0

In the question Problem writing aux file asked about the problems I encountered due to an update of my MiKTeX distribution, but didn't take the time (at that moment) to create a MWE, so it didn't attract much response.

I have the directory structure:

  • main
    • manual.tex
  • group
    • group__group2.tex
    • refman_doc.tex

manual.tex

\documentclass{book}
\usepackage{import}
\usepackage{hyperref}

\begin{document}
\subinputfrom{../group}{refman_doc}
\end{document}

group__group2.tex

\hypertarget{group__group2}{}{The Second Group}

refman_doc.tex

{Module Documentation}
\include{group__group2}

When running in the directory main the command pdflatex manual.tex I get the error:

...
(../group/../group/refman_doc.tex [1{C:/Users/User/AppData/Local/MiKTeX/2.9/pdf
tex/config/pdftex.map}]
! I can't write on file `../group//group__group2.aux'.
\@include ...mmediate \openout \@partaux "#1.aux"
                                                  \immediate \write \@partau...
l.2 \include{group__group2}

Please type another output file name:

but in a non interactive mode (the usual way to run. i.e. with \batchmode) one doesn't get an opportunity to specify the file and the generation crashes.

As written in the original question adding options like -shell-escape and / or -enable-write18 didn't help.

Is theer a solution for this problem?

10
  • as I already wrote in a comment to your previous question: you can't write a file in a parent directory. For security reason you can only write files in the current directory and its subfolders. If your current directory is main you are going up into the parent and then down into another folder, and this will not work with \include which tries to create an aux-file there. Use \input if you want such a layout. Dec 16, 2020 at 15:25
  • Strange that this did work till my last update (Yesterday) and before that the update was a couple of months ago. Also a bit strange that the options -shell-escape and / or -enable-write18 have no effect. I'm not sure that I can use \input here due to the fact that the the included file again includes (independent automatically generated) files from that same directory.
    – albert
    Dec 16, 2020 at 15:41
  • You can/should edit the existing question to add clarifications rather than open a new duplicate question. Dec 16, 2020 at 15:57
  • shell-escape and write18 would not affect file permissions, they are about running commands. Dec 16, 2020 at 15:59
  • You can \input a file that uses \include but you can not \include one as includes can not be nested. Dec 16, 2020 at 16:00

0

Browse other questions tagged .