diff options
Diffstat (limited to 'macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls')
-rw-r--r-- | macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls | 339 |
1 files changed, 206 insertions, 133 deletions
diff --git a/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls b/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls index 1be6bd1ccc..988bb4b588 100644 --- a/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls +++ b/macros/latex/contrib/univie-ling/tex/univie-ling-wlg.cls @@ -33,7 +33,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{univie-ling-wlg}[2022/10/02 v.2.0 Univie WLG journal layout (JSp)] +\ProvidesPackage{univie-ling-wlg}[2022/10/21 v.2.1 Univie WLG journal layout (JSp)] %% ============================================================ @@ -42,6 +42,8 @@ \newif\if@wlg@biblatex\@wlg@biblatexfalse \newif\if@wlg@covington\@wlg@covingtontrue +\newif\if@wlg@draftmark\@wlg@draftmarkfalse +\newif\if@wlg@draftmarkfp\@wlg@draftmarkfpfalse \newif\if@wlg@expert\@wlg@expertfalse \newif\if@wlg@titlepage\@wlg@titlepagefalse \newif\if@wlg@specialprint\@wlg@specialprintfalse @@ -51,41 +53,61 @@ \ExplSyntaxOn \keys_define:nn { wlg } { - % biblatex=<true|false> - % Load biblatex - biblatex.legacy_if_set:n = @wlg@biblatex, - biblatex.usage:n = preamble, - % covington=<true|false> - % Load covington - covington.legacy_if_set:n = @wlg@covington, - covington.usage:n = preamble, - % expertfonts=<true|false> - % Load MinionPro - expertfonts.legacy_if_set:n = @wlg@expert, - expertfonts.usage:n = preamble, - % preprint=<true|false> - preprint.legacy_if_set:n = @wlg@preprint, - preprint.usage:n = preamble, - % peerrev=<true|false> - peerrev.legacy_if_set:n = @wlg@peerrev, - peerrev.usage:n = preamble, - % titlepage=<none|specialprint|issue> - titlepage .choice:, - % none - titlepage / none .code:n = - { \@wlg@titlepagefalse - \@wlg@specialprintfalse - }, - % specialprint - titlepage / specialprint .code:n = - { \@wlg@titlepagetrue - \@wlg@specialprinttrue - }, - % issue - titlepage / issue .code:n = - { \@wlg@titlepagetrue - \@wlg@specialprintfalse - }, + % biblatex=<true|false> + % Load biblatex + biblatex.legacy_if_set:n = @wlg@biblatex, + biblatex.usage:n = preamble, + % covington=<true|false> + % Load covington + covington.legacy_if_set:n = @wlg@covington, + covington.usage:n = preamble, + % expertfonts=<true|false> + % Load MinionPro + expertfonts.legacy_if_set:n = @wlg@expert, + expertfonts.usage:n = preamble, + % preprint=<true|false> + preprint.legacy_if_set:n = @wlg@preprint, + preprint.usage:n = preamble, + % peerrev=<true|false> + peerrev.legacy_if_set:n = @wlg@peerrev, + peerrev.usage:n = preamble, + % titlepage=<none|specialprint|issue> + titlepage .choice:, + % none + titlepage / none .code:n = + { \@wlg@titlepagefalse + \@wlg@specialprintfalse + }, + % specialprint + titlepage / specialprint .code:n = + { \@wlg@titlepagetrue + \@wlg@specialprinttrue + }, + % issue + titlepage / issue .code:n = + { \@wlg@titlepagetrue + \@wlg@specialprintfalse + }, + % draftmark=<true|false|firstpage> + % Print draftmark + draftmark .choice:, + % true + draftmark / true .code:n = + { \@wlg@draftmarktrue + \@wlg@draftmarkfpfalse + }, + % false + draftmark / false .code:n = + { \@wlg@draftmarkfalse + \@wlg@draftmarkfpfalse + }, + % firstpage + draftmark / firstpage .code:n = + { \@wlg@draftmarktrue + \@wlg@draftmarkfptrue + }, + % no val equals to true + draftmark .default:n = {true}, } \ExplSyntaxOff @@ -106,17 +128,17 @@ \LoadClass{scrartcl}[2003/04/22] \KOMAoptions{% - footlines=2, - paper=152mm:229mm, - DIV=calc, - fontsize=12pt, - footlines=2, - headings=small, - captions=tableheading, - listof=totoc, - numbers=noenddot, - abstract=on, - twoside=semi + footlines=2, + paper=152mm:229mm, + DIV=calc, + fontsize=12pt, + footlines=2, + headings=small, + captions=tableheading, + listof=totoc, + numbers=noenddot, + abstract=on, + twoside=semi } \recalctypearea @@ -134,21 +156,46 @@ \InputIfFileExists{univie-ling-wlg.cfg} %% ============================================================ +%% HELPERS: +%% ============================================================ + +\newif\if@wlg@inputeencloaded\@wlg@inputeencloadedfalse +\newcommand*\AfterInputencOrAtEndPreamble[1]{% + \AfterPackage*{inputenc}{% + #1% + \@wlg@inputeencloadedtrue + } + \AtEndPreamble{% + \if@wlg@inputeencloaded\else + #1% + \fi% + }% +} + +%% ============================================================ %% FONTS UND MICROTYPOGRAPHY: %% ============================================================ -% Roman Font: + \if@wlg@expert - % Adobe Minion (Expert) + % Roman Font: Adobe Minion (Expert) \RequirePackage[footnotefigures]{MinionPro} + % Sans; Myriad + \RequirePackage[medfamily,scale=0.925]{MyriadPro} + % Mono: DejaVu + \RequirePackage[scaled=0.83]{DejaVuSansMono} \else - % Crimson + % Roman Font: Crimson \RequirePackage[osf]{cochineal} % Enable bold and slanted in IPA \AtBeginDocument{% \@ifpackageloaded{tipa}{% \DeclareFontFamilySubstitution{T3}{Cochineal-TOsF}{cmr}}{} } + % Sans: Alegreya + \RequirePackage[osf,scaled=.9]{sourcesanspro} + % Mono: DejaVu + \RequirePackage[scaled=0.8]{DejaVuSansMono} \fi % Hyperlinks @@ -182,6 +229,8 @@ \languagealias{naustrian}{German} \deftranslation[to=German]{chapter}{Kapitel} \deftranslation[to=English]{chapter}{chapter} +\deftranslation[to=German]{draft}{ENTWURF} +\deftranslation[to=English]{draft}{DRAFT} \deftranslation[to=German]{section}{Abschnitt} \deftranslation[to=English]{section}{section} \deftranslation[to=German]{footnote}{Anm.} @@ -392,13 +441,13 @@ \raggedbottom % Quotation marks -\AfterPackage*{inputenc}{% +\AfterInputencOrAtEndPreamble{% \RequirePackage{csquotes} \ExecuteQuoteOptions{autostyle=try,german=guillemets,austrian=guillemets,maxlevel=3} - \if@wlg@biblatex + \AfterPackage*{biblatex}{% % Change cite command for integrated csquotes env. \SetCiteCommand{\parencite} - \fi + } \renewcommand{\mktextdel}[1]{[\,]} } @@ -432,12 +481,12 @@ \def\@author{} \def\@@author{} \renewcommand*\author[2][]{% - \ifx\\#1\\% - \def\@@author{#2} - \else - \def\@@author{#1} - \fi - \def\@author{#2} + \ifx\\#1\\% + \def\@@author{#2} + \else + \def\@@author{#1} + \fi + \def\@author{#2} } % Author affiliation (starred: corresponding author) @@ -454,25 +503,25 @@ \def\@title{} \def\@@title{} \renewcommand*\title[2][]{% - \ifx\\#1\\% - \def\@@title{#2} - \else - \def\@@title{#1} - \fi - \def\@title{#2} + \ifx\\#1\\% + \def\@@title{#2} + \else + \def\@@title{#1} + \fi + \def\@title{#2} } \def\@issuetitle{} \newcommand*\issuetitle[1]{% - \def\@issuetitle{#1} + \def\@issuetitle{#1} } \def\@issuesubtitle{} \newcommand*\issuesubtitle[1]{% - \def\@issuesubtitle{#1} + \def\@issuesubtitle{#1} } \def\@issueeditors{} \newcommand*\issueeditors[1]{% - \def\@issueeditors{#1} + \def\@issueeditors{#1} } \def\@issue{} @@ -588,58 +637,58 @@ \vskip 3em \fi \if@wlg@specialprint - {\usekomafont{title}{\@title\par}}% - \vskip 1em - {\ifx\@subtitle\@empty\else\usekomafont{subtitle}{\@subtitle\par}\fi}% - \vskip 2em - {% - \usekomafont{author}{% - \@author\par - }% - }% - \vfill - {\usekomafont{date}{\if@wlg@preprint\translate{preprintfrom}% - \else\translate{specialprint}\fi\ \emph{Wiener Linguistische Gazette} - (\versal{WLG}) - \@issue\ (\@pubyear)\if@wlg@preprint\else: \startpageref--\lastpageref\fi\par}} - {\ifx\@issuetitle\@empty\else - \vskip 1em - \usekomafont{date}{\translate{specialissue} \itshape\@issuetitle + {\usekomafont{title}{\@title\par}}% + \vskip 1em + {\ifx\@subtitle\@empty\else\usekomafont{subtitle}{\@subtitle\par}\fi}% + \vskip 2em + {% + \usekomafont{author}{% + \@author\par + }% + }% + \vfill + {\usekomafont{date}{\if@wlg@preprint\translate{preprintfrom}% + \else\translate{specialprint}\fi\ \emph{Wiener Linguistische Gazette} + (\versal{WLG}) + \@issue\ (\@pubyear)\if@wlg@preprint\else: \startpageref--\lastpageref\fi\par}} + {\ifx\@issuetitle\@empty\else + \vskip 1em + \usekomafont{date}{\translate{specialissue} \itshape\@issuetitle \ifx\@issuesubtitle\@empty\else.\ \@issuesubtitle\fi\par}% - \fi}% - \ifx\@issueeditors\@empty\else - \usekomafont{date}{% - \translate{edby}\ \@issueeditors\par - }% + \fi}% + \ifx\@issueeditors\@empty\else + \usekomafont{date}{% + \translate{edby}\ \@issueeditors\par + }% \fi \else - {\ifx\@issuetitle\@empty - \usekomafont{title}{\translate{issue} \@issue\ (\@pubyear)\par} + {\ifx\@issuetitle\@empty + \usekomafont{title}{\translate{issue} \@issue\ (\@pubyear)\par} \etocsettocstyle{\subsubsection*{\contentsname}}{} - \etocsetstyle{chapter} - {} - {\scriptsize\mdseries\rmfamily} - {\scriptsize\etocname{}\dotfill\etocpage\par\vspace{8pt}} - {} + \etocsetstyle{chapter} + {} + {\scriptsize\mdseries\rmfamily} + {\scriptsize\etocname{}\dotfill\etocpage\par\vspace{8pt}} + {} \tableofcontents - \else - \usekomafont{date}{\translate{issue} \@issue\ (\@pubyear)\par} - \fi} - {\ifx\@issuetitle\@empty\else - \vskip 1em - \usekomafont{date}{\translate{specialissue}\par}% - \usekomafont{title}{\@issuetitle\par}% - \vskip 3pt - {\ifx\@issuesubtitle\@empty\else\usekomafont{subtitle}{\@issuesubtitle\par}\fi}% - \vskip 2em - {% - \ifx\@issueeditors\@empty\else - \usekomafont{date}{% - \translate{edby}\ \@issueeditors\par - }% + \else + \usekomafont{date}{\translate{issue} \@issue\ (\@pubyear)\par} + \fi} + {\ifx\@issuetitle\@empty\else + \vskip 1em + \usekomafont{date}{\translate{specialissue}\par}% + \usekomafont{title}{\@issuetitle\par}% + \vskip 3pt + {\ifx\@issuesubtitle\@empty\else\usekomafont{subtitle}{\@issuesubtitle\par}\fi}% + \vskip 2em + {% + \ifx\@issueeditors\@empty\else + \usekomafont{date}{% + \translate{edby}\ \@issueeditors\par + }% \fi }% - \fi}% + \fi}% \fi% \vfill {\usekomafont{publishers}{\translate{univie} $\cdot$ \translate{lingdep} $\cdot$ \@pubyear\par}}% @@ -694,7 +743,7 @@ \renewcommand*{\@maketitle}{% \addcontentsline{toc}{chapter}{\@author\texorpdfstring{\\[5pt]}{: }\@title% - \ifx\@subtitle\empty\else\texorpdfstring{\\}{. }\@subtitle\fi}% + \ifx\@subtitle\empty\else\texorpdfstring{\\}{. }\@subtitle\fi}% \next@tdpage \global\@topnum=\z@ \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative @@ -706,17 +755,17 @@ \null \vskip 2em% \renewcommand*\@@aff[2][]{% - \def\@ccauthor{\translate{corrauthor}}% - \ifx##1f% - \def\@ccauthor{\translate{corrauthorf}}% - \else\ifx##1p% - \def\@ccauthor{\translate{corrauthors}}% - \fi\fi% - \def\@cauthor{##2}% - \thanks{\protect\raggedright ##2 (\@ccauthor).} + \def\@ccauthor{\translate{corrauthor}}% + \ifx##1f% + \def\@ccauthor{\translate{corrauthorf}}% + \else\ifx##1p% + \def\@ccauthor{\translate{corrauthors}}% + \fi\fi% + \def\@cauthor{##2}% + \thanks{\protect\raggedright ##2 (\@ccauthor).} } \renewcommand*\@aff[2][]{% - \thanks{\protect\raggedright ##2.} + \thanks{\protect\raggedright ##2.} } \begin{flushleft}% \renewcommand*\thefootnote{\@fnsymbol\c@footnote}% @@ -820,7 +869,7 @@ \cleardoublepage \phantomsection \addcontentsline{toc}{chapter}{\@iauthor\texorpdfstring{\\[5pt]}{: }\@ititle% - \ifx\@isubtitle\empty\else\texorpdfstring{\\}{. }\@isubtitle\fi}% + \ifx\@isubtitle\empty\else\texorpdfstring{\\}{. }\@isubtitle\fi}% \includepdf[pages=3-]{\@ipaper} } @@ -928,10 +977,10 @@ \setkomafont{captionlabel}{\bfseries} % left aligned captions \RequirePackage[% - format=hang, - justification=RaggedRight, - singlelinecheck=false - ]{caption} + format=hang, + justification=RaggedRight, + singlelinecheck=false + ]{caption} %% Nicer tables with booktabs.sty \RequirePackage{booktabs} @@ -946,11 +995,13 @@ % Biblatex \if@wlg@biblatex - \RequirePackage[% - style=univie-ling, - sorting=nyvt, - autolang=hyphen] - {biblatex} + \AfterInputencOrAtEndPreamble{% + \RequirePackage[% + style=univie-ling, + sorting=nyvt, + autolang=hyphen] + {biblatex} + } \fi \AtBeginDocument{% \@ifundefined{bibhang}{}{% @@ -1008,4 +1059,26 @@ % Main url \def\wlgurl{http://wlg.univie.ac.at} +%% ============================================================= +%% DRAFT: +%% ============================================================= + +\if@wlg@draftmark + +\if@wlg@draftmarkfp + \RequirePackage[firstpageonly]{draftwatermark} +\else + \RequirePackage{draftwatermark} +\fi + +\DraftwatermarkOptions{% + angle=0, + vpos=10pt, + anchor=ct, + fontsize=14pt, + text={\translate{draft} (\today)} +} + +\fi + %% Finis. |