gsalzer / subfiles

class and package for multi-file projects in LaTeX
LaTeX Project Public License v1.3c
25 stars 1 forks source link

Misbehaviour when subfiles is used with standalone #23

Open markellos918 opened 3 years ago

markellos918 commented 3 years ago

Inputting a tex file in a subfile when the standalone package is loaded causes the appearance in the pdf (of both the subfile and the master file) of a text string containing excerpts of the path. This is related to the presence of spaces in the folders names.

Files are organised as follows:

master.tex         sub folder_space/input.tex         subfolder_nospace/input.tex         subfiles/space.tex         subfiles/nospace.tex

master.tex:


\documentclass{book}
\usepackage{subfiles}
\usepackage{standalone}
\usepackage{lipsum,}

\begin{document}

\subsection*{The input file is in a directory containing a space in the name but is not called form within a subfile}
\input{"sub folder_space"/input}
\subfile{subfiles/space}
\subfile{subfiles/nospace}

\end{document}

Both input files: \lipsum[1]

subfiles/space.tex:


\documentclass[../master]{subfiles}
\begin{document}

\subsection*{The input file is in a directory containing a space in the name}
\input{../"sub folder_space"/input}
\end{document}

\end{document}

subfiles/nospace.tex


\documentclass[../master]{subfiles}
\begin{document}

\subsection*{The input file is in a directory NOT containing a space in the name}
\input{../"subfolder_nospace"/input}
\end{document}

\end{document}

In the pdf this is the string that shows up: folder ̇space/input.texfolder ̇space/input.tex. Please notice the high dots. The issue only occurs with subfiles >1.6 (in my test 2.2).

Lorenzo

gsalzer commented 3 years ago

Thanks for the report. I will investigate the issue.

gsalzer commented 3 years ago

I have narrowed down the issue to an incompatibility between the package import.sty (used by subfiles) and the standalone package. I have reported the issue to the bug tracker of standalone.

markellos918 commented 3 years ago

Thanks for reporting the issue. What I think is strange is that the bug only showed up with packages updates that were released in the last six months (after July 2020 let’s say). Neither import.sty nor standalone were updated in that time frame.

gsalzer commented 3 years ago

standalone loads several other packages, and some of them changed recently, like filehook.sty 2020/09/29 v0.8a (which might be the key to the problem). Also the LaTeX format changed: LaTeX2e <2020-10-01> patch level 3 (which is the reason why all the packages, including subfiles, had to update).

markellos918 commented 3 years ago

Downgrading filehook to v0.7a does indeed fix the issue.