etoolbox

The tests and switches a package, or a document built from a program's values, decides what to set with.

Loading

\usepackage{etoolbox}

A module of its own, compiled into mLaTeX: the package's commands are defined over mLaTeX's primitives.

Commands

\appto, \AtBeginEnvironment, \AtEndPreamble, \boolfalse, \booltrue, \foo, \ifblank, \ifbool, \ifdef, \ifdimcomp, \ifnumcomp, \ifnumequal, \ifnumgreater, \ifnumless, \ifnumodd, \ifstrequal, \iftoggle, \ifundef, \list, \newbool, \newtoggle, \notblank, \notbool, \nottoggle, \preto, \setbool, \settoggle, \togglefalse, \toggletrue.

Example

A document that uses it, from mLaTeX's own tests, so it compiles as written, and below it what mLaTeX sets from it in your browser:

etoolbox.tex
\documentclass{article}
\usepackage{etoolbox}
\begin{document}
\newtoggle{draft}
\toggletrue{draft}
\iftoggle{draft}{Draft.}{Final.}
\newbool{flag}\booltrue{flag}\ifbool{flag}{Flag set.}{}
\ifstrequal{a}{a}{Equal.}{Different.}
\ifnumcomp{3}{>}{2}{Greater.}{}
\ifblank{}{Blank.}{}
\ifdef{\foo}{}{No foo.}
\newcommand{\list}{a}
\appto\list{b}\preto\list{c}
\list
\AtEndPreamble{}
\AtBeginEnvironment{quote}{}
\end{document}
OutputLoading mLaTeX in your browser
Loading mLaTeX