Skip to content

About AutoTeX

Andrew Head edited this page Feb 15, 2020 · 2 revisions

The following notes are what we have learned about the AutoTeX tool that arXiv uses to compile PDFs from TeX files.

Perhaps most important note to make about AutoTeX is that sometimes it edits the TeX it's trying to compile, and sometimes it modifies the contents of the directory it's trying to compile a TeX file in.

Testing out AutoTeX

You can test-run AutoTeX to compile TeX in a directory with the following command:

perl \
  perl/compile_tex.pl \
  <path-to-directory> \
  <path-to-texlive> \
  <path-to-texlive-bin>

Where <path-to-texlive> and <path-to-texlive-bin> are the same as the values for texlive_path and texlive_bin_path you defined in the config.ini. See the README for the data-processing project for more details.

Making non-hyperlinked documents hyperlinked

AutoTeX instruments TeX files to add hyperlink functionality. It does this in the HyperTeX.pm file. As part of this process, it checks to see if hyperref is already included in a file and, if not, imports it.

It seems that AutoTeX adds hyperref only for certain types of files, and not all files. For instance, for this file...

\documentclass{article}

\begin{document}
Hi there.
\end{document}

AutoTeX will add the line \RequirePackage[hyperindex]{hyperref} right above begin{document}.

However, for the plain TeX (non-LaTeX) file...

Hi there
\end

AutoTeX will leave this file alone, not adding any hyperref package.

Clone this wiki locally