[texhax] A Comprehensive list of TeX primitives and Plain TeX macros

Heiko Oberdiek heiko.oberdiek at googlemail.com
Thu Oct 11 03:14:50 CEST 2012


On Thu, Oct 11, 2012 at 12:50:12AM +0100, Paul Stanley wrote:

> I'm looking for the above in order to create a pronunciation
> dictionary for my speech synth.

The following Perl script generates a list of command names that
are used in plain.tex. The list does not include active characters
and primitives that are not used in plain.tex explicitly.

%%% plaincmds.pl %%%
#!/usr/bin/env perl
use strict;
$^W=1;

my %cmd;

chomp(my $file_plain = `kpsewhich plain.tex`);
open(IN, '<', $file_plain) or die "!!! Error: Cannot open `$file_plain`!\n";
while (<IN>) {
    # s/(^|[^\\])%.*/$1/;
    s/(\\[^a-zA-Z]|\\[a-zA-Z@]+)/addcmd($1)/ge;
    s/\\newif\\if([a-zA-Z@]+)/addcmd("\\$1true");addcmd("\\$1false")/ge;
}

sub addcmd ($) {
    my $cmd = shift;
    $cmd{$cmd} = 1;
    return $cmd;
}

map { print "$_\n"; } (sort keys %cmd);

__END__
%%% plaincmds.pl %%%

Call: plaincmds.pl >plaincmds.txt

At last the list of commands follows (893 commands):

%%% plaincmds.txt
\ 
\!
\"
\#
\$
\%
\&
\'
\(
\)
\*
\+
\,
\-
\.
\/
\:
\;
\<
\=
\>
\?
\@
\@crfalse
\@crtrue
\@midfalse
\@midtrue
\A
\AA
\AE
\Arrowvert
\Big
\Bigg
\Biggl
\Biggm
\Biggr
\Bigl
\Bigm
\Bigr
\Delta
\Downarrow
\Gamma
\H
\Im
\L
\Lambda
\Leftarrow
\Leftrightarrow
\Longleftarrow
\Longleftrightarrow
\Longrightarrow
\O
\OE
\Omega
\Orb
\P
\Phi
\Pi
\Pr
\Psi
\Re
\Relbar
\Rightarrow
\S
\Sigma
\TeX
\Theta
\Uparrow
\Updownarrow
\Upsilon
\Vert
\Xi
\Z
\[
\\
\]
\^
\_
\`
\a
\aa
\abovedisplayshortskip
\abovedisplayskip
\accent
\active
\acute
\adjdemerits
\advance
\advancepageno
\ae
\afterassignment
\aftergroup
\aleph
\alloc@
\allocationnumber
\allowbreak
\alpha
\amalg
\angle
\approx
\arccos
\arcsin
\arctan
\arg
\arrowvert
\ast
\asymp
\atopwithdelims
\b
\backslash
\bar
\baselineskip
\begingroup
\beginsection
\belowdisplayshortskip
\belowdisplayskip
\beta
\bf
\bffam
\bgroup
\big
\bigbreak
\bigcap
\bigcirc
\bigcup
\bigg
\biggl
\biggm
\biggr
\bigl
\bigm
\bigodot
\bigoplus
\bigotimes
\bigr
\bigskip
\bigskipamount
\bigsqcup
\bigtriangledown
\bigtriangleup
\biguplus
\bigvee
\bigwedge
\binoppenalty
\bmod
\body
\bordermatrix
\bot
\bowtie
\box
\boxdef
\boxmaxdepth
\brace
\braceld
\bracelu
\bracerd
\braceru
\bracevert
\brack
\break
\breve
\brokenpenalty
\buildrel
\bullet
\bye
\c
\c at ncel
\cal
\cap
\cases
\catcode
\catcodes
\cdot
\cdotp
\cdots
\centering
\centerline
\ch at ck
\char
\chardef
\check
\chi
\choose
\circ
\cleaders
\cleartabs
\clubpenalty
\clubsuit
\colon
\columns
\cong
\coprod
\copy
\copyright
\cos
\cosh
\cot
\coth
\count
\count@
\countdef
\cr
\crcr
\csc
\csname
\cup
\d
\dag
\dagger
\dashv
\day
\ddag
\ddagger
\ddot
\ddots
\def
\defaulthyphenchar
\defaultskewchar
\deg
\delcode
\delimiter
\delimiterfactor
\delimitershortfall
\delta
\det
\diamond
\diamondsuit
\dim
\dimen
\dimen@
\dimen at i
\dimen at ii
\dimendef
\discretionary
\displ at y
\displayindent
\displaylines
\displaystyle
\displaywidowpenalty
\displaywidth
\div
\divide
\do
\dospecials
\dosupereject
\dot
\doteq
\dotfill
\dots
\doublehyphendemerits
\downarrow
\downbracefill
\dp
\dt at pfalse
\dt at ptrue
\edef
\egroup
\eject
\ell
\else
\empty
\emptyset
\end
\endcsname
\endgraf
\endgroup
\endinsert
\endline
\endlinechar
\enskip
\enspace
\epsilon
\eqalign
\eqalignno
\equiv
\errmessage
\errorcontextlines
\escapechar
\eta
\everycr
\exhyphenpenalty
\exists
\exp
\expandafter
\f@@t
\f at t
\fam
\fi
\filbreak
\finalhyphendemerits
\finph at nt
\finsm at sh
\fivebf
\fivei
\fiverm
\fivesy
\flat
\floatingpenalty
\fmtname
\fmtversion
\fo at t
\folio
\font
\fontdimen
\foo
\foofalse
\footins
\footline
\footnote
\footnoterule
\footrue
\footstrut
\forall
\frenchspacing
\frown
\futurelet
\gamma
\gcd
\gdef
\ge
\geq
\getf at ctor
\gets
\gg
\global
\globaldefs
\goodbreak
\grave
\h at false
\h at true
\halign
\hang
\hangafter
\hangindent
\hat
\hbadness
\hbar
\hbox
\headline
\heartsuit
\hfil
\hfill
\hfuzz
\hgl@
\hglue
\hideskip
\hidewidth
\hoffset
\holdinginserts
\hom
\hookleftarrow
\hookrightarrow
\hphantom
\hrule
\hrulefill
\hsize
\hskip
\hss
\ht
\hyphenpenalty
\i
\ialign
\if
\if@
\if at cr
\if at mid
\ifcase
\ifcat
\ifdim
\ifdt at p
\iff
\iffalse
\iffoo
\ifh@
\ifhmode
\ifmmode
\ifnum
\ifp at ge
\ifr at ggedbottom
\iftrue
\ifus@
\ifv@
\ifvoid
\ifx
\ignorespaces
\imath
\immediate
\in
\indent
\inf
\infty
\input
\insc at unt
\insert
\insertpenalties
\int
\interdisplaylinepenalty
\interfootnotelinepenalty
\interlinepenalty
\intop
\iota
\it
\item
\itemitem
\iterate
\itfam
\j
\jmath
\joinrel
\jot
\kappa
\ker
\kern
\l
\lambda
\land
\langle
\language
\lastbox
\lastskip
\lbrace
\lbrack
\lccode
\lceil
\ldotp
\ldots
\le
\leaders
\leavevmode
\left
\leftarrow
\leftarrowfill
\leftharpoondown
\leftharpoonup
\lefthyphenmin
\leftline
\leftrightarrow
\leftskip
\leq
\leqalignno
\let
\lfloor
\lg
\lgroup
\lhook
\lim
\liminf
\limits
\limsup
\line
\linepenalty
\lineskip
\lineskiplimit
\ll
\llap
\lmoustache
\ln
\lnot
\log
\loggingall
\longleftarrow
\longleftrightarrow
\longmapsto
\longrightarrow
\loop
\looseness
\lor
\lower
\lq
\m at g
\m at ketabbox
\m at ne
\m at th
\mag
\magnification
\magstep
\magstephalf
\makefootline
\makeheadline
\makeph at nt
\makesm at sh
\mapsto
\mapstochar
\mathaccent
\mathbin
\mathchar
\mathchardef
\mathchoice
\mathclose
\mathcode
\mathhexbox
\mathinner
\mathop
\mathopen
\mathord
\mathpalette
\mathph at nt
\mathrel
\mathsm at sh
\mathstrut
\mathsurround
\matrix
\max
\maxdeadcycles
\maxdepth
\maxdimen
\medbreak
\medmuskip
\medskip
\medskipamount
\message
\mid
\midinsert
\min
\mit
\mkern
\models
\month
\mp
\mscount
\mskip
\mu
\multispan
\muskip
\muskipdef
\n at space
\nabla
\narrower
\natural
\ne
\nearrow
\neg
\negthinspace
\neq
\newbox
\newcount
\newdimen
\newfam
\newhelp
\newif
\newinsert
\newlanguage
\newlinechar
\newmuskip
\newread
\newskip
\newtoks
\newwrite
\next
\ni
\ninerm
\noalign
\nobreak
\noexpand
\noindent
\nointerlineskip
\nolimits
\nonfrenchspacing
\nonscript
\nopagenumbers
\normalbaselines
\normalbaselineskip
\normalbottom
\normallineskip
\normallineskiplimit
\not
\notin
\nu
\null
\nulldelimiterspace
\number
\nwarrow
\nxt
\o
\o at lign
\oalign
\obeylines
\obeyspaces
\odot
\oe
\of
\offinterlineskip
\oint
\ointop
\oldstyle
\omega
\ominus
\omit
\ooalign
\openup
\oplus
\or
\oslash
\otimes
\outer
\output
\outputpenalty
\over
\overbrace
\overfullrule
\overleftarrow
\overrightarrow
\owns
\p@
\p at gefalse
\p at getrue
\p at renwd
\pagebody
\pagecontents
\pagegoal
\pageinsert
\pageno
\pageshrink
\pagetotal
\par
\parallel
\parfillskip
\parindent
\parskip
\partial
\pausing
\penalty
\perp
\ph at nt
\phantom
\phi
\pi
\plainoutput
\pm
\pmatrix
\pmod
\postdisplaypenalty
\pr@@@s
\pr@@@t
\pr at m@s
\prec
\preceq
\predisplaypenalty
\predisplaysize
\preloaded
\pretolerance
\prevdepth
\prim at s
\prime
\proclaim
\prod
\propto
\psi
\qquad
\quad
\r@@t
\r at ggedbottomfalse
\r at ggedbottomtrue
\radical
\raggedbottom
\raggedright
\raise
\rangle
\rbrace
\rbrack
\rceil
\read
\relax
\relbar
\relpenalty
\removelastskip
\repeat
\rfloor
\rgroup
\rho
\rhook
\right
\rightarrow
\rightarrowfill
\rightharpoondown
\rightharpoonup
\righthyphenmin
\rightleftharpoons
\rightline
\rightskip
\rlap
\rlh@
\rm
\rmoustache
\romannumeral
\root
\rootbox
\rq
\s at tcols
\s at tt@b
\sb
\scriptfont
\scriptscriptfont
\scriptscriptstyle
\scriptspace
\scriptstyle
\searrow
\sec
\setbox
\setminus
\sett at b
\settabs
\sevenbf
\seveni
\sevenrm
\sevensy
\sfcode
\sh at ft
\sharp
\shipout
\showboxbreadth
\showboxdepth
\showhyphens
\sigma
\sim
\simeq
\sin
\sinh
\sixt@@n
\skew
\skewchar
\skip
\skip@
\skipdef
\sl
\slash
\slfam
\smallbreak
\smallint
\smallskip
\smallskipamount
\smash
\smile
\sp
\sp at n
\space
\spacefactor
\spaceskip
\spadesuit
\span
\splitmaxdepth
\splittopskip
\sqcap
\sqcup
\sqrt
\sqsubseteq
\sqsupseteq
\ss
\star
\string
\strut
\strutbox
\subset
\subseteq
\succ
\succeq
\sum
\sup
\supereject
\supset
\supseteq
\surd
\swarrow
\t
\t at bb@x
\t at bbox
\tabalign
\tabs
\tabsdone
\tabskip
\tabsyet
\tan
\tanh
\tau
\tenbf
\tenex
\teni
\tenit
\tenrm
\tensl
\tensy
\tentt
\textfont
\textindent
\textstyle
\the
\theta
\thickmuskip
\thinmuskip
\thinspace
\thr@@
\tilde
\time
\times
\to
\toks
\toks@
\toksdef
\tolerance
\top
\topglue
\topins
\topinsert
\topskip
\tracingall
\tracingcommands
\tracinglostchars
\tracingmacros
\tracingonline
\tracingoutput
\tracingpages
\tracingparagraphs
\tracingrestores
\tracingstats
\triangle
\triangleleft
\triangleright
\tt
\ttfam
\ttraggedright
\tw@
\u
\uccode
\uchyph
\undefined
\underbar
\underbrace
\underline
\unhbox
\unhcopy
\unskip
\unvbox
\unvcopy
\uparrow
\upbracefill
\updownarrow
\uplus
\uppercase
\upsilon
\us at false
\us at true
\v
\v at false
\v at true
\varepsilon
\varphi
\varpi
\varrho
\varsigma
\vartheta
\vbadness
\vbox
\vcenter
\vdash
\vdots
\vec
\vee
\vert
\vfil
\vfill
\vfilneg
\vfootnote
\vfuzz
\vgl@
\vglue
\voffset
\voidb at x
\vphantom
\vrule
\vsize
\vskip
\vss
\vtop
\wd
\wedge
\widehat
\widetilde
\widowpenalty
\wlog
\wp
\wr
\write
\xi
\xspaceskip
\year
\z
\z@
\z at skip
\zeta
\{
\|
\}
\~
%%% plaincmds.txt

Yours sincerely
  Heiko Oberdiek


More information about the texhax mailing list