TeX - LaTeX Asked on November 1, 2021
The MWE, test.tex
:
documentclass{article}
begin{filecontents*}{A$&1file.tex}
Hello, World!
end{filecontents*}
begin{document}
input{A$&1file.tex}
end{document}
The MWE does not contain calls to write18
.
The filename A$&1file.tex
is fine with many file-systems.
Nevertheless compiling the MWE delivers the following warning twice (once when processing the filecontents*
-environment; once when processing the input
-command) to the console but not to the .log-file:
warning: kpathsea: A$&1file.tex: Unrecognized variable construct `$&'.
Why?
Is/where is this behavior documented? Is this a bug?
(Besides these warnings everything seems to compile fine.
The resulting .pdf-file and auxiliary files look as expected by me.)
Here is the output to console:
$ pdflatex -shell-escape test.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2019/dev/Debian) (preloaded format=pdflatex)
write18 enabled.
entering extended mode
(./test.tex
LaTeX2e <2018-12-01>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo))warning: kpathsea: A$&1file.tex: Unrecognized variable construct `$&'.
LaTeX Warning: Writing file `./A$&1file.tex'.
(./test.aux)warning: kpathsea: A$&1file.tex: Unrecognized variable construct `$&'.
warning: kpathsea: A$&1file.tex: Unrecognized variable construct `$&'.
(./A$&1file.tex) [1{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.
map}] (./test.aux) )</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/
cm/cmr10.pfb>
Output written on test.pdf (1 page, 12015 bytes).
Transcript written on test.log.
Here is the .log-file:
This is pdfTeX, Version 3.14159265-2.6-1.40.19 (TeX Live 2019/dev/Debian) (preloaded format=pdflatex 2020.2.13) 21 JUL 2020 00:35
entering extended mode
write18 enabled.
%&-line parsing enabled.
**test.tex
(./test.tex
LaTeX2e <2018-12-01>
(/usr/share/texlive/texmf-dist/tex/latex/base/article.cls
Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size10.clo
File: size10.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
)
c@part=count80
c@section=count81
c@subsection=count82
c@subsubsection=count83
c@paragraph=count84
c@subparagraph=count85
c@figure=count86
c@table=count87
abovecaptionskip=skip41
belowcaptionskip=skip42
bibindent=dimen102
)
LaTeX Warning: Writing file `./A$&1file.tex'.
openout15 = `A$&1file.tex'.
(./test.aux)
openout1 = `test.aux'.
LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 7.
LaTeX Font Info: ... okay on input line 7.
(./A$&1file.tex) [1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] (./test.aux) )
Here is how much of TeX's memory you used:
204 strings out of 494412
2170 string characters out of 6172415
55258 words of memory out of 5000000
3979 multiletter control sequences out of 15000+600000
3640 words of font info for 14 fonts, out of 8000000 for 9000
59 hyphenation exceptions out of 8191
23i,4n,17p,112b,314s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/
texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb>
Output written on test.pdf (1 page, 12015 bytes).
PDF statistics:
12 PDF objects out of 1000 (max. 8388607)
7 compressed objects within 1 object stream
0 named destinations out of 1000 (max. 500000)
1 words of extra memory for PDF output out of 10000 (max. 10000000)
It seems you get this from openin
message{in }
immediateopenin5="A$&1file.tex"
message{out }
immediateopenout5="A$&1file.tex"
immediatewrite5{zzz}
immediatecloseout5
bye
produces
in warning: kpathsea: A$&1file.tex: Unrecognized variable construct `$&'.
out )
latex does the openin to check for ifeof
as part of its checks on over-writing the file.
Worth reporting to the texk list I think.
Answered by David Carlisle on November 1, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP