texlive[56577] Master/texmf-dist: semantex (6oct20)

commits+karl at tug.org commits+karl at tug.org
Wed Oct 7 00:00:22 CEST 2020


Revision: 56577
          http://tug.org/svn/texlive?view=revision&revision=56577
Author:   karl
Date:     2020-10-07 00:00:21 +0200 (Wed, 07 Oct 2020)
Log Message:
-----------
semantex (6oct20)

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-10-06 22:00:05 UTC (rev 56576)
+++ trunk/Master/texmf-dist/doc/latex/semantex/semantex.tex	2020-10-06 22:00:21 UTC (rev 56577)
@@ -34,11 +34,15 @@
 
 \usepackage[english=american]{csquotes}
 
-\usepackage[hidelinks]{hyperref}
+%\usepackage[hidelinks]{hyperref}
+\newcommand\hypersetup[1]{}
+\newcommand\href[2]{\texttt{#2}}
+\newcommand\url[1]{\texttt{#1}}
+\newcommand\texorpdfstring[2]{#1}
 	
 \usepackage[nameinlink]{cleveref}
 
-\title{Seman\!\TeX: semantic, keyval-based mathematics (v0.45)}
+\title{Seman\!\TeX: semantic, keyval-based mathematics (v0.46)}
 \date{\today}
 \author{Sebastian Ørsted (\href{mailto:sorsted at gmail.com}{sorsted at gmail.com})}
 
@@ -249,7 +253,7 @@
 		},
 		definekeys[1]={
 			{der}{upper={ (#1) } },
-			{res}{ rightreturn ,symbolputright={|}, lower={#1} },
+			{res}{ rightreturn, symbolputright={|}, lower={#1} },
 			{stalk}{seplower={#1}},
 			% "seplower" means "separator + lower", i.e. lower index
 			% separated from any previous lower index by a separator,
@@ -681,7 +685,7 @@
 \end{LTXexample}
 
 Other keys might need to take one value.
-For defining these, we use the key~\lstinline!definekeys[1]!.
+For defining these, we use a different key, \lstinline!definekeys[1]!.
 For instance, suppose we want a command for deriving a function \( n \)~times.
 For this, we add the key~\lstinline!der!:
 \begin{lstlisting}
@@ -1178,16 +1182,40 @@
 \begin{LTXexample}
 $\vf[inv,conj]$
 \end{LTXexample}
-Therefore, there is a command \lstinline!return! that can be applied at any point to invoke the routine of adding all indices and commands to the symbol. Let us try it out:
+Therefore, there is a key, called \lstinline!return!, that can be applied at any point to invoke the routine of adding all current commands, indices, and arguments to the symbol. Let us try it out:
 \begin{LTXexample}
 $\vf[inv,return,conj]$
 \end{LTXexample}
-In fact, \lstinline!return! is an umbrella key that invokes three different return routines: \lstinline!leftreturn!, \lstinline!innerreturn!, and \lstinline!rightreturn!. The command \lstinline!leftreturn! adds the left indices to the symbol (we have not discussed left indices yet, though). The command \lstinline!innerreturn! adds all commands to the symbol (those defined using the \lstinline!command!~key).
-Finally, \lstinline!rightreturn! adds all right indices and arguments to the symbol.
-There is also a collection of partial return routines that add either the indices or the argument to the symbol.
-See~\cref{sec:fundamental_keys} for an overview of these.
-In general, most of the time, the user should probably be satisfied with just using~\lstinline!return!.
+Before we invoked~\lstinline!return!, the symbol was~\lstinline!f!, and the~\lstinline!-1! was stored as an upper index.
+But after the \lstinline!return! routine, the symbol is~\lstinline!f^{-1}!, and consequently, when we apply the~\lstinline!conj! key, you add a line above the whole thing.
 
+There are some cases when you do not want to add all commands, indices, and arguments to the symbol at the same time.
+Therefore, there exist a few extra, partial \lstinline!return! keys that only add some of them to the symbol and save the rest of later.
+We list the most important ones here and refer to~\cref{sec:fundamental_keys} for the remaining ones.
+Most users will probably only ever need the keys \lstinline!return! and~\lstinline!rightreturn!.
+\begin{itemize}
+	\item
+	\mylst!return!
+	
+	Invokes the return routine, i.e.\ adds all commands, indices, and arguments to the symbol, if any such exist.
+
+	\item
+	\mylst!innerreturn!
+	
+	Invokes the inner return routine, i.e.\ adds all commands to the symbol, if any such exist.
+
+	\item
+	\mylst!rightreturn!
+	
+	Invokes the right return routine, i.e.\ adds all commands, right indices, and right arguments to the symbol, if any such exist.
+
+	\item
+	\mylst!leftreturn!
+	
+	Invokes the left return routine, i.e.\ adds all commands, left indices, and left arguments to the symbol, if any such exist.
+\end{itemize}
+
+
 \section{Keyval syntax conflicts}
 
 You can pass anything you want as key values, including other objects.
@@ -1648,22 +1676,18 @@
 \SetupClass\MyVar{
 	definekeys[1]={
 		{Lder} {
-			innerreturn,leftreturn,
-			symbolputleft=\mathbb{L}^{#1},
+			leftreturn, symbolputleft=\mathbb{L}^{#1},
 		},
 		{Rder} {
-			innerreturn,leftreturn,
-			symbolputleft=\mathbb{R}^{#1},
+			leftreturn, symbolputleft=\mathbb{R}^{#1},
 		},
 	},
 	definekeys={
 		{Lder} {
-			innerreturn,leftreturn,
-			symbolputleft=\mathbb{L},
+			leftreturn,	symbolputleft=\mathbb{L},
 		},
 		{Rder} {
-			innerreturn,leftreturn,
-			symbolputleft=\mathbb{R},
+			leftreturn,	symbolputleft=\mathbb{R},
 		},
 	},
 }
@@ -1671,22 +1695,18 @@
 \SetupClass\MyVar{
 	definekeys[1]={
 		{Lder} {
-			innerreturn,leftreturn,
-			symbolputleft=\mathbb{L}^{#1},
+			leftreturn,	symbolputleft=\mathbb{L}^{#1},
 		},
 		{Rder} {
-			innerreturn,leftreturn,
-			symbolputleft=\mathbb{R}^{#1},
+			leftreturn, symbolputleft=\mathbb{R}^{#1},
 		},
 	},
 	definekeys={
 		{Lder} {
-			innerreturn,leftreturn,
-			symbolputleft=\mathbb{L},
+			leftreturn,	symbolputleft=\mathbb{L},
 		},
 		{Rder} {
-			innerreturn,leftreturn,
-			symbolputleft=\mathbb{R},
+			leftreturn,	symbolputleft=\mathbb{R},
 		},
 	},
 }
@@ -1798,7 +1818,10 @@
 $ \leftindex[P]^* {A} $
 \end{LTXexample}
 We refer to the manual of the package \pack{leftindex} for details,
-see~\url{https://ctan.org/pkg/leftindex}.
+see
+\begin{center}
+	\url{https://ctan.org/pkg/leftindex}
+\end{center}
 
 Our solution for left indices in \semantex is based directly on the one
 from \pack{leftindex}. However, it works much better if you use \semantex
@@ -3365,52 +3388,52 @@
 	\item
 	\mylst!return!
 	
-	Invokes the return routine.
+	Invokes the return routine, i.e.\ adds all commands, indices, and arguments to the symbol, if any such exist.
 
 	\item
-	\mylst!leftreturn!
+	\mylst!innerreturn!
 	
-	Invokes the left return routine.
-	
+	Invokes the inner return routine, i.e.\ adds all commands to the symbol, if any such exist.
+
 	\item
 	\mylst!rightreturn!
 	
-	Invokes the right return routine.
-	
+	Invokes the right return routine, i.e.\ adds all commands, right indices, and right arguments to the symbol, if any such exist.
+
 	\item
-	\mylst!innerreturn!
+	\mylst!leftreturn!
 	
-	Invokes the inner return routine.
+	Invokes the left return routine, i.e.\ adds all commands, left indices, and left arguments to the symbol, if any such exist.
 	
 	\item
 	\mylst!leftindexreturn!
 	
-	Adds the left indices to the symbol, but not the left argument, if any such exists.
+	Adds the left indices to the symbol, if any such exists.
 	
 	\item
 	\mylst!rightindexreturn!
 	
-	Adds the right indices to the symbol, but not the right argument, if any such exists.
+	Adds the right indices to the symbol, if any such exists.
 	
 	\item
 	\mylst!indexreturn!
 	
-	Adds all indices to the symbol, left and right, but not the argument, if any such exists.
+	Adds all indices, left and right to the symbol, if any such exists.
 	
 	\item
 	\mylst!leftargreturn!
 	
-	Adds the left argument, if any such exists, to the symbol, otherwise does nothing.
+	Adds the left argument, if any such exists, to the symbol.
 	
 	\item
 	\mylst!rightargreturn!
 	
-	Adds the right argument, if any such exists, to the symbol, otherwise does nothing.
+	Adds the right argument, if any such exists, to the symbol.
 	
 	\item
 	\mylst!argreturn!
 	
-	Adds the argument, if any such exists, to the symbol, otherwise does nothing.
+	Adds the argument, if any such exists, to the symbol.
 	
 	\item
 	\mylst!output={$\<Class\>$}!
@@ -3636,7 +3659,7 @@
 	\mylst!Otherspar={$\<left parenthesis\>$}{$\<right parenthesis\>$}{$\values\<normal|auto|*|{\textit{other}}\>$}!
 	
 	Invokes the \lstinline!spar! routine, but with the assigned parentheses and size.
-	Here,~\lstinline!normal! means normal size
+	Here, \lstinline!normal! means normal size
 	parentheses,
 	\lstinline!auto! and~\lstinline!*!
 	mean auto-scaled parentheses using~\lstinline!\left...\right!.
@@ -5207,8 +5230,8 @@
 	\item
 	\mylst!\SemantexThis!
 	
-	Returns the name of the current class or object. The name is stored in the form \mylst!object_$\<name of object without backslash\>$!
-	or~\mylst!class_$\<name of class without backslash\>$!,
+	Returns the name of the current class or object. It is returned in the format \mylst!object_$\<name of object without backslash\>$!
+	and \mylst!class_$\<name of class without backslash\>$!,
 	which is the way the names are stored internally.
 	
 	\item

Modified: trunk/Master/texmf-dist/tex/latex/semantex/semantex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/semantex/semantex.sty	2020-10-06 22:00:05 UTC (rev 56576)
+++ trunk/Master/texmf-dist/tex/latex/semantex/semantex.sty	2020-10-06 22:00:21 UTC (rev 56577)
@@ -1,5 +1,5 @@
 \RequirePackage{xparse,l3keys2e,leftindex,semtex}
-\ProvidesExplPackage{semantex}{2020/10/03}{0.45}{}
+\ProvidesExplPackage{semantex}{2020/10/06}{0.46}{}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %															%
@@ -1504,7 +1504,6 @@
 	% #2 = options
 	\group_begin:
 		\cs_set:Nn\semantex_this: { #1 }
-		\semantex_data_tl_inherit:nn { #1 } { symbol } % Inherit the symbol from parent if not done already
 		#2 % This is where keys can be set up
 		\semantex_parse:n { #1 } % Run the "parse" routine, i.e. run the collection of code that the user has added via the key "parseoptions"
 		\semantex_data_bool_get:nnTF { #1 } { output } % Checks if the register is supposed to output
@@ -1530,7 +1529,8 @@
 			{
 				\semantex_data_bool_get:nnTF { #1 } { leftargument } % Checks if left or right argument
 				{
-					\semantex_left_pre_return:n { #1 }
+					\semantex_left_indices_pre_return:n { #1 }
+					\semantex_left_arg_pre_return:n { #1 }
 					\tl_set:Nx\l__semantex_render_symbol_temp_tl { \semantex_data_tl_get_exp_not:nn { #1 } { symbol } } % Stores the symbol in a temporary command
 					\tl_set:Nx \l__semantex_render_temp_tl
 					{
@@ -1564,7 +1564,8 @@
 					}
 				}
 				{
-					\semantex_right_pre_return:n { #1 }
+					\semantex_right_indices_pre_return:n { #1 }
+					\semantex_right_arg_pre_return:n { #1 }
 					\tl_set:Nx\l__semantex_render_symbol_temp_tl { \semantex_data_tl_get_exp_not:nn { #1 } { symbol } } % Stores the symbol in a temporary command
 					\tl_set:Nx \l__semantex_render_temp_tl
 					{
@@ -1897,8 +1898,10 @@
 	% This is an umbrella key that runs all of the three
 	% return routines, innerreturn, rightreturn, and leftreturn
 	\semantex_inner_return:n { #1 }
-	\semantex_left_return:n { #1 }
-	\semantex_right_return:n { #1 }
+	\semantex_left_index_return:n { #1 }
+	\semantex_left_arg_return:n { #1 }
+	\semantex_right_index_return:n { #1 }
+	\semantex_right_arg_return:n { #1 }
 }
 
 \cs_new_protected:Npn\semantex_pre_return:n#1
@@ -1909,8 +1912,10 @@
 	% resetting parameters in this case would just waste
 	% time.
 	\semantex_inner_pre_return:n { #1 }
-	\semantex_left_pre_return:n { #1 }
-	\semantex_right_pre_return:n { #1 }
+	\semantex_left_indices_pre_return:n { #1 }
+	\semantex_left_arg_pre_return:n { #1 }
+	\semantex_right_indices_pre_return:n { #1 }
+	\semantex_right_arg_pre_return:n { #1 }
 }
 
 \cs_new_protected:Npn\semantex_inner_return:n#1
@@ -1940,16 +1945,11 @@
 
 \cs_new_protected:Npn\semantex_right_return:n#1
 {
+	\semantex_inner_return:n { #1 }
 	\semantex_right_index_return:n { #1 }
 	\semantex_right_arg_return:n { #1 }
 }
 
-\cs_new_protected:Npn\semantex_right_pre_return:n#1
-{
-	\semantex_right_indices_pre_return:n { #1 }
-	\semantex_right_arg_pre_return:n { #1 }
-}
-
 \cs_new_protected:Npn\semantex_right_index_return:n#1
 {
 	\semantex_right_indices_pre_return:n { #1 }
@@ -2010,16 +2010,11 @@
 
 \cs_new_protected:Npn\semantex_left_return:n#1
 {
+	\semantex_inner_return:n { #1 }
 	\semantex_left_index_return:n { #1 }
 	\semantex_left_arg_return:n { #1 }
 }
 
-\cs_new_protected:Npn\semantex_left_pre_return:n#1
-{
-	\semantex_left_indices_pre_return:n { #1 }
-	\semantex_left_arg_pre_return:n { #1 }
-}
-
 \cs_new_protected:Npn\semantex_left_index_return:n#1
 {
 	\semantex_left_indices_pre_return:n { #1 }

Modified: trunk/Master/texmf-dist/tex/latex/semantex/stripsemantex.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/semantex/stripsemantex.sty	2020-10-06 22:00:05 UTC (rev 56576)
+++ trunk/Master/texmf-dist/tex/latex/semantex/stripsemantex.sty	2020-10-06 22:00:21 UTC (rev 56577)
@@ -1,5 +1,5 @@
 \RequirePackage{xparse}
-\ProvidesExplPackage{stripsemantex}{2020/10/03}{0.45}{}
+\ProvidesExplPackage{stripsemantex}{2020/10/06}{0.46}{}
 
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %																		%



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