2
votes
2answers
92 views

Read part and page count from auxiliary file

My main document is included into another that rearranges and adds crop marks to it. For universalizing my script I need to extract the page and part count out of the .toc- or .aux-file. These are ...
11
votes
2answers
83 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 ...
2
votes
0answers
210 views

.aux file not found or empty while cross-referencing between files [closed]

I have an issue similar to this one. In oppose to that thread, I use xelatex. Don't know, though, if this is the issue or not. I have two files. In the first one (Characteristics.tex) I have: % ...
4
votes
1answer
336 views

Read in number of citations from aux file

In the aux file produced by latex, I see the following line: \newlabel{LastBibItem}{{30}{10}{}{}{}} How can I pull the 30 (the total number of citations) into a counter in the preamble of another ...
2
votes
1answer
887 views

How to compile LaTeX out-of-source while using bibtex?

I often use the out-of-source compilation on my LaTeX code to separate the generated files from the source files, thus I can conveniently commit my code to the repository. The command is like this: ...
2
votes
1answer
326 views

.bat file execution from a .tex document during compilation

Is there a way to execute a .bat file directly from a latex document when I compile that document? I would something like this: \documentclass{article} \begin{document} \chapter{test} bla bla bla ...
5
votes
1answer
277 views

\write and \\ command

Why I get some errors with the code below, and how can I fix that behaviour? \documentclass{article} \begin{document} \newwrite\indexist \immediate\openout\indexist=classic.ist ...
13
votes
3answers
447 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 ...
36
votes
11answers
12k 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.
13
votes
3answers
902 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 ...
14
votes
4answers
683 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 ...
16
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 ...