diff options
Diffstat (limited to 'macros/latex/contrib/stex/doc/stex-manual.tex')
-rw-r--r-- | macros/latex/contrib/stex/doc/stex-manual.tex | 154 |
1 files changed, 65 insertions, 89 deletions
diff --git a/macros/latex/contrib/stex/doc/stex-manual.tex b/macros/latex/contrib/stex/doc/stex-manual.tex index 31b9c4eaeb..547e238f54 100644 --- a/macros/latex/contrib/stex/doc/stex-manual.tex +++ b/macros/latex/contrib/stex/doc/stex-manual.tex @@ -1,19 +1,15 @@ -\makeatletter -\ifcsname if@infulldoc\endcsname\else - \expandafter\newif\csname if@infulldoc\endcsname\@infulldocfalse -\fi -\makeatother - -\csname if@infulldoc\endcsname\else - -\def\bibfolder#1{../lib/bib/#1} -\input{stex-docheader} +\ifcsname ifinfulldoc\endcsname\else + \expandafter\newif\csname ifinfulldoc\endcsname\infulldocfalse +\fi +\ifcsname ifinidedoc\endcsname\else + \expandafter\newif\csname ifinidedoc\endcsname\inidedocfalse +\fi -\infulldoctrue +\ifinfulldoc\else + \input{stex-docheader} \begin{document} - \csname if@infulldoc\endcsname\else \title{ The {\stex{3}} Manual \thanks{Version {\fileversion} (last revised {\filedate})} @@ -192,82 +188,55 @@ provided by several pieces of software: \end{itemize} \end{sfragment} - -\begin{sfragment}{Quickstart} - \begin{sfragment}{Setup} - There are two ways of using \sTeX: as a - \begin{enumerate} - \item way of writing {\LaTeX} more modularly (object-oriented Math) for creating PDF - documents or - \item foundation for authoring active documents in HTML5 instrumented with knowledge - management services. - \end{enumerate} - Both are legitimate and useful. The first requires a significantly smaller - tool-chain, so we describe it first. The second requires a much more substantial - (and experimental) toolchain of knowledge management systems. Both workflows profit - from an integrated development environment (IDE), which (also) automates setup as - far as possible (see \sref{sec.sTeX-IDE}). - - \begin{sfragment}[id=sec.minimal-setup]{Minimal Setup for the PDF-only Workflow} - In the best of all worlds, there is no setup, as you already have a new version of - {\TeX}Live on your system as a {\LaTeX} enthusiast. If not now is the time to - install it; see \cite{TeXLive:on}. You can usually update {\TeX}Live via a package - manager or the {\TeX}Live manager \textbf{tlmgr}. - - Alternatively, you can install \sTeX from CTAN, the Comprehensive {\TeX} Archive - Network; see \cite{stexCTAN:on} for details. - \end{sfragment} - - \begin{sfragment}[id=sec.git-setup]{GIT-based Setup for the \sTeX Development Version} - If you want use the latest and greatest \sTeX packages - that have not even been released to CTAN, - then you can directly clone them from the \sTeX development - repository \cite{sTeX:github:on} by the following command-line instructions: -\begin{lstlisting}[language=bash] - cd <stexdir> - git clone https://github.com/slatex/sTeX.git -\end{lstlisting} - and keep it updated by pulling updates via \lstinline|git pull| in the cloned \sTeX - directory. - Then update your \lstinline|TEXINPUTS| environment variable, e.g. by placing the following line in your \lstinline|.bashrc|: -\begin{lstlisting}[language=bash] -export TEXINPUTS="$(TEXINPUTS):<sTeXDIR>//:" -\end{lstlisting} - \end{sfragment} - - \begin{sfragment}[id=sec.stex-archives]{\sTeX Archives (Manual Setup)} - Writing semantically annotated \sTeX becomes much easier, if we can use - well-designed libraries of already annotated content. \sTeX provides such - libraries as \sTeX archives -- i.e. GIT repositories at - \url{https://gl.mathhub.info} -- most prominently the SMGLoM libraries at - \url{https://gl.mathhub.info/smglom}. - - To do so, we set up a \textbf{local MathHub} by creating a MathHub directory - \lstinline|<mhdir>|. Every \sTeX archive as an \textbf{archive path} - \lstinline|<apath>| and a name \lstinline|<archive>|. We can clone the \sTeX - archive by the following command-line instructions: +\begin{sfragment}{Setup} + There are two ways of using \sTeX: as a + \begin{enumerate} + \item way of writing {\LaTeX} more modularly (object-oriented Math) for creating PDF + documents or + \item foundation for authoring active documents in HTML5 instrumented with knowledge + management services. + \end{enumerate} + Both are legitimate and useful. The first requires a significantly smaller + tool-chain, so we describe it first. The second requires a much more substantial + toolchain of knowledge management systems. + + Luckily, the \sTeX-IDE will take care of much of the setup required + for the full toolchain, if you are willing to use it. + + \input{packages/stex-setup} + + \input{packages/stex-idesetup} + + \begin{sfragment}{Manual Setup} + + In lieu of using the \sTeX IDE, we can do the following: + + \begin{sfragment}[id=sec.stex-archives]{\sTeX Archives (Manual Setup)} + Writing semantically annotated \sTeX becomes much easier, if we can use + well-designed libraries of already annotated content. \sTeX provides such + libraries as \sTeX archives -- i.e. GIT repositories at + \url{https://gl.mathhub.info} -- most prominently the SMGLoM libraries at + \url{https://gl.mathhub.info/smglom}. + + To do so, we set up a \textbf{local MathHub} by creating a MathHub directory + \lstinline|<mhdir>|. Every \sTeX archive as an \textbf{archive path} + \lstinline|<apath>| and a name \lstinline|<archive>|. We can clone the \sTeX + archive by the following command-line instructions: \begin{lstlisting}[language=bash] - cd <mhdir>/<apath> - git clone https://gl.mathhub.info/smglom/<archive>.git +cd <mhdir>/<apath> +git clone https://gl.mathhub.info/smglom/<archive>.git \end{lstlisting} - Note that \sTeX archives often depend on other archives, thus you should be - prepared to clone these as well -- e.g. if \texttt{pdflatex} reports missing - files. - To make sure that \sTeX too knows where to find its archives, we need to set a global - system variable |MATHHUB|, that points to your local |MathHub|-directory (see - \sref{sec.stexarchives}). + Note that \sTeX archives often depend on other archives, thus you should be + prepared to clone these as well -- e.g. if \texttt{pdflatex} reports missing + files. + To make sure that \sTeX too knows where to find its archives, we need to set a global + system variable |MATHHUB|, that points to your local |MathHub|-directory (see + \sref{sec.stexarchives}). \begin{lstlisting}[language=bash] -export MATHHUB="<mhdir>'' +export MATHHUB="<mhdir>" \end{lstlisting} - \end{sfragment} - - \begin{sfragment}[id=sec.sTeX-IDE]{The \sTeX IDE} - We are currently working on an \sTeX IDE as an \sTeX plugin for |VScode|; - see~\cite{sTeX-IDE:on}. It will feature a setup procedure that automates the setup - described above (and below). For additional functionality see the (now obsolete) - plugin for \sTeX1 \cite{stexls:on,stexls-vscode-plugin:on}. - \end{sfragment} + \end{sfragment} \begin{sfragment}{Manual Setup for Active Documents and Knowledge Management Services} Foregoing on the \sTeX IDE, we will need several additional (on top of the minimal @@ -301,11 +270,15 @@ export MATHHUB="<mhdir>'' \end{itemize} \end{sfragment} \end{sfragment} +\end{sfragment} - \input{stex-tutorial} - +\begin{sfragment}[id=sec.sTeX-IDE]{The \sTeX IDE} + \input{stex-ide} \end{sfragment} +\input{stex-tutorial} + + \begin{sfragment}{Creating \sTeX Content} \input{packages/stex-basics} @@ -453,7 +426,6 @@ export MATHHUB="<mhdir>'' \begin{sfragment}{\sTeX Statements} \input{packages/stex-statements} \input{packages/stex-proofs} -\end{sfragment} \begin{sfragment}[id=sec.customhighlight]{Highlighting and Presentation Customizations} @@ -538,7 +510,7 @@ export MATHHUB="<mhdir>'' \begin{latexcode} \protected\def\symrefemph@uri#1#2{ \pdftooltip{ - \srefsymuri{#2}{\symrefemph{#1}} + \symrefemph{#1} }{ URI:~\detokenize{#2} } @@ -548,6 +520,10 @@ export MATHHUB="<mhdir>'' other three commands). \end{function} \end{sfragment} +\end{sfragment} +\begin{sfragment}[id=sec.references]{Cross References} + \input{packages/stex-references} +\end{sfragment} \begin{sfragment}{Additional Packages} \begin{sfragment}{Tikzinput: Treating TIKZ code as images} @@ -557,7 +533,7 @@ export MATHHUB="<mhdir>'' \input{packages/stex-document-structure} \end{sfragment} \begin{sfragment}{Slides and Course Notes} - \input{packages/stex-slides} + \input{packages/stex-notesslides} \end{sfragment} \begin{sfragment}{Representing Problems and Solutions} \input{packages/stex-problem} @@ -567,7 +543,7 @@ export MATHHUB="<mhdir>'' \end{sfragment} \end{sfragment} -\csname if@infulldoc\endcsname\else +\ifinfulldoc\else \newpage \printbibliography \end{document} |