diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/tudscr/tudscrtutorial.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/tudscr/tudscrtutorial.sty | 450 |
1 files changed, 242 insertions, 208 deletions
diff --git a/Master/texmf-dist/tex/latex/tudscr/tudscrtutorial.sty b/Master/texmf-dist/tex/latex/tudscr/tudscrtutorial.sty index 5f89cff818c..938277760b7 100644 --- a/Master/texmf-dist/tex/latex/tudscr/tudscrtutorial.sty +++ b/Master/texmf-dist/tex/latex/tudscr/tudscrtutorial.sty @@ -14,9 +14,9 @@ %% %% TUD-Script -- Corporate Design of Technische Universitaet Dresden %% -%% 2017/05/30 v2.05m TUD-Script +%% 2019/06/28 v2.06 TUD-Script %% -%% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2017 +%% Copyright (C) Falk Hanisch <hanisch.latex@outlook.com>, 2012-2019 %% %% This file was generated from file(s) of the TUD-Script bundle. %% ---------------------------------------------------------------------------- @@ -42,7 +42,7 @@ \def\@tempb##1 v##2 ##3\relax##4\relax{\gdef\TUDScriptVersionNumber{##2}}% \edef\@tempa{\TUD@Version}% \expandafter\@tempb\@tempa\relax? ? \relax\relax% - \gdef\TUD@Version@KOMA{3.17}% + \gdef\TUD@Version@KOMA{3.25}% } \else \newcommand*\TUD@Version@Check[1]{% @@ -57,7 +57,7 @@ \fi% } \fi - \TUD@Version@Check{2017/05/30 v2.05m TUD-Script} + \TUD@Version@Check{2019/06/28 v2.06 TUD-Script} \endgroup \NeedsTeXFormat{LaTeX2e} \providecommand*\tudscrmail{hanisch.latex@outlook.com} @@ -68,18 +68,24 @@ This package can only be used with a class out of the\MessageBreak% tudscr bundle (tudscrbook, tudscrreprt, tudscrartcl, tudscrposter).% }% - \endinput + \endinput% \fi \@ifundefined{TUDScript}{% \DeclareRobustCommand\TUDScript{% - \ifdin{TUD-SCRIPT}{% - \textsf{T\kern.05em U\kern.05em D\kern.1em-\kern.1em Script}% - }\csname xspace\endcsname% + \begingroup% + \def\tud@res@b##1{T\kern.05em U\kern.05em D\kern.1em-\kern.1em ##1}% + \tud@ifdin{% + \edef\tud@res@a{\tud@res@b{SCRIPT}}% + }{% + \edef\tud@res@a{\noexpand\textsf{\tud@res@b{Script}}}% + }% + \expandafter\endgroup\tud@res@a% + \csname xspace\endcsname% }% }{} %%% From File: tudscr-manual.dtx \ProvidesPackage{tudscrtutorial}[% - 2017/05/30 v2.05m TUD-Script + 2019/06/28 v2.06 TUD-Script package (internal tutorials)% ] @@ -106,7 +112,9 @@ \ifdef{\tudfinalflag}{% \TUDoptions{ToDo=false}% \TUD@key{ToDo}{\FamilyKeyStateProcessed}% - }{}% + }{% + \KOMAoptions{overfullrule}% + }% \ifdef{\tudprintflag}{% \ifnum\tud@cd@num>\z@\relax% \TUDoptions{cd=true}% @@ -128,17 +136,17 @@ \else% \def\@tempa not##1##2##3##4\@nil{% \ifstr{##1##2##3}{not}{% - \if\relax##4\relax\else% + \IfArgIsEmpty{##4}{}{% \listeadd\tud@todo@type@neg{##4}% \@tud@todotrue% \FamilyKeyStateProcessed% - \fi% + }% }{% - \if\relax##1\relax\else% + \IfArgIsEmpty{##1}{}{% \listeadd\tud@todo@type@pos{##1##2##3##4}% \@tud@todotrue% \FamilyKeyStateProcessed% - \fi% + }% }% }% \edef\@tempb{not\trim@spaces{#1}}% @@ -148,7 +156,9 @@ %%% From File: tudscr-misc.dtx \KOMAoptions{headings=small} \TUDoptions{cdfoot=true} -\TUDExecuteOptions{ToDo=true} +\TUDExecuteOptions{% + ToDo=true% +} \TUDProcessOptions\relax %%% From File: tudscr-manual.dtx \PassOptionsToPackage{log-declarations=false}{xparse} @@ -160,12 +170,6 @@ \reversemarginpar \RequirePackage{xspace}[2009/10/20] \xspaceaddexceptions{"=} -\@ifpackagelater{geometry}{2010/09/13}{% - \ClassWarning{\TUD@Class@Name}{% - Package `geometry' was updated so some patches\MessageBreak% - are maybe outdated% - }% -}{}% \newcommand*\vTUDScript{v\TUDScriptVersionNumber} \newcommand*\vKOMAScript{v\TUD@Version@KOMA} \newcommand*\tud@english[1]{#1} @@ -174,66 +178,20 @@ \renewcommand*\tud@english[1]{\foreignlanguage{english}{#1}}% }{}% } +\RequirePackage{shellesc}[2016/06/07] \RequirePackage{pdftexcmds}[2016/05/21] -\newcommand*\tud@templist{} -\let\tud@templist\relax -\newcommand*\tud@list@sort[1]{% - \ifdefvoid{#1}{% - \ClassWarning{tudscrmanual}{% - The given list \string#1\space\MessageBreak% - is empty, nothing to sort here% - }% - }{% - \let\tud@reserved#1% - \let\tud@templist\relax% - \forlistloop\tud@list@@sort{\tud@reserved}% - \let\tud@reserved\relax% - \@for\@tempa:=\tud@templist\do{\listeadd\tud@reserved{\@tempa}}% - \let#1\tud@reserved% - }% -} -\newif\if@tud@list@sorted -\newcommand*\tud@list@@sort[1]{% - \ifx\tud@templist\relax% - \def\tud@templist{#1}% - \else% - \@tud@list@sortedfalse% - \let\@tempb\@empty% - \@for\@tempa:=\tud@templist\do{% - \if@tud@list@sorted% - \expandafter\edef\expandafter\@tempb\expandafter{\@tempb,\@tempa}% - \else% - \expandafter\ifnum\pdf@strcmp{#1}{\@tempa}<\z@\relax% - \ifx\@tempb\@empty% - \expandafter\edef\expandafter\@tempb\expandafter{% - #1,\@tempa% - }% - \else% - \expandafter\edef\expandafter\@tempb\expandafter{% - \@tempb,#1,\@tempa% - }% - \fi% - \@tud@list@sortedtrue% - \else% - \ifx\@tempb\@empty% - \expandafter\edef\expandafter\@tempb\expandafter{\@tempa}% - \else% - \expandafter\edef\expandafter\@tempb\expandafter{\@tempb,\@tempa}% - \fi% - \fi% - \fi% - }% - \if@tud@list@sorted\else% - \expandafter\edef\expandafter\@tempb\expandafter{\@tempb,#1}% - \fi% - \let\tud@templist\@tempb% - \fi% -} \RequirePackage{scrwfile}[2013/08/05] -\RequirePackage{silence}[2012/07/02] \RequirePackage{filecontents}[2011/10/08] -\WarningFilter[Tutorial]{latex}{Overwriting file}% -\WarningFilter[Tutorial]{latex}{Writing file}% +\begingroup% + \catcode`\*=11% + \catcode`\^^M\active% + \catcode`\^^L\active\let^^L\relax% + \catcode`\^^I\active% + \patchcmd{\filec@ntents}{% + \@latex@warning@no@line{Overwriting file `\@currdir#1'}% + }{}{}{\tud@patch@wrn{filec@tents}}% + \global\let\filec@ntents\filec@ntents% +\endgroup% \PassOptionsToPackage{hyperindex=false,colorlinks,linkcolor=blue}{hyperref} \PassOptionsToPackage{open,openlevel=0}{bookmark} \AfterPackage*{hyperref}{% @@ -284,16 +242,16 @@ } \newcommand*\tud@hyperref@a[2][]{#2} \newcommand*\tud@hyperref@b[4]{#4} - \tud@locale@german{\partautorefname}{Teil}% - \tud@locale@german{\chapterautorefname}{Kapitel}% - \tud@locale@german{\sectionautorefname}{Unterkapitel}% - \tud@locale@german{\subsectionautorefname}{Abschnitt}% - \tud@locale@german{\subsubsectionautorefname}{Unterabschnitt}% - \tud@locale@english{\partautorefname}{Part}% - \tud@locale@english{\chapterautorefname}{chapter}% - \tud@locale@english{\sectionautorefname}{section}% - \tud@locale@english{\subsectionautorefname}{subsection}% - \tud@locale@english{\subsubsectionautorefname}{subsubsection}% + \tud@localization@german{\partautorefname}{Teil}% + \tud@localization@german{\chapterautorefname}{Kapitel}% + \tud@localization@german{\sectionautorefname}{Unterkapitel}% + \tud@localization@german{\subsectionautorefname}{Abschnitt}% + \tud@localization@german{\subsubsectionautorefname}{Unterabschnitt}% + \tud@localization@english{\partautorefname}{Part}% + \tud@localization@english{\chapterautorefname}{chapter}% + \tud@localization@english{\sectionautorefname}{section}% + \tud@localization@english{\subsectionautorefname}{subsection}% + \tud@localization@english{\subsubsectionautorefname}{subsubsection}% \providecommand*\tudhyperref[2]{#2}% \providecommand*\autorefname[1][]{??\xspace}% } @@ -363,17 +321,17 @@ \let\tud@bdl@curr\tud@bdl@dflt \newcommand*\tud@if@bdl[2]{\ifstr{\tud@bdl@curr}{\tud@bdl@dflt}{#2}{#1}} \NewExpandableDocumentCommand\@Application{sm}{#2} -\NewDocumentCommand\Application{smd()d<>d||}{% +\NewDocumentCommand\Application{s m !d() !d<> !d||}{% \Markup@SetFormat{\sbsfont}% \IfValueTF{#4}{% \Process@Markup{\Application{#2}}(#3)<#4>% }{% \Process@Markup{\Application{#2}}(#3)% }% - \Process@Index{#1}{\Application{#2}}[Anwendungssoftware](#3)|#4|% + \Process@Index{#1}{\Application{#2}}[Anwendungssoftware](#3)|#5|% } \NewExpandableDocumentCommand\@Distribution{sm}{#2} -\NewDocumentCommand\Distribution{smod()d||}{% +\NewDocumentCommand\Distribution{s m !o !d() !d||}{% \Markup@SetFormat{\sbnfont}% \IfValueTF{#3}{% \Process@Markup{\Distribution{#2}}[~#3](#4)% @@ -383,25 +341,26 @@ \Process@Index{#1}{\Distribution{#2}}[Distribution](#4)|#5|% } \NewExpandableDocumentCommand\@Engine{sm}{#2} -\NewDocumentCommand\Engine{smd()d||}{% +\NewDocumentCommand\Engine{s m !d() !d||}{% \Markup@SetFormat{\sbnfont}% \Process@Markup{\Engine{\hologo{#2}}}(#3)% \Process@Index{#1}{\Engine{#2}}[Textsatzsystem](#3)|#4|% } +\newrobustcmd*\Path[1]{\mbox{\texttt{#1}}} \NewExpandableDocumentCommand\@File{sm}{#2} -\NewDocumentCommand\File{smd()d||}{% +\NewDocumentCommand\File{s m !d() !d||}{% \Markup@SetFormat{\sbnfont}% \Process@Markup{\File{#2}}(#3)% \Process@Index{#1}{\File{#2}}[Datei](#3)|#4|% } \NewExpandableDocumentCommand\@Class{sm}{#2} -\NewDocumentCommand\Class{smd()d''d||}{% +\NewDocumentCommand\Class{s m !d() !d'' !d||}{% \Markup@SetFormat{\sbnfont}% \Process@Markup{\Class{#2}}(#3)'#4'% \Process@Index{#1}{\Class{#2}}[Klasse](#3)|#5|% } \NewExpandableDocumentCommand\@Package{sm}{#2} -\NewDocumentCommand\Package{smd()d<>d''d||}{% +\NewDocumentCommand\Package{s m !d() !d<> !d'' !d||}{% \Markup@SetFormat{\sbnfont}% \IfValueTF{#4}{% \Process@Markup{\Package{#2}}(#3)<#4>'#5'% @@ -411,7 +370,7 @@ \Process@Index{#1}{\Package{#2}}[Paket](#3)|#6|% } \NewExpandableDocumentCommand\@Option{sm}{#2} -\NewDocumentCommand\Option{s>{\ProcessorKeyVal}md==d()d''d||}{% +\NewDocumentCommand\Option{s >{\ProcessorKeyVal}m !d== !d() !d'' !d||}{% \Option@Value{#1}#2=#3=(#4)'#5'|#6|% } \NewDocumentCommand\Option@Value{mmd==d==d()d''d||}{% @@ -421,7 +380,7 @@ \Process@Index{#1}{\Option{#2}}=#3=(#5)|#7|% } \NewExpandableDocumentCommand\@Environment{sm}{#2} -\NewDocumentCommand\Environment{smod()d''d||}{% +\NewDocumentCommand\Environment{s m !o !d() !d'' !d||}{% \Markup@SetFormat{\ttfamily}(% \ttfamily\bsc{}begin\textbraceleft#2\textbraceright\IfValueT{#3}{#3}% \tabularnewline\ttfamily\dots% @@ -431,19 +390,19 @@ \Process@Index{#1}{\Environment{#2}}[Umgebung](#4)|#6|% } \NewExpandableDocumentCommand\@Macro{sm}{#2} -\NewDocumentCommand\Macro{smod()d''d||}{% - \Markup@SetFormat{\ttfamily\bsc}% +\NewDocumentCommand\Macro{s m !o !d() !d'' !d||}{% + \Markup@SetFormat[\bsc]{\ttfamily}% \Process@Markup{\Macro{#2}}[#3](#4)'#5'% \Process@Index{#1}{\Macro{#2}}(#4)|#6|% } \NewExpandableDocumentCommand\@Length{sm}{#2} -\NewDocumentCommand\Length{smd()d''d||}{% - \Markup@SetFormat{\ttfamily\bsc}[L\"ange]% +\NewDocumentCommand\Length{s m !d() !d'' !d||}{% + \Markup@SetFormat[\bsc]{\ttfamily}[L\"ange]% \Process@Markup{\Length{#2}}(#3)'#4'% \Process@Index{#1}{\Length{#2}}[L\"ange](#3)|#5|% } \NewExpandableDocumentCommand\@Counter{sm}{#2} -\NewDocumentCommand\Counter{smd()d''d||}{% +\NewDocumentCommand\Counter{s m !d() !d'' !d||}{% \Markup@SetFormat{\ttfamily}[Z\"ahler]% \Process@Markup{\Counter{#2}}(#3)'#4'% \Process@Index{#1}{\Counter{#2}}[Z\"ahler](#3)|#5|% @@ -473,7 +432,6 @@ }% \tud@reserved% } -\newrobustcmd*\Path[1]{\mbox{\texttt{#1}}} \newrobustcmd*\PValue[1]{\mbox{\texttt{#1}}} \newrobustcmd*\PName[1]{\PValue{\textsl{<#1>}}} \newrobustcmd*\PValueName[1]{\PName{#1}} @@ -557,6 +515,7 @@ \let\IeC\@firstofone% \def\"##1{##1e}% \def\ss{ss}% + \def\dots{...}% \let\NoCaseChange\@firstofone% } \NewDocumentCommand\tud@lbl@get@curr{% @@ -608,6 +567,17 @@ }% \@tempc% } +\newif\if@tud@disposition +\newcommand*\ifdisposition{% + \if@tud@disposition% + \expandafter\@firstoftwo% + \else% + \expandafter\@secondoftwo% + \fi% +} +\pretocmd{\tud@sec@format}{% + \@tud@dispositiontrue% +}{}{\tud@patch@wrn{tud@sec@format}} \newcommand*\Markup@Suppress{\let\Process@Markup\Markup@@Suppress} \NewDocumentCommand\Markup@@Suppress{md==od()d<>d''}{} \NewDocumentCommand\Process@Markup{md==od()d<>d''}{% @@ -643,7 +613,8 @@ \ifstr{#6}{none}{\let\@tempa\@tempc}{% \ifstr{#6}{manual}{\def\@tempa{\tudhyperref{#1}{\@tempc}}}{% \def\@tempb{% - \ClassWarning{tudscrmanual}{% + \PackageWarning{tudscrtutorial}% + {% You've used the unknown cross-reference\MessageBreak% shorthand '#6'. Only 'none' and 'manual'\MessageBreak% are valid% @@ -652,7 +623,7 @@ }% }% }% - \ifdin{\@tempc}{\@tempa\@tempb}% + \ifdisposition{\@tempc}{\@tempa\@tempb}% \endgroup% \Markup@ClearFormat% } @@ -673,48 +644,52 @@ } \newcommand*\Markup@Inline[1]{\mbox{\Markup@Format{#1}}} \newcommand*\Markup@Format{} +\undef\Markup@Format \newcommand*\Markup@Suffix{} -\NewDocumentCommand\Markup@SetFormat{mod()}{% - \def\Markup@Format{\ifdin{\MakeTextUppercase}{#1}}% - \IfValueT{#2}{\def\Markup@Suffix{\suffix{#2}}}% -} -\robustify\NoCaseChange -\NewDocumentCommand\tud@nonchangecase{m}{% - \DeclareExpandableDocumentCommand#1{sm}{% - \IfBooleanT{##1}{\noexpand\@tud@indextrue}% - \NoCaseChange{#1{##2}}% +\NewDocumentCommand\Markup@SetFormat{omod()}{% + \def\Markup@Format##1{% + \def\tud@res@a{#2}% + \tud@ifdin{\let\tud@res@a\tud@sec@format}{}% + \begingroup\tud@res@a{\IfValueT{#1}{#1}##1}\endgroup% }% + \IfValueT{#3}{\def\Markup@Suffix{\suffix{#3}}}% } -\apptocmd{\tud@x@textcase@uclcnotmath}{% - \tud@nonchangecase\Application% - \tud@nonchangecase\Distribution% - \tud@nonchangecase\Engine% - \tud@nonchangecase\File% - \tud@nonchangecase\Class% - \tud@nonchangecase\Package% - \tud@nonchangecase\Option% - \tud@nonchangecase\Environment% - \tud@nonchangecase\Macro% - \tud@nonchangecase\Length% - \tud@nonchangecase\Counter% -}{}{\tud@patch@wrn{tud@x@textcase@uclcnotmath}} \newcommand*\Markup@ClearFormat{% - \let\Markup@Format\relax% + \undef\Markup@Format% \let\Markup@Declare\Markup@@Declare% \let\Markup@Suffix\relax% } \Markup@ClearFormat \newcommand*\Markup@CheckFormat{% - \ifx\Markup@Format\relax% - \ClassError{tudscrmanual}{\string\Markup@SetFormat\space unused}{% - It seems you have forgotten to use \string\Markup@SetFormat.% + \ifundef\Markup@Format{% + \PackageError{tudscrtutorial}% + {\string\Markup@SetFormat\space unused}% + {It seems you have forgotten to use \string\Markup@SetFormat.}% + }{}% +} +\ifundef{\tud@x@textcase@uclcnotmath}{}{% + \NewDocumentCommand\tud@nonchangecase{m}{% + \DeclareExpandableDocumentCommand#1{sm}{% + \IfBooleanT{##1}{\noexpand\@tud@indextrue}% + \NoCaseChange{#1{##2}}% }% - \fi% + } + \apptocmd{\tud@x@textcase@uclcnotmath}{% + \tud@nonchangecase\Application% + \tud@nonchangecase\Distribution% + \tud@nonchangecase\Engine% + \tud@nonchangecase\File% + \tud@nonchangecase\Class% + \tud@nonchangecase\Package% + \tud@nonchangecase\Option% + \tud@nonchangecase\Environment% + \tud@nonchangecase\Macro% + \tud@nonchangecase\Length% + \tud@nonchangecase\Counter% + }{}{\tud@patch@wrn{tud@x@textcase@uclcnotmath}} } \PassOptionsToPackage{xindy,splitindex}{imakeidx} -\let\tud@shellescape\shellescape \RequirePackage{imakeidx}[2013/07/11] -\let\shellescape\tud@shellescape \indexsetup{% level=\subsection*,% noclearpage,firstpagestyle=headings,headers={\indexname}{\indexname},% @@ -775,7 +750,7 @@ \fi% }{}{\tud@patch@wrn{theindex}}% \fi% -\NewDocumentCommand\makexdyindex{somo}{% +\NewDocumentCommand\makexdyindex{s o m !o}{% \let\@tempb\@empty% \protected@edef\@tempa{% title={#3},% @@ -878,7 +853,8 @@ } \newrobustcmd*\cleversee{\tud@cleversee{\seename}} \newrobustcmd*\cleverseealso{% - \ClassWarning{tudscrmanual}{You should use `|see' instead of `|seealso'}% + \PackageWarning{tudscrtutorial}% + {You should use `|see' instead of `|seealso'}% \tud@cleversee{\alsoname}% } \newcommand*\tud@cleversee{} @@ -898,7 +874,8 @@ }{}{% \IfBooleanTF{#1}{% \IfValueT{#6}{% - \ClassWarning{tudscrmanual}{% + \PackageWarning{tudscrtutorial}% + {% You've used the starred version. No index entry\MessageBreak% for #2 is created. The\MessageBreak% optional argument |#6| will be ignored% @@ -974,6 +951,10 @@ activated shell escape option% }% } +\newcommand*\tud@latex@ext{} +\ifpdftex% + {\def\tud@latex@ext{pdflatex\space}}% + {\def\tud@latex@ext{lualatex\space}}% \newcommand*\Tutorial[1]{\href{#1.pdf}{\textsbn{#1.pdf}}} \newcommand*\tud@tut@temp{} \edef\tud@tut@temp{\@currname-temp} @@ -1026,7 +1007,7 @@ \noindent\ignorespaces% } \newcommand\FinishTutorial[1][]{% - \immediate\write\tud@write@b{^^J\string\end{document}^^J} + \immediate\write\tud@write@b{^^J\string\end{document}^^J}% \immediate\closeout\tud@write@b% \immediate\closeout\tud@write@a% \immediate\openout\tud@write@a\jobname-example.tex\relax% @@ -1057,7 +1038,7 @@ \else% \def\@tempa{rm}% \fi% - \immediate\write18{\@tempa\space\tud@tut@temp*.*}% + \ShellEscape{\@tempa\space\tud@tut@temp*.*}% \fi% } \newcommand\Code@Preamble{} @@ -1074,12 +1055,10 @@ \let\StandaloneFile\relax \newcommand*\StandaloneDate{} \newcommand*\tud@tut@pre{% - \ActivateWarningFilters[Tutorial]% \csuse{filecontents*}{\tud@tut@temp.tex}% } \newcommand*\tud@tut@post{% \csuse{endfilecontents*}% - \DeactivateWarningFilters[Tutorial]% } \newenvironment{Preamble}{\tud@tut@pre}{% \tud@tut@post% @@ -1209,9 +1188,7 @@ \@tempa{\Code@Preamble}{}% \setlength\@tempdimc{\leftskip}% \setlength\leftskip{\leftmargin}% - \ActivateWarningFilters[Tutorial]% \@tempa{\input{\tud@tut@temp.tex}}{\Code@Hook}% - \DeactivateWarningFilters[Tutorial]% \global\let\Code@Hook\relax% \setlength\leftskip{\@tempdimc}% \noindent\ignorespaces% @@ -1219,12 +1196,10 @@ \newcommand*\InputCode{\input{\tud@tut@temp.tex}} \IfFileExists{\tud@tut@temp-standalone.tex}{\@tempswafalse}{\@tempswatrue} \if@tempswa% -\ActivateWarningFilters[Tutorial]% \begin{filecontents*}{\tud@tut@temp-standalone.tex} -\RequirePackage[ngerman=ngerman-x-latest]{hyphsubst} \documentclass[english,ngerman]{tudscrreprt} \usepackage[T1]{fontenc} -\usepackage[utf8]{inputenc} +\ifpdftex{\usepackage[ngerman=ngerman-x-latest]{hyphsubst}}{} \usepackage{babel} \usepackage{tudscrsupervisor} \usepackage{isodate} @@ -1235,7 +1210,6 @@ \input{\jobname.tex}% \end{document} \end{filecontents*} -\DeactivateWarningFilters[Tutorial]% \fi \newcommand*\tud@tut@pdf{% \ifnum\pdf@shellescape=\@ne\relax% @@ -1245,22 +1219,22 @@ \edef\@tempa{\expandonce\@date}% \def\@tempb{\today}% \ifx\@tempa\@tempb\relax% - \def\@tempb{}% + \let\@tempb\@empty% \else% \edef\@tempb{\etex@unexpanded{\def\StandaloneDate}{\@date}}% \fi% \edef\@tempa{% - pdflatex -jobname=\tud@tut@temp\space% + \tud@latex@ext -jobname=\tud@tut@temp\space% "\noexpand\unexpanded{\expandonce\@tempb\noexpand\input}% {\tud@tut@temp-standalone.tex}"% }% - \immediate\write18{\@tempa^^J\@tempa^^J\@tempa}% + \ShellEscape{\@tempa^^J\@tempa^^J\@tempa}% \ifwindows% \def\@tempa{rename}% \else% \def\@tempa{mv}% \fi% - \immediate\write18{% + \ShellEscape{% \@tempa\space\tud@tut@temp.pdf\space% \jobname-standalone-\StandaloneFile.pdf% }% @@ -1269,7 +1243,7 @@ \fi% \global\let\StandaloneFile\relax% } -\NewDocumentCommand\IncludeStandalone{omO{1}}{% +\NewDocumentCommand\IncludeStandalone{o m !O{1}}{% \IfFileExists{\jobname-standalone-#2.pdf}{% \@tempcnta\z@% \@for\@tempa:=#3\do{\advance\@tempcnta\@ne}% @@ -1318,60 +1292,94 @@ \PassOptionsToPackage{colorinlistoftodos,color=HKS92!10}{todonotes}% } \RequirePackage{todonotes}[2012/07/25] +\AtEndPreamble{% + \ifdim\marginparwidth<2cm\relax% + \setlength\marginparwidth{2cm}% + \fi% +} \AfterPackage*{todonotes}{% - \newcommand*\tud@todo@type@color[2]{% - \define@boolkey{todonotes}{#1}[true]{% - \ifdef{\tudprintflag}{}{% - \ifbool{KV@todonotes@#1}{\setkeys{todonotes}{color=#2}}{}% - }% - }% - }% - \tud@todo@type@color{doc}{HKS41!30}% - \tud@todo@type@color{rls}{HKS44!30}% - \tud@todo@type@color{imp}{HKS57!50}% - \tud@todo@type@color{urg}{HKS07!50}% - \tud@todo@type@color{nxt}{HKS92!30}% - \undef\tud@todo@type@color% - \newcommand*\tud@todo@marginnote{}% - \NewDocumentCommand\ToDo{somo}{% + \newcommand*\tud@todo@type@use{}% + \NewDocumentCommand\ToDo{s o m !o}{% \ifbool{@tud@todo}{% \global\let\tud@currentHref\@currentHref% \begingroup% - \let\@tempa\@empty% - \def\tud@todo@marginnote{ToDo}% - \IfValueT{#4}{% - \def\tud@todo@marginnote{#4}% - \tud@v@get\@tempc{#4}% - \ifcsdef{tud@v@\@tempc}{% - \ifstr{\@tempc}{\TUDScriptVersionNumber}{}{\def\@tempa{urg}}% - \edef\tud@todo@marginnote{v\@tempc}% + \let\tud@todo@type@use\@empty% + \IfValueTF{#2}{% + \IfArgIsEmpty{#2}{}{% + \let\tud@todo@type@use\relax% + \ifx\tud@todo@type@pos\relax% + \def\tud@res@a##1{% + \ifinlist{##1}{\tud@todo@type@use}{}{% + \ifinlist{##1}{\tud@todo@type@neg}{}{% + \listadd\tud@todo@type@use{##1}% + }% + }% + }% + \else% + \def\tud@res@a##1{% + \ifinlist{##1}{\tud@todo@type@use}{}{% + \ifinlist{##1}{\tud@todo@type@pos}{% + \listadd\tud@todo@type@use{##1}% + }{}% + }% + }% + \fi% + \forcsvlist\tud@res@a{#2}% + }% + }{}% + \ifx\tud@todo@type@use\relax\else% + \let\tud@res@a\@empty% + \let\tud@res@b\@empty% + \let\tud@res@c\@empty% + \ifinlist{rls}{\tud@todo@type@use}{% + \def\tud@res@a{color=HKS44!30,}% + \def\tud@res@b{color=HKS44!30,}% + \edef\tud@res@c{v\TUDScriptVersionNumber}% }{% - \def\@tempa##1.##2##3##4\@nil{##1##2##3}% - \edef\@tempb{\expandafter\@tempa\@tempc.000\@nil}% - \ifxnumber{\@tempb}{% - \def\@tempa{nxt}% - \edef\tud@todo@marginnote{v\@tempc}% - }{\let\@tempa\@empty}% + \ifinlist{imp}{\tud@todo@type@use}{% + \def\tud@res@a{color=HKS57!50,}% + }{% + \ifinlist{doc}{\tud@todo@type@use}{% + \def\tud@res@a{color=HKS41!30,}% + }{}% + }% + \def\tud@res@c{ToDo}% + \IfValueT{#4}{% + \begingroup% + \tud@v@get\tud@res@a{#4}% + \def\tud@res@c##1.##2##3##4\@nil{##1##2##3}% + \edef\tud@res@b{\expandafter\tud@res@c\tud@res@a.000\@nil}% + \ifnumber{\tud@res@b}{% + \edef\tud@res@c{% + \expandafter\tud@res@c\TUDScriptVersionNumber.000\@nil% + }% + \ifnum\tud@res@b>\tud@res@c\relax% + \def\tud@res@b{color=HKS92!30,}% + \else% + \ifnum\tud@res@b<\tud@res@c\relax% + \def\tud@res@b{color=HKS07!50,}% + \else% + \def\tud@res@b{color=HKS41!30,}% + \fi% + \fi% + \def\tud@res@c{v\tud@res@a}% + }{% + \let\tud@res@b\@empty% + \def\tud@res@c{#4}% + }% + \edef\tud@res@c{% + \endgroup% + \def\noexpand\tud@res@b{\tud@res@b}% + \def\noexpand\tud@res@c{\tud@res@c}% + }% + \tud@res@c% + }% }% - }% - \IfValueT{#2}{\preto\@tempa{#2,}}% - \@tempswafalse% - \ifx\tud@todo@type@pos\relax\@tempswatrue\fi% - \toks@{\forcsvlist\@tempb}% - \eaddto@hook\toks@{\expandafter{\@tempa}}% - \let\@tempa\@empty% - \def\@tempb##1{% - \eappto\@tempa{##1,}% - \ifinlist{##1}{\tud@todo@type@pos}{\@tempswatrue}{}% - \ifinlist{##1}{\tud@todo@type@neg}{\@tempswafalse}{}% - }% - \the\toks@% - \if@tempswa% \ifhmode\par\fi% \let\par\relax% \vskip\medskipamount% \noindent% - \toks@\expandafter{\@tempa inline}% + \toks@\expandafter{\tud@res@b inline}% \IfBooleanT{#1}{\addto@hook\toks@{,nolist}}% \sbox\z@{% \expandafter\todo\expandafter[\the\toks@]{\trim@spaces{#3}\strut}% @@ -1379,11 +1387,30 @@ \renewcommand*\marginpar[2][]{% \marginnote[##1]{##2}[\dimexpr-\ht\z@+1.6ex+1.75pt\relax]% }% - \toks@\expandafter{\@tempa noline,nolist}% - \settowidth\marginparwidth{\tud@todo@marginnote}% + \toks@\expandafter{\tud@res@a noline,nolist}% + \settowidth\marginparwidth{\tud@res@c}% \addtolength\marginparwidth{\dimexpr1.6ex+1pt\relax}% - \expandafter\todo\expandafter[\the\toks@]{\tud@todo@marginnote\strut}% + \expandafter\todo\expandafter[\the\toks@]{\tud@res@c\strut}% \aftergroup\par\aftergroup\noindent% + \listremove{\tud@todo@type@use}{rls}% + \listremove{\tud@todo@type@use}{imp}% + \listremove{\tud@todo@type@use}{doc}% + \ifx\tud@todo@type@use\@empty\else% + \begingroup% + \let\tud@res@c\@empty% + \renewcommand*{\do}[1]{% + \appto\tud@res@c{,##1}% + }% + \dolistloop{\tud@todo@type@use}% + \edef\tud@res@c{% + \endgroup% + \edef\noexpand\tud@res@c{\expandafter\@gobble\tud@res@c}% + }% + \tud@res@c% + \ClassWarning{tudscrmanual}{% + Unknown key(s) `\string\ToDo[\tud@res@c]'% + }% + \fi% \fi% \endgroup% \global\let\@currentHref\tud@currentHref% @@ -1393,11 +1420,10 @@ \newcommand*\ListOfToDo{\if@tud@todo\clearpage\listoftodos\fi}% } \TUD@UnwindPackage{todonotes}{% - \NewDocumentCommand\ToDo{somo}{}% + \NewDocumentCommand\ToDo{s o m !o}{}% \newcommand*\ListOfToDo{}% } -\AfterPackage*{inputenc}{\RequirePackage{csquotes}[2011/10/22]} -\TUD@UnwindPackage{inputenc}{\RequirePackage{csquotes}[2011/10/22]} +\RequirePackage{csquotes}[2011/10/22] \RequirePackage{textcomp}[2005/09/27] \RequirePackage{setspace}[2011/12/19] \setstretch{1.1} @@ -1435,19 +1461,19 @@ } \newcommand*\Attention[2][\z@]{% \marginnote{% - \setlength\fboxsep{0.25em} + \setlength\fboxsep{0.25em}% \fbox{Achtung!}% }[#1]% \emph{\trim@spaces{#2}}% } -\NewDocumentCommand\Forum{st'}{% +\NewDocumentCommand\Forum{!s !t'}{% \IfBooleanTF{#1}{\toks@{\href}}{\toks@{\hrfn}}% \IfBooleanT{#2}{\toks@{\url}}% \addto@hook\toks@{{http://latex.wcms-file3.tu-dresden.de/phpBB3/}}% \IfBooleanF{#2}{\addto@hook\toks@{{TUD-\LaTeX-Forum}}}% \the\toks@\xspace% } -\NewDocumentCommand\CTAN{sog}{% +\NewDocumentCommand\CTAN{!s !o !g}{% \IfBooleanTF{#1}{\toks@{\href}}{\toks@{\hrfn}}% \addto@hook\toks@{{http://www.ctan.org/\IfValueT{#2}{#2}}}% \addto@hook\toks@{% @@ -1455,7 +1481,7 @@ }% \the\toks@\xspace% } -\NewDocumentCommand\scrguide{sO{\KOMAScript-Handbuch}}{% +\NewDocumentCommand\scrguide{!s !O{\KOMAScript-Handbuch}}{% \IfBooleanTF{#1}{\toks@{\href}}{\toks@{\hrfn}}% \addto@hook\toks@{% {http://mirrors.ctan.org/macros/latex/contrib/koma-script/doc/scrguide.pdf}% @@ -1482,8 +1508,16 @@ \def\KOMAScript{KOMA-Script}% }% } -\newcommand*\Univers{\texorpdfstring{\textubn{Univers}}{Univers}\xspace} -\newcommand*\DIN{\texorpdfstring{\textdbn{DIN~BOLD}}{DIN BOLD}\xspace} +\DeclareTextFontCommand\tud@cdfont@texteb{% + \fontfamily{\tud@cdfont@fam}\fontseries{\tud@cdfont@ebf}\selectfont% +} +\newrobustcmd*\OpenSans{% + \texorpdfstring{\tud@cdfont@texteb{Open~Sans}}{Open Sans}\xspace% +} +\newrobustcmd*\Univers{\texorpdfstring{\textcdbi{Univers}}{Univers}\xspace} +\newrobustcmd*\DIN{\texorpdfstring{\textcdxi{DIN~Bold}}{DIN Bold}\xspace} +\renewcommand*\@pnumwidth{2.1em}% +\renewcommand*\@tocrmarg{3.1em}% \newcommand*\textsbn{} \newrobustcmd*\sbnfont{\sffamily\bfseries\upshape} \DeclareTextFontCommand\textsbn{\sbnfont} |