{plain-tex} commands used for macro {programming}.
4
votes
2answers
165 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
121 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
181 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 ...
16
votes
3answers
5k 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 ...
9
votes
2answers
714 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
114 views
Converting command to result
Consider this example:
\documentclass{article}
\newcommand{\foo}{}
\newcommand{\currentbar}{\thebar}
\newcounter{bar}
\setcounter{bar}{0}
\makeatletter
...
14
votes
2answers
1k 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
217 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
193 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
222 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
284 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
580 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 ...
11
votes
2answers
467 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 ...