diff options
Diffstat (limited to 'macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls')
-rw-r--r-- | macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls | 73 |
1 files changed, 56 insertions, 17 deletions
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls b/macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls index 289315beb8..4ee6eaf8f8 100644 --- a/macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls +++ b/macros/latex/contrib/univie-ling/tex/univie-ling-paper.cls @@ -31,8 +31,8 @@ %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{univie-ling-paper}[2023/03/31 v.2.4 Univie Linguistic Papers (JSp)] +\NeedsTeXFormat{LaTeX2e}[2022/06/01] +\ProvidesPackage{univie-ling-paper}[2024/05/09 v.2.5 Univie Linguistic Papers (JSp)] %% ============================================================ @@ -51,13 +51,12 @@ \newif\if@uvp@polyglossia\@uvp@polyglossiafalse \newif\if@uvp@psfonts\@uvp@psfontstrue \newif\if@uvp@otffonts\@uvp@otffontsfalse +\newif\if@uvp@short\@uvp@shortfalse \newif\if@uvp@usefontenc\@uvp@usefontenctrue \def\uvp@fontenc{T1} -% We use l3keys here since (1) LaTeX2e keys are rather -% new and (2) do not provide for choice keys yet. -\ExplSyntaxOn -\keys_define:nn { uvp } +% Define keys and values +\DeclareKeys[uvp] { % all=<true|false> % Load all (most) packages @@ -166,18 +165,14 @@ { \@uvp@psfontsfalse \@uvp@otffontsfalse }, + % short=<true|false> + % short paper + short.legacy_if_set:n = @uvp@short, + short.usage:n = preamble, } -\ExplSyntaxOff % Process - -\IfFormatAtLeastTF{2022-06-01} -{ - \ProcessKeyOptions[uvp] -}{ - \RequirePackage{l3keys2e} - \ProcessKeysOptions{uvp} -} +\ProcessKeyOptions[uvp] %% ============================================================ @@ -195,6 +190,12 @@ sectionentrydots=true ]{scrartcl}[2003/04/22] +\if@uvp@short + \KOMAoptions{fontsize=11pt, + headings=small, + titlepage=false} +\fi + %% ============================================================ %% LOCALIZATION: @@ -218,6 +219,8 @@ \deftranslation[to=English]{example}{example} \deftranslation[to=German]{matnr}{Matrikelnummer} \deftranslation[to=English]{matnr}{Matrikelnummer} +\deftranslation[to=German]{instructor}{Leitung} +\deftranslation[to=English]{instructor}{Instructor} \deftranslation[to=German]{stkz}{Studienkennzahl} \deftranslation[to=English]{stkz}{Studienkennzahl} \deftranslation[to=German]{erkl}{Erkl\"arung} @@ -290,6 +293,12 @@ This includes all drawings, sketches, graphics and internet sources.} \setkomafont{subtitle}{\normalfont\fontsize{12}{14pt}\sffamily} \setkomafont{date}{\normalfont\fontsize{10}{12pt}\mdseries\sffamily} \newkomafont{course}{\normalfont\mdseries\sffamily} +% short paper settings +\newkomafont{spauthor}{\normalfont\mdseries} +\newkomafont{sptitle}{\Large\bfseries} +\newkomafont{spsubtitle}{\large\bfseries} +\newkomafont{spdate}{\normalfont\normalsize\mdseries} +\newkomafont{spcourse}{\footnotesize\mdseries\sffamily} %% ============================================================ @@ -436,6 +445,35 @@ This includes all drawings, sketches, graphics and internet sources.} \begin{tabular}[t]{c}% }% \fi + \if@uvp@short + \bgroup + \let\footnote\thanks + \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% + \let\@oldmakefnmark\@makefnmark + \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}% + \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative + \parbox[b]{11.5cm}{% + \ifx\@course\@empty\else% + \usekomafont{spcourse}{\lectypeverb\ \emph{\@course} (\lecsemshort~\@semester)}% + \ifx\@instructor\@empty\else\newline\fi% + \fi% + \ifx\@instructor\@empty\else% + \usekomafont{spcourse}{\translate{instructor}:~\@instructor}\fi + }\hfill + \parbox[b]{3cm}{\includegraphics[width=3cm]{univielogo-sw}}\par + \vskip 3em + \def\and{\leavevmode\unskip\slash}% + {\usekomafont{spauthor}{\@author\ifx\@matrikelnr\@empty\else\ (\translate{matnr}:~\@matrikelnr)\fi\par\vskip .5em}}% + \ifx\@title\@empty\else + {\usekomafont{sptitle}{\@title% + \ifx\@subtitle\@empty\else\\\usekomafont{spsubtitle}{\@subtitle}\fi\par}}% + \fi + \vskip .5em + {\usekomafont{spdate}{\ifx\@texttype\@empty\else\@texttype, \fi\@date\par% + \vspace{.5\baselineskip}}\noindent}% + \@thanks\let\@thanks\@empty + \egroup + \else \begin{titlepage} \sffamily% \setcounter{page}{% @@ -569,6 +607,7 @@ This includes all drawings, sketches, graphics and internet sources.} \fi \ifx\titlepage@restore\relax\else\clearpage\titlepage@restore\fi \end{titlepage} + \fi% not \if@uvp@short \setcounter{footnote}{0}% \expandafter\ifnum \csname scr@v@3.12\endcsname>\scr@compatibility\relax \let\thanks\relax @@ -607,7 +646,7 @@ This includes all drawings, sketches, graphics and internet sources.} \begin{tabular}[t]{c}% \hline }% -\clearpage +\if@uvp@short\else\clearpage\fi \section*{\translate{erkl}} \if@uvp@multiauthors @@ -636,7 +675,7 @@ This includes all drawings, sketches, graphics and internet sources.} \@author \end{tabular}\par \egroup -\clearpage +\if@uvp@short\else\clearpage\fi \global\let\and\relax } |