diff options
author | Karl Berry <karl@freefriends.org> | 2020-11-05 22:13:21 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2020-11-05 22:13:21 +0000 |
commit | 86150b021e30a24eeef3151108c04d3f31c3b114 (patch) | |
tree | 33522a38ca75cde56a91fed7811adebb878d1083 /Master/texmf-dist/doc/latex/semantex | |
parent | c816799bdba3bdb0a17a7a75ba7ff7aaf54f2a7f (diff) |
semantex (5nov20)
git-svn-id: svn://tug.org/texlive/trunk@56863 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/semantex')
-rw-r--r-- | Master/texmf-dist/doc/latex/semantex/semantex.pdf | bin | 364165 -> 364816 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/semantex/semantex.tex | 43 |
2 files changed, 33 insertions, 10 deletions
diff --git a/Master/texmf-dist/doc/latex/semantex/semantex.pdf b/Master/texmf-dist/doc/latex/semantex/semantex.pdf Binary files differindex 766ee647176..9fa36eaa214 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 75282510c11..ab0d352a62d 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.462)} +\title{Seman\!\TeX: semantic, keyval-based mathematics (v0.463)} \date{\today} \author{Sebastian Ørsted (\href{mailto:sorsted@gmail.com}{sorsted@gmail.com})} @@ -319,7 +319,8 @@ $ \vh[inverseimage]{\sheafF}[spar,stalk=\vp] \usepackage{amsmath,semantex} -\NewVariableClass\MyVar % creates a new class of variables, called "\MyVar" +\NewVariableClass\MyVar % creates a new class of variables, + % called "\MyVar" % Now we create a couple of variables of the class \MyVar: \NewObject\MyVar\vf{f} @@ -1039,7 +1040,7 @@ quotient~\( \vX[projquotient={\vchi}{\vG}] \) of~\( \vX \) with respect to the a \begin{lstlisting} \SetupClass\MyVar{ definekeys[2]={ - {projquotient}{ symbolputright={ /\!\!/ _ { #1 } #2 } }, + {projquotient}{ symbolputright={ /\!\!/_{#1} #2 } }, } } \end{lstlisting} @@ -1947,7 +1948,11 @@ $\vX \fibre[\vY,der] \vX$ \chapter{The \texorpdfstring{\texttt{Delimiter}}{Delimiter} class type} \NewDelimiterClass\MyDelim[parent=\MyVar] -\NewObject\MyDelim\norm{\lVert}{\rVert} +\NewObject\MyDelim\norm{\lVert}{\rVert}[ + definekeys[1]={ + {default}{ outputoptions={ default={#1} } }, + }, +] \NewObject\MyDelim\inner{\langle}{\rangle} Delimiters are what they sound like: functions like \( \norm{slot} \) and~\( \inner{slot,slot} \) @@ -1970,6 +1975,23 @@ $\norm{\va}$, $\inner{\va,\vb}$, $\inner{slot,slot}$ \end{LTXexample} +In the case where you want to use different kinds of +norms, say \( \norm[2]{slot} \) or~\( \norm[\infty]{slot} \), +you can use the key~\mylst!outputoptions={$\<options\>$}!. +This allows you to pass the~\<options\> to the output class +(in this case,~\lstinline!\MyVar!): +\begin{lstlisting} +\SetupObject\norm{ + definekeys[1]={ + {default}{ outputoptions={ default={#1} } }, + }, +} +\end{lstlisting} +\begin{LTXexample} +$\norm{\vx}$, +$\norm[2]{\vx}$, +$\norm[\infty]{\vx}$ +\end{LTXexample} We can also use it for more complicated constructions, like sets. The following is inspired from the \pack{mathtools} package where a similar construction is created using the commands from that package. My impression is that Lars Madsen is the main mastermind behind the code I use for the \lstinline!\where!~construction: @@ -2109,7 +2131,7 @@ $\int \vf \wedgeD{\vx[1], \vx[2],...,\vx[n]}$ \end{LTXexample} -\chapter{Using \texorpdfstring{Seman\!\TeX}{SemanTeX} in other commands using \texorpdfstring{\texttt{\textbackslash UseClassInCommand}}{\UseClassInCommand}}\label{sec:UseClassInCommand} +\chapter{Using \texorpdfstring{Seman\!\TeX{}}{SemanTeX} in other commands using \texorpdfstring{\texttt{\textbackslash UseClassInCommand}}{\UseClassInCommand}}\label{sec:UseClassInCommand} \SemantexRecordObject{\Frac} \newcommand\Frac[2]{ @@ -3521,12 +3543,12 @@ In the following sections, we include the full list. Adds a double bullet to the \lstinline!d!-index. \item - \mylst!-! + \mylst!slot!, \mylst!-! Adds a slot to the \lstinline!i!-index. \item - \mylst!...! + \mylst!dots!, \mylst!...! Adds three dots to the \lstinline!i!-index. @@ -3562,8 +3584,9 @@ In the following sections, we include the full list. \mylst!prime!, \mylst!'!, \mylst!''!, \mylst!'''! Adds one or more primes to the symbol in the upper index. - Equivalent to \lstinline!upper={\prime}!, \lstinline!upper={\prime\prime}!, - etc. + The first one is equivalent to \lstinline!upper={\prime},nextupperwithsep=false!, + and the rest are equivalent to multiple iterations + of~\lstinline!prime!. \end{itemize} \section{Keys for the argument parentheses} @@ -5608,7 +5631,7 @@ the programming keys and commands: \item \mylst!mathclass! (token list): - the \TeX\ character class command that the final output + the \TeX\ math class command that the final output is evnetually wrapped around; the intended use of this is the \TeX\ commands \lstinline!\mathord!, \lstinline!\mathop!, \lstinline!\mathbin!, \lstinline!\mathrel!, \lstinline!\mathopen!, \lstinline!\mathclose!, and~\lstinline!\mathpunct!. |