diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/multidef/multidef-test.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/multidef/multidef-test.tex | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/multidef/multidef-test.tex b/Master/texmf-dist/doc/latex/multidef/multidef-test.tex new file mode 100644 index 00000000000..0161d8d6225 --- /dev/null +++ b/Master/texmf-dist/doc/latex/multidef/multidef-test.tex @@ -0,0 +1,37 @@ +\documentclass{article} +\usepackage{xspace} +\usepackage{dsfont} +\usepackage{multidef} + + +%% basic definition +\multidef[p=cal]{\ensuremath{\mathcal{#1}}}{A-Z} + +%% example with noerr, nowarn +\multidef[noerr,nowarn,suffix=name]{#1}{contents->Table des mati\`eres, + ref->R\'ef\'erences, + part->Partie} + +%% with one argument +\multidef[arg=1]{\ensuremath{\mathsf{#1}(##1)}}{first,last} + +%% global + robust +\makeatletter +\bgroup +\multidef[noerr,global,p=bb,args=1,robust] + {\@ifnextchar+{\ensuremath{\mathds{#1}^+}\@gobble} + {\ensuremath{\mathds{#1}}}} + {A,B,C,H,N,Q,R,T,Z, + Z , Z ,one->1} +\egroup + + +\begin{document} + +\section{\protect\(\bbZ\protect\) would fail if not robust} + +\calT\ should write $\mathcal T$ + +\first a should write $\mathsf{first}(a)$ + +\end{document} |