For some mystifying reason, compiling my AASTeX v6.1 manuscript fails on my Ubuntu 16.10 machine, but works perfectly fine on my macOS Sierra setup (which uses TeXShop and MacTex). I've found a solution I only vaguely understand, and I'm hoping for some insight. I suspect this may impact a subset of AASTeX users.
The Issue
When compiling (either via latex manuscript.tex
or pdflatex manuscript.tex
) on my Ubuntu machine, I receive the following error:
pdflatex: Not writing to .bib (openout_any = A).
! I can't write on file `.bib'.
<to be read again>
\relax
l.53 \begin{document}
(Press Enter to retry, or Control-D to exit; default file extension is `.tex')
Please type another output file name:
I can then give any filename (e.g. junk
), the compilation will continue (successfully), and a blank junk.tex
will be written alongside the expected output. Note that this issue does not arise when compiling via TeXShop (using either latex or pdflatex) on my Mac.
The Solution
While I understand that the error is related to LaTeX's default (p)aranoid
setting, I don't really understand exactly why this works (because the issue only arises on my Ubuntu machine). I can only thank this Japanese blog post for the help. I'm clearly not the only one with this issue!
The quick way : Explicitly set openout_any=a pdflatex manuscript.tex
before you compile. This solves the issue.
It appears that the root cause lies in lines 6322 and 6323 of aastex61.cls
. Commenting them out will also solve the issue, and negate the need to explicitly set openout_any=a
before you compile. That is,
%% get rid of \jobname Notes being sent to .aux file:
\let\bibdata@app\relax
\def\pre@bibdata{}
Commenting those two lines, i.e.,
%% get rid of \jobname Notes being sent to .aux file:
%\let\bibdata@app\relax
%\def\pre@bibdata{}
solves the issue.