{plain-tex} commands used for macro {programming}.

learn more… | top users | synonyms

17
votes
1answer
146 views

Which primitives does LaTeX2e rename/move?

TeX's primitives can be renamed by macro formats/packages: this allows new/altered features or behaviours. Usually this is done such that the originals are still available ('renamed'): certainly ...
13
votes
1answer
131 views

Which primitives does ConTeXt rename/move?

TeX's primitives can be renamed by macro formats/packages: this allows new/altered features or behaviours. Usually this is done such that the originals are still available ('renamed'): certainly ...
5
votes
1answer
234 views

Why should some TeX primitives never be set directly in LaTeX?

In an earlier question More economic and robust command for abstract at the beginning of chapters, David Carlisle told that one should never use directly some TeX primitives. How can I distinguish ...
1
vote
0answers
67 views

About those magic primitives

While learning TeX, I found some primitives are magic (e.g., \expandafter \futurelet \aftergroup). These primitives can change the expansion order of the input stream. Have anyone made any ...
8
votes
1answer
123 views

How can \ifx\\\\ be false?

It appears that I have a case where \ifx\\#2\\ is false, even though #2 is empty. Here is the relevant excerpt from the log file, with \tracingcommands and \tracingmacros turned on: \lastpageref ...
25
votes
1answer
293 views

Using elastic lengths — when do they work?

I was wondering why elastic lengths like \fill seem to work only under certain conditions. For instance if I write A \hspace{\fill} B I get A left aligned, B right aligned as wanted. If however ...
4
votes
2answers
239 views

ConTeXt doesn't implement some Knuth TeX primitives?

I try to use new TeX format ConTeXt, but I find that some TeX primitives don't act any more. How sad I am when I find that. An simple example is that in plain TeX, we can set the spaces between ...
6
votes
1answer
180 views

How to emulate \pdfstartlink and \pdfendlink with xetex?

In my ocgx package, I would use the new ocg-p package instead of the ocg package. With pdflatex or lualatex, all is good. But with xelatex, I obviously can't use \pdfstartlink and \pdfendlink (these ...
11
votes
3answers
342 views

A command to replace \middle| when it's missing?

I'm using this LaTeX plugin for a Wiki (Confluence, blech), and it doesn't support the \middle| command. I'm guessing it doesn't have eTex primitives or some such backwardness. Anyway, I guess I can ...
17
votes
3answers
14k views

how to suppress “Underfull \vbox (badness 10000) … while \output is active”?

when using an inflexible document class, one is often faced with the warning Underfull \vbox (badness 10000) has occurred while \output is active [] on pages that contain no display math. in ...
11
votes
2answers
1k views

Is it safe to temporarily redefine \and, \or, and \not?

I'm writing lots of logic expressions in LaTeX and I'd much rather write $p \and \not q \or r$ than $p \land \lnot q \lor r$. I was thinking of doing something like this: \newenvironment{logic}{% ...
3
votes
1answer
215 views

Converting command to result

Consider this example: \documentclass{article} \newcommand{\foo}{} \newcommand{\currentbar}{\thebar} \newcounter{bar} \setcounter{bar}{0} \makeatletter ...
20
votes
2answers
2k views

What are the exact semantics of \detokenize?

How does \detokenize work? The e-TeX Short Reference Manual states: When followed by a <general text>, expands to yield a sequence of character tokens of \catcode 10 (space) or 12 ...
10
votes
2answers
251 views

Which TeX primitives can be recovered after their initial definitions are overwritten?

This is mostly an academic question out of curiosity, but I think it may give some interesting answers. The question is, given a TeX file beginning with \def\someprimitive{}, for which values of ...
3
votes
1answer
219 views

Recursion - splitting a group.

I've been trying to understand the notion of recursion in TeX - not easy given that my background is the high-level stuff in LaTeX. The only examples I can (just about) understand are very basic ...
7
votes
1answer
298 views

\let a control sequence to a redefined primitive

pdfTeX version 1.40.0 introduced the primitive \pdfprimitive which the manual describes as follows. This command executes the primitive meaning of the following control sequence, if it has been ...
7
votes
1answer
325 views

Use case for pdfTeX's \quitvmode

While reading one of Lev's answers, I encountered a pdfTeX primitive \quitvmode that I have never noticed before. The pdfTeX manual states that this causes TeX to leave (internal) vertical mode and ...
16
votes
1answer
825 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 ...
12
votes
3answers
575 views

Is there a printable version of a reference manual for all TeX primitives?

Everywhere in the TeX community, I see suggestions like \parskip, \obeylines, \parindent, etc. I'd be surprised not to find them even in the most basic LaTeX packages. So I figured they must be deeper ...