diff --git a/primer/primer.pdf b/primer/primer.pdf index 62c54f9a0957b779097becb587fc7a558e0f8283..99b0c706a184a58079fc631601b47e7c06c85d4f 100644 Binary files a/primer/primer.pdf and b/primer/primer.pdf differ diff --git a/primer/primer.tex b/primer/primer.tex index 1d886e74357eccc705316e7e93cacac5920d7753..2dde6569376e48acffac22258f58bb7d2642d23b 100644 --- a/primer/primer.tex +++ b/primer/primer.tex @@ -69,6 +69,8 @@ elsewhere~\cite{Kohlhase:tsmgs13,Kohlhase:cmsmglom14,KohJuc:edsmglom14,Kohlhase: (consult them for details and further discussion). In this primer, we want to give a hands-on introduction for the \smglom author and curator. + + \section{\smglom Concepts}\label{sec:terminology} Before we can understand the workflow details and how-tos, we first need to get an @@ -329,7 +331,9 @@ notation in line 2. \begin{lstlisting}[label=lst:binom,caption=Alternative Notation Definitions] \symdef[name=binomial-coefficient]{binom}[2]{\left(#1\atop #2\right)} + \symtest{binomcoeff}{\binomcoeff{n}k} \symvariant{binom}[2]{c}{\mathcal{C}^{#1}_{#2}} + \symtest[variant=c]{binomcoeff}{\binomcoeff[c]{n}k} \end{lstlisting} The call pattern @@ -344,9 +348,23 @@ Listing~\ref{lst:binom} |\binom{n}k| expands to $\left(n\atop k\right)$ and Finally, we can use |\symtest| to test the newly defined macros: |\symtest[|\meta{keys}|]{|\meta{cs}|}{|\meta{test}|}| will generate a phrase describing -the test\ednote{MK: complete this}. +the test. For instance, the |\symtest| macros in the listing above will generate the test +output: +\begin{quote} + Symbol |binomcoeff| with semantic macro |\binomcoeff|: used e.g. in + $\left(n\atop k\right)$ + + Symbol |binomcoeff| (variant |c|) with semantic macro |\binomcoeff[c]|: used e.g. in + $\mathcal{C}^n_k$. +\end{quote} \subsection{Specifying Presentation Declaratively} +The notations in the semantics macros are somewhat unrealistic, since they use {\TeX} +primitives directly to express the layout of the basic mathematical operators. In \smglom +we usually use the more sophisticated facilities of the |presentation| package from \sTeX +instead. In a nutshell -- see~\cite{Kohlhase:ipsmsl:svn} for details -- provides +primitites for mixfix (infix, prefix, postfix, \ldots) notations with precedences. + \ednote{MK: need to talk about the presentation package.} \section{Authoring and Managing \smglom content in \mathhub}\label{sec:mathhub}