diff options
author | Karl Berry <karl@freefriends.org> | 2022-10-04 19:52:56 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-10-04 19:52:56 +0000 |
commit | 4d5d8538614712dcf9b5cd6dabbfbf144dd55655 (patch) | |
tree | 52c18b55db2e52745f24defba43840e109ad60f4 /Master/texmf-dist/doc | |
parent | 4512c147c45476d85b9e48a1f0bc643048897d60 (diff) |
semantex (4oct22)
git-svn-id: svn://tug.org/texlive/trunk@64611 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc')
-rw-r--r-- | Master/texmf-dist/doc/latex/semantex/semantex.pdf | bin | 397503 -> 397454 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/semantex/semantex.tex | 64 |
2 files changed, 33 insertions, 31 deletions
diff --git a/Master/texmf-dist/doc/latex/semantex/semantex.pdf b/Master/texmf-dist/doc/latex/semantex/semantex.pdf Binary files differindex 4e50ebe1d45..64e0bae6cfc 100644 --- a/Master/texmf-dist/doc/latex/semantex/semantex.pdf +++ b/Master/texmf-dist/doc/latex/semantex/semantex.pdf diff --git a/Master/texmf-dist/doc/latex/semantex/semantex.tex b/Master/texmf-dist/doc/latex/semantex/semantex.tex index bd932ca3be6..08587d1ad85 100644 --- a/Master/texmf-dist/doc/latex/semantex/semantex.tex +++ b/Master/texmf-dist/doc/latex/semantex/semantex.tex @@ -2135,9 +2135,9 @@ $\int \vf \wedgeD{\vx[1], \chapter{Using \texorpdfstring{Seman\!\TeX{}}{SemanTeX} in other commands using \texorpdfstring{\texttt{\textbackslash UseClassInCommand}}{\string\UseClassInCommand}}\label{sec:UseClassInCommand} \SemantexRecordObject{\Frac} -\newcommand\Frac[2]{ - \SemantexRecordSource{\Frac{#1}{#2}} - \UseClassInCommand\MyVar{ \frac{#1}{#2} } +\newcommand\Frac[2]{% + \SemantexRecordSource{\Frac{#1}{#2}}% + \UseClassInCommand\MyVar{\frac{#1}{#2}}% } Sometimes, it is useful to create other commands based on \semantex @@ -2148,7 +2148,9 @@ a command~\lstinline!\Frac! which automatically wraps the fraction in~\lstinline!\MyVar!. The first guess how to do that would be something like \begin{lstlisting} -\newcommand\Frac[2]{ \MyVar{ \frac{#1}{#2} } } +\newcommand\Frac[2]{% + \MyVar{\frac{#1}{#2}}% +} \end{lstlisting} \begin{LTXexample} \[ @@ -2162,9 +2164,9 @@ your document of \semantex{} markup. But in order to prepare yourself for this p in a slightly more cumbersome way: \begin{lstlisting} \SemantexRecordObject{\Frac} -\newcommand\Frac[2]{ - \SemantexRecordSource{\Frac{#1}{#2}} - \UseClassInCommand\MyVar{ \frac{#1}{#2} } +\newcommand\Frac[2]{% + \SemantexRecordSource{\Frac{#1}{#2}}% + \UseClassInCommand\MyVar{\frac{#1}{#2}}% } \end{lstlisting} \begin{LTXexample} @@ -2240,27 +2242,27 @@ Therefore, we do three things: \NewObject\MyVar\catvect{\categoryformat{Vect}} \SemantexRecordObject{\catxmod} -\newcommand\catxmod[1]{ - \SemantexRecordSource{\catxmod{#1}} - \UseClassInCommand\MyVar{#1\categoryformat{-mod}} +\newcommand\catxmod[1]{% + \SemantexRecordSource{\catxmod{#1}}% + \UseClassInCommand\MyVar{#1\categoryformat{-mod}}% } \SemantexRecordObject{\catmodx} -\newcommand\catmodx[1]{ - \SemantexRecordSource{\catmodx{#1}} - \UseClassInCommand\MyVar{\categoryformat{mod-}#1} +\newcommand\catmodx[1]{% + \SemantexRecordSource{\catmodx{#1}}% + \UseClassInCommand\MyVar{\categoryformat{mod-}#1}% } \SemantexRecordObject{\catxmody} -\newcommand\catxmody[2]{ - \SemantexRecordSource{\catxmody{#1}{#2}} - \UseClassInCommand\MyVar{#1\categoryformat{-mod-}#2} +\newcommand\catxmody[2]{% + \SemantexRecordSource{\catxmody{#1}{#2}}% + \UseClassInCommand\MyVar{#1\categoryformat{-mod-}#2}% } \SemantexRecordObject{\catxmodx} -\newcommand\catxmodx[1]{ - \SemantexRecordSource{\catxmodx{#1}} - \UseClassInCommand\MyVar{#1\categoryformat{-mod-}#1} +\newcommand\catxmodx[1]{% + \SemantexRecordSource{\catxmodx{#1}}% + \UseClassInCommand\MyVar{#1\categoryformat{-mod-}#1}% } The above method can be used to create commands @@ -2293,9 +2295,9 @@ For this, we use the constructions we learned at the introduction to this chapter: \begin{lstlisting} \SemantexRecordObject{\catxmod} -\newcommand\catxmod[1]{ - \SemantexRecordSource{\catxmod{#1}} - \UseClassInCommand\MyVar{#1\categoryformat{-mod}} +\newcommand\catxmod[1]{% + \SemantexRecordSource{\catxmod{#1}}% + \UseClassInCommand\MyVar{#1\categoryformat{-mod}}% } \end{lstlisting} \begin{LTXexample} @@ -2310,21 +2312,21 @@ of other situations, like \( \catmodx{\vR} \) or~\( \catxmody{\vR}{\vS} \): \begin{lstlisting} \SemantexRecordObject{\catmodx} -\newcommand\catmodx[1]{ - \SemantexRecordSource{\catmodx{#1}} - \UseClassInCommand\MyVar{\categoryformat{mod-}#1} +\newcommand\catmodx[1]{% + \SemantexRecordSource{\catmodx{#1}}% + \UseClassInCommand\MyVar{\categoryformat{mod-}#1}% } \SemantexRecordObject{\catxmody} -\newcommand\catxmody[2]{ - \SemantexRecordSource{\catxmody{#1}{#2}} - \UseClassInCommand\MyVar{#1\categoryformat{-mod-}#2} +\newcommand\catxmody[2]{% + \SemantexRecordSource{\catxmody{#1}{#2}}% + \UseClassInCommand\MyVar{#1\categoryformat{-mod-}#2}% } \SemantexRecordObject{\catxmodx} -\newcommand\catxmodx[1]{ - \SemantexRecordSource{\catxmodx{#1}} - \UseClassInCommand\MyVar{#1\categoryformat{-mod-}#1} +\newcommand\catxmodx[1]{% + \SemantexRecordSource{\catxmodx{#1}}% + \UseClassInCommand\MyVar{#1\categoryformat{-mod-}#1}% } \end{lstlisting} |