0

Upon the risk of being down voted as no MWE is present, but at the moment just trying to get some pointers.

I updated my MiKTeX installation to the newest available version at the moment (MiKTeX-pdfTeX 4.1 (MiKTeX 20.12)) and now I get an error while building my documentation:

Appendix D.
(../html/examples/group/latex/refman_doc.tex (../html/examples/group/latex//gro
up__group1.tex) [243]
! I can't write on file `../html/examples/group/latex//group__group2.aux'.
\@include ...mmediate \openout \@partaux "#1.aux"
                                                  \immediate \write \@partau...
l.3 \include{group__group2}

Please type another output file name
! Emergency stop.
\@include ...mmediate \openout \@partaux "#1.aux"
                                                  \immediate \write \@partau...
l.3 \include{group__group2}

*** (job aborted, file error in nonstop mode)

some small background:

  • Started normally with pdflatex doxygen_manual.tex
  • in here is the statement: \subinputfrom{../html/examples/group/latex/}{refman_doc}
  • and in this file again: \include{group__group2}
  • as far as I know the disk is not full and the protections of the files and directories are OK as well

It looks like that now an attempt is made to write to the directory ../html/examples/group/latex/ whilst in the past the file was written to the current directory. I already tried -shell-escape and -enable-write18 (as well as --shell-escape and --enable-write18) but to no avail.

  • Any known changes in respect to writing the aux file?
  • Any hints

edit I asked another question (Problem writing aux file in relative referenced directory) with the details and MWE but that was closed with the reason that it was a duplicate of this one ...

So I'm adding the information now here: 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 there a solution for this problem?

edit 2

I did some further test. I replaced the \subinputfrom with an \input statement, although this worked for the limited example above it didn't work for my larger codebase as here (again just a limited view) we have in the refman_doc.tex

{Module Documentation}
\input{group__group1}
\include{group__group2}

with the contents of group_group1.tex similar to group__group2.tex and the file is also parallel to group__group2.tex. This results in the error:

(manual.out) (manual.out) (../group/refman_doc.tex

! LaTeX Error: File `group__group1.tex' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: tex)

Enter file name:
! Emergency stop.
<read *>

l.2 \input{group__group1}

!  ==> Fatal error occurred, no output PDF file produced!
7
  • why are there two backslashes in the path: latex//group__group2.aux? And what is the current directory? (writing to parent directories is not allowed). Dec 15, 2020 at 14:04
  • As far as I can tell the second slash is added automatically, In an old document I found that \subinputform required it, though even removing it didn't help (so \subinputfrom{../html/examples/group/latex}{refman_doc})
    – albert
    Dec 15, 2020 at 14:10
  • See my comment with the closed question, I had the same experience. The pdfversion: pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020/Cygwin) and LaTeX2e <2020-02-02> patch level 5
    – albert
    Dec 16, 2020 at 17:17
  • OK I can reproduce this, it is a change between tl 2019 and tl 2020 Dec 16, 2020 at 17:17
  • @albert no I made an error it does not work in cygwin with an up to date system (ie October not Feb release) Dec 16, 2020 at 17:18

1 Answer 1

3

I don't have miktex so this answer is checked with texlive (cygwin)

The old version wrote the .aux file for the \include file in the current directory (this does not happen normally appears to have been an undocumented feature of import) That happened to make your example work but if for example you included files of the same name in different folders the .aux files would over-write each other leading to very strange behaviour.

With current latex the normal \include behaviour has been restored (I have not traced exactly where the changes happened) and so the .aux is written to ../group except that writing outside the current folder is prevented by default.

To process the file unchanged you can do

openout_any=a pdflatex manual.tex

which will allow writing to parent directories without changing the default. (the exact syntax there is a bash commandline other systems may differ)

Or as you do not appear to be using \includeonly use \input rather than \include

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .