diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/semantex/semantex.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/semantex/semantex.tex | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Master/texmf-dist/doc/latex/semantex/semantex.tex b/Master/texmf-dist/doc/latex/semantex/semantex.tex index 2bf168eb0f7..2d257f95aef 100644 --- a/Master/texmf-dist/doc/latex/semantex/semantex.tex +++ b/Master/texmf-dist/doc/latex/semantex/semantex.tex @@ -42,7 +42,7 @@ \usepackage[nameinlink]{cleveref} -\title{Seman\!\TeX: semantic, keyval-based mathematics (v0.500)} +\title{Seman\!\TeX: semantic, keyval-based mathematics (v0.501)} \date{\today} \author{Sebastian Ørsted (\href{mailto:sorsted@gmail.com}{sorsted@gmail.com})} @@ -1731,10 +1731,10 @@ $\RHom{\vX,\vY}$ } Imagine we want to do cohomology with coefficients in some ring~\( \vR \). -It is common to write this as~\( \co{*}{\vX,coef=\vR} \) +It is common to write this as~\( \co[*]{\vX,coef=\vR} \) with a semicolon instead of a comma. This can be implemented, too, with the syntax \begin{LTXexample} -$\co{*}{\vX,coef=\vR}$ +$\co[*]{\vX,coef=\vR}$ \end{LTXexample} This shows that arguments of functions also support keyval syntax. To define argument keys, @@ -1748,11 +1748,13 @@ keys (at least those taking values) are actually turned off by default, so we shall have to turn them on first: \begin{lstlisting} \SetupClass\MyVar{ - arg keyval=true, % this turns keyval syntax in arguments on define arg keys[1]={ {coef}{ other sep={;}{#1} }, }, } +\SetupObject\co{ + arg keyval=true, +} \end{lstlisting} The key \lstinline!other sep! is a key that controls the separator between the current argument and the previous argument (it will only be printed if there was a previous argument). By default, this separator is a comma. So in the syntax~\lstinline!\co{*}{\vX,coef=\vR}!, |