Questions tagged [primitives]

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

http://www.tug.org/utilities/plain/cseq.html

89 questions
24
votes
1 answer

What does \/ do?

I've seen this in some tex file where a word is set in italics, but its ending is in regular font. Trying it out I don't see it making any difference, so I must be missing something. What does the \/ do? a…
muk.li
  • 3,620
12
votes
2 answers

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 \someprimitive is it possible to recover its primitive…
Villemoes
  • 4,131
9
votes
3 answers

\ignorespaces vs \relax

In the TeXbook, there is a macro called \ignorespaces: \ignorespaces ⟨optional spaces⟩. TeX reads (and expands) tokens, doing nothing until reaching one that is not a ⟨space token⟩. And there is another macro called \relax for which TeX does…
Stephen
  • 3,826
9
votes
3 answers

How to use @ifstar with arguments

I want to use @ifstar to define a command, whose non-star version stores a value in a variable and whose star version reads the value from the variable. I tried the following. It doesn't produce an error, but doesn't print the value…
5
votes
2 answers

Trying to understand \def\def@ sintax primitives

I am trying to understand this syntax of primitive \def \DeclareOption{man}{% \def\def@man{\@manmode} } Why this primitive nesting? And I do not get to understand why there is two \def sentences concatenated.
2
votes
1 answer

"\show\ " outputs the "^^M" in TeX?

On page 10 of the book The TeXbook, it says that \show\cs, where \cs is any control sequence, can output its meaning. For example, \show\thinspace outputs > \thinspace=macro: ->\kern .16667em . Why does \show\ output: > \^^M=macro: ->\ . Why is…
Y. zeng
  • 1,885