I was trying some programming in LaTeX and found that \ifx was predefined, since I get an error from this:
\documentclass[10pt]{book}%
\newif\ifx
\xtrue
\begin{document}
\end{document}
Then I found there is a way to check if a command exist from this answer:
how-can-i-check-in-latex-or-plain-tex-whether-a-command-exists-by-name
Use it to check for \ifx:
\documentclass[10pt]{book}%
\newcommand{\checkfor}[1]{%
\ifcsname#1\endcsname%
... command '#1' exists ...%
\else%
... command '#1' does not exist ...%
\fi%
}
\begin{document}
\checkfor{ifx}\par
\end{document}
Compiling the above says indeed that command \ifx exists.
But how would one get a list of all the \ifXXXXXs that are out there? I need to use lots of \if in my code to customize my build and need to make lots of new boolean variables. If there is a list out there, I can paste it on my wall next to my computer and just look at it before I use a new command instead of getting an error or having to check using code each time.
