summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/semantex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-07-08 03:01:45 +0000
committerNorbert Preining <norbert@preining.info>2020-07-08 03:01:45 +0000
commit8c3fedd243b69349b426144e5e2b94ef4aea6a4c (patch)
treef5842753f11a90141f3cc2e356c3a04766e8d81e /macros/latex/contrib/semantex
parentef87f13c4503a2aa4a9098cbf33e0bfcad19008e (diff)
CTAN sync 202007080301
Diffstat (limited to 'macros/latex/contrib/semantex')
-rw-r--r--macros/latex/contrib/semantex/README.md10
-rw-r--r--macros/latex/contrib/semantex/semantex.pdfbin234442 -> 235556 bytes
-rw-r--r--macros/latex/contrib/semantex/semantex.sty2
-rw-r--r--macros/latex/contrib/semantex/semantex.tex103
4 files changed, 24 insertions, 91 deletions
diff --git a/macros/latex/contrib/semantex/README.md b/macros/latex/contrib/semantex/README.md
index 9b7c6e4617..fc47222981 100644
--- a/macros/latex/contrib/semantex/README.md
+++ b/macros/latex/contrib/semantex/README.md
@@ -1,10 +1,12 @@
SemanTeX - object-oriented mathematics
--------------------------------------
-The SemanTeX package for LaTeX delivers a more semantic, systematized way of writing mathematics compared to the ordinary math syntax. The system is
-object-oriented and uses keyval syntax, and everything is highly
-customizable. At the same time, care has been taken to make it the syntax as
-intuitive, natural, practical, and lightweight as possible.
+The SemanTeX package for LaTeX delivers a more semantic,
+systematized way of writing mathematics compared to the
+ordinary math syntax in LaTeX. The system uses keyval syntax
+and is highly customizable. At the same time, care has been
+taken to make it the syntax as simple, natural, practical,
+and lightweight as possible.
----------------------------------------------------------------
SemanTeX --- object-oriented mathematics
diff --git a/macros/latex/contrib/semantex/semantex.pdf b/macros/latex/contrib/semantex/semantex.pdf
index 4f4e3b00c9..8c9f32df7e 100644
--- a/macros/latex/contrib/semantex/semantex.pdf
+++ b/macros/latex/contrib/semantex/semantex.pdf
Binary files differ
diff --git a/macros/latex/contrib/semantex/semantex.sty b/macros/latex/contrib/semantex/semantex.sty
index 3ed17fb64a..1fb42b0bbd 100644
--- a/macros/latex/contrib/semantex/semantex.sty
+++ b/macros/latex/contrib/semantex/semantex.sty
@@ -1,5 +1,5 @@
\RequirePackage{expl3,xparse}
-\ProvidesExplPackage{semantex}{2020/07/06}{0.2alpha}{}
+\ProvidesExplPackage{semantex}{2020/07/07}{0.201alpha}{}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
diff --git a/macros/latex/contrib/semantex/semantex.tex b/macros/latex/contrib/semantex/semantex.tex
index c273d1dcec..2a3bee0153 100644
--- a/macros/latex/contrib/semantex/semantex.tex
+++ b/macros/latex/contrib/semantex/semantex.tex
@@ -34,7 +34,7 @@
\usepackage[nameinlink]{cleveref}
-\title{Seman\!\TeX: Semantic mathematics (v$0.2\alpha$)}
+\title{Seman\!\TeX: Semantic mathematics (v$0.201\alpha$)}
\date{\today}
\author{Sebastian Ørsted (\href{mailto:sorsted@gmail.com}{sorsted@gmail.com})}
@@ -288,8 +288,11 @@ $ \vh[inverseimage]{\sheafF}[spar,stalk=\vp]
% Now we create a couple of variables of the class \MyVar:
\NewObject\MyVar\vf{f}
-\NewObject\MyVarr\vg{g}
+\NewObject\MyVar\vg{g}
\NewObject\MyVar\vh{h}
+\NewObject\MyVar\vn{n}
+\NewObject\MyVar\vp{p}
+\NewObject\MyVar\vU{U}
\NewObject\MyVar\sheafF{\mathcal{F}}
% Now we set up the class \MyVar:
@@ -310,92 +313,20 @@ $ \vh[inverseimage]{\sheafF}[spar,stalk=\vp]
{res}{ return ,symbolputright ={|}, lower ={#1} },
},
}
+
+\begin{document}
+
+$ \vf[conj,der=\vn] $
+
+$ \vg[inv,res=\vU]{x} $
+
+$ \vh[inverseimage]{\sheafF}[spar,stalk=\vp]
+ = \sheafF[stalk=\vh{\vp}] $
+
+\end{document}
\end{lstlisting}
\endgroup
-%\begingroup
-% \SetupClass\MyVar{
-% singlekeys={
-% {inverseimage}{upper={-1},nopar},
-% },
-% valuekeys={
-% {stalk}{lower=#1},
-% {res}{ return,symbolputright={|}, lower={#1} },
-% },
-% argvaluekeys={
-% {coef}{othersep={;}{#1}},
-% },
-% }
-%
-% Traditional math notation in \TeX\ is not particularly semantic -- you usually type the raw \emph{notation} rather than the underlying
-% \emph{meaning} of your math.
-% Take, for instance, the following equations from algebraic geometry:
-% \begin{align*}
-% \vf[inverseimage]{\sheafF}[spar,stalk=\vp]
-% &=
-% \sheafF[stalk=\vf{\vp}] ,
-% \\
-% \sheafreg[\vU]
-% &=
-% \sheafreg[\vX,res=\vU] ,
-% \\
-% \sheafHom{ \sheafF , \sheafG }{\vU}
-% &=
-% \Hom[\sheafreg[\vU]]{ \sheafF[res=\vU] , \sheafG[res=\vU] } ,
-% \\
-% \co{0}{\vU,coef=\sheafreg[\vX]}
-% &= \sheafreg[\vX]{\vU}
-% .
-% \end{align*}
-% Here, \( \sheafF \) and~\( \sheafG \)
-% are sheaves on some scheme~\( \vX \),
-% \( \sheafreg[\vX] \)~is the structure sheaf,
-% and~\( \vU \subset \vX \) an open subset.
-% In traditional \TeX, you would probably define a collection of commands \lstinline!\sheafF!, \lstinline!\sheafG!, \lstinline!\sheafreg!, and~\lstinline!\sheafHom! for~\( \sheafF \),~\( \sheafG \), \( \sheafreg \), and~\( \sheafHom \) and then proceed
-% something like
-% \begin{lstlisting}
-%(f^{-1}\sheafF)_{p}=\sheafF_{f(p)},
-%\sheafreg_{U} = \sheafreg_{X}|_{U},
-%\sheafHom( \sheafF , \sheafG)(U)
-% = \Hom_{\sheafreg_{X} ( \sheafF|_{U} , \sheafG|_{V} ),
-% H^{0}(U;\sheafF) = \sheafF(U).
-% \end{lstlisting}
-% For more than~90~\% of all mathematicians, this solution will be completely satisfactory; it prints what it is supposed to, and that's that.
-% If this is how you feel, there is absolutely no reason for you to continue reading. This package is for the remaining less than~10~\% who would prefer to write
-% something like the following instead:
-% \begin{lstlisting}
-%\vf[inverseimage]{ \sheafF }[spar,stalk=\vp]
-% = \sheafF[ stalk=\vf{\vp} ] ,
-%\sheafreg[\vU] = \sheafreg[ \vX, res=\vU ],
-%\sheafHom{ \sheafF , \sheafG }{\vU}
-% = \Hom[\sheafreg[\vU]]{ \sheafF[res=\vU], \sheafG[res=\vU] },
-%\co{0}{ \vU, coef=\sheafreg[\vX] } = \sheafreg[\vX]{\vU}.
-% \end{lstlisting}
-%
-% A lot of comments are in order.
-% The whole syntax will be explained in later chapters, but let us take a moment to look at these examples and understand the logic.
-% First of all, what is up with all the~\lstinline!v!'s in the command names \lstinline!\vf!, \lstinline!\vX!, \lstinline!\vU!? The~\lstinline!v!~stands for \textquote{variable}, and it is the prefix I recommend using for all standard variables. So for all letters in the alphabet, uppercase and lowercase, as well as the Greek ones, there will be a command: \lstinline!\va!, \lstinline!\vA!, \lstinline!\vb!, \lstinline!\vB!,~etc.
-% It is not always necessary to use them; for instance, in the above example, both \lstinline!\vX! and \lstinline!\vU! could have been replaced by simply~\lstinline!X!,~\lstinline!U! without changing anything. This is because we did not apply any arguments to these symbols. However, for the sake of consistency, I prefer to switch completely to using commands instead of writing the symbols directly.
-% How \emph{you} use the system is completely up to you.
-%
-% In \semantex, all entries are being built up from the inside and out.
-% The basic syntax layout for most \semantex commands is
-% \begin{lstlisting}
-%\⟨object⟩[⟨options⟩]{⟨argument⟩}
-% \end{lstlisting}
-% Let us try focusing on the first example from above:
-% \begin{LTXexample}
-%$\vf[inverseimage]{\sheafF}[spar,stalk=\vp]$
-% \end{LTXexample}
-% You always start with a central piece: a \emph{⟨symbol⟩}.
-% In the case of~\lstinline!\vf!, the symbol is~\( f \). After the symbol follows the options we apply to it, written in brackets~\lstinline![...]!. In this case, we the option~\lstinline!inverseimage!. This tells \semantex that we want the inverse image functor~\( \vf[inverseimage] \), so it adds a superscript~\lstinline!-1! to the symbol. After this, we apply the function~\lstinline!\vf[inverseimage]! to something, namely the sheaf~{$\sheafF$}. This is done by enclosing them in braces~\lstinline!{...}!.\footnote{You should be aware that this argument in braces~\texttt{\{...\}} is \emph{optional}. You can simply write~\texttt{$\backslash$vf[inverseimage]} if you want, and it will produce~\smash{\( \vf[inverseimage] \)}.}
-%
-%
-% Next, we want to take the stalk of this sheaf at the point~\( \vp \). If we simply wrote~\lstinline!\vf[inverseimage]{\sheafF}[stalk=\vp]!, we would get~\smash{\( \vf[inverseimage]{\sheafF}[stalk=\vp] \)}, which looks confusing. So we want to enclose~\smash{\( \vf[inverseimage]{\sheafF} \)} in parentheses before taking the stalk. This is done with the key~\lstinline!spar! (an abbreviation for \textquote{symbol parentheses}).
-% This key takes whatever has been typed so far, symbol and indices, and adds parentheses around it (of course, type and size is adjustable).
-% This~\lstinline!spar! is a key you fill find yourself using a lot.
-%\endgroup
-
\chapter{Getting started}
To get started using \semantex, load down the package
@@ -2220,7 +2151,7 @@ As you see, we use the \lstinline!d!~key to tell the command what superscript it
\chapter{Bugs}
-Lots of things can be improved in the system, including the order in which things are being expanded internally. I am not going to explain this is detail for now, but hope to correct this in the future. For now, the system seems to work fine as long as you do \enquote{normal} things and insert~\lstinline!\noexpand!'s whenever something goes wrong. The only real bug that I currently know of occurs if you use the key~\lstinline!Othersep! in a heading. Then it all dies painfully.
+Lots of things can be improved in the system, including the order in which things are being expanded internally. I am not going to explain this is detail for now, but hope to correct this in the future. For now, the system seems to work fine as long as you do \enquote{normal} things and insert~\lstinline!\noexpand!'s whenever something goes wrong. The only real bug that I currently know of occurs if you use the key~\lstinline!Otherspar! in a heading. Then it all dies painfully.
Then again, why the heck would you do that in the first place? Who scales parentheses in headings?
%\input{testground}