{auxiliary-files} is about files generated and read by LaTeX and packages which hold auxiliary information about the document.

learn more… | top users | synonyms (2)

56
votes
4answers
3k views

Which auxiliary LaTeX files should be ignored by Version Control Software?

I'm about to start version controlling my LaTeX documents with Git but I haven't used either very much. I would like to version only the files needed to compile the document but I use different OS's ...
53
votes
13answers
14k views

Prevent pdflatex from writing a bunch of files

If I create just a basic hello.tex file an compile it using pdflatex hello.tex The pdflatex program is creating a plethora of file which is a little annoying. Currently it writes all those files ...
41
votes
2answers
4k views

What is the basic mechanism for writing something to an aux file?

I am interested in the basic mechanism behind writing stuff to the .aux file. (Or some other auxiliary file). Let's say I want to write myself a basic package for making notes on my files. (I know ...
41
votes
1answer
791 views

On the basics of writing to & reading from auxiliary files (.aux, .toc, etc.)

Some actions (such as generating the Table of Contents) require two passes of the TeX compiler: during the first pass, some data get written to an auxiliary file, only to be retrieved during the ...
36
votes
8answers
6k views

Need *.aux file in separate folder

When compiling with pdflatex we need the *.aux files in a separate folder.
35
votes
11answers
11k views

Deleting external/auxiliary files?

Is there a way to make TeX delete files? In my document a lot of auxiliary files are created and it would be wonderful to have them removed after their content has been used.
34
votes
7answers
6k views

File extensions of LaTeX-related files

In addition to the .tex and .dvi or .pdf files, TeX/LaTeX/ConTeXt produces and uses lots of other files. What do they do? Which ones are used to create the document and which ones are automatically ...
29
votes
7answers
1k views

How do you store all your TeX files long-term?

Reading through As an expert, can you always use TeX for (nearly) any kind of document?, it seems most people use TeX for almost all their documents. My question is this: how do you store these ...
23
votes
1answer
156 views

Why is the .toc file created at end document?

To create a Table of Contents (for example), LaTeX2e follows the process: Run 1 .aux file is created from scratch after \begin{document}. When processing section headers, write \addtocontents to ...
21
votes
5answers
2k views

‘Bundle’ TeX output in a directory

(My personal interest in this question is mainly for OS X but solutions/approaches for other operating systems are also appreciated.) What I see as a main distraction with using TeX/LateX is that it ...
19
votes
7answers
2k views

Is there a way to configure pdflatex to make all but the .tex and .pdf files hidden files?

I have asked a previous question about how to manage all the files generated when my LaTeX files are compiled but the approach in the answer I accepted is still unsatisfactory for the many small ...
18
votes
2answers
4k views

Diagram / Infographic of TeX & friends?

So, I recently delved into LaTeX for a project at work. But I’m come from the XML+XSL world, and some of LaTeX’s design is kind of difficult for me to grok. (I’m not interested in debating the ...
16
votes
2answers
374 views

Why characters UTF-8 encoded are ISO-8859-1 encoded when written in an external file

For an UTF-8 encoded file as follows: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} % \newwrite\outtmp \immediate\openout\outtmp=out.tmp % \begin{document} ...
16
votes
1answer
262 views

When is the aux file read and written?

I'd like to know when the aux file is read. I know it happens after the preamble, but does it come before or after the \AtBeginDocument hook? I'd like to know when the aux file (or any other helper ...
15
votes
3answers
1k views

Writing { and } to a file with LaTeX

How can the special characters { and } be written literally to an external file in LaTeX, without being balanced? Obviously the following does not work: \immediate\write\my@outfile{{} ...
15
votes
2answers
210 views

Write content of box to a file

I would like to take the contents of a box generated with \begin{lrbox} ... \end{lrbox} and write it to a file. The use case is a question and answer environment, where the answer should be collected ...
15
votes
2answers
2k views

What is the variable that contains the source file name?

I am writing a package that saves information to an external file. I would like to name that file according to the source one; something like foo.tex -> foo.bar But I cannot find any variable that ...
15
votes
5answers
1k views

Best script for automatically copying references from a centralised bib file based on aux file

In a previous question I asked about best practices when managing multiple bibtex files. One strategy involves having a single centralised bibtex file. Then, citations in a particular article are ...
14
votes
4answers
2k views

Use MiKTeX option through latexmk

When I use MiKTeX normally, I call this: pdflatex --aux-directory="C:\Users\doncherry\Documents\LaTeX\AUXI_global" foo.tex For latexmk outputting pdf (via pdfLaTeX) with continuous previewing, my ...
14
votes
4answers
668 views

File copy without expansion

What is the command for file copy? I want to copy the contents of one file into another without any command expansion. The operative system would use copy source target I tried reading the contents ...
14
votes
2answers
146 views

writing to \jobname.aux using LaTeX3

In LaTeX2e, one can write to the standard auxiliary file via the \@auxout file handle. Are there dedicated LaTeX3 functions (planned) that facilitate writing to \jobname.aux or is there an equivalent ...
13
votes
3answers
426 views

Need help creating a custom aux file read/write routine to suit my needs

I require two new commands, \createreference and \citereference, to work with. They should work as shown in the following examples: \createreference{john}{John Q. Citizen} should write the text “John ...
13
votes
3answers
855 views

How can I open a file in “append” mode?

Could not find anything in the TeXBook, but this could be just me. I guess it is always possible to open the file for reading, copy its content to another file, and then continue writing to that ...
13
votes
1answer
117 views

The LaTeX runs (with varioref) never settle down to a stable final state

This is something which has happened for real in a document where I am using varioref. The LaTeX runs never end, a text chunk keeps on being moved back and forth accross a page break (naturally with ...
12
votes
4answers
1k views

Making efficient use of \writes

I'm currently trying to compile my thesis using LaTeX and have run up against the old ! No room for a new \write . problem. After some googling it seems the only way to actually resolve this problem ...
12
votes
1answer
244 views

How to execute a command only on the next run?

Let's say I have a command \foo that I want to execute only on the next run of TeX. How do I create a command \onceFoo that does this? (It is also permitted to execute \foo if the aux file has been ...
12
votes
1answer
512 views

Macro saving a value for next run

I need a macro, which saves a string (like the content of a label) to the aux file. During the next run, there should be a macro checking, if that string has been set in the last run or not. My ...
12
votes
1answer
438 views

Egad! What are all those files?

Ok, let's write a document! $ vim thesis.tex i[input a whole bunch of latex and text]<Esc>ZZ $ pdflatex thesis $ ls thesis.acn thesis.alg thesis.bbl thesis.dvi thesis.glo thesis.ilg ...
11
votes
2answers
5k views

How to use the aux file

This is not a terribly well-formed question, sorry. I don't really know what information is in the .aux file, or how I can make use of it in other (related) documents. What's the best reference for ...
11
votes
2answers
166 views

Inserting statistics of a resulting PDF file back into the document on the next run

This is an example of what I want to do: After a run of pdflatex, calculate and store (into an auxiliary file?) the size of the resulting PDF file, as obtained from the Terminal command "du -h ...
11
votes
1answer
181 views

arara: problem with spaces in the name of .tex files?

I know that there is a problem with spaces in the name of .bib files. Nonetheless, the following MWE compiles perfectly fine if one does the normal latex -> bibtex -> latex -> latex compilation ...
11
votes
2answers
76 views

How can I insert an entire input stream (up to EOF) into an output stream?

I am trying to automate the generation of a text version of my resume. I'd like to incorporate a note to any potential human readers (most plain text resumes are, to my understanding, simply scanned ...
11
votes
1answer
1k views

\addtocontents at end of document not getting written to .toc file?

I'm trying to find a more elegant solution for ToC, LoT, and LoF formatting for my university's thesis/dissertation style. The short form of their requirements means I need one page style for the ...
11
votes
1answer
126 views

Save an etoolbox list to a file … and read it after

I have a problem. I would like : to construct an etoolbox list to save this list in a temp file to read this list from this file at the next run to use this file. For any reason, I can't see the ...
10
votes
2answers
1k views

“pgf Error: No shape named i-0 is known”, but only upon 2nd run

Update 2012-01-31: This seems to be a version (and/or OS specific) problem. It breaks on my latest TeXLive2011 on a Mac, but I can get it to run on my PC version of MiKTeX 2.8, and @MarcvanDongen ...
10
votes
1answer
3k views

Print bibliography only when references are cited

The root question here is how can one print a bibliography only when there are sources to be cited? BACKGROUND I'm working on expanding a small package (originally by Jackson Taylor and Becca Funke) ...
9
votes
3answers
278 views

How can I write % into a file?

How can I write % into an auxiliary file? % will not work, because LaTeX thinks that I start a comment with it (in the main file, not in the auxiliary file!), and \% will write \% into the file. How ...
9
votes
1answer
310 views

Is there any advantage in keeping track of aux bbl blg files in a git repository

As question says, I am just interested to know the pros and cons of keeping track of auxiliary files of a LaTeX project in every commit of git repository.
9
votes
1answer
252 views

Put projects into OS X bundles

I’m still looking for the solution to a question asked in 2010: Under Mac OS X, but staying compatible with other operating systems, I want to hide the mechanics. Please note: I do not want to delete ...
8
votes
1answer
109 views

Is there any side effect in using \immediate in the definition of \protected@write?

In latex.ltx, \protected@write is defined as: \long\def \protected@write#1#2#3{% \begingroup \let\thepage\relax #2% \let\protect\@unexpandable@protect ...
8
votes
1answer
436 views

What is the use of the command \IeC?

It is produced in streams by newfile when I use special characters.
8
votes
1answer
3k views

*.aux file not generated

I am using \documentclass[margin]{res}. On running latex/xelatex, *.aux file is not generated. Because of this the references in the document are not being cited. I am using biblatex for citations. ...
8
votes
4answers
935 views

How to write a command to file

I am trying to write to a auxillary file using \newwrite\tempfile [...] \immediate\openout\tempfile=list.tex \immediate\write\tempfile{Text to write to file} \immediate\closeout\tempfile It works ...
8
votes
1answer
14k views

Package babel Error: You haven't loaded the option english yet [duplicate]

Sorry for the less-than-descriptive title, but I'm new to LaTeX and have no idea how to debug or make sense of errors. I've modified an invoice template from here to suit my needs, but I'm getting ...
7
votes
2answers
137 views

Writing to a file - robust commands mess the text file written

I'm writing some lines to a file but I've found that robust commands damages the written file. In this context \plural can be a fragile command but in the real application it must be robust. MWE: ...
7
votes
3answers
6k views

Placing Intermediate and Output Files in Another Folder

I am trying to figure out a way to cleanly separate the TEX files from all of the intermediate and output files. Various approaches I've tried, including the one described by ‘Bundle’ TeX output in a ...
7
votes
1answer
47 views

Why does \iow_shipout: introduce typeset whitespace (where \iow_now: does not)?

For my resume, I have an environment that lays out information in two minipages—one for position/education data, one for the environment contents. The class I wrote also produces plain text ...
7
votes
1answer
196 views

debug No room for a new \write problem

I have a template with an extensive documentation. (See TemplateDocumentation.pdf). It compiled several month ago. Now with updated packages it does not compile anymore because of the famous No room ...
7
votes
1answer
213 views

Strange behaviour of \addcontentsline [closed]

Using an up-to-date TeXlive 2012 (with all updates) this small document will produce a strange AUX file: \documentclass{book} \usepackage[list=on]{subcaption} % Suppress writing the definition of ...
7
votes
1answer
275 views

How to create fancy table of equations (to be typeset before the equations are rendered in text)

Is there a way to create a command which adds to a table or otherwise typesets in a place specified by the user? Example of what I'm after \documentclass{article} \begin{document} \tableofequations ...