summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/covington/covington.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/covington/covington.tex')
-rw-r--r--macros/latex/contrib/covington/covington.tex770
1 files changed, 461 insertions, 309 deletions
diff --git a/macros/latex/contrib/covington/covington.tex b/macros/latex/contrib/covington/covington.tex
index 5dbc41c275..f8fe4ee94c 100644
--- a/macros/latex/contrib/covington/covington.tex
+++ b/macros/latex/contrib/covington/covington.tex
@@ -65,10 +65,13 @@
\usepackage{tocloft}
\setlength{\cftbeforesecskip}{0pt}
\renewcommand{\cfttoctitlefont}{\normalsize\bfseries}
-\renewcommand{\cftsecfont}{\footnotesize}
-\renewcommand{\cftsecpagefont}{\footnotesize}
-\renewcommand{\cftsubsecfont}{\footnotesize}
-\renewcommand{\cftsubsecpagefont}{\footnotesize}
+\renewcommand{\cftsecfont}{\small}
+\renewcommand{\cftsecpagefont}{\small}
+\renewcommand{\cftsubsecfont}{\small}
+\renewcommand{\cftsubsecpagefont}{\small}
+\renewcommand{\cftsubsubsecfont}{\footnotesize}
+\renewcommand{\cftsubsubsecpagefont}{\footnotesize}
+\tocloftpagestyle{empty}
\usepackage{babel}
@@ -94,8 +97,8 @@
%
% Titling
%
-\def\pversion{Version 2.9}
-\def\pdate{May 26, 2023}
+\def\pversion{Version 2.10}
+\def\pdate{June 2, 2023}
\title{\textbf{The \cvt\ Package\\\Large Macros for Linguistics}}
\author{Michael A. Covington \and J\"urgen Spitzm\"uller\thanks{Current maintainer.
@@ -109,15 +112,15 @@
\begin{abstract}
\noindent This package, initially a collection of Michael A. Covington's private macros, provides
-numerous minor \LaTeX\ enhancements for linguistics, including multiple diacritics on the
-same letter, interlinear glosses (word-by-word translations), Discourse Representation Structures,
-example numbering, and semantic markup.
+numerous customizable \LaTeX\ macros that are helpful for linguists, including macros that allow
+for multiple diacritics on the same letter, numbered linguistic examples, interlinear glosses
+(word-by-word translations), Discourse Representation Structures, phrase structure rules and disjunctions,
+linguistic feature structures, and for semantic markup commonly used in linguistic notation.
\end{abstract}
+\enlargethispage{2\baselineskip}
\tableofcontents
-\clearpage
-
\section{Introduction}\label{sec:intro}
This is the documentation for \MakeLowercase{\pversion}
@@ -126,50 +129,53 @@ for typing some special notations common in linguistics.%
\footnote{The package has a long history. It started off as a collection of private macros back in the
\LaTeX\ 2.09 days and was initially released as \texttt{covingtn.sty} (following the old 8.3 \textsc{fat}
file name limit). In em\TeX\ under \textsc{ms-dos}, the file was distributed as \texttt{covingto.sty}.
-Eventually, it has been renamed to \cvt\ and adapted to \LaTeXe.}
+Eventually, it has been renamed to \cvt\ and adapted to \LaTeXe. The current version requires a resonably
+recent version of \LaTeXe, as it employs some newer kernel features.}
-To use \cvt\ with \LaTeXe, load the package as usual by adding the command
-\lstinline"\usepackage{covington}" to your document preamble.
-The package has the following options:
+To use \cvt, load the package as usual by adding the command
+\begin{lstlisting}
+\usepackage[<options>]{covington}
+\end{lstlisting}
+to your document preamble. The package has the following options to customize its behavior:
\begin{description}
- \item{\joption{force}:} Force the redefinition of environments that have already been
- defined by other packages or the class.
+ \item{\joption{force=\jparam{true|false}}} Default: \emph{false}.
+ Force the redefinition of environments that have already been defined by other packages or the class.
+
+ This applies to the \jenv{example}, \jenv{examples}, \jenv{subexamples} and \jenv{exercise} environments,
+ which are by default not touched if they are already defined before \cvt\ is loaded.
+ See sec.~\ref{sec:ex}, \ref{sec:exs}, \ref{sec:subexs} and \ref{sec:exercises} for details.
+ \item{\joption{keeplayout=\jparam{true|false}}} Default: \emph{false}. Do not tweak the layout.
- This applies to the \jenv{example}, \jenv{examples}, \jenv{subexamples} and \jenv{exercise} environments,
- which are by default not touched if they are already defined before \cvt\ is loaded.
- See sec.~\ref{sec:ex}, \ref{sec:exs}, \ref{sec:subexs} and \ref{sec:exercises} for details.
+ \Cvt\ sets \jfcsmacro{raggedbottom} and redefines the value of the \jfcsmacro{textfloatsep} length.
+ This just follows the preferences of the original package author and is not necessary
+ for the package's functionality. Yet for backwards compatibility reasons, we cannot change this.
+ Thus, we provide the option described here to opt out this presetting. And we actually encourage you to use it.
+ \item{\joption{noglossbreaks=\jparam{true|false}}} Default: \emph{false}.
+ If this option is set to \joption{true}, \cvt\ will try hard to prevent page breaks within glosses.
- \item{\joption{keeplayout}:} Do not tweak the layout.
+ If this option is not set, page breaks can occur between interlinearized text and free translation of a gloss, as
+ well as between gloss preamble and interlinearized text, which is usually not what you will want.
+ Nonetheless the option is not set by default. This is for backwards compatibility reasons (in order to not change
+ page breaking of existing documents). Note that page breaks might still occur in some cases even if the option is set.
+ In order to prevent them definitely, you can put the gloss in a parbox or minipage.
+ \item{\joption{owncounter=\jparam{true|false}}} Default: \emph{false}. Use an own counter for numbered examples.
+
+ By default, \cvt\ uses \LaTeX's equation counter for example numbering, so that if you use equations and numbered examples
+ in the same paper, you get a single continuous series of numbers. While some people (including the original author of this package)
+ consider this a feature, others might prefer to number equations and linguistic examples separately. If you count to the latter sort,
+ use this option.
+ \item{\joption{fnexamplecounter=\jparam{main|own|own-reset}}} Default: \emph{main}.
+ Specifics of the counter for numbered examples in footnotes.
- \Cvt\ sets \jfcsmacro{raggedbottom} and redefines the value of the \jfcsmacro{textfloatsep} length.
- This just follows the preferences of the original package author and is not necessary
- for the package's functionality. Yet for backwards compatibility reasons, we cannot change this.
- Thus, we provide the option described here to opt out this presetting.
-
-\item{\joption{noglossbreaks}:} If this option is set, \cvt\ will try hard to prevent page breaks within glosses.
-
- If this option is not set, page breaks can occur between interlinearized text and free translation of a gloss, as
- well as between gloss preamble and interlinearized text, which is usually not what you will want.
- Nonetheless the option is not set by default. This is for backwards compatibility reasons (in order to not change
- page breaking of existing documents). Note that page breaks might still occur in some cases even if the option is set.
- In order to prevent them definitely, you can put the gloss in a parbox or minipage.
-
-\item{\joption{owncounter}:} Use an own counter for numbered examples.
-
- By default, \cvt\ uses \LaTeX's equation counter for example numbering, so that if you use equations and numbered examples
- in the same paper, you get a single continuous series of numbers. While some people (including the original author of this package)
- consider this a feature, others might prefer to number equations and linguistic examples separately. If you count to the latter sort,
- use this option.
-
-\item{\joption{ownfncounter}:} Use a separate counter for numbered examples in footnotes.
-
- By default, \cvt\ numbers examples in footnotes in sequence with the numbering used in the main text. With this option,
- examples in footnotes get a different numbering. This uses by default lowercase Roman numbering (see sec.~\ref{sec:custno}
- on how to change this) and is incremented throughout the whole footnote apparatus.
-
-\item{\joption{ownfncounter*}:} Same as \joption{ownfncounter}, except that this variant resets the counter at each footnote
- (similar to \textsf{linguex} and \textsf{gb4e}).
-
+ By default, \cvt\ numbers examples in footnotes in sequence with the numbering used in the main text (this conforms to
+ the default value of this option, \joption{fnexamplecounter=main}). If you set \joption{fnexamplecounter=own},
+ examples in footnotes get a different numbering which is incremented throughout the whole footnote apparatus.%
+ \footnote{The previous option \joption{ownfncounter} is still supported,
+ but deprecated.}
+ If you set \joption{fnexamplecounter=own-reset}, examples in footnotes get an own counter as well, but this variant
+ resets the counter at each footnote (similar to \textsf{linguex} and \textsf{gb4e}).\footnote{The previous option
+ \joption{ownfncounter*} is still supported, but deprecated.}
+ Both own counters use lowercase Roman numbering by default (see sec.~\ref{sec:ex} on how to change this)
\end{description}
%
Please note the following package-related caveats:
@@ -234,8 +240,17 @@ Linguistic papers often include numbered examples. With \cvt, generating those i
In this section, we describe how you can typeset a self-stepping example number (see section~\ref{sec:exno}),
a single numbered example (sec.~\ref{sec:ex}), a consecutive range of numbered examples (sec.~\ref{sec:exs}),
and alpha-numerically labeled sub-examples (sec.~\ref{sec:subexs}).
-All numbered examples can be referred to in the text via \jfcsmacro{label} and \jfcsmacro{ref} as usual
-(see sec.~\ref{sec:ref} for details).
+
+\Cvt's numbered examples can be customized in many ways. For instance, you can make them by default be
+typeset in italics, as common in linguistics, you can adjust the way the numbers
+are displayed, and you can customize the spacing and indentation if the default
+settings do not suit you. This can be achieved via example options that can be set locally to a specific
+environment as optional arguments or globally via the \jcsmacro{setexampleoptions} macro (see sec.~\ref{sec:ex}
+for details).
+
+All numbered examples can be referred to in the text via \jfcsmacro{label} and \jfcsmacro{ref} as usual,
+or with a convenience macro \jcsmacro{pxref} that adds the parentheses that are usually used
+in example references (see sec.~\ref{sec:ref} for details).
\subsection{Example numbers}\label{sec:exno}
@@ -251,16 +266,24 @@ Here's what you get:
\begin{flushleft}
This is a sentence. \hfill (\exampleno)
\end{flushleft}
-If you want to output the (current) number without stepping it, the starred form \jcsmacro{exampleno*} will do that.
+If you want to output the (current) number without stepping it at the same time, the starred form
+\jcsmacro{exampleno*} will do that.
Normally, however, you do not need to manually place \jcsmacro{exampleno} yourselves,
as in the example above. For the common case where example numbers in parentheses are
placed left to the example, \cvt\ provides more convenient solutions. These are described in turn.
-\subsection[The \texttt{example} environment]{The \jenv{example} environment}\label{sec:ex}
+\subsection[The \jenv{example} environment]{The \jenv{example} environment}\label{sec:ex}
-The \jenv{example} environment (alias \jenv{covexample}) displays a single example
+The \jenv{example} environment (alias \jenv{covexample}\footnote{\label{fn:fallbacks}%
+ As of version 1.1, \cvt\ checks if there is already an \jfenv{example} environment defined (e.\,g., by the class).
+ If so, \cvt\ does not define its own one. The alias environment \jenv{covexample} which can be used in order to
+ produce \texttt{covington's} example, however, is always defined and can be used in such cases.
+ If you use the package option \joption{force}, \cvt\ will override existing \jfenv{example} environments.
+ In any case, the package will issue a warning if \jfenv{example} is already defined (this is the case,
+ for instance, if you use \cvt\ with the \texttt{beamer} class).}%
+) displays a single example
with a generated example number to the left of it.
If you type
\begin{lstlisting}
@@ -280,65 +303,78 @@ This is a sentence.\label{expl}
\end{example}
The example can be of any length; it can consist of many lines (separated by \verb"\\"), or even whole paragraphs.
-The \jenv{example} environment provides the following options:
+The \jenv{example} environment provides the following options which also allow for customization of their appearance:
\begin{description}
+ \item[\joption{fs=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the example text.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fsno=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the example number.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
\item[\joption{preamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is inserted on an own line
- after the example number (preceding the actual example text). This might be useful, for instance,
+ after the example number (preceding the example text). This might be useful, for instance,
to give context information, to specify the language or the source in case of cited examples.
- The advantage over just adding a line manually in the example is that you can globally set the markup
- (see sec.~\ref{sec:custno}).
- \item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is appended to example (on the
- same line after a space).
+ The advantage over just adding a line manually in the example is that you can globally or locally
+ set the markup with the \joption{fspreamble} option.
+ \item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is appended to the example
+ (on the same line after a space).
This might be useful to add a reference or an explanation to the translation.
- The advantage over just adding text manually in the example is that this uses its own markup
- (see sec.~\ref{sec:custno}).
+ The advantage over just adding text manually in the example is that that you can globally or locally
+ set the markup with the \joption{fspostamble} option.
\item[\joption{postamble*=\{\jparam{arbitrary text}\}}] A variant of \joption{postamble} that does not add
a space. This might be preferred if you want to add a footnote.
Note that \joption{postamble} and \joption{postamble*} are mutually exclusive.
+
+ If you want the postamble text to be on a line of its own, simply add a line break
+ (i.\,e., \verb|postamble={\\Text}| or, to the same effect, \verb|postamble*={\\Text}|).
+ \item[\joption{fspreamble=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the preamble text.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fspostamble=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the postamble text.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{leftmargin=\{\jparam{length}\}}] Default: \verb|{0pt}|.
+ Lets you change the indentation of examples (including number). Positive values will increase,
+ negative values will decrease the indentation of the example.
+ \item[\joption{addnumbersep=\{\jparam{length}\}}] Default: \verb|{0pt}|.
+ Increases or (with negative values) decreases the spacing between example number and example.
+ \item[\joption{numberformat=\{\jparam{template}\}}] Default: \verb|{(1)}|.
+ The format of the example number. The option takes templates as known from the \textsf{enumerate}
+ package \cite{enumerate}.
+ Arabic numbering is represented by \jparam{1}, Roman by \jparam{i} and \jparam{I}, alphabetic by
+ \jparam{a} and \jparam{A}. Any text before and after the number are inserted as is.
+
+ For instance, \verb|numberformat={[a.]}| results in lower alphabetic numbering followed by a dot,
+ embraced in brackets.
+ \item[\joption{fnnumberformat=\{\jparam{template}\}}] Default: \verb|{(i)}|.
+ The format of the example number if \joption{fnexamplecounter=own} or \joption{fnexamplecounter=own-reset}
+ and example is in a footnote. For the template format, see \joption{numberformat}.
\end{description}
%
-If you want the postamble text be on a line of its own, simply add a line break (i.\,e., \verb|postamble={\\Text}|).
-
-If you need more space between the example number and the text, you can increase it by means of
-the length \jcsmacro{examplenumbersep} (which is preset to \texttt{0pt}). Doing \lstinline|\setlength\examplenumbersep{1em}|,
-for instance, will increase the space by 1\,em (negative values will decrease the space accordingly).
-
-If you need to change the indentation (left margin) of examples, you can do so by means of
-the length \jcsmacro{exampleind} (preset to \texttt{0pt}). Doing \lstinline|\setlength\exampleind{1em}|,
-for instance, will increase the indentation by 1\,em, negative values will decrease it accordingly.
+If you pass the options as optional argument to an environment, they will only apply to the current environment.
-Note that, as of version 1.1, \cvt\ checks if there is already an \jenv{example} environment defined
-(e.\,g., by the class). If so, \cvt\ does not
-define its own one. However, there is always the alias environment \jenv{covexample} which can be used in order to
-produce \texttt{covington's} example. If you use the package option \joption{force}, \cvt\ will override
-existing \jenv{example} environments. In any case, the package will issue a warning if \jenv{example} is already defined
-(this is the case, for instance, if you use \cvt\ with the \texttt{beamer} class).
-
-One way to number sub-examples is to use \jfenv{itemize} or \jfenv{enumerate}
-within an example, like this:
-\begin{lstlisting}
-\begin{example}
+If you want to make a global change, you can use the macro
\begin{itemize}
-\item[(a)] This is the first sentence.
-\item[(b)] This is the second sentence.
+ \item \jcsmacro{setexampleoptions\{\jparam{options}\}}
\end{itemize}
-\end{example}
-\end{lstlisting}
-This prints as:
-\begin{example}
-\begin{itemize}
-\item[(a)] This is the first sentence.
-\item[(b)] This is the second sentence.
-\end{itemize}
-\end{example}
-However, the \jenv{subexamples} environment, described in sec.~\ref{sec:subexs}, is usually more
-convenient for this task.
+and pass either of the above options to it (as usual separated by comma). This will apply to all subsequent examples
+(the \jenv{example} environment described here as well as \jenv{examples}, \jenv{subexamples} and glosses with the
+\joption{ex} option) until further global change and unless an option is altered locally via optional argument.
+
+Please refer to sec.~\ref{sec:exex} for exemplifications of the options.
-\subsection[The \texttt{examples} environment]{The \jenv{examples} environment}\label{sec:exs}
+\subsection[The \jenv{examples} environment]{The \jenv{examples} environment}\label{sec:exs}
To display a series of examples together, each with its own example number, use \jenv{examples}
-(or \jenv{covexamples}) instead of \jenv{example} or \jenv{covexample}.
+(or \jenv{covexamples}\footnote{%
+ As for \jenv{example}, \cvt\ checks if there is already an \jfenv{examples} environment defined,
+ and if this is the case, \cvt\ does not define its own one. The alias environment \jenv{covexamples}
+ is always available as a fallback. If you use the package option \joption{force}, \cvt\ will override
+ existing \jfenv{examples} environments. The package will issue a warning if \jenv{examples} is already defined
+ (this is the case, for instance, if you use \cvt\ with the \texttt{beamer} class), telling you
+ how the package has dealt with the situation.%
+}) instead of \jenv{example} or \jenv{covexample}.
There can be more than one example with this environment, and each of them has to be introduced
by \jfcsmacro{item}, like this:
\begin{lstlisting}
@@ -360,48 +396,71 @@ This prints as:
\item This is the second sentence.
\end{examples}
%
-To add additional text to specific items (analogous to the \joption{preamble} option of the \jenv{example} environment),
-you can use the \jcsmacro{expreamble} macro, like this:
+The \jenv{examples} environments accepts the same options than the \jenv{example} environment (please refer
+to sec.~\ref{sec:ex} for details).
+However, there is one notable exception: \joption{preamble} and \joption{postamble[*]} do not have any effect since,
+if you want to add preceding or trailing text, you will want to add this to specific items in the set.
+
+To this end, we provide specific macros, namely \jcsmacro{expreamble} and \jcsmacro{expostamble}, which can be placed
+where they should appear in the example, and which take the same markup than the texts passed via \joption{preamble}
+or \joption{postamble} option in the \jenv{example} environment.
+
+Hence, also here, the advantage over just adding text as is in the example is that an own, globally settable markup is used.
+This is particularly relevant if you globally set examples to be italicized via the \joption{fs} option (as we have done it
+in our examples in sec.~\ref{sec:exex}).
+
+Consider:
\begin{lstlisting}[moretexcs={expreamble}]
\begin{examples}
\item \expreamble{Here is Jakobson's famous poetic example:}
- I like Ike
+ I like Ike!
\item \expreamble{Here is the less poetic variant:}
- I am in favor of Mr. Eisenhover
+ I am in favor of Mr. Eisenhower.
\end{examples}
\end{lstlisting}
%
-which prints:
+This prints as follows:
\begin{examples}
\item \expreamble{Here is Jakobson's famous poetic example:}
- I like Ike
+ I like Ike!
\item \expreamble{Here is the less poetic variant:}
- I am in favor of Mr. Eisenhover
+ I am in favor of Mr. Eisenhower.
\end{examples}
%
-Again, the advantage over just adding a line manually in the example is that you can globally set the markup
-(see sec.~\ref{sec:custno}).
-
-Along the same line, trailing text (analogous to the \joption{postamble} option of the \jenv{example} environment)
-can be added to specific items via the \jcsmacro{expostamble} macro, like this:
+To see the advantage more clearly, let us locally set the markup of the example text:
+\begin{lstlisting}[moretexcs={expreamble}]
+\begin{examples}[fs={\itshape}]
+\item \expreamble{Here is Jakobson's famous poetic example:}
+ I like Ike!
+\item \expreamble{Here is the less poetic variant:}
+ I am in favor of Mr. Eisenhower.
+\end{examples}
+\end{lstlisting}
+%
+As you can see, the preamble text is untouched:
+\begin{examples}[fs={\itshape}]
+ \item \expreamble{Here is Jakobson's famous poetic example:}
+ I like Ike!
+ \item \expreamble{Here is the less poetic variant:}
+ I am in favor of Mr. Eisenhower.
+\end{examples}
+%
+Along the same line, consider:
\begin{lstlisting}[moretexcs={expostamble}]
-\begin{examples}
-\item I like Ike \expostamble{(Jakobson 1960: 357)}
-\item I am in favor of Mr. Eisenhover\expostamble{\footnote{He actually didn't.}}
+\begin{examples}[fs={\itshape}]
+\item I like Ike! \expostamble{(Jakobson 1960: 357)}
+\item I am in favor of Mr. Eisenhower.\expostamble{\footnote{He actually wasn't.}}
\end{examples}
\end{lstlisting}
%
which results in:
-\begin{examples}
- \item I like Ike \expostamble{(Jakobson 1960: 357)}
- \item I am in favor of Mr. Eisenhover\expostamble{\footnote{He actually didn't.}}
+\begin{examples}[fs={\itshape}]
+ \item I like Ike! \expostamble{(Jakobson 1960: 357)}
+ \item I am in favor of Mr. Eisenhower.\expostamble{\footnote{He actually wasn't.}}
\end{examples}
%
-The advantage over just adding text as is in the example is that this has its own, globally settable markup,
-which is particularly relevant if you globally set examples to be italicized (see sec.~\ref{sec:custno}).
-
Like in any other \LaTeX\ list, the numbering can be freely set via the optional argument of \jfcsmacro{item}.
-For a somewhat practical example, consider
+For a somewhat realistic example, observe how:
\begin{lstlisting}[moretexcs={covexnumber,exampleno}]
\begin{examples}
\item A proposition.
@@ -409,27 +468,38 @@ For a somewhat practical example, consider
\end{examples}
\end{lstlisting}
%
-which results in:
+results in:
\begin{examples}
\item A proposition.
\item[\covexnumber{\exampleno*'}] An alternative proposition.
\end{examples}
-%
-As for \jenv{example}, \cvt\ checks if there is already an \jenv{examples} environment defined,
-and if this is the case, \cvt\ does not define its own one. The alias environment \jenv{covexamples}
-is always available as a fallback. If you use the package option \joption{force}, \cvt\ will override
-existing \jenv{examples} environments. The package will issue a warning if \jenv{examples} is already defined
-(this is the case, for instance, if you use \cvt\ with the \texttt{beamer} class), telling you
-how it has dealt with the situation.
-Please refer to sec.~\ref{sec:ex} for ways to adjust the spacing of the environment.
-
-\subsection[The \texttt{subexamples} environment]{The \jenv{subexamples} environment}\label{sec:subexs}
+\subsection[The \jenv{subexamples} environment]{The \jenv{subexamples} environment}\label{sec:subexs}
Sometimes a set of (paradigmatic) sub-examples gets only one main example number with alphabetic sub-numbering,
-as in \pxref{sbex}. To achieve this most conveniently, \cvt\ provides the \jenv{subexamples} (or \jenv{covsubexamples})
-environment. The difference to \jenv{examples}\slash \jenv{covexamples} is the numbering:
+as in \pxref{sbex} below. An ad-hoc way to achieve this is to use \jfenv{itemize} or \jfenv{enumerate}
+within an example with customized items, like this:
+\begin{lstlisting}
+\begin{example}
+\begin{itemize}
+\item[(a)] This is the first sentence.
+\item[(b)] This is the second sentence.
+\end{itemize}
+\end{example}
+\end{lstlisting}
+This prints as:
+\begin{example}
+ \begin{itemize}
+ \item[(a)] This is the first sentence.
+ \item[(b)] This is the second sentence.
+ \end{itemize}
+\end{example}
+However, the \jenv{subexamples} (or \jenv{covsubexamples}\footnote{The fallback mechanism described in
+ footnote~\ref{fn:fallbacks} for \jfenv{example} apply here, too.%
+}) environment, described in this section, is usually more convenient for
+this task.
+As opposed to \jenv{examples}\slash \jenv{covexamples}, this environment sub-numbers its items. Thus
\begin{lstlisting}
\begin{subexamples}
\item This is the first sentence.
@@ -449,63 +519,59 @@ prints as:
\item This is the second sentence.
\end{subexamples}
%
-Again, \cvt\ checks if there is already an \jenv{subexamples} environment defined,
-and if this is the case, \cvt\ does not define its own one. The alias environment \jenv{covsubexamples}
-is always available as a fallback. If you use the package option \joption{force}, \cvt\ will override
-existing \jenv{subexamples} environments. The package will issue a warning if \jenv{subexamples} is already defined.
-
-\medskip
-\noindent The \jenv{subexamples} environment provides the following options:
+The \jenv{subexamples}/\jenv{covsubexamples} environment provides the same options than the \jenv{example}
+and \jenv{examples} environment (see sec.~\ref{sec:ex}) with the following deviations and additions:
\begin{description}
- \item[\joption{preamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is inserted in the first line
- (after the main number and before the first sub-example, which then follows in a new line).
+ \item[\joption{preamble=\{\jparam{arbitrary text}\}}] Arbitrary text is inserted here on the first line
+ (after the main number and before the first sub-example, which then follows on a new line).
This might be useful, for instance, to give context information, to specify the language or the source
- in case of cited sub-examples. You can globally set the markup of this preamble text (see sec.~\ref{sec:custno}).
- \item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is appended after all sub-examples (on a
- new line). This might be useful to add a reference or an explanation to the set.
- The advantage over just adding text manually in the example is that this uses its own markup
- (see sec.~\ref{sec:custno}).
+ in case of cited sub-examples.
+ \item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text is appended here after all sub-examples (on a
+ new line). This might be useful to add a reference or an explanation to the whole set.
+ \item[\joption{addsubnumbersep=\{\jparam{length}\}}] Default: \verb|{0pt}|.
+ Increases or (with negative values) decreases the spacing between example subnumber and example text.
+ \item[\joption{subnumberformat=\{\jparam{template}\}}] Default: \verb|{(a)}|.
+ The format of the sub-example number. For the template format, consult the documentation of
+ \joption{numberformat} in sec.~\ref{sec:ex}.
\end{description}
%
-For instance,
-\begin{lstlisting}
-\begin{subexamples}[preamble={Here are two sentences},postamble={(Doe 1974: 12)}]
-\item This is the first sentence.
-\item This is the second sentence.
-\end{subexamples}
-\end{lstlisting}
-or, respectively:
-\begin{lstlisting}
-\begin{covsubexamples}[preamble={Here are two sentences},postamble={(Doe 1974: 12)}]
-\item This is the first sentence.
-\item This is the second sentence.
-\end{covsubexamples}
-\end{lstlisting}
-prints as:
-\begin{subexamples}[preamble={Here are two sentences},postamble={(Doe 1974: 12)}]
- \item This is the first sentence.
- \item This is the second sentence.
-\end{subexamples}
+Also note that, if you set options globally via \jcsmacro{setexampleoptions}, the following derivating options
+should be used to distinguish the \jenv{subexample} from the \jenv{example} case.
+\begin{description}
+ \item[\joption{fssubpreamble=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of subexample's preamble text and the \jcsmacro{subexpreamble}
+ macro described below.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fssubpostamble=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Tweaks the sub\-example's postamble text font settings and the \jcsmacro{subexpostamble}
+ macro described below.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+\end{description}
%
-To add additional text to specific subitems, you can use the \jcsmacro{subexpreamble} macro, which uses the
-same markup than the \joption{preamble} option, like this:
+For convenience, both options actually also work (as aliases) in optional arguments.
+
+To add additional text preceding or following specific subitems, you can principally use the \jcsmacro{expreamble} and
+\jcsmacro{expostamble} macros desribed in sec.~\ref{sec:exs}. To allow for separating the markup of such texts
+in subexample from the example case, we also provide specific macros, \jcsmacro{subexpreamble} and
+\jcsmacro{subexpostamble} which use their own font settings (and the same than the \joption{preamble} and
+\joption{postamble} options of this environment).
+
+For example:
\begin{lstlisting}[moretexcs={subexpreamble}]
-\begin{covsubexamples}[preamble={Here are two sentences}]
-\item This is the first sentence.
-\item \subexpreamble{Note particular this one}
- This is the second sentence.
+\begin{covsubexamples}[preamble={Here are two sentences:}]
+\item \subexpreamble{English:} This is the first sentence.
+\item \subexpreamble{German:} Das ist der zweite Satz.
\end{covsubexamples}
\end{lstlisting}
%
-which prints:
-\begin{covsubexamples}[preamble={Here are two sentences}]
- \item This is the first sentence.
- \item \subexpreamble{Note particular this one}
- This is the second sentence.
+\begin{covsubexamples}[preamble={Here are two sentences:}]
+ \item \subexpreamble{English:}
+ This is the first sentence.
+ \item \subexpreamble{German:}
+ Das ist der zweite Satz.
\end{covsubexamples}
%
-Along the same line, trailing text (analogous to the \joption{postamble} option)
-can be added to specific subitems via the \jcsmacro{subexpostamble} macro, like this:
+Analoguously, with:
\begin{lstlisting}[moretexcs={subexpostamble}]
\begin{subexamples}
\item This is the first sentence. \subexpostamble{(Miller 2022: 15)}
@@ -513,98 +579,157 @@ can be added to specific subitems via the \jcsmacro{subexpostamble} macro, like
\end{subexamples}
\end{lstlisting}
%
-which results in:
+you will get:
\begin{subexamples}
\item This is the first sentence. \subexpostamble{(Miller 2022: 15)}
\item This is the second sentence.\subexpostamble{\footnote{My own.}}
\end{subexamples}
%
-Again, the advantage over just adding text as is is that this has its own, globally settable markup,
-which is particularly relevant if you globally set examples to be italicized (see sec.~\ref{sec:custno}).
+More customization possibilities of examples and subexamples are elaborated in the following section.
-The distance between example number and subnumber (letter) can be changed via the length \jcsmacro{examplenumbersep}
-(which is preset to \texttt{0pt}). The distance between example subnumber and text can be changed via the length
-\jcsmacro{subexamplenumbersep} (preset to \texttt{0pt} as well). In both cases, a positive value will increase, a negative
-value will decrease the respective distance.
-Doing
-\begin{lstlisting}[moretexcs={setlength,examplenumbersep,subexamplenumbersep}]
-\setlength{\examplenumbersep}{-0.4em}
-\setlength{\subexamplenumbersep}{0.4em}
-\end{lstlisting}
-for instance, will come out like this:
+\subsection{Examples of examples}\label{sec:exex}
-\bgroup
-\setlength{\examplenumbersep}{-0.4em}
-\setlength{\subexamplenumbersep}{0.4em}
+As already noted, all example environments can be customized in many aspects via the example options.
+If passed as an optional argument to the respective environment, the change only applies to this very environment.
+If passed via \jcsmacro{setexampleoptions}, the change will apply to any subsequent \jenv{example}, \jenv{examples},
+or \jenv{subexamples} environment unless a local option overrides a setting.
-\begin{subexamples}
+For this section and the purpose of demonstration, we globally set the markup of example sentences to italics,
+as common in linguistics. As you now already know, this is very easy to do, via:
+\begin{lstlisting}[morekeywords=fs,moretexcs={setexampleoptions}]
+\setexampleoptions{fs=\itshape}
+\end{lstlisting}
+\setexampleoptions{fs=\itshape}
+%
+which applies from now on. If we now enter:
+\begin{lstlisting}
+\begin{example}[preamble={This example showcases the pre- and postamble options:},
+ postamble={(German)}]
+Das ist ein Satz.
+\end{example}
+\end{lstlisting}
+%
+We will get:
+\begin{example}[preamble={This example showcases the pre- and postamble options:},postamble={(German)}]
+ Das ist ein Satz.
+\end{example}
+%
+And with a similar subexample:
+\begin{lstlisting}
+\begin{subexamples}[preamble={Here are two sentences},
+ postamble={(Doe 1974: 12)}]
+\item This is the first sentence.
+\item This is the second sentence.
+\end{subexamples}
+\end{lstlisting}
+we get the following output:
+\begin{subexamples}[preamble={Here are two sentences},postamble={(Doe 1974: 12)}]
\item This is the first sentence.
\item This is the second sentence.
\end{subexamples}
%
-To change the indentation (left margin) of subexamples, adjust the length \jcsmacro{exampleind}
-(preset to \texttt{0pt}). Note that this also applies to the \jenv{examples} environment.
-\egroup
-
-
-\subsection{Customizing number display and example markup}\label{sec:custno}
-
-You can change the display of the example number by redefining (via \jfcsmacro{renewcommand*}) the macro
-\jcsmacro{covexnumber}, which has the following default definition:
-\begin{lstlisting}[moretexcs={covexnumber}]
-\newcommand*\covexnumber[1]{(#1)}
+In what follows, we demonstrate the adjustment of the spacing of examples.
+The space between the example number and the text (or the subnumber in case of subexamples)
+can be adjusted, as documented above, by means of the \joption{addnumbersep} example option.
+So, for instance,
+\begin{lstlisting}[moretexcs={addnumbersep}]
+\begin{example}[addnumbersep={2em}]
+Look, I am shifted right!
+\end{example}
\end{lstlisting}
+will come out like this:
+
+\begin{example}[addnumbersep={2em}]
+ Look, I am shifted right!
+\end{example}
%
-with the variable \texttt{\#1} representing the number.
-If you use \joption{ownfncounter}, example numbers in footnote use this macro as well. If you want
-a different display, you can redefine
-\begin{lstlisting}[moretexcs={covexnumberfn,covexnumber}]
-\newcommand*\covexnumberfn[1]{\covexnumber{#1}}
+The indentation (left margin) of examples and subexamples is controlled by the \joption{leftmargin}
+example option. Doing \joption{leftmargin=1em}, for instance, will increase the indentation by 1\,em,
+negative values will decrease it accordingly.
+For the latter, consider:
+\begin{lstlisting}[moretexcs={leftmargin}]
+\begin{example}[leftmargin={-2.6em}]
+This is a marginal case.
+\end{example}
\end{lstlisting}
+which will come out like this:
%
-In the same vein, you can customize the display of the subexample letter by redefining
-the macro \jcsmacro{covsubexnumber}, which has the following default definition:
-\begin{lstlisting}[moretexcs={covsubexnumber}]
-\newcommand*\covsubexnumber[1]{(#1)}
-\end{lstlisting}
+\begin{example}[leftmargin={-2.6em}]
+This is a marginal case.
+\end{example}
%
-To remove the parentheses from the subexample letter, for instance, to this:
-\begin{lstlisting}[moretexcs={covsubexnumber}]
-\renewcommand*\covsubexnumber[1]{#1}
+In case of \jenv{subexamples}, the distance between example subnumber and text can be changed
+via the \joption{addsubnumbersep} option.
+Again, a positive value will increase, a negative value will decrease the distance.
+Doing
+\begin{lstlisting}[moretexcs={addnumbersep,addsubnumbersep}]
+\begin{subexamples}[addnumbersep={-0.4em},addsubnumbersep={0.4em}]
+\item My numbers have been moved.
+\item Mine as well.
+\end{subexamples}
\end{lstlisting}
+for instance, will yield:
+
+\begin{subexamples}[addnumbersep={-0.4em},addsubnumbersep={0.4em}]
+ \item My numbers have been moved.
+ \item Mine as well.
+\end{subexamples}
%
-\noindent You can also customize the markup of the example sentences by redefining the macro
-\jcsmacro{covexamplefs} (which is empty by default). To have all example sentences italicized, for instance, do:
-\begin{lstlisting}[moretexcs={covexamplefs}]
-\renewcommand*{\covexamplefs}{\itshape}
+The example also demonstrates how, in subexamples, \joption{addnumbersep} alters (here: decreases) the spacing
+between main number and subnumber.
+
+Next, we showcase how to change the display of the example number or subnumber via the \joption{numberformat} and
+\joption{subnumberformat} options. As described in sec.~\ref{sec:ex}, these take a `mini template' as known from
+the \textsf{enumerate} package \cite{enumerate}. In these templates, the first occurrence of the characters \jparam{1},
+\jparam{i}, \jparam{I}, \jparam{a}, and \jparam{A} represents the numeric system where the respective character marks
+the first positive value. All the rest of the template (including following occurrences of the mentioned characters)
+is interpreted literally.
+For instance, \jparam{(1)} is an alphabetic number in parentheses, \jparam{a.} a lower alphabetic value followed by a dot,
+etc.
+
+So to equip the examples with a dot after the number, we use \joption{numberformat=\{(1.)\}}
+To remove the parentheses from the subexample letter, for instance, we can use \joption{subnumberformat=\{a\}}.
+The following example demonstrates both options:
+\begin{lstlisting}[moretexcs={numberformat,subnumberformat}]
+\begin{subexamples}[numberformat={(1.)}, subnumberformat={a}]
+\item This is a statement.
+\item This is an adjacent statement.
+\end{subexamples}
\end{lstlisting}
%
-Note that this does, deliberately, not include the numbers, since those are controlled by another font setting macro,
-\jcsmacro{covexamplenofs}, which defaults to \jfcsmacro{normalfont}. Of course you are free to redefine this as well,
-if you wish do to so.
-
-Furthermore, you can customize the markup of the example and sub-example preamble text (supplied via the \joption{preamble}
-option or the \jcsmacro{expreamble} or \jcsmacro{subexpreamble} macro) by redefining the macro
-\jcsmacro{expreamblefs} or \jcsmacro{subexpreamblefs}, which also both default to \jfcsmacro{normalfont}.
-To have them italicized, analogously do:
-\begin{lstlisting}[moretexcs={expreamblefs}]
-\renewcommand*{\expreamblefs}{\itshape}
-\end{lstlisting}
-or
-\begin{lstlisting}[moretexcs={subexpreamblefs}]
-\renewcommand*{\subexpreamblefs}{\itshape}
-\end{lstlisting}
+And we get what we want:
+\begin{subexamples}[numberformat={(1.)}, subnumberformat={a}]
+ \item This is a statement.
+ \item This is an adjacent statement.
+\end{subexamples}
%
-Likewise, you can customize the markup of the example and sub-example postamble text (supplied via the
-\joption{postamble[*]} option or the \jcsmacro{expostamble} or \jcsmacro{subexpostamble} macro) by redefining the macro
-\jcsmacro{expostamblefs} or \jcsmacro{subexpostamblefs}, which also both default to \jfcsmacro{normalfont}.
-
-The separate footnote example number with \joption{ownfncounter} uses lowercase Roman numbering by default.
-This can be changed by redefining
-\begin{lstlisting}[moretexcs={thecovfnex}]
-\renewcommand{\thecovfnex}{\roman{covfnex}}
-\end{lstlisting}
+Note that the \joption{numberformat} option by default also changes the numbers of examples in footnotes, even if
+\joption{fnexamplecounter=own} or \joption{fnexamplecounter=own-reset} is used. This does not apply to the counter format,
+however. So \joption{numberformat=\{[1.])\}} will also make the example numbers in footnote appear in brackets and with the
+dot, but it will still use the lower Roman numbering. Use \joption{fnnumberformat} to fully change the appearance.
+With the last examples, we return to example markup. Remember, we have globally set the markup of example sentences to italics
+at the beginning of this section. Now if we want to have it bold instead for one single occurence, we can reset it for the one
+case via the environment options (if we wanted to change it globally from now on, we would use \jcsmacro{setexampleoptions} once more).
+
+Observe how:
+\begin{lstlisting}[moretexcs={covsubexnumber}]
+\begin{example}[fs=\bfseries,preamble={This is the preamble},
+ postamble={(Postamble)}]
+This is a bold statement!
+\end{example}
+\end{lstlisting}
+%
+results in:
+\begin{example}[fs=\bfseries,preamble={This is the preamble},
+ postamble={(Postamble)}]
+ This is a bold statement!
+\end{example}
+%
+As outlined in sec.~\ref{sec:ex} and \ref{sec:subexs}, all elements of examples and subexamples
+(number, actual example text, pre- and postamble) can be marked up independently via \joption{fsno},
+\joption{fspreamble}, \joption{fspostamble}, etc. Hence, many useful (and also lots of nonsensical)
+example formats are easily achievable.
\subsection{Referring to examples}\label{sec:ref}
@@ -664,8 +789,8 @@ Note that:
line is in italics, subsequent lines are set upright, and the free translation in single
quotation marks (using the language-sensitive \textsf{csquotes} \cite{csquotes} macros if
this package is loaded). This can be customized, though, via the macro options or globally
- (for the latter, see sec.~\ref{sec:glossfc}).
- \item By default, page breaks might occur within glosses. In order to prevent it, the option
+ via the macro \jcsmacro{setglossoptions} which will be documented below.
+ \item By default, page breaks might occur within glosses. In order to prevent it, the package option
\joption{noglossbreaks} (see sec.~\ref{sec:intro}) will help in many cases.
If it doesn't, you can wrap the whole gloss into a minipage or parbox.
\item The words do not have to be typed lining up; \TeX\ counts and aligns them.
@@ -697,30 +822,52 @@ Note that:
\begin{description}
\item[\joption{ex=\jparam{true|false}}] Default: \emph{false}. Wraps the gloss in an example environment
- (i.\,e., it is numbered).
+ (i.\,e., it is numbered). In this case, any example settings done via \jcsmacro{setexampleoptions}
+ (sec.~\ref{sec:ex}) apply.
\item[\joption{tlr=\jparam{true|false}}] Default: \emph{false}. If set to true, the translation line (content
of the \jparam{free translation} argument) is set right to the gloss lines, rather than into a new line below.
Since the gloss itself is set in a box, this means the \jparam{free translation} will appear lined up with the
first line of the gloss. This can be useful when no translation, but an aligned number or something similar,
is to be inserted right to the gloss (please refer to sec.~\ref{sec:glossex} for an example).
- \item[\joption{fsi=\{\jparam{font settings}\}}] Adjusts the font settings of the first gloss line.
- Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
- \item[\joption{fsii=\{\jparam{font settings}\}}] Adjusts the font settings of the second gloss line.
- Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
- \item[\joption{fsiii=\{\jparam{font settings}\}}] Adjusts the font settings of the third gloss line.
- Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fsi=\{\jparam{font settings}\}}]. Default: \verb|{\normalfont\itshape}|.
+ Adjusts the font settings of the first gloss line.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fsii=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the second gloss line.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fsiii=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the third gloss line (in case of \jcsmacro{trigloss}).
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fstl=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the translation line.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{enquotetl=\jparam{true|false}}] Default: \emph{true}.
+ By default, the translation line is embraced in single quotation marks. Set this option to
+ \jparam{false} to omit this.
+
+ Note that for \joption{enquotetl=true}, \cvt\ checks at document begin whether the \textsf{csquotes}
+ \cite{csquotes} package is loaded. If so, it uses its language-sensitive \jcsmacro{enquote*} macro
+ for enquoting the translation.
+ If not, a fallback quotation (using English single quotation marks) is used. The usage of
+ \textsf{csquotes} is highly recommended!
\item[\joption{preamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is inserted on an own line
before the interlinearized gloss. This might be useful, for instance, to give context information,
to specify the language or the source in case of cited glosses.
- The advantages over just adding a line manually above the gloss are that you can globally set the
- markup (see sec.~\ref{sec:glossfc}), and that such lines are kept on the same page than the gloss
- with the option \joption{noglossbreaks} (at least as long as preamble does not exceed one line).
+ The advantages over just adding a line manually above the gloss are that you can locally and globally
+ set the markup with the \joption{fspreamble} option, and that such lines are kept on the same page than
+ the gloss with the option \joption{noglossbreaks} (at least as long as preamble does not exceed one line).
Furthermore, this option is the only way to add such text when the \joption{ex} option is used.
\item[\joption{postamble=\{\jparam{arbitrary text}\}}] Arbitrary text that is appended to the translation line, but after
the closing quotation mark. This might be useful to add a footnote or some additional text to the translation
line, after the actual translation.
+ \item[\joption{fspreamble=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the preamble line.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{fspostamble=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the postamble line.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
\end{description}
%
If given as optional arguments to a \jcsmacro{digloss} or \jcsmacro{trigloss} macro, the options will only apply to
@@ -771,12 +918,30 @@ The following is a complete list of all low-level glossing commands:
and a smarter way to insert a translation line. Other than \jcsmacro{glt}, it marks up
(by default: enquotes) the translation line. Also, it does not add an empty line if the
translation is empty. This command has been introduced in \cvt\ 2.0.
+ The markup can be customized by redefining the following macro:
+\begin{lstlisting}[moretexcs={glosslinetrans,covenquote,cov@fstl,ifcov@enquote@tl}]
+\newcommand*\glosslinetrans[1]{%
+ \bgroup\cov@fstl\ifcov@enquote@tl\covenquote{#1}\else#1\fi\egroup}
+\end{lstlisting}
+ Note that for \jcsmacro{covenquote}, as used in the default definition, \cvt\ checks at
+ document begin whether the \textsf{csquotes} \cite{csquotes} package is loaded. If so,
+ it uses its language-sensitive \jcsmacro{enquote*} macro for enquoting the translation.
+ If not, a fallback quotation (using English single quotation marks) is used. The usage of
+ \textsf{csquotes} is highly recommended!
+
+ The \jcsmacro{ifcov@enquote@tl} boolean checks for the \joption{enquotetl} option of the gloss
+ macro. The macro \jcsmacro{cov@fstl} holds the font settings as set via the \joption{fstl} gloss option.
+ These are both relevant also for low-level commands if you set the respective options via
+ \jcsmacro{setglossoptions}.
+
+ In general, please take care when redefining this macro that the functioning of some gloss environment
+ options relies on some of the macros contained in the default definition.
\item[\jcsmacro{glosspreamble\{\jparam{arbitrary text}\}}] lets you enter text that is printed immediately
before the interlinearized gloss (on a line of its own). This might be useful, for instance,
to give context information, to specify the language or the source in case of cited glosses.
The advantages over just adding a line manually above the gloss are that you can globally set the markup
- (see sec.~\ref{sec:glossfc}) and that such lines are kept on the same page than the gloss with the option
- \joption{noglossbreaks}. Note, however, that page breaks might occur if this text spans multiple lines.
+ and that such lines are kept on the same page than the gloss with the option \joption{noglossbreaks}.
+ Note, however, that page breaks might occur if this text spans multiple lines.
In this case, you can wrap the whole gloss into a minipage.
This command has been introduced in \cvt\ 2.1.
\item[\jcsmacro{glend}] ends the special \jfenv{flushleft}-like environment.
@@ -808,7 +973,7 @@ This is not so if you use \jcsmacro{glot}:
%
The advantage of \jcsmacro{glot} is that you can easily customize the translation markup globally.
Also, \jcsmacro{glot} uses the language-sensitive \textsf{csquotes} \cite{csquotes} macros if
-this package is loaded (see sec.~\ref{sec:glossfc}).
+this package is loaded (see sec.~\ref{sec:gmacros}).
Since \jcsmacro{gll} and \jcsmacro{glll} locally activate the end of line in glosses in order to
identify the different lines of the gloss (via category code change), they do not work inside macros
@@ -833,47 +998,10 @@ To sum up: With low-level commands, every glossed sentence begins with either \j
Layout is critical in the part preceding \jcsmacro{glt} or \jcsmacro{gln}, and fairly free afterward.
-\subsection{Customization}\label{sec:glossfc}
-
-The font settings of each gloss line can be customized globally by way of
-the global options macro \jcsmacro{setglossoptions} and the \joption{fsi},
-\joption{fsii} or \joption{fsiii} key, respectively (see sec.~\ref{sec:gmacros}).
-Alternatively, you can also redefine these macros:
-\begin{lstlisting}[moretexcs={glosslineone,glosslinetwo,glosslinethree}]
-\newcommand*\glosslineone{\normalfont\itshape}% font settings 1st gloss line
-\newcommand*\glosslinetwo{\normalfont\upshape}% font settings 2nd gloss line
-\newcommand*\glosslinethree{\normalfont\upshape}% font settings 3rd gloss line
-\end{lstlisting}
-%
-The markup of the translation line (if the \jcsmacro{digloss} or \jcsmacro{trigloss}
-macro or the \jcsmacro{glot} low-level command is used) can be customized by redefining
-the following macro.
-\begin{lstlisting}[moretexcs={glosslinetrans,covenquote}]
-\newcommand*\glosslinetrans[1]{\covenquote{#1}}
-\end{lstlisting}
-Note that for \jcsmacro{covenquote}, as used in the default definition, \cvt\ checks at
-document begin whether the \textsf{csquotes} \cite{csquotes} package is loaded. If so,
-it uses its language-sensitive \jcsmacro{enquote*} macro for enquoting the translation.
-If not, a fallback quotation (using English single quotation marks) is used. The usage of
-\textsf{csquotes} is highly recommended!
-
-The markup of the preamble line (which is not marked up at all by default) can be customized
-by redefining the macro:
-\begin{lstlisting}[moretexcs={glosslinepreamble}]
-\newcommand*\glosslinepreamble[1]{#1}
-\end{lstlisting}
-
-Analogously, the markup of the postamble text (which is not marked up at all by default either)
-can be customized by redefining the macro:
-\begin{lstlisting}[moretexcs={glosslinepostamble}]
-\newcommand*\glosslinepostamble[1]{#1}
-\end{lstlisting}
-
-
-\subsection{Examples}\label{sec:glossex}
+\subsection{Example glosses}\label{sec:glossex}
-This section gives some further examples. First, a sentence with three lines aligned,
-instead of just two:
+This section gives some further examples and showcases some options.
+First, a sentence with three lines aligned, instead of just two:
\trigloss[fsii={\normalfont\scshape}]
{Hoc est aliud exemplum}
{n.sg.nom 3sg n.sg.nom n.sg.nom}
@@ -881,7 +1009,8 @@ instead of just two:
{This is another example.}
In order to produce this, we use the \jcsmacro{trigloss} macro for a three-line gloss
and pass the \joption{fsii} option with the respective font switches in order to
-get small capitals in the second line:
+get small capitals in the second line (\jcsmacro{normalfont} is needed here to
+disable the italics set for the first line):
\begin{lstlisting}[moretexcs={trigloss}]
\trigloss[fsii={\normalfont\scshape}]
{Hoc est aliud exemplum}
@@ -956,7 +1085,6 @@ This has been input as follows:
{Do you have matches?}
\end{lstlisting}
-
\section{Phrase structure rules}
To print phrase structure rules such as \psr{S}{NP~VP} you can use \texttt{covington's} macro
@@ -1274,6 +1402,29 @@ it.
\section{Release history}
+\subsection*{2.10 (2023 June 2)}
+\begin{itemize}
+ \item Use \LaTeXe's own keyval mechanism rather than \textsf{xkeyval}.
+ \item Introduce a better interface to customize the appearance of examples. Now everything can
+ be easily adjusted globally and locally via key-val options. This entails the following changes:
+ \begin{itemize}
+ \item Allow to globally set example options via the new macro \jcsmacro{setexampleoptions}.
+ \item Add way to customize example and subexample number format (see sec.~\ref{sec:subexs}).
+ \item Add new example options: \joption{fs}, \joption{fsno}, \joption{fspreamble}, \joption{fspostamble},
+ \joption{leftmargin}, \joption{addnumbersep}, \joption{addsubnumbersep}, \joption{numberformat},
+ \joption{subnumberformat}, as well as \joption{fnnumberformat} (see sec.~\ref{sec:ex}).
+ \end{itemize}
+ \item Add new gloss options: \joption{fspreamble}, \joption{fspostamble}, \joption{fstl},
+ and \joption{enquotetl}. This allows for full customization of glosses via options,
+ both locally and globally (see sec.~\ref{sec:gloss}).
+ \item Package options now all have a key-value format as well.
+ \item Introduce new package choice-option \joption{fnexamplecounter} that
+ supersedes the two boolean, mutually exclusive options \joption{ownfncounter}
+ and \joption{ownfncounter*} (which are still supported for backwards
+ compatibility reasons).
+ \item Major documentation revisions.
+\end{itemize}
+
\subsection*{2.9 (2023 May 26)}
\begin{itemize}
\item Add \joption{postamble} and \joption{postamble*} options to \jenv{example} and \jenv{subexamples} environment
@@ -1296,7 +1447,7 @@ it.
\begin{itemize}
\item Add \joption{postamble} gloss macro option for arbitrary text that is appended to the free
translation line (after closing quotation marks). See sec.~\ref{sec:gmacros}.
-\item Add \jcsmacro{glosslinepostamble} command to markup this text. See sec.~\ref{sec:glossfc}.
+\item Add \jcsmacro{glosslinepostamble} command to markup this text.
\end{itemize}
\subsection*{2.6 (2021 May 19)}
@@ -1335,7 +1486,6 @@ it.
\item Add starred \jcsmacro{exampleno*} command that outputs the current example number value without stepping it.
See sec.~\ref{sec:exno}.
\item Add macros \jcsmacro{covexamplefs} and \jcsmacro{covexamplenofs} for global setting of example text markup.
- See sec.~\ref{sec:custno}.
\end{itemize}
\subsection*{2.1 (2019 May 12)}
@@ -1360,8 +1510,8 @@ it.
\begin{itemize}
\item Fix font markup of second gloss line (do not force rm).
- \item Add possibility to customize gloss line font setting. See sec.~\ref{sec:custno}.
- \item Add possibility to customize example number display. See sec.~\ref{sec:custno}.
+ \item Add possibility to customize gloss line font setting. See sec.~\ref{sec:ex}.
+ \item Add possibility to customize example number display. See sec.~\ref{sec:ex}.
\end{itemize}
\subsection*{1.7 (2018 September 8)}
@@ -1473,6 +1623,8 @@ it.
by morpheme glosses}. Revised version of February 2008. Department
of Linguistics, Max Plank Institute for Evolutionary Anthropology.
\url{http://www.eva.mpg.de/lingua/resources/glossing-rules.php}.
+ \bibitem{enumerate} Carlisle, David: \emph{The enumerate package}. July 23, 2015.
+ \url{https://www.ctan.org/pkg/enumerate}.
\bibitem{drs} Dimitriadis, Alexis: \emph{drs -- Typeset Discourse Representation Structures (DRS)}.
June 10, 2010. \url{https://ctan.org/pkg/drs}.
\bibitem{sdrt} Isambert, Paul: \emph{sdrt -- Macros for Segmented Discourse Representation Theory}.