\documentclass[english]{article}

\usepackage[osf]{libertine}
\usepackage[scaled=0.7]{beramono}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage{url}
\usepackage[pdfusetitle,
 bookmarks=true,bookmarksnumbered=false,bookmarksopen=false,
 breaklinks=false,pdfborder={0 0 0},backref=false,colorlinks=false]
 {hyperref}

% Tweak the TOC (make it more compact)
\usepackage{tocloft}
\setlength{\cftaftertoctitleskip}{6pt}
\setlength{\cftbeforesecskip}{3pt}
\setlength{\cftbeforesubsecskip}{0pt}
\renewcommand{\cfttoctitlefont}{\normalsize\bfseries}
\renewcommand{\cftsecfont}{\small\bfseries}
\renewcommand{\cftsecpagefont}{\small\bfseries}
\renewcommand{\cftsubsecfont}{\small}
\renewcommand{\cftsubsecpagefont}{\small}

% markup
\newcommand*\jmacro[1]{\textbf{\texttt{#1}}}
\newcommand*\jcsmacro[1]{\jmacro{\textbackslash{#1}}}
\newcommand*\joption[1]{\textbf{\texttt{#1}}}
\newcommand*\jfmacro[1]{\texttt{#1}}
\newcommand*\jfcsmacro[1]{\jfmacro{\textbackslash{#1}}}

% macros
\newcommand*\uvlt{\textsf{univie-ling-wlg}}
\providecommand{\LyX}{\texorpdfstring{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}{LyX}}

% improve layout
\tolerance 1414
\hbadness 1414
\emergencystretch 1.5em
\hfuzz 0.3pt
\widowpenalty = 10000
\vfuzz \hfuzz
\raggedbottom

\usepackage{microtype}

\usepackage{babel}

\usepackage{listings}
\lstset{language={[LaTeX]TeX},
        basicstyle={\small\ttfamily},
        frame=single}

\setcounter{tocdepth}{2}

\begin{document}

\title{The \uvlt\ class}

\author{\texorpdfstring{Jürgen Spitzmüller%
		\thanks{Please report issues via \protect\url{https://github.com/jspitz/univie-ling}.}}{Jürgen Spitzmüller}}

\date{Version 2.7, 2024/07/23}

\maketitle

\begin{abstract}
\noindent The \uvlt\ class provides a \LaTeXe\ class suitable for articles in the journal \emph{Wiener Linguistische Gazette} (WLG),
the house journal of the Department of Linguistics at the University of Vienna.\footnote{See \url{https://wlg.univie.ac.at}.}
\end{abstract}

\tableofcontents

\clearpage

\section{Aims and scope}

The \uvlt\ class provides a \LaTeXe\ class suitable for articles in the journal \emph{Wiener Linguistische Gazette} (WLG) and should
be used for contributions to this journal. It comes with suitable \textsf{biblatex} style files that follow the style sheet of the journal.

\section{Fonts}\label{fonts}

The class uses PostScript (a.\,k.\,a. Type\,1) fonts and thus requires classic (PDF)LaTeX.

By default, the class uses \emph{Cochineal} as a serif font, an extended fork of \emph{Crimson},
\emph{Source Sans Pro} as sans serif, and \emph{DejaVu Sans Mono} as monospaced font.
Alternatively, the quite similar shaped \emph{MinionPro} (serif) and \emph{MyriadPro} (sans) can also be used.
They cover more glyphs and are probably a bit more polished than \emph{Cochineal} and \emph{Source Sans Pro}, but due to license reasons
they are not included in the common  \LaTeX\ distributions. Both \emph{MinionPro} and \emph{MyriadPro} are provided by the excellent
\textsf{FontPro} package.%
\footnote{\url{https://github.com/sebschub/FontPro} <25.\,01.\,2017>.} However, some effort is needed to install the package and fonts.
Please refer to the package's documentation in case you are interested.

If you want to use the \emph{MinionPro}/\emph{MyriadPro} pair of fonts, use the class option \joption{expertfonts=true} (see sec.~\ref{coptions}).


\section{Class Options}\label{coptions}

The \uvlt\ class provides a range of \texttt{key=value} type options to control the font handling, package loading and some specific behavior.
These are documented in this section.

\subsection{Font selection}

As elaborated above, the package supports only PostScript fonts (via LaTeX and PDFLaTeX).
PostScript is the traditional LaTeX font format. Specific LaTeX packages and metrics files are needed to use the fonts (but the default font
needed to use this class should be included in your LaTeX distribution and thus ready to use).

The class provides the following option to set the font handling:
\begin{description}
 \setlength\itemsep{0pt}
 \item{\joption{expertfonts=true|false}}: if this option is set to true, \emph{MinionPro} and \emph{MyriadPro} are used instead of \emph{Crimson}
      and \emph{Source Sans Pro}.
      See sec.~\ref{fonts} for details.
\end{description}

\subsection{Package loading}\label{packageloading}

Some extra features provided by the class can toggled. This might be useful if you do not need the respective feature anyway,
and crucial if you need an alternative package that conflicts with one of the preloaded package.

\begin{description}
 \setlength\itemsep{0pt}
 \item{\joption{biblatex=true|false}}: If \joption{true}, \textsf{biblatex} is loaded with a suitable style. This is actually encouraged.
      See sec.~\ref{bibliography} for details.
 \item{\joption{covington=true|false}}: If \joption{false}, \textsf{covington} is not loaded. Covington is used for numbered examples.
\end{description}

\subsection{Titlepage settings}\label{titlepage}

The class can generate a titlepage in two different forms.

\begin{description}
	\setlength\itemsep{0pt}
	\item{\joption{titlepage=none|specialprint|issue}}: If \joption{none} (default), no titlepage is generated.
	      With \joption{issue}, a title page for a whole journal issue is output.
	      With \joption{specialprint}, a special print (``Sonderdruck'') title page suitable for single articles
	      is generated.
	\item{\joption{peerrev=true|false}}: If \joption{true}, a statement is added to the imprint stating that the papers
	      of this issue have undergone double-blind peer review.
	\item{\joption{preprint=true|false}}: If \joption{true}, the issue is marked as preprint on the titlepage and in
	     the journal metadata. Pagination info in these places is suppressed.
\end{description}

\subsection{Paper type}\label{type}

The option \joption{type=paper|review} lets you select between a normal article and a review article (the former being default).
With \joption{review}, the paper is flagged as a review and the title is set smaller, as review titles tend to be long. Note
that reviews do not have subtitles.  

\subsection{Draft mode}\label{draft}

The option \joption{draftmark=true|false|firstpage} allows you to mark your document as a draft, which is indicated by a watermark (including the current date). This might be useful when sharing preliminary versions with the editors.
With \joption{draftmark=true}, this mark is printed on top of each page.  With \joption{draftmark=firstpage}, the draft mark appears on the title page only.

\section{General settings}

\subsection{Editorial data}

Data for a particular issue can be set via:

\begin{description}
 \setlength\itemsep{0pt}
 \item{\jcsmacro{startpage\{<page>\}}} Set start pagination (default: 1).
 \item{\jcsmacro{issue\{<number>\}\{<year>\}}} Set journal issue (number and year)
 \item{\jcsmacro{issuetitle\{<title>\}}} Set title of special issue
 \item{\jcsmacro{issuesubtitle\{<subtitle>\}}} Set subtitle of special issue
\end{description}
%
If needed, the editorial (as printed in the imprint) can be adapted for a particular issue via:

\begin{description}
 \setlength\itemsep{0pt}
 \item{\jcsmacro{jeditors\{<name>\}}} Set editor(s) of the journal
 \item{\jcsmacro{jedboard\{<name>\}}} Set editorial board member(s)
\end{description}
%
In general, the data for the editorial board should be set/changed in a local copy of the file
\texttt{univie-ling-wlg.cls} which is shipped with this class.

\subsection{Titling}

\begin{description}
 \setlength\itemsep{0pt}
 \item{\jcsmacro{author\{<name>\}}}: Article author(s); multiple authors separated by \jfcsmacro{and}.
      Author affiliations should be specified via the macro \jcsmacro{aff\{Affilitation\}} immediately behind the author name,
      using \jcsmacro{aff*[m|f|p]\{Affilitation\}} for the corresponding author (the optional argument, \joption{f} or \joption{m},
      specifies the grammatical gender, \joption{p} indicates plural [multiple authors])
 \item{\jcsmacro{title\{<title>\}}}: Title of the paper.
 \item{\jcsmacro{subtitle\{<subtitle>\}}}: Subtitle. Omitted with \joption{type=review}.
 \item{\jcsmacro{date\{<date>\}}}: Date of publication (optional; by default the date when the PDF file was processed is used).
\end{description}
Use \jfcsmacro{maketitle} to set the title after the above settings have been made.

\subsection{Abstract and keywords}
The abstract is set with the \jmacro{abstract} environment.
Keywords (following the abstract) are set with the \jcsmacro{keywords\{<comma-separated keywords>\}} macro.
Please note that language switches for abstracts in a different language should be done inside the \jmacro{abstract}
environment. It is suggested to use \textsf{babel}'s \jfmacro{otherlanguage} environment for this purpose.

\subsection{Structuring}

The usual sectioning commands are used. For quotations, it is advised to use the display quote environments provided by the \textsf{csquotes}
package (which is automatically loaded). If you want to start your paper with a smart quote, use

\jcsmacro{motto{[<source>]}\{Motto\}}

\section{Semantic markup}\label{markup}

The class defines some basic semantic markup common in linguistics:

\begin{description}
 \setlength\itemsep{0pt}
 \item{\jcsmacro{Expression\{<text>\}}}: To mark expressions (object language). Typeset in \emph{italics}.
 \item{\jcsmacro{Concept\{<text>\}}}: To mark concepts. Typeset in \textsc{small capitals}.
 \item{\jcsmacro{Meaning\{<text>\}}}: To mark meaning. Typeset in `single quotation marks'.
\end{description}
You can redefine each of these commands, if needed, like this:
\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,morekeywords={enquote}]
\renewcommand*\Expression[1]{\textit{#1}}
\renewcommand*\Concept[1]{\textsc{#1}}
\renewcommand*\Meaning[1]{\enquote*{#1}}
\end{lstlisting}
%
Furthermore, the class features a \jcsmacro{versal\{<text>\}} macro to typeset capital text and acronyms
(slightly scaled and tracked).

\section{Hyperlinks}

The journal stylesheet requires you to always give last access dates to web links (URLs). To make this easier,
\uvlt\ provides a number of convenience macros. To begin with, you can easily enter URLs with the last date you
accessed the site with the function
\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,morekeywords={weblink}]
\weblink{<URL>}[<date>]
\end{lstlisting}
%
This will format the date in the way preferred by the journal (``[last accessed: <date>]''), localized to English or German.
The argument can be given in the form YYYY-MM-DD, DD/MM/YYYY, or DD.MM.YYYY, e.g.
\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,morekeywords={weblink}]
\weblink{https://wlg.univie.ac.at}[27/06/2024]
\end{lstlisting}
%
will print: \url{https://wlg.univie.ac.at} [last accessed: 27/06/2024].
If you do not give the optional date argument, no date is printed unless you have specified a general last access date
by means of the function
\begin{lstlisting}[language={[LaTeX]TeX},basicstyle={\small\ttfamily},frame=single,morekeywords={SetURLDate}]
\SetURLDate{<date>}
\end{lstlisting}
%
which takes the same date format as argument. This function might come in handy if you have the same access date
for all, or many, URLs. And it lets you update all URL access dates with a single change.

For hyperlinks without date, you can also use the legacy command \jcsmacro{url\{<URL>\}}.
To output the date information only, you can use the macro \jcsmacro{urldate\{<date>\}}.


\section{Linguistic examples and glosses}

The class automatically loads the \textsf{covington} package which provides macros for examples and glosses.
Please refer to the \textsf{covington} manual \cite{covington} for details.

\section{Bibliography}\label{bibliography}

If the class option \joption{biblatex=true} is set, the \uvlt\ class loads a bibliography style which matches journal style sheet. These conventions draw on the
\emph{Unified Style Sheet for Linguistics} of the LSA (\emph{Linguistic Society of America}).
In order to conform to this style, the \uvlt\ class uses the \textsf{biblatex} package with the \textsf{univie-ling} style that is included in the \textsf{univie-ling} bundle.

If, for some reason, you do not want to use \textsf{biblatex} and prefer to have a manually constituted bibliography\footnote{A reason might be that you transform
a paper submitted in a an office file format to \LaTeX.}, use the \texttt{reflist} environment
and separate each entry by a blank line. Since this environment is provided by \textsf{covington}, the \joption{covington} options must not be \joption{false}.

\section{\LyX\ layouts and templates}

A layout for \LyX\footnote{See \url{https://www.lyx.org}.}\ can be retrieved from \url{https://github.com/jspitz/univie-ling/raw/master/lyx/layouts/univie-ling-wlg.layout}.

A template is provided as well:	\url{https://github.com/jspitz/univie-ling/raw/master/lyx/templates/template-wlg-article.lyx}.


\section{Release History}

\raggedright
\begin{itemize}
  \item 2024/07/23 (v.\,2.7)
	\begin{itemize}
		\item Use proper spacing with \textsf{covington}'s \texttt{reflist} environment.
		\item Fix spacing after \jfcsmacro{weblink}.
		\item Fix empty argument check in \jfcsmacro{weblink}.
	\end{itemize}
  \item 2024/06/27 (v.\,2.6)
	\begin{itemize}
		\item Provide \jcsmacro{weblink}, \jcsmacro{SetURLDate} and \jcsmacro{urldate} macros.
	\end{itemize}
  \item 2024/05/09 (v.\,2.5)
	\begin{itemize}
	   \item Update the editorial structure.
	\end{itemize}
  \item 2023/03/31 (v.\,2.4)
	\begin{itemize}
		\item No change to this class.
	\end{itemize}
  \item 2023/01/26 (v.\,2.3)
	\begin{itemize}
		\item Add \joption{type} option and allow for review articles.
	\end{itemize}
  \item 2022/12/06 (v.\,2.2)
	\begin{itemize}
		\item No change to this class.
	\end{itemize}
  \item 2022/10/21 (v.\,2.1)
	\begin{itemize}
		\item Add a sans (\emph{Source Sans Pro} or \emph{MyriadPro}) and monospaced (\emph{DejaVu Sans Mono}) font.
		\item Add \joption{draftmark} option.
	\end{itemize}
  \item 2022/10/02 (v.\,2.0)
	\begin{itemize}
		\item Use \textsf{l3keys} rather than \textsf{xkeyval} for key-value option handling.
		\item Fix and properly localize some \textsf{varioref} definitions.
		\item Various small class cleanups (addressing warnings).
	\end{itemize}
  \item 2022/09/08 (v.\,1.20)
	\begin{itemize}
		\item Load \textsf{varioref} \jfcsmacro{AtBeginDocument}.
	\end{itemize} 
  \item 2022/05/11 (v.\,1.18) No change to this class.
  \item 2022/02/05 (v.\,1.17) Allow to set fixed publication date via \jcsmacro{date} in titling.
  \item 2021/11/03 (v.\,1.16) No change to this class.
  \item 2021/10/19 (v.\,1.15) Allow for slanted/bold IPA.
  \item 2021/09/01 (v.\,1.14) Update editorial board.
  \item 2020/11/11 (v.\,1.13) 
  \begin{itemize}
  	\item Use \textsf{totpages} package rather than \textsf{lastpage} in order to fix
          clash with \textsf{totpages} which is loaded by a secondary package.
    \item New option \joption{peerrev}.
    \item New option \joption{preprint}.
    \item Factor out editorial data to new \texttt{univie-ling-wlg.cls} file
    \item Make editorial data configurable locally via \jcsmacro{edboardGL}, \jcsmacro{edboardAL}, 
          \jcsmacro{edboardHL}, and \jcsmacro{techboard}.
  \end{itemize}
  \item 2020/06/25 (v.\,1.12) Adapt to compatibility-breaking \textsf{doclicense} change.
  \item 2020/05/05 (v.\,1.11) Update editorial board info.
  \item 2020/05/01 (v.\,1.10) Fix encoding incompatibilities.
  \item 2019/01/21 (v.\,1.9) No change to this class.
  \item 2019/01/15 (v.\,1.8) No change to this class.
  \item 2018/11/07 (v.\,1.7) No change to this class.
  \item 2018/11/04 (v.\,1.6) Remove \jmacro{subexamples} environment as this is now provided by \textsf{covington}.
  \item 2018/09/03 (v.\,1.5)	
  \begin{itemize}
  	\item Introduce \jmacro{subexamples} environment.
  	\item Fix \joption{expertfonts} option.
  \end{itemize}
  \item 2018/04/26 (v.\,1.4)	Fix full date issue in biblatex bibliography style.
  \item 2018/03/02 (v.\,1.3)	Add (CC BY-NC-ND-4.0) license statement to copyright page (via \textsf{doclicense} package).
  \item 2018/02/13 (v.\,1.2)	Rename \texttt{wlg.cls} to \texttt{univie-ling-wlg.cls} as per TeXLive request.
  \item 2018/02/11 (v.\,1.1)	Initial release to CTAN.
\end{itemize}

\begin{thebibliography}{1}
	
	\bibitem{covington} Covington, Michael A. and Spitzmüller, Jürgen:
	\emph{The covington Package. Macros for Linguistics}. September 7, 2018.
	\url{http://www.ctan.org/pkg/covington}.

\end{thebibliography}

\end{document}
