texlive[56863] Master/texmf-dist: semantex (5nov20)

commits+karl at tug.org commits+karl at tug.org
Thu Nov 5 23:13:21 CET 2020


Revision: 56863
          http://tug.org/svn/texlive?view=revision&revision=56863
Author:   karl
Date:     2020-11-05 23:13:21 +0100 (Thu, 05 Nov 2020)
Log Message:
-----------
semantex (5nov20)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/semantex/semantex.pdf
    trunk/Master/texmf-dist/doc/latex/semantex/semantex.tex
    trunk/Master/texmf-dist/tex/latex/semantex/semantex.sty
    trunk/Master/texmf-dist/tex/latex/semantex/stripsemantex.sty

Modified: trunk/Master/texmf-dist/doc/latex/semantex/semantex.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/semantex/semantex.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/semantex/semantex.tex	2020-11-05 22:13:06 UTC (rev 56862)
+++ trunk/Master/texmf-dist/doc/latex/semantex/semantex.tex	2020-11-05 22:13:21 UTC (rev 56863)
@@ -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 at gmail.com}{sorsted at gmail.com})}
 
@@ -319,7 +319,8 @@
 
 \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 @@
 \begin{lstlisting}
 \SetupClass\MyVar{
 	definekeys[2]={
-		{projquotient}{ symbolputright={ /\!\!/ _ { #1 } #2 } },
+		{projquotient}{ symbolputright={ /\!\!/_{#1} #2 } },
 	}
 }
 \end{lstlisting}
@@ -1947,7 +1948,11 @@
 \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 @@
 $\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 @@
 	\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 @@
 	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 @@
 	\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 @@
 	\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!.

Modified: trunk/Master/texmf-dist/tex/latex/semantex/semantex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/semantex/semantex.sty	2020-11-05 22:13:06 UTC (rev 56862)
+++ trunk/Master/texmf-dist/tex/latex/semantex/semantex.sty	2020-11-05 22:13:21 UTC (rev 56863)
@@ -1,5 +1,5 @@
 \RequirePackage{xparse,l3keys2e,leftindex,semtex}
-\ProvidesExplPackage{semantex}{2020/10/30}{0.462}{}
+\ProvidesExplPackage{semantex}{2020/11/05}{0.463}{}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %															%
@@ -5734,8 +5734,10 @@
 		{argreturn}{ execute={ \semantex_arg_return:n { ##1 } } },
 		{parse}{ execute={ \semantex_parse:n { ##1 } } },
 		{clearcommand}{ execute={ \semantex_data_seq_clear:nn { ##1 } { commands_sequence } } },
-		{...}{sepidots},
-		{-}{sepislot},
+		{dots}{sepidots},
+		{...}{dots},
+		{slot}{sepislot},
+		{-}{slot},
 		{*}{sepd*},
 		{**}{sepd**},
 	},
@@ -5799,7 +5801,7 @@
 		{argwithoutkeyvalset}{ execute={ \semantex_arg_without_keyval:nn { ##1 } { #1 } } },
 		{setargwithoutkeyvalx}{ execute={ \semantex_arg_without_keyval:nx { ##1 } { #1 } } },
 		{argwithoutkeyvalsetx}{ execute={ \semantex_arg_without_keyval:nx { ##1 } { #1 } } },
-		{prearg}{ execute={ \semantex_data_tl_put_left:nnn { ##1 } { prearg } { #1 } } },
+		{prearg}{ execute={ \semantex_data_tl_put_right:nnn { ##1 } { prearg } { #1 } } },
 		{postarg}{ execute={ \semantex_data_tl_put_left:nnn { ##1 } { postarg } { #1 } } },
 		{setargsep}{ execute={ \semantex_data_tl_set:nnn { ##1 } { argsep } { #1 } } },
 		{setargslot}{ execute={ \semantex_data_tl_set:nnn { ##1 } { argslot } { #1 } } },
@@ -5937,7 +5939,7 @@
 	% Accents, primes, bullets, etc.:
 	definekeys={
 		{smash}{command=\smash},
-		{prime}{upper={\prime}},
+		{prime}{upper={\prime},nextupperwithsep=false},
 		{'}{prime},
 		{''}{prime,prime},
 		{'''}{prime,prime,prime},
@@ -6029,7 +6031,7 @@
 		{preupper}{
 			execute={
 				\tl_if_blank:nF{#1}{
-					\semantex_data_tl_put_left:nnn { ##1 } { preupper } { #1 }
+					\semantex_data_tl_put_right:nnn { ##1 } { preupper } { #1 }
 				}
 			},
 		},
@@ -6036,7 +6038,7 @@
 		{postupper}{
 			execute={
 				\tl_if_blank:nF{#1}{
-					\semantex_data_tl_put_right:nnn { ##1 } { postupper } { #1 }
+					\semantex_data_tl_put_left:nnn { ##1 } { postupper } { #1 }
 				}
 			},
 		},
@@ -6213,7 +6215,7 @@
 		{prelower}{
 			execute={
 				\tl_if_blank:nF{#1}{
-					\semantex_data_tl_put_left:nnn { ##1 } { prelower } { #1 }
+					\semantex_data_tl_put_right:nnn { ##1 } { prelower } { #1 }
 				}
 			},
 		},
@@ -6220,7 +6222,7 @@
 		{postlower}{
 			execute={
 				\tl_if_blank:nF{#1}{
-					\semantex_data_tl_put_right:nnn { ##1 } { postlower } { #1 }
+					\semantex_data_tl_put_left:nnn { ##1 } { postlower } { #1 }
 				}
 			},
 		},
@@ -6397,7 +6399,7 @@
 		{preupperleft}{
 			execute={
 				\tl_if_blank:nF{#1}{
-					\semantex_data_tl_put_left:nnn { ##1 } { preupperleft } { #1 }
+					\semantex_data_tl_put_right:nnn { ##1 } { preupperleft } { #1 }
 				}
 			},
 		},
@@ -6404,7 +6406,7 @@
 		{postupperleft}{
 			execute={
 				\tl_if_blank:nF{#1}{
-					\semantex_data_tl_put_right:nnn { ##1 } { postupperleft } { #1 }
+					\semantex_data_tl_put_left:nnn { ##1 } { postupperleft } { #1 }
 				}
 			},
 		},
@@ -6581,7 +6583,7 @@
 		{prelowerleft}{
 			execute={
 				\tl_if_blank:nF{#1}{
-					\semantex_data_tl_put_left:nnn { ##1 } { prelowerleft } { #1 }
+					\semantex_data_tl_put_right:nnn { ##1 } { prelowerleft } { #1 }
 				}
 			},
 		},
@@ -6588,7 +6590,7 @@
 		{postlowerleft}{
 			execute={
 				\tl_if_blank:nF{#1}{
-					\semantex_data_tl_put_right:nnn { ##1 } { postlowerleft } { #1 }
+					\semantex_data_tl_put_left:nnn { ##1 } { postlowerleft } { #1 }
 				}
 			},
 		},

Modified: trunk/Master/texmf-dist/tex/latex/semantex/stripsemantex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/semantex/stripsemantex.sty	2020-11-05 22:13:06 UTC (rev 56862)
+++ trunk/Master/texmf-dist/tex/latex/semantex/stripsemantex.sty	2020-11-05 22:13:21 UTC (rev 56863)
@@ -1,5 +1,5 @@
 \RequirePackage{xparse}
-\ProvidesExplPackage{stripsemantex}{2020/10/30}{0.462}{}
+\ProvidesExplPackage{stripsemantex}{2020/11/05}{0.463}{}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %																		%



More information about the tex-live-commits mailing list.