15
votes
2answers
423 views

What's the meaning of the macro `\m@th`?

I found this macro from Voss' Math mode v2.47, page 21: \makeatletter \newif\if@borderstar \def\bordermatrix{\@ifnextchar*{% \@borderstartrue\@bordermatrix@i}{\@borderstarfalse\@bordermatrix@i*}% ...
3
votes
1answer
85 views

Setting initial value of a storage macro

When I create a "storage macro" I often initialize it to be empty with \newcommand{\@mymacro}{} \newcommand{\mymacro}[1]{\renewcommand{\@mymacro}{#1}} Instead of initializing it to empty I could do ...
8
votes
1answer
105 views

What's the differences between the kernel commands \trivlist and \list?

LaTeX defines the two environments \trivlist and \list. Both can be used creating own environments. What exactly is the differences between \trivlist and \list?
25
votes
3answers
781 views

@tempdima, reserved@a, @tempcnta, what else?

I'm aware that some "temporary" LaTeX dimensions etc. exist. I would, however, like to know all of them. I know \reserved@a (macro), \@tempdima (dimension) and \@tempcnta (counter).
9
votes
1answer
87 views

\@ifnextchar inside pmatrix?

I created a function which handles a superscript followed after the function. I do that by using \@ifnextchar^. Everything works well, except in any pmatrix environment. Why? As a quick-and-dirty ...
9
votes
3answers
640 views

Are commands defined by \newcommand[.][.]{.} robust?

This question is from the comments at the foot of Abbreviations for AM, PM (small caps) for use within \textbf. Readers will get the remaining gist from there. With ...
22
votes
6answers
749 views

\@ifnextchar and friends documentation

While reading this question and its answers I tried to find where, for instance, \@ifnextchar is documented. I'm afraid I couldn't... I looked in TeX: The Program and TeX for the Impatient which can ...
33
votes
2answers
2k views

Understanding \@ifnextchar

I understand the definitions of the \makeatletter and \makeatother commands and also \def and \newcommand somewhat. But, explained in a simple way, what is happening in the following line? ...
8
votes
2answers
365 views

What exactly does \DeclareOldFontCommand and \DeclareRobustCommand do?

In the article class appears the following code related with the font selection: \DeclareOldFontCommand{\rm}{\normalfont\rmfamily}{\mathrm} \DeclareOldFontCommand{\sf}{\normalfont\sffamily}{\mathsf} ...
14
votes
2answers
384 views

What does the command \@dblarg in a class?

In the definition of a command appears the declaration of \@dblarg, as follows: \def\title{\@dblarg\CJ@title}. What exactly does \@dblarg do?
25
votes
4answers
935 views

Why does the LaTeX kernel define \usepackage *and* \RequirePackage?

The ubiquitous \usepackage command is used to load packages in the preamble of a document; the command syntax is \usepackage[<package-option-list>]{<package-list>}[<version>] ...
36
votes
2answers
2k views

What does \z@ do?

in parcolumns it has \z@ all over the space. I don't see it define it anywhere so I assume it is some internal command or something? I can't really make heads or tails of it though and I can't really ...
5
votes
3answers
549 views

How to extract parts of (La)TeX document?

I want to run queries against LaTeX documents like these: get list of all equations, even if one declares \def\be{\begin{equation}} and uses it; get list of all arguments of some command (e. g. ...
6
votes
2answers
841 views

What do \m@ne‎ and \@M do in the definition of \@makechapterhead?

What do \m@ne‎ and \@M do in the definition of \@makechapterhead in book class? I took a quick look at latex.ltx and couldn't find any explanation.
14
votes
1answer
414 views

What does \p@ mean in some code?

I have found the source code within octavo.dtx (from the octavo package) and it has some parts called \p@. I have searched throughout the document, but cannot understand what this is defined as or ...
16
votes
4answers
866 views

Understanding a \@for loop

I'm having trouble with a \@for loop. I've got a macro that takes a comma delimited list and puts each element into a row of an array. When I do this using a \@for loop, I get an extra row that I ...
14
votes
1answer
444 views

What is a BANG float?

This question follows up on What is the exact purpose of \ftype@<TYPE>?. The LaTeX kernel source refers to a BANG float in the ltoutput.dtx, but there is no explanation for it. Anybody knows ...
17
votes
3answers
474 views

What is the exact purpose of \ftype@<TYPE>?

I currently working on some float related code an saw that the standard float environments figure and table define (beside others) the macros \def\ftype@figure{1} and \def\ftype@table{2}. The LaTeX ...
23
votes
1answer
490 views

What does \@let@token do?

In source2e.pdf I've seen \@let@token used in several places, for example in the definition of \@ifnextchar: \long\def\@ifnextchar#1#2#3{% \let\reserved@d=#1% \def\reserved@a{#2}% ...
16
votes
1answer
483 views

What exactly does \@doendpe do?

Quoting from the LaTeX2e sources: [\@endparenv, \@doendpe] To suppress the paragraph indentation in text immediately following a paragraph-making environment, \everypar is changed to remove ...
7
votes
2answers
526 views

Where can I find an online manual for low-level LaTeX commands?

Is there an online manual for low-level LaTeX commands I can download? I am looking for something which would have, for example: \newif\ifportrait \newif\ifcustomsize \newif\ifdebug \makeatletter ...
28
votes
4answers
1k views

What do \@firstoftwo and \@secondoftwo do?

The LaTeX kernel uses these two all over the place. For example, apparently the correct way of defining something like \ifeq{\macro 1}{\macro 2}{true}{false} is (note Martin's response: each case ...
19
votes
1answer
495 views

Why \( and \) were not defined as robust commands in the first place?

I am aware of the difference between using \(...\) and $...$ (in moving arguments, for example), and yes, I've read the answers to this question: Are \( and \) preferable to $?). I also know the ...
12
votes
2answers
502 views

Is there a list of general use LaTeX kernel macros?

Here are a few cases in which one could use such a list: Is there a "prepend" version of \g@addto@macro? A "local" version? What's the most efficient way of gobbling n characters? Can I use LaTeX's ...
18
votes
4answers
638 views

How exactly does \def\p@figure{Figure~} work?

I took this line from my thesis style and added it into my document (preceded by \makeatletter) and what it does that whenever I used \ref{figureid} instead of putting just the figure number, it puts ...
50
votes
2answers
2k views

Documentation reference for LaTeX internal commands?

This question led to a new package: macros2e Is there a place where I can find a reference of LaTeX internal commands? For example, just a few months ago I saw an answer using \@for and today I ...