summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/stex/tex/etc
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2022-02-26 03:00:34 +0000
committerNorbert Preining <norbert@preining.info>2022-02-26 03:00:34 +0000
commit740a11f29a3551babe3d7edbb57ac3baa2280a3f (patch)
tree5d6d449e762f5ab95042e3517d03c5ac3ddaf7c3 /macros/latex/contrib/stex/tex/etc
parent157cc9e776520d0b7d488317a69a10d4ae4d493b (diff)
CTAN sync 202202260300
Diffstat (limited to 'macros/latex/contrib/stex/tex/etc')
-rw-r--r--macros/latex/contrib/stex/tex/etc/beamernotesthemesTeX.sty14
-rw-r--r--macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty61
-rw-r--r--macros/latex/contrib/stex/tex/etc/hwexam-default.header30
-rw-r--r--macros/latex/contrib/stex/tex/etc/lststex.sty45
-rw-r--r--macros/latex/contrib/stex/tex/etc/rustex.sty67
-rw-r--r--macros/latex/contrib/stex/tex/etc/stexthm.sty45
6 files changed, 262 insertions, 0 deletions
diff --git a/macros/latex/contrib/stex/tex/etc/beamernotesthemesTeX.sty b/macros/latex/contrib/stex/tex/etc/beamernotesthemesTeX.sty
new file mode 100644
index 0000000000..4ebba507ae
--- /dev/null
+++ b/macros/latex/contrib/stex/tex/etc/beamernotesthemesTeX.sty
@@ -0,0 +1,14 @@
+% Beamer sTeX notes theme;
+% Copyright (c) 2022 Michael Kohlhase <michael.kohlhase@fau.de>.
+\ProvidesPackage{beamernotesthemesTeX}
+\typeout{Beamer sTeX notes theme}
+\setbeamertemplate{theorem begin}
+{%
+ \inserttheoremheadfont
+ \inserttheoremname
+ \inserttheoremnumber
+ \ifx \inserttheoremaddition \empty \else\ (\inserttheoremaddition)\fi
+ \inserttheorempunctuation\xspace
+ \inserttheorembodyfont
+}
+\setbeamertemplate{theorem end}{}
diff --git a/macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty b/macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty
new file mode 100644
index 0000000000..f5cc87feb4
--- /dev/null
+++ b/macros/latex/contrib/stex/tex/etc/beamerthemesTeX.sty
@@ -0,0 +1,61 @@
+% Beamer sTeX slide theme;
+% Copyright (c) 20 Michael Kohlhase <michael.kohlhase@fau.de>.
+\ProvidesPackage{beamerthemesTeX}
+\typeout{Beamer sTeX theme}
+\RequirePackage{xspace}
+
+% General appearance of theorems, like "ams style", but without the block env.
+\setbeamertemplate{theorem begin}
+{%
+ \inserttheoremheadfont
+ \inserttheoremname
+ \inserttheoremnumber
+ \ifx \inserttheoremaddition \empty \else\ (\inserttheoremaddition)\fi
+ \inserttheorempunctuation\xspace
+ \inserttheorembodyfont
+}
+\setbeamertemplate{theorem end}{}
+
+% THEME
+\mode
+<presentation>
+
+%% Logo images
+\pgfdeclareimage[height=2ex]{instlogo}{sTeX-logo}
+\pgfdeclareimage[height=2ex]{cclogo}{cc_somerights}
+
+%% A simple frame title with a long rule under it.
+\setbeamertemplate{frametitle}{%
+ \usebeamerfont{frametitle}\insertframetitle\strut%
+ \vskip-.1\baselineskip%
+ \leaders\vrule width \paperwidth\vskip0.4pt%
+ \vskip0pt%
+ \nointerlineskip
+}
+
+%% A Footer line with a Institution and CC logos
+\setbeamertemplate{footline}[text line]{%
+ \usebeamercolor[fg]{titlelike}
+ \pgfuseimage{instlogo}\hspace*{1cm}\insertshortauthor: \insertshorttitle\hfill{}%
+ \insertframenumber\hfill\insertshortdate\hspace*{1cm}\pgfuseimage{cclogo}%
+ }
+
+%% Turn off the navigation symbols
+\setbeamertemplate{navigation symbols}{}
+
+%% Inner theme
+\useinnertheme{default}
+%\setbeamertemplate{enumerate item}{(\alph{enumi})}
+%\setbeamertemplate{enumerate subitem}{(\roman{enumii})}
+
+\mode
+<all>
+
+%% Redefine various margin sizes
+\setbeamersize{text margin left=3mm}
+\setbeamersize{text margin right=3mm}
+\setbeamersize{description width=0.57cm}
+\setlength\leftmargini{1em}
+\setlength\leftmarginii{1em}
+\setlength\leftmarginiii{1em}
+\providecommand{\vstretch}[1]{\vspace*{\stretch{#1}}}
diff --git a/macros/latex/contrib/stex/tex/etc/hwexam-default.header b/macros/latex/contrib/stex/tex/etc/hwexam-default.header
new file mode 100644
index 0000000000..f3ee390bf9
--- /dev/null
+++ b/macros/latex/contrib/stex/tex/etc/hwexam-default.header
@@ -0,0 +1,30 @@
+\noindent\large{}Name: \hfill%
+Matriculation Number:\hspace*{2cm}\strut\\[1ex]
+
+\begin{center}
+ \Large\textbf{\@title}\\[1ex]
+ \large\@date\\[3ex]
+\end{center}
+
+\textbf{You have {\hwexamminutes} (sharp) for the test};\\
+Write the solutions to the sheet.
+
+\noindent
+The estimated time for solving this exam is {\theassignment@totalmin} minutes,
+leaving you {\check@time} minutes for revising your exam.
+
+\noindent
+You can reach {\theassignment@totalpts} points if you solve all problems.
+You will only need {\testheading@reqpts} points for a perfect score, i.e.
+{\bonus@pts} points are bonus points.
+\vfill
+\begin{center}
+{
+ \Large\em You have ample time, so take it slow and avoid rushing
+ to mistakes!\\[2ex]
+ Different problems test different skills and knowledge, so do not
+ get stuck on one problem.
+}\vfill
+
+\resizebox{\textwidth}{!}{\correction@table}\\[3ex]
+\end{center} \ No newline at end of file
diff --git a/macros/latex/contrib/stex/tex/etc/lststex.sty b/macros/latex/contrib/stex/tex/etc/lststex.sty
new file mode 100644
index 0000000000..e3865cb464
--- /dev/null
+++ b/macros/latex/contrib/stex/tex/etc/lststex.sty
@@ -0,0 +1,45 @@
+\RequirePackage{xcolor}
+\RequirePackage{listings}
+
+\lstdefinelanguage{pseudocode}
+{morekeywords={procedure,function,end,loop,return,to,local,Value,fail,if,then,do,for,else,elif,foreach,in,true,false,
+ inputs,returns,persistent,repeat,until,while},
+ morecomment=[s]{(*}{*)},
+ morecomment=[s]{/*}{*/}, % preferred over (* ... *)
+ morecomment=[s][\sl]{<}{>}
+}
+
+\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,
+ inputref,
+ sproof,spfstep,spfcases,spfcase,justification,premise}}
+
+\definecolor{backcolor}{gray}{.96}
+
+\lstset{columns=fullflexible,basicstyle=\ttfamily}
+\lstset{frame=none,numbers=none,lineskip=-.7ex}%,aboveskip=-1em,belowskip=-2em}
+\lstset{keywordstyle=[2]\color{red},keywordstyle=[3]\color{blue}}
+\lstset{keywordstyle=[4]\color{green},keywordstyle=[5]\color{magenta}}
+\lstset{emphstyle=[2]\color{red},emphstyle=[3]\color{blue}}
+\lstset{emphstyle=[4]\color{green},emphstyle=[5]\color{magenta}}
+\lstset{commentstyle=\color{brown}}
+\lstset{backgroundcolor=\color{backcolor}}
+\newcommand{\lstkeycolor}[2]{\ifcase#1\textbf{#1}\or\red{#2}\or\blue{#2}\or\green{#2}\or\magenta{#2}\fi}
+\define@key{stexlisting}{id}{\def\sref@id{#1}}
+\define@key{stexlisting}{id}{\def\stexlst@id{#1}}
+
+% LocalWords: lstdefinelanguage morekeywords morecomment moretexcs defin sref
+% LocalWords: twindef atwindef definalt twindefalt atwindefalt termref lstset
+% LocalWords: basicstyle scriptsize fullflexible lineskip aboveskip belowskip
+% LocalWords: keywordstyle keywordstyle newcommand lstkeycolor ifcase textbf
+% LocalWords: stexlisting stexlst sproof spfstep symdef spfcases spfcase tt
+% LocalWords: texcsstyle emphstyle emphstyle ttfamily
diff --git a/macros/latex/contrib/stex/tex/etc/rustex.sty b/macros/latex/contrib/stex/tex/etc/rustex.sty
new file mode 100644
index 0000000000..dafcc184eb
--- /dev/null
+++ b/macros/latex/contrib/stex/tex/etc/rustex.sty
@@ -0,0 +1,67 @@
+\ProvidesPackage{rustex}[2022/01/11]
+\RequirePackage{xspace}
+
+\ifcsname if@rustex\endcsname\else
+ \expandafter\newif\csname if@rustex\endcsname
+ \@rustexfalse
+\fi
+
+\if@rustex\else
+ \def\rustex@directHTML#1{}
+ % usage: plain HTML as argument, e.g.
+ % \rustex@directHTML{<div>foo</div>}
+
+ \def\rustex@annotateHTML#1{}
+ \def\rustex@annotateHTMLEnd{}
+ % usage: First argument: attributes and styles
+ % attribute names may contain URL prefixes
+ % styles should be prefixed with style:
+ % second argument: The stuff that gets annotated
+ % e.g.
+ %\rustex@annotateHTML{rustex:mycolor="grey" style:fontsize="150\%"}hello\rustex@annotateHTMLEnd
+
+ \def\rustex@addNamespaceAbbrev#1#2{}
+ % e.g. \rustex@addNamespaceAbbrev{stex}{http://kwarc.info/ns/sTeX}
+ \def\rustexBREAK{}
+\fi
+
+\ifcsname ExplSyntaxOn\endcsname
+ \ExplSyntaxOn
+ \prg_new_conditional:Nnn \rustex_if: {p, T, F, TF} {
+ \if@rustex
+ \prg_return_true:
+ \else:
+ \prg_return_false:
+ \fi:
+ }
+ \cs_new_protected:Npn\rustex_direct_HTML:n #1 {
+ \rustex_if:T {\cs:w rustex@directHTML\cs_end:{#1}}
+ }
+ \cs_new_protected:Npn\rustex_annotate_HTML_begin:n #1 {
+ \rustex_if:T {\cs:w rustex@annotateHTML\cs_end:{#1}}
+ }
+ \cs_new_protected:Nn\rustex_annotate_HTML_end: {
+ \rustex_if:T {\cs:w rustex@annotateHTMLEnd\cs_end:}
+ }
+ \cs_new_protected:Npn\rustex_annotate_HTML:nn #1 #2 {
+ \rustex_if:TF {
+ \rustex_annotate_HTML_begin:n{#1}
+ #2
+ \rustex_annotate_HTML_end:
+ }{#2}
+ }
+ \cs_new_protected:Npn\rustex_add_Namespace:nn #1 #2 {
+ \rustex_if:T {
+ \cs:w rustex@addNamespaceAbbrev\cs_end:{#1}{#2}
+ }
+ }
+ \ExplSyntaxOff
+\fi
+
+\protected\def\RusTeX{%
+ \@ifundefined{texorpdfstring}%
+ {\let\texorpdfstring\@firstoftwo}%
+ {}%
+ \texorpdfstring{R\kern-0.1em\raise-0.1em\hbox{\scriptsize US}\kern-0.2em\TeX}{RusTeX}\xspace%
+}
+\let\rustex\RusTeX \ 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
new file mode 100644
index 0000000000..5f2071c4fe
--- /dev/null
+++ b/macros/latex/contrib/stex/tex/etc/stexthm.sty
@@ -0,0 +1,45 @@
+\ProvidesExplPackage{stexthm}{2022/02/24}{3.0.0}{Default Typesetting for sTeX Statements}
+
+\RequirePackage{stex}
+\RequirePackage{amsthm}
+\RequirePackage{thmtools}
+
+\declaretheorem[parent=section]{theorem}
+\stexpatchassertion[theorem]
+{\ifx\sassertiontitle\@empty\begin{theorem}\else\begin{theorem}[\sassertiontitle]\fi}
+{\end{theorem}}
+
+\declaretheorem[sibling=theorem]{observation}
+\stexpatchassertion[observation]
+{\ifx\sassertiontitle\@empty\begin{observation}\else\begin{observation}[\sassertiontitle]\fi}
+{\end{observation}}
+
+\declaretheorem[sibling=theorem]{corollary}
+\stexpatchassertion[corollary]
+{\ifx\sassertiontitle\@empty\begin{corollary}\else\begin{corollary}[\sassertiontitle]\fi}
+{\end{corollary}}
+
+\declaretheorem[sibling=theorem]{lemma}
+\stexpatchassertion[lemma]
+{\ifx\sassertiontitle\@empty\begin{lemma}\else\begin{lemma}[\sassertiontitle]\fi}
+{\end{lemma}}
+
+\declaretheorem[sibling=theorem]{axiom}
+\stexpatchassertion[axiom]
+{\ifx\sassertiontitle\@empty\begin{axiom}[type=axiom]\else\begin{axiom}[type=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}}
+
+\declaretheorem[sibling=theorem,style=definition]{example}
+\stexpatchexample
+{\ifx\sexampletitle\@empty\begin{example}\else\begin{example}[\sexampletitle]\fi}
+{\end{example}}
+
+\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