summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/stex/source/extensions/notesslides.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/stex/source/extensions/notesslides.dtx')
-rw-r--r--macros/latex/contrib/stex/source/extensions/notesslides.dtx141
1 files changed, 51 insertions, 90 deletions
diff --git a/macros/latex/contrib/stex/source/extensions/notesslides.dtx b/macros/latex/contrib/stex/source/extensions/notesslides.dtx
index ff06827660..e74693c26b 100644
--- a/macros/latex/contrib/stex/source/extensions/notesslides.dtx
+++ b/macros/latex/contrib/stex/source/extensions/notesslides.dtx
@@ -11,9 +11,8 @@
% \iffalse
%
%<*driver>
-\def\bibfolder#1{../../lib/bib/#1}
+\def\libfolder#1{../../lib/#1}
\input{../../doc/stex-docheader}
-
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
@@ -54,7 +53,9 @@
% see \href{\basedocurl/manual.pdf}{the \sTeX Manual} or the
% \href{\basedocurl/stex.pdf}{full \sTeX documentation}.
%
-% \input{../../doc/packages/stex-slides}
+% \begin{sfragment}{The User Interface}
+% \input{../../doc/packages/stex-notesslides}
+% \end{sfragment}
% \fi
%
% \begin{documentation}\label{pkg:notesslides:doc}
@@ -76,7 +77,7 @@
% \begin{macrocode}
%<*cls>
%<@@=notesslides>
-\ProvidesExplClass{notesslides}{2022/05/24}{3.1.0}{notesslides Class}
+\ProvidesExplClass{notesslides}{2022/09/14}{3.2.0}{notesslides Class}
\RequirePackage{l3keys2e}
\keys_define:nn{notesslides / cls}{
@@ -121,7 +122,7 @@
% now we do the same for the |notesslides| package.
% \begin{macrocode}
%<*package>
-\ProvidesExplPackage{notesslides}{2022/05/24}{3.1.0}{notesslides Package}
+\ProvidesExplPackage{notesslides}{2022/09/14}{3.2.0}{notesslides Package}
\RequirePackage{l3keys2e}
\keys_define:nn{notesslides / pkg}{
@@ -208,35 +209,23 @@
\RequirePackage[bookmarks,bookmarksopen,bookmarksnumbered,breaklinks,hidelinks]{hyperref}
}
\RequirePackage{stex-tikzinput}
-\RequirePackage{etoolbox}
-\RequirePackage{amssymb}
-\RequirePackage{amsmath}
\RequirePackage{comment}
-\RequirePackage{textcomp}
\RequirePackage{url}
\RequirePackage{graphicx}
\RequirePackage{pgf}
+\RequirePackage{bookmark}
% \end{macrocode}
%
% \subsection{Notes and Slides}\label{sec:impl:noteslides}
%
% For the lecture notes cases, we also provide the |\usetheme| macro that would otherwise
-% come from the the |beamer| class. While the latter loads
-% |beamertheme|\meta{theme}{.sty}, the notes version loads
-% |beamernotestheme|\meta{theme}|.sty|.\ednote{MK: This is not ideal, but I am not sure
-% that I want to be able to provide the full theme functionality there.}
+% come from the the |beamer| class.
% \begin{macrocode}
\bool_if:NT \c_@@_notes_bool {
- \renewcommand\usetheme[2][]{\usepackage[#1]{beamernotestheme#2}}
+ \renewcommand\usetheme[2][]{\usepackage[#1]{beamertheme#2}}
}
-
-
\NewDocumentCommand \libusetheme {O{} m} {
- \bool_if:NTF \c_@@_notes_bool {
- \libusepackage[#1]{beamernotestheme#2}
- }{
\libusepackage[#1]{beamertheme#2}
- }
}
% \end{macrocode}
@@ -485,8 +474,6 @@
\includegraphics[#1]{\mhpath\Gin@mhrepos{#2}}
}
-
-
\bool_if:NTF \c_@@_notes_bool {
\setlength{\slidelogoheight}{.4cm}
}{
@@ -506,10 +493,26 @@
% \end{macrocode}
% \end{macro}
%
+% \begin{macro}{\author}
+% In notes mode, we redefine the |\author| macro so that it does not disregard the
+% optional argument (as \pkg{beamerarticle} does). We want to use it to set the source
+% later.
+% \begin{macrocode}
+\bool_if:NT \c_@@_notes_bool {
+ \def\author{\@dblarg\ns@author}
+ \long\def\ns@author[#1]#2{%
+ \def\c_@@_shortauthor{#1}%
+ \def\@author{#2}
+ }
+}
+% \end{macrocode}
+% \end{macro}
+%
% \begin{macro}{\setsource}
-% |\source| stores the writer's name. By default it is {\it Michael Kohlhase} since he is the main user and designer of this package. |\setsource{|\meta{name}|}| can change the writer's name.
+% |\source| stores the writer's name. By default it is {\it Michael Kohlhase} since he
+% is the main user and designer of this package. |\setsource{|\meta{name}|}| can change
+% the writer's name.
% \begin{macrocode}
-\def\source{Michael Kohlhase}% customize locally
\newrobustcmd{\setsource}[1]{\def\source{#1}}
% \end{macrocode}
% \end{macro}
@@ -521,7 +524,13 @@
% logo. |\setlicensing[|\meta{url}|]{|\meta{logo name}|}| is used for customization,
% where ||\meta{url}|| is optional.
% \begin{macrocode}
-\def\copyrightnotice{\footnotesize\copyright :\hspace{.3ex}{\source}}
+\def\copyrightnotice{%
+ \footnotesize\copyright :\hspace{.3ex}%
+ \ifcsname source\endcsname\source\else%
+ \ifcsname c_@@_shortauthor\endcsname\c_@@_shortauthor\else%
+ \PackageWarning{notesslides}{Author/Source~undefined~in~copyright~notice}%
+ ?source/author?\fi%
+ \fi}
\newsavebox{\cclogo}
\sbox{\cclogo}{\includegraphics[height=\slidelogoheight]{stex-cc_somerights}}
\newif\ifcchref\cchreffalse
@@ -617,69 +626,6 @@
% \end{macrocode}
% \end{macro}
%
-% \subsection{Colors and Highlighting}\label{sec:impl:highlighting}
-%
-% We first specify sans serif fonts as the default.
-%
-% \begin{macrocode}
-\sffamily
-% \end{macrocode}
-%
-% Now, we set up an infrastructure for highlighting phrases in slides. Note that we use
-% content-oriented macros for highlighting rather than directly using color markup.
-% The first thing to to is to adapt the green so that it is dark enough for most beamers
-% \begin{macrocode}
-\AddToHook{begindocument}{
- \definecolor{green}{rgb}{0,.5,0}
- \definecolor{purple}{cmyk}{.3,1,0,.17}
-}
-% \end{macrocode}
-%
-% We customize the |\defemph|, |\symrefemph|, |\compemph|, and |\titleemph| macros with
-% colors. Furthermore we customize the |\__omtextlec| macro for the appearance of line end
-% comments in |\lec|.
-%
-% \begin{macrocode}
-% \def\STpresent#1{\textcolor{blue}{#1}}
-\def\defemph#1{{\textcolor{magenta}{#1}}}
-\def\symrefemph#1{{\textcolor{cyan}{#1}}}
-\def\compemph#1{{\textcolor{blue}{#1}}}
-\def\titleemph#1{{\textcolor{blue}{#1}}}
-\def\__omtext_lec#1{(\textcolor{green}{#1})}
-% \end{macrocode}
-%
-% I like to use the dangerous bend symbol for warnings, so we provide it here.
-% \begin{macro}{\textwarning}
-% as the macro can be used quite often we put it into a box register, so that it is only
-% loaded once.
-% \begin{macrocode}
-\pgfdeclareimage[width=.8em]{miko@small@dbend}{stex-dangerous-bend}
-\def\smalltextwarning{
- \pgfuseimage{miko@small@dbend}
- \xspace
-}
-\pgfdeclareimage[width=1.2em]{miko@dbend}{stex-dangerous-bend}
-\newrobustcmd\textwarning{
- \raisebox{-.05cm}{\pgfuseimage{miko@dbend}}
- \xspace
-}
-\pgfdeclareimage[width=2.5em]{miko@big@dbend}{stex-dangerous-bend}
-\newrobustcmd\bigtextwarning{
- \raisebox{-.05cm}{\pgfuseimage{miko@big@dbend}}
- \xspace
-}
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macrocode}
-\newrobustcmd\putgraphicsat[3]{
- \begin{picture}(0,0)\put(#1){\includegraphics[#2]{#3}}\end{picture}
-}
-\newrobustcmd\putat[2]{
- \begin{picture}(0,0)\put(#1){#2}\end{picture}
-}
-% \end{macrocode}
-%
% \subsection{Sectioning}
%
% If the |sectocframes| option is set, then we make section frames. We first define
@@ -744,33 +690,48 @@
\ifcase\l_document_structure_section_level_int\or
\stepcounter{part}
\def\@@label{{\omdoc@part@kw}~\Roman{part}}
+ \addcontentsline{toc}{part}{\protect\numberline{\thepart}#2}
+ \pdfbookmark[0]{\thepart\ #2}{part.\thepart}
\def\currentsectionlevel{\omdoc@part@kw}
\or
\stepcounter{chapter}
\def\@@label{{\omdoc@chapter@kw}~\arabic{chapter}}
+ \addcontentsline{toc}{chapter}{\protect\numberline{\thechapter}#2}
+ \pdfbookmark[1]{\thechapter\ #2}{chapter.\cs_if_exist:cT{thepart}\thepart.\thechapter}
\def\currentsectionlevel{\omdoc@chapter@kw}
\or
\stepcounter{section}
\def\@@label{\part@prefix\arabic{section}}
+ \addcontentsline{toc}{section}{\protect\numberline{\thesection}#2}
+ \pdfbookmark[2]{\cs_if_exist:cT{thechapter}{\thechapter.}\thesection\ #2}
+ {section.\cs_if_exist:cT{thepart}{\thepart}.\cs_if_exist:cT{thechapter}{\thechapter}.\thesection}
\def\currentsectionlevel{\omdoc@section@kw}
\or
\stepcounter{subsection}
\def\@@label{\part@prefix\arabic{section}.\arabic{subsection}}
+ \addcontentsline{toc}{subsection}{\protect\numberline{\thesubsection}#2}
+ \pdfbookmark[3]{\cs_if_exist:cT{thechapter}{\thechapter.}\thesection.\thesubsection\ #2}
+ {subsection.\cs_if_exist:cT{thepart}{\thepart}.\cs_if_exist:cT{thechapter}{\thechapter}.\thesection.\thesubsection}
\def\currentsectionlevel{\omdoc@subsection@kw}
\or
\stepcounter{subsubsection}
\def\@@label{\part@prefix\arabic{section}.\arabic{subsection}.\arabic{subsubsection}}
+ \addcontentsline{toc}{subsubsection}{\protect\numberline{\thesubsubsection}#2}
+ \pdfbookmark[4]{\cs_if_exist:cT{thechapter}{\thechapter.}\thesection.\thesubsection.\thesubsubsection\ #2}
+ {subsubsection.\cs_if_exist:cT{thepart}{\thepart}.\cs_if_exist:cT{thechapter}{\thechapter}.\thesection.\thesubsection.\thesubsubsection}
\def\currentsectionlevel{\omdoc@subsubsection@kw}
\or
\stepcounter{paragraph}
\def\@@label{\part@prefix\arabic{section}.\arabic{subsection}.\arabic{subsubsection}.\arabic{paragraph}}
+ \addcontentsline{toc}{paragraph}{\protect\numberline{\theparagraph}#2}
+ \pdfbookmark[5]{\cs_if_exist:cT{thechapter}{\thechapter.}\thesection.\thesubsection.\thesubsubsection.\theparagraph\ #2}
+ {paragraph.\cs_if_exist:cT{thepart}{\thepart}.\cs_if_exist:cT{thechapter}{\thechapter}.\thesection.\thesubsection.\thesubsubsection.\theparagraph}
\def\currentsectionlevel{\omdoc@paragraph@kw}
\else
\def\@@label{}
\def\currentsectionlevel{\omdoc@paragraph@kw}
\fi% end ifcase
- \@@label%\sref@label@id\@@label
- \quad #2%
+ \@@label\quad #2%
}%
\vfill%
\end{frame}%