34
votes
3answers
753 views

What does the 'etex' package do, exactly?

I was creating a rather large LaTeX project, so I had to use many packages. This gave me an error No room for a new \dimen \newdimen \MPscratchDim while my editor(Kile) opened the file ...
16
votes
2answers
289 views

Use of \everyeof and \endlinechar with \scantokens

The e-TeX \scantokens primitive allows retokenization of input. However, it is almost always used in a group where \everyeof and \endlinechar are set (see for example Can I convert a string to catcode ...
7
votes
1answer
207 views

Weird output of \tracingassigns with \font

Setting \tracingassigns to a positive value causes eTeX to write to the log file (and console when \tracingonline is positive) all assignments it performs. Thus, I would expect the following code to ...
9
votes
1answer
1k views

Expansion in \numexpr…\relax versus \pdfstrcmp

The \numexpr...\relax construction in eTeX allows to evaluate numerical expressions, and it expands tokens fully as it goes. The \pdfstrcmp{...}{...} construction in pdfTeX lets us compare two lists ...
8
votes
2answers
279 views

How do I redefine a macro when any group begins, then again when that group ends?

Okay, I know this is a pretty tall order, but I'm working on a package based on my answer here, and I'm including Ahmed Musa's environment which redefines \par. The problems are: Some environments ...
7
votes
2answers
651 views

Detecting \global, \long, \outer, \protected

Is there a way to detect whether or not the next assignment is going to be \global, \long, \outer, or \protected? That is, is it possible to write a command \detectmodifiers such that code like ...
11
votes
1answer
600 views

How to do \scantokens inside \edef without triggering “Runaway definition”

I'm trying to find a way to use the e-TeX \scantokens command inside [the equivalent of] an \edef (well, actually an \xdef, but presumably this does not make any real difference since that's just the ...
7
votes
3answers
195 views

Are we inside an edef?

How would you test whether we are in an expansion only context (i.e., \edef, \xdef, \write,...) or not? The only ways I could think of leave things behind (but the full expansion of that extra stuff ...
16
votes
1answer
881 views

What does \marks do?

Recently I had cause to define a macro called \marks. If I try something like \newcommand{\marks}{fred} I get the error ! LaTeX Error: Command \marks already defined. In LaTeX, if I do ...