summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/stex/tex/etc
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-05-25 03:01:13 +0000
committerNorbert Preining <norbert@preining.info>2022-05-25 03:01:13 +0000
commitf01a37f8311f33e32441d25bdadcda9dcdbd165d (patch)
treeefb861dfafff09d4bef8024c85a11f8c8deaba76 /macros/latex/contrib/stex/tex/etc
parent0c7d079315627312627c83bc9ce6f5e4f1b436f6 (diff)
CTAN sync 202205250301
Diffstat (limited to 'macros/latex/contrib/stex/tex/etc')
-rw-r--r--macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty9
-rw-r--r--macros/latex/contrib/stex/tex/etc/lststex.sty14
-rw-r--r--macros/latex/contrib/stex/tex/etc/stex-backend-latexml.cfg56
-rw-r--r--macros/latex/contrib/stex/tex/etc/stex-backend-pdflatex.cfg10
-rw-r--r--macros/latex/contrib/stex/tex/etc/stex-backend-rustex.cfg59
-rw-r--r--macros/latex/contrib/stex/tex/etc/stex-logo.sty7
-rw-r--r--macros/latex/contrib/stex/tex/etc/stexthm.sty45
7 files changed, 186 insertions, 14 deletions
diff --git a/macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty b/macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty
index 5d3a63c630..d7b861086a 100644
--- a/macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty
+++ b/macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty
@@ -20,9 +20,14 @@
\mode
<presentation>
+\ifcsname slidelogo\endcsname\else
+ \newsavebox\slidelogo
+ \sbox\slidelogo{\sTeX}
+\fi
+
%% Logo images
\pgfdeclareimage[height=2ex]{instlogo}{sTeX-logo}
-\pgfdeclareimage[height=2ex]{cclogo}{cc_somerights}
+\pgfdeclareimage[height=2ex]{cclogo}{stex-cc_somerights}
%% A simple frame title with a long rule under it.
\setbeamertemplate{frametitle}{%
@@ -36,7 +41,7 @@
%% A Footer line with a Institution and CC logos
\setbeamertemplate{footline}[text line]{%
\usebeamercolor[fg]{titlelike}
- \pgfuseimage{instlogo}\hspace*{1cm}\insertshortauthor: \insertshorttitle\hfill{}%
+ \usebox\slidelogo\hspace*{1cm}\insertshortauthor: \insertshorttitle\hfill{}%
\insertframenumber\hfill\insertshortdate\hspace*{1cm}\pgfuseimage{cclogo}%
}
diff --git a/macros/latex/contrib/stex/tex/etc/lststex.sty b/macros/latex/contrib/stex/tex/etc/lststex.sty
index e3865cb464..2b0f7a9b2e 100644
--- a/macros/latex/contrib/stex/tex/etc/lststex.sty
+++ b/macros/latex/contrib/stex/tex/etc/lststex.sty
@@ -10,16 +10,10 @@
}
\lstdefinelanguage[sTeX]{TeX}[LaTeX]{TeX}%
- {moretexcs={[2]defin,twindef,atwindef,definalt,twindefalt,atwindefalt,definiendum,
- importmodule,usemodule,importmhmodule,usemhmodule,gimport,guse,
- symdef,symvariant,symtest,
- defi,defii,defiii,adefi,adefii,adefiii,defis,defiis,defiiis,
- trefi,trefii,trefiii,atrefi,atrefii,atrefiii,mtrefi,mtrefii,mtrefiii,
- trefis,trefiis,trefiiis,atrefis,atrefiis,atrefiiis,
- symi,symii,symiii,
- termref,sref},
- morekeywords={module,definition,axiom,assertion,omtext,
- mhmodule,mhmodsig,mhmodnl,modsig,modnl,
+ {moretexcs={[2]definiendum,definame,symref,symname,comp,
+ importmodule,usemodule
+ symdef,symdecl,notation,sref},
+ morekeywords={smodule,sdefinition,sassertion,sparagraph,
inputref,
sproof,spfstep,spfcases,spfcase,justification,premise}}
diff --git a/macros/latex/contrib/stex/tex/etc/stex-backend-latexml.cfg b/macros/latex/contrib/stex/tex/etc/stex-backend-latexml.cfg
new file mode 100644
index 0000000000..1cb4e31d3a
--- /dev/null
+++ b/macros/latex/contrib/stex/tex/etc/stex-backend-latexml.cfg
@@ -0,0 +1,56 @@
+\ifcsname if@latexml\endcsname\else
+\expandafter\newif\csname if@latexml\endcsname\@latexmlfalse
+\fi
+
+\tl_const:Nx \c_stex_html_emptyarg_tl {~}
+
+\prg_new_conditional:Nnn \latexml_if: {p, T, F, TF} {
+ \if@latexml
+ \expandafter\prg_return_true:
+ \else:
+ \expandafter\prg_return_false:
+ \fi:
+}
+
+\cs_new_protected:Nn \stex_annotate:nnn {
+ \_stex_html_checkempty:n { #3 }
+ \mode_if_math:TF {
+ \cs:w latexml@annotate@math\cs_end:{#1}{#2}{
+ \tl_use:N \l_stex_html_arg_tl
+ }
+ }{
+ \cs:w latexml@annotate@text\cs_end:{#1}{#2}{
+ \tl_use:N \l_stex_html_arg_tl
+ }
+ }
+}
+
+\cs_new_protected:Nn \stex_annotate_invisible:n {
+ \_stex_html_checkempty:n { #1 }
+ \mode_if_math:TF {
+ \cs:w latexml@invisible@math\cs_end:{
+ \tl_use:N \l_stex_html_arg_tl
+ }
+ } {
+ \cs:w latexml@invisible@text\cs_end:{
+ \tl_use:N \l_stex_html_arg_tl
+ }
+ }
+}
+
+\cs_new_protected:Nn \stex_annotate_invisible:nnn {
+ \_stex_html_checkempty:n { #3 }
+ \cs:w latexml@annotate@invisible\cs_end:{#1}{#2}{
+ \tl_use:N \l_stex_html_arg_tl
+ }
+}
+
+\NewDocumentEnvironment{stex_annotate_env} { m m } {
+ \par\begin{latexml@annotateenv}{#1}{#2}
+}{
+ \par\end{latexml@annotateenv}
+}
+
+\prg_new_conditional:Nnn \stex_html_backend: {p, T, F, TF} {
+ \prg_return_true:
+} \ No newline at end of file
diff --git a/macros/latex/contrib/stex/tex/etc/stex-backend-pdflatex.cfg b/macros/latex/contrib/stex/tex/etc/stex-backend-pdflatex.cfg
new file mode 100644
index 0000000000..bdd2810d09
--- /dev/null
+++ b/macros/latex/contrib/stex/tex/etc/stex-backend-pdflatex.cfg
@@ -0,0 +1,10 @@
+\tl_const:Nx \c_stex_html_emptyarg_tl {~}
+
+\cs_new_protected:Nn \stex_annotate:nnn {#3}
+\cs_new_protected:Nn \stex_annotate_invisible:n {}
+\cs_new_protected:Nn \stex_annotate_invisible:nnn {}
+\NewDocumentEnvironment{stex_annotate_env} { m m } {}{}
+
+\prg_new_conditional:Nnn \stex_html_backend: {p, T, F, TF} {
+ \prg_return_false:
+} \ No newline at end of file
diff --git a/macros/latex/contrib/stex/tex/etc/stex-backend-rustex.cfg b/macros/latex/contrib/stex/tex/etc/stex-backend-rustex.cfg
new file mode 100644
index 0000000000..3f48631e40
--- /dev/null
+++ b/macros/latex/contrib/stex/tex/etc/stex-backend-rustex.cfg
@@ -0,0 +1,59 @@
+\RequirePackage{rustex}
+
+\rustex_add_Namespace:nn{stex}{http://kwarc.info/ns/sTeX}
+\rustex_add_Namespace:nn{mmt}{http://uniformal.github.io/MMT}
+
+\tl_const:Nx \c_stex_html_emptyarg_tl {
+ \rustex_direct_HTML:n { \c_ampersand_str \c_hash_str 8205; }
+}
+
+\cs_new_protected:Nn \stex_annotate:nnn {
+ \_stex_html_checkempty:n { #3 }
+ \rustex_annotate_HTML:nn {
+ property="stex:#1" ~
+ resource="#2"
+ } {
+ \mode_if_vertical:TF{
+ \tl_use:N \l_stex_html_arg_tl\stex_par:
+ }{
+ \tl_use:N \l_stex_html_arg_tl
+ }
+ }
+}
+
+\cs_new_protected:Nn \stex_annotate_invisible:n {
+ \_stex_html_checkempty:n { #1 }
+ \rustex_annotate_HTML:nn {
+ stex:visible="false" ~
+ style:display="none"
+ } {
+ \ifmmode\tl_use:N \l_stex_html_arg_tl\else\hbox{\tl_use:N \l_stex_html_arg_tl}\fi
+ }
+}
+
+\cs_new_protected:Nn \stex_annotate_invisible:nnn {
+ \_stex_html_checkempty:n { #3 }
+ \rustex_annotate_HTML:nn {
+ property="stex:#1" ~
+ resource="#2" ~
+ stex:visible="false" ~
+ style:display="none"
+ } {
+ \ifmmode\tl_use:N \l_stex_html_arg_tl\else\hbox{\tl_use:N \l_stex_html_arg_tl}\fi
+ }
+}
+
+\NewDocumentEnvironment{stex_annotate_env} { m m } {
+ \stex_par:
+ \rustex_annotate_HTML_begin:n {
+ property="stex:#1" ~
+ resource="#2"
+ }
+}{
+ \stex_par:
+ \rustex_annotate_HTML_end:
+}
+
+\prg_new_conditional:Nnn \stex_html_backend: {p, T, F, TF} {
+ \prg_return_true:
+} \ No newline at end of file
diff --git a/macros/latex/contrib/stex/tex/etc/stex-logo.sty b/macros/latex/contrib/stex/tex/etc/stex-logo.sty
new file mode 100644
index 0000000000..1bcb487aba
--- /dev/null
+++ b/macros/latex/contrib/stex/tex/etc/stex-logo.sty
@@ -0,0 +1,7 @@
+\RequirePackage{xspace}
+\protected\def\stex{%
+ \@ifundefined{texorpdfstring}{\raisebox{-.5ex}S\kern-.5ex\TeX}{%
+ \texorpdfstring{\raisebox{-.5ex}S\kern-.5ex\TeX}{sTeX}\xspace%
+ }%
+}
+\let\sTeX\stex \ No newline at end of file
diff --git a/macros/latex/contrib/stex/tex/etc/stexthm.sty b/macros/latex/contrib/stex/tex/etc/stexthm.sty
index 5f2071c4fe..16931b514a 100644
--- a/macros/latex/contrib/stex/tex/etc/stexthm.sty
+++ b/macros/latex/contrib/stex/tex/etc/stexthm.sty
@@ -26,13 +26,16 @@
\declaretheorem[sibling=theorem]{axiom}
\stexpatchassertion[axiom]
-{\ifx\sassertiontitle\@empty\begin{axiom}[type=axiom]\else\begin{axiom}[type=axiom,\sassertiontitle]\fi}
+{\ifx\sassertiontitle\@empty\begin{axiom}\else\begin{axiom}[\sassertiontitle]\fi}
{\end{axiom}}
\declaretheorem[sibling=theorem,style=remark]{remark}
\stexpatchassertion[remark]
{\ifx\sassertiontitle\@empty\begin{remark}\else\begin{remark}[\sassertiontitle]\fi}
{\end{remark}}
+\stexpatchparagraph[remark]
+{\ifx\sparagraphtitle\@empty\begin{remark}\else\begin{remark}[\sparagraphtitle]\fi}
+{\end{remark}}
\declaretheorem[sibling=theorem,style=definition]{example}
\stexpatchexample
@@ -42,4 +45,42 @@
\declaretheorem[sibling=theorem,style=definition]{definition}
\stexpatchdefinition
{\ifx\sdefinitiontitle\@empty\begin{definition}\else\begin{definition}[\sdefinitiontitle]\fi}
- {\end{definition}} \ No newline at end of file
+ {\end{definition}}
+
+
+\RequirePackage{pdfcomment}
+\RequirePackage{xcolor}
+
+\def\compemph#1{\ifcsname textcolor\endcsname\textcolor{blue}{#1}\else#1\fi}
+\def\symrefemph#1{\ifcsname textcolor\endcsname\textcolor{blue}{#1}\else#1\fi}
+\def\defemph#1{\ifcsname textcolor\endcsname\textcolor{blue}{\textbf{#1}}\else\textbf{#1}\fi}
+\def\varemph#1{\ifcsname textcolor\endcsname\textcolor{gray}{#1}\else#1\fi}
+
+\protected\def\compemph@uri#1#2{%
+ \pdftooltip{%
+ \srefsymuri{#2}{\compemph{#1}}%
+ }{%
+ URI:~\detokenize{#2}%
+ }%
+}
+\protected\def\symrefemph@uri#1#2{%
+ \pdftooltip{%
+ \srefsymuri{#2}{\symrefemph{#1}}%
+ }{%
+ URI:~\detokenize{#2}%
+ }%
+}
+\protected\def\defemph@uri#1#2{%
+ \pdftooltip{%
+ \defemph{#1}%
+ }{%
+ URI:~\detokenize{#2}%
+ }%
+}
+\protected\def\varemph@uri#1#2{%
+ \pdftooltip{%
+ \varemph{#1}%
+ }{%
+ Variable~\detokenize{#2}%
+ }%
+} \ No newline at end of file