fchauvel / flap

Flattening LaTeX projects
https://fchauvel.github.io/flap
GNU General Public License v3.0
17 stars 2 forks source link

Local packages in subdirectories are not copied #22

Closed fchauvel closed 7 years ago

fchauvel commented 7 years ago

According to @gro1729, the traversal of style files that are located in subdirectories seems broken (see Issue #21).

fchauvel commented 7 years ago

A couple of questions:

gro1729 commented 7 years ago

Yes, a log-file is generated but it is empty. I fear it's again a problem with my kind of insertion of pictures.

And by the way:

Calling "flap -v" results in:

Usage: flap [OPTIONS] TEX_FILE OUTPUT

Error: Missing argument "tex_file".

Am 10.01.2017 14:53, schrieb Franck Chauvel:

A couple of questions:

* Do you think it is the |\usepackage{input/onimage.sty}| that fails?
* Did FLaP generate a log file (named |flap.log|)? Is it exists,
  could you paste it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fchauvel/flap/issues/22#issuecomment-271580644, or mute the thread https://github.com/notifications/unsubscribe-auth/AEjJq3aDhzw7LzH4ED-ArhkYOWiqtx8Uks5rQ412gaJpZM4LfbSW.

fchauvel commented 7 years ago

The "Error: Missing argument" is normal, as we still must specify the root TeX file and the output directory. Could you try with: flap -v 20161208.tex flattened and let me know the output (if any)?

gro1729 commented 7 years ago

Yes, it's true. My style-file '|onimage.sty|' is correctly copied, but none of my included pictures ist found.

Am 10.01.2017 14:53, schrieb Franck Chauvel:

A couple of questions:

* Do you think it is the |\usepackage{input/onimage.sty}| that fails?
* Did FLaP generate a log file (named |flap.log|)? Is it exists,
  could you paste it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fchauvel/flap/issues/22#issuecomment-271580644, or mute the thread https://github.com/notifications/unsubscribe-auth/AEjJq3aDhzw7LzH4ED-ArhkYOWiqtx8Uks5rQ412gaJpZM4LfbSW.

gro1729 commented 7 years ago

Sorry!, my fault. "-v" often stands for "version" and not for "verbose" Pretty good! That's much better: And my pictures aren't found any longer

FLaP 0.5.0

File Line Column LaTeX Command


20161208-Zeichnung.tex 14 1 \input{input/000_packages}

input/000_packages.tex 44 1 \usepackage[colorinlistoftodos,p... todonotes.sty 472 1 \endinput\n%%\n%% End of file t... input/000_packages.tex 84 1 \usepackage{input/onimage} onimage.sty 130 1 \endinput\n%%\n%% End of fileo... 20161208-Zeichnung.tex 15 1 \input{input/010_layout} 20161208-Zeichnung.tex 16 1 \input{input/020_customize} 20161208-Zeichnung.tex 26 4 \input{input/011_layout} 20161208-Zeichnung.tex 32 10 \input{20161208-Grotefeld} 20161208-Grotefeld.tex 167 4 \includegraphics[width=0.275\tex...

Am 10.01.2017 15:21, schrieb Franck Chauvel:

The "Error: Missing argument" is normal, as we still must specify the root TeX file and the output directory. Could you try with: |flap -v 20161208.tex flattened| and let me know the output (if any)?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fchauvel/flap/issues/22#issuecomment-271587204, or mute the thread https://github.com/notifications/unsubscribe-auth/AEjJq_DL-XormyjL5tYjUereOW0WrY0cks5rQ5PwgaJpZM4LfbSW.

gro1729 commented 7 years ago

Great, you got it:

\includegraphics[width=0.275\textwidth,interpolate]{../VeryLongPathName/Picture}

works, but

\includegraphics[width=0.275\textwidth,interpolate]{% ../VeryLongPathName//Pyrit}

does not!

Am 10.01.2017 15:21, schrieb Franck Chauvel:

The "Error: Missing argument" is normal, as we still must specify the root TeX file and the output directory. Could you try with: |flap -v 20161208.tex flattened| and let me know the output (if any)?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fchauvel/flap/issues/22#issuecomment-271587204, or mute the thread https://github.com/notifications/unsubscribe-auth/AEjJq_DL-XormyjL5tYjUereOW0WrY0cks5rQ5PwgaJpZM4LfbSW.

gro1729 commented 7 years ago

One further remark regarding my last email.

I have in mind that my typical kind of include-syntax could be implemented in FLaP, too.

fchauvel commented 7 years ago

I have reproduced this issue and I will look at it later this week.

Meanwhile, a workaround is to move the comment symbol outside the group containing the path, as follows:

\includegraphics[width=0.275\textwidth,interpolate]%
{ ../VeryLongPathName//Pyrit}

This is tested in v0.5.0 (cf. the associated test case).

fchauvel commented 7 years ago

Hopefully, Commit 10d2347 fixes this issue. Could you try it (i.e., installing again from the sources) and let me know the result?

gro1729 commented 7 years ago

Hello, much better!

but I have some further issues:

1) In one of my style files I set

\setkomavar{fromlogo}{\includegraphics[width=3cm]{images/Logo}}

In the resulting "merged.tex" I find the same text. The "Logo.png"-File ist not copied.

2) My style file "onimage.sty" is copied into the "merged"-Root-Directory, but in "merged.tex" I still find the line \usepackage{input/onimage}

3) I have to use Fonts of my company. Thus I have to compile with xetex or luatex. A Font-Declaration is defined by: \setmainfont[ Path = ../Fonts/Fontin/ttf/, Extension = .ttf, Ligatures = TeX, BoldFont = Fontin-Bold, ItalicFont = Fontin-Italic, SmallCapsFont = Fontin-SmallCaps ]{Fontin-Regular} None of the Fonts is copied into the "merged"-Directory

4) I use one of the KOMA-Script packages, where you can define external declarations of style information in files with extension ".lco". I do that in the file "input/sections.lco" \documentclass[

5) I use relative pathnames like: "../VeryLongPathName/Pyrit". \includegraphics[width=0.275\textwidth,interpolate]{% .._VeryLongPathName_Pyrit} On Linux FLaP generates a local file ".._VeryLongPathName_Pyrit" in the merged-directory. The filename is valid for Linux but not for Windows. "lualatex" also has trouble with the compilation.

6) In combination with the package "wrapfigure" I had to define some variables \newcounter{figure} \makeatletter \def\ext@figure{} \makeatother \newcounter{table} \makeatletter \def\ext@table{} \makeatother FLaP translates this to \newcounter{figure} \makeatletter

    \makeatother
    \newcounter{table}
    \makeatletter

    \makeatother

in the file "merged.tex"

7) Besides "includegraphics" for instance I use \adjincludegraphics[valign=t,width=.9\textwidth,interpolate]{% ../VeryLongPathName/Pyrit} The referenced image-file is not converted. "merged.tex" contains the same text as the original file.

Regards

Am 11.01.2017 11:11, schrieb Franck Chauvel:

Hopefully, Commit 10d2347 https://github.com/fchauvel/flap/commit/10d2347a29884fb47d15c603e547fc3cb3f04ceb fixes this issue. Could you try it (i.e., installing again from the sources https://github.com/fchauvel/flap/archive/master.zip) and let me know the result?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fchauvel/flap/issues/22#issuecomment-271829406, or mute the thread https://github.com/notifications/unsubscribe-auth/AEjJq-xCLgfRvn_gmeHPGHlciJ43wPlkks5rRKq_gaJpZM4LfbSW.

fchauvel commented 7 years ago

Thanks a lot for the feedback. As those are new problems, I close this issue and created a separate one for each.