2
votes
2answers
94 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 ...
13
votes
1answer
267 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 ...
1
vote
0answers
42 views

Bibtex-like macros organising software

From what I gather (I don't use them, and have never actually managed to get it to work - though this is not my issue), bibtex/biber uses a database of references, alongside an ancillary file created ...
7
votes
2answers
142 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: ...
4
votes
1answer
185 views

To-do-notes in separate TeX File, but without \listoftodo in main doc

I am using the todonotes package and have three requirements, the first two which the MWE already does: Obtain a list of todo notes in a separate auxiliary file. This can easily be obtained via the ...
4
votes
2answers
354 views

Write a \setcounter command to a file

I try to write a setcounter command to a file (using the newfile package) by something like the following \addtostream{mystream}{\protect\setcounter{mycounter}{\myvariable}} However, since the ...
1
vote
1answer
173 views

Custom LaTeX commands involving auxiliary files

Can someone with low-level LaTeX knowledge please help me create new customized commands? The commands should be named \storeitem and \typesetitems, and they should work like this: \typesetitems ...
12
votes
1answer
557 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 ...