(This question may make sense only in Linux.)
I have the following simple file called .main.tex. Note that it is a "hidden" file because of its name.
\documentclass[]{article}
\begin{document}
sample
\end{document}
I cannot compile it the usual way pdflatex .main.tex because I get this error:
$ pdflatex .interpolation.tex
This is pdfTeX, Version 3.1415926-2.6-1.40.14 (TeX Live 2014/dev)
restricted \write18 enabled.
entering extended mode
(./.main.tex
...
No file .main.aux.
pdflatex: Not writing to .main.aux (openout_any = p).
! I can't write on file `.main.aux'.
\document ...ate \openout \@mainaux \jobname .aux
\immediate \write \@mainau...
l.4 \begin{document}
(Press Enter to retry, or Control-D to exit; default file extension is `.tex')
Please type another output file name:
Of course if the filename were main.tex it would work.
Is there a workaround to compile dot files directly?
Or is this another limitation of how TeX detects file extensions (confused by the dots)?
Note that other related but different questions where asked before, this is however different:
(windows) TeX engine can't write on hidden aux files in Windows
(cleanup related) Is there a way to configure pdflatex to make all but the .tex and .pdf files hidden files?
(limitations of extension handling) How to avoid automatic .tex extension in filenames?
openout_any = ain my/usr/share/texlive/texmf-dist/web2c/texmf.cnf(line 598) solved it. This also explains why I was never able to compile from a different directory! (It is the first time I see that creating dot files is a security problem.) – alfC Aug 30 '14 at 08:48agenerally then copying a malicious MWE from a tex web site and running it could trash your system files like .profile .login etc... unless you are totally sure what the macros are doing – David Carlisle Aug 30 '14 at 08:55/usr/local/texlive/2014/texmf.cnfrather than intexmf-dist/web2c/texmf.cnf? That is, according to the comments at the top of the former file, customisations should not me made in the latter but only the former. – cfr Apr 19 '16 at 21:04