summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/covington/covington.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-06-18 03:00:54 +0000
committerNorbert Preining <norbert@preining.info>2023-06-18 03:00:54 +0000
commit560cff4babb98ab81103bfe3f966c4111f31b0b0 (patch)
tree693683201e5a68b77690eb48e77392f9bfadf140 /macros/latex/contrib/covington/covington.tex
parentf07aa0a2368abb30efa4b434b345413c68fcab3a (diff)
CTAN sync 202306180300
Diffstat (limited to 'macros/latex/contrib/covington/covington.tex')
-rw-r--r--macros/latex/contrib/covington/covington.tex414
1 files changed, 333 insertions, 81 deletions
diff --git a/macros/latex/contrib/covington/covington.tex b/macros/latex/contrib/covington/covington.tex
index f8fe4ee94c..865305f981 100644
--- a/macros/latex/contrib/covington/covington.tex
+++ b/macros/latex/contrib/covington/covington.tex
@@ -97,8 +97,8 @@
%
% Titling
%
-\def\pversion{Version 2.10}
-\def\pdate{June 2, 2023}
+\def\pversion{Version 2.11}
+\def\pdate{June 17, 2023}
\title{\textbf{The \cvt\ Package\\\Large Macros for Linguistics}}
\author{Michael A. Covington \and J\"urgen Spitzm\"uller\thanks{Current maintainer.
@@ -312,11 +312,20 @@ The \jenv{example} environment provides the following options which also allow f
\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{judge=\{\jparam{arbitrary text}\}}] Insert grammaticality judgments (such as * or ?)
+ to an example. This will be inserted before the example text with a small space and uses its own
+ markup. For convenience, the following shorthand options are also provided:
+ \joption{*}, \joption{?}, \joption{*?}, \joption{??}, and \joption{\#} (as alias to
+ \joption{judge=*} etc.).
+ \item[\joption{fsjudge=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the grammaticality judgment.
+ 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 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 or locally
- set the markup with the \joption{fspreamble} option.
+ set the markup with the \joption{fspreamble} option. Also, judgment markers are properly set
+ after the preamble.
\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.
@@ -339,6 +348,14 @@ The \jenv{example} environment provides the following options which also allow f
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{judgewidth=\{\jparam{text}\}}]
+ Sets the width that is reserved for the judgment marker. This is automatically set to the input
+ of \joption{judge}. By default and notably in the \jenv{examples} and \jenv{examples} environments
+ which use an angular \jcsmacro{item} argument rather than the \joption{judge} option,
+ this is preset to \verb|{?}|.
+ \item[\joption{addjudgesep=\{\jparam{length}\}}] Default: \verb|{0pt}|.
+ Increases or (with negative values) decreases the spacing between judgment mark and example
+ (which amounts to 0.2\,em by default).
\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}.
@@ -352,12 +369,11 @@ The \jenv{example} environment provides the following options which also allow f
and example is in a footnote. For the template format, see \joption{numberformat}.
\end{description}
%
-If you pass the options as optional argument to an environment, they will only apply to the current environment.
-
+If you pass these as optional argument to an environment, they will only apply to the current environment.
If you want to make a global change, you can use the macro
-\begin{itemize}
- \item \jcsmacro{setexampleoptions\{\jparam{options}\}}
-\end{itemize}
+\begin{lstlisting}[moretexcs={setexampleoptions}]
+\setexampleoptions{<options>}
+\end{lstlisting}
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.
@@ -368,12 +384,7 @@ Please refer to sec.~\ref{sec:exex} for exemplifications of the options.
To display a series of examples together, each with its own example number, use \jenv{examples}
(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.%
+ The fallback mechanism described in footnote~\ref{fn:fallbacks} for \jfenv{example} apply here, too.%
}) 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:
@@ -396,18 +407,48 @@ This prints as:
\item This is the second sentence.
\end{examples}
%
-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.
+Besides to the normal optional item argument (see below), the examples environment provides an optional angular
+argument which allows you to pass a judgment marker. Consider:
+\begin{lstlisting}
+\begin{examples}
+\item<*> Ein ungrammatischem Satz.
+\item Ein grammatischer Satz.
+\end{examples}
+\end{lstlisting}
+%
+This is printed as:
+\begin{examples}
+ \item<*> Ein ungrammatischem Satz.
+ \item Ein grammatischer Satz.
+\end{examples}
+%
+If you use a wider marker such as \jparam{??}, you need to adjust the width of the reserved space for the marker.
+To this end, the option \joption{judgewidth=\{\jparam{text}\}} is provided (e.\,g., \verb|judgewidth={??}|).
+With even wider markers, you might also need to adjust \joption{addnumbersep} to prevent the marker from coming too
+close to the example number.
+
+The \jenv{examples} environments accepts the same options than the \jenv{example} environment (please refer to
+sec.~\ref{sec:ex} for details).
+However, there are some notable deviations and exceptions due to the fact that we are dealing with multiple examples
+in a row here:
+\begin{itemize}
+ \item \joption{judge=\{\jparam{arbitrary text}\}} and its shorthand aliases (\joption{*}, \joption{?}, \joption{*?},
+ \joption{??}, and \joption{\#}) set the default judgment marker for all items in the environment.
+ It also sets the appropriate \joption{judgewidth} for the selected marker.
+ Use the aforementioned angular \jcsmacro{item} option to overwrite the preset marker or to set
+ one for indivual examples only.
+ \item \joption{preamble} and \joption{postamble[*]} do not have any effect at all, as such text needs to
+ be set for individual examples in the set; to this end, we provide a specific solution, as documented
+ in what follows.
+\end{itemize}
+%
+For preambles and postambles, 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}).
+in our examples in sec.~\ref{sec:exex}). Also, judgment markers are properly set after the preamble.
Consider:
\begin{lstlisting}[moretexcs={expreamble}]
@@ -428,7 +469,7 @@ This prints as follows:
\end{examples}
%
To see the advantage more clearly, let us locally set the markup of the example text:
-\begin{lstlisting}[moretexcs={expreamble}]
+\begin{lstlisting}[moretexcs={expreamble},morekeywords=fs]
\begin{examples}[fs={\itshape}]
\item \expreamble{Here is Jakobson's famous poetic example:}
I like Ike!
@@ -446,7 +487,7 @@ As you can see, the preamble text is untouched:
\end{examples}
%
Along the same line, consider:
-\begin{lstlisting}[moretexcs={expostamble}]
+\begin{lstlisting}[moretexcs={expostamble},morekeywords=fs]
\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.}}
@@ -473,7 +514,9 @@ results in:
\item A proposition.
\item[\covexnumber{\exampleno*'}] An alternative proposition.
\end{examples}
-
+%
+If you need an angular (judgment) argument and an optional argument, pass the judgment argument first
+(i.\,e., \verb|\item<judgment>[custom label]|).
\subsection[The \jenv{subexamples} environment]{The \jenv{subexamples} environment}\label{sec:subexs}
@@ -519,9 +562,33 @@ prints as:
\item This is the second sentence.
\end{subexamples}
%
+Similar to the \jenv{examples} environment, the \jenv{subexamples} environment's item has an angular argument
+to pass grammaticality judgment markers, as in:
+%
+\begin{subexamples}
+ \item This is a well-formed sentence.
+ \item<*> This not well-formed is.
+\end{subexamples}
+%
+which was typed as:
+\begin{lstlisting}
+\begin{subexamples}
+\item This is a well-formed sentence.
+\item<*> This not well-formed is.
+\end{subexamples}
+\end{lstlisting}
+%
+The settings of the judgment markers (spacing and markup) is done via the options described in
+sec.~\ref{sec:ex}.
+
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{judge=\{\jparam{arbitrary text}\}}] and its shorthand aliases (\joption{*}, \joption{?},
+ \joption{*?}, \joption{??}, and \joption{\#}) set the default judgment marker for all items in the environment.
+ It also sets the appropriate \joption{judgewidth} for the selected marker.
+ Use the aforementioned angular \jcsmacro{item} option to overwrite the preset marker or to set
+ one for indivual subexamples only.
\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
@@ -538,6 +605,7 @@ and \jenv{examples} environment (see sec.~\ref{sec:ex}) with the following devia
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{subjudge=\{\jparam{text}\}}] sets the default judge marker for subexamples.
\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.
@@ -546,18 +614,24 @@ should be used to distinguish the \jenv{subexample} from the \jenv{example} case
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.
+ \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}
%
-For convenience, both options actually also work (as aliases) in optional arguments.
+For convenience, all these options actually also work (as aliases) in optional arguments passed to
+\jenv{subexamples} environment.
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).
+\joption{postamble} options of this environment). With all these macros, judgment markers are properly set after
+the preamble.
For example:
-\begin{lstlisting}[moretexcs={subexpreamble}]
+\begin{lstlisting}[moretexcs={subexpreamble},morekeywords=preamble]
\begin{covsubexamples}[preamble={Here are two sentences:}]
\item \subexpreamble{English:} This is the first sentence.
\item \subexpreamble{German:} Das ist der zweite Satz.
@@ -602,20 +676,21 @@ as common in linguistics. As you now already know, this is very easy to do, via:
\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:},
+\begin{lstlisting}[morekeywords={preamble,postamble}]
+\begin{example}[preamble={Consider this example:},
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)}]
+\begin{example}[preamble={Consider this example:},
+ postamble={(German)}]
Das ist ein Satz.
\end{example}
%
And with a similar subexample:
-\begin{lstlisting}
+\begin{lstlisting}[morekeywords={preamble,postamble}]
\begin{subexamples}[preamble={Here are two sentences},
postamble={(Doe 1974: 12)}]
\item This is the first sentence.
@@ -628,11 +703,81 @@ we get the following output:
\item This is the second sentence.
\end{subexamples}
%
-In what follows, we demonstrate the adjustment of the spacing of examples.
+Let us briefly demonstrate the judgment feature. If we want to mark an example as being ungrammatical,
+we use the conventional asterisk mark, like this:
+\begin{lstlisting}[morekeywords=judge]
+\begin{example}[judge=*]
+Ein ungrammatischem Satz.
+\end{example}
+\end{lstlisting}
+%
+or, shorter:
+\begin{lstlisting}[morekeywords={*}, alsoletter={*}]
+\begin{example}[*]
+Ein ungrammatischem Satz.
+\end{example}
+\end{lstlisting}
+%
+to get:
+\begin{example}[judge=*]
+ Ein ungrammatischem Satz.
+\end{example}
+%
+With the \jenv{examples} and \jenv{subexamples} environment, we need to pass the marker to the item's
+angular argument instead, as already demonstrated in sec.~\ref{sec:exs}:
+\begin{lstlisting}
+\begin{examples}
+\item<*> Ein ungrammatischem Satz.
+\item Ein grammatischer Satz.
+\end{examples}
+\end{lstlisting}
+%
+\begin{examples}
+ \item<*> Ein ungrammatischem Satz.
+ \item Ein grammatischer Satz.
+\end{examples}
+%
+With wider markers, we need to adjust the marker width via \joption{judgewidth}, and
+since we have a larger count of examples now, we also adjust \joption{addnumbersep}
+to have a good space to the number:
+\begin{lstlisting}[morekeywords={judgewidth,addnumbersep}]
+\begin{examples}[judgewidth={??},addnumbersep={1ex}]
+\item<??> Kann ich ein gratis Bier haben?
+\item Kann ich ein Bier gratis haben?
+\end{examples}
+\end{lstlisting}
+%
+\begin{examples}[judgewidth={??},addnumbersep={1ex}]
+ \item<??> Kann ich ein gratis Bier haben?
+ \item Kann ich ein Bier gratis haben?
+\end{examples}
+%
+\Cvt\ takes care that judgment markers are also properly set with preambles (with the
+\jcsmacro{expreamble} and \jcsmacro{subexpreamble} macros, this requires an extra
+\LaTeX\ pass). Observe how:
+%
+\begin{lstlisting}[moretexcs={expreamble}]
+\begin{examples}
+\item \expreamble{Compare this:}
+ Oh, I am so well-formed!
+\item<*> \expreamble{with this:}
+ Lucky are you!
+\end{examples}
+\end{lstlisting}
+%
+comes out as expected:
+\begin{examples}
+ \item \expreamble{Compare this:}
+ Oh, I am so well-formed!
+ \item<*> \expreamble{with this:}
+ Lucky are you!
+\end{examples}
+%
+In what follows, we demonstrate further adjustments 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{lstlisting}[morekeywords={addnumbersep}]
\begin{example}[addnumbersep={2em}]
Look, I am shifted right!
\end{example}
@@ -647,7 +792,7 @@ The indentation (left margin) of examples and subexamples is controlled by the \
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{lstlisting}[morekeywords={leftmargin}]
\begin{example}[leftmargin={-2.6em}]
This is a marginal case.
\end{example}
@@ -662,7 +807,7 @@ In case of \jenv{subexamples}, the distance between example subnumber and text c
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{lstlisting}[morekeywords={addnumbersep,addsubnumbersep}]
\begin{subexamples}[addnumbersep={-0.4em},addsubnumbersep={0.4em}]
\item My numbers have been moved.
\item Mine as well.
@@ -690,8 +835,8 @@ 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}]
+\begin{lstlisting}[morekeywords={numberformat,subnumberformat}]
+\begin{subexamples}[numberformat={(1.)},subnumberformat={a}]
\item This is a statement.
\item This is an adjacent statement.
\end{subexamples}
@@ -704,25 +849,24 @@ And we get what we want:
\end{subexamples}
%
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,
+\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)}]
+\begin{lstlisting}[morekeywords={fs,preamble,postamble}]
+\begin{example}[fs=\bfseries,preamble={Note:},
+ postamble={(in any respect)}]
This is a bold statement!
\end{example}
\end{lstlisting}
%
results in:
-\begin{example}[fs=\bfseries,preamble={This is the preamble},
- postamble={(Postamble)}]
+\begin{example}[fs=\bfseries,preamble={Note:},
+ postamble={(in any respect)}]
This is a bold statement!
\end{example}
%
@@ -762,18 +906,28 @@ Both are described in turn.
\subsection{Gloss macros}\label{sec:gmacros}
\Cvt\ provides two gloss macros:
-\begin{itemize}
- \item \jcsmacro{digloss[\jparam{options}]\{\jparam{gloss line 1}\}\{\jparam{gloss line 2}\}\{\jparam{free translation}\}}\\
- typesets two-line glosses with a translation line (the macro name
- puns on Greek \lexp{diglossía}, lit. \lmean{two tongues}, \lmean{bilingualism})
- \item \jcsmacro{trigloss[\jparam{options}]\{\jparam{gloss l.\,1}\}\{\jparam{gloss l.\,2}\}\{\jparam{gloss l.\,3}\}\{\jparam{free tr.}\}}\\
- typesets three-line\footnote{The additional line can be useful for instance
- to gloss cited forms, morphology, or an additional translation.
- See sec.~\ref{sec:glossex} for examples.}
- glosses with a translation line (cf. Greek \lexp{triglossía},
- lit. \lmean{three tongues}, \lmean{trilingualism})
-\end{itemize}
-%
+\begin{lstlisting}[moretexcs={digloss}]
+\digloss[<options>]
+ {<gloss line 1>}[<optional comment line 1>]
+ {<gloss line 2>}[<optional comment line 2>]
+ {<free translation>}
+\end{lstlisting}
+typesets two-line glosses with a translation line, and optionally comments to the right side
+of the gloss lines (the macro name puns on Greek \lexp{diglossía}, lit. \lmean{two tongues},
+\lmean{bilingualism}).
+\begin{lstlisting}[moretexcs={trigloss}]
+\trigloss[<options>]
+ {<gloss line 1>}[<optional comment line 1>]
+ {<gloss line 2>}[<optional comment line 2>]
+ {<gloss line 3>}[<optional comment line 3>]
+ {<free translation>}
+\end{lstlisting}
+typesets three-line\footnote{The additional line can be useful for instance
+to gloss cited forms, morphology, or an additional translation.
+See sec.~\ref{sec:glossex} for examples.}
+glosses with a translation line and optional comments (cf. Greek \lexp{triglossía},
+lit. \lmean{three tongues}, \lmean{trilingualism}).
+
The example given above would thus be typed as:
\begin{lstlisting}[moretexcs={digloss}]
\digloss{Dit is een Nederlands voorbeeld}
@@ -785,11 +939,11 @@ Note that:
\begin{itemize}
\item The \jparam{free translation} argument can be left empty. In this case, no translation line is added
(and no extra space taken).
- \item The macros automatically markup the lines. By default, the first gloss
- 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
- via the macro \jcsmacro{setglossoptions} which will be documented below.
+ \item The macros automatically markup the lines.
+ By default, the first gloss 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 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.
@@ -825,10 +979,19 @@ Note that:
(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
+ of the \jparam{free translation} argument) is set right to the gloss lines, rather than into a new line below,
+ and shifted towards the right margin. In contrast to the normal translation line, the content is not enquoted.
+ Since the gloss itself is set in a box, 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).
+
+ Note that this option defuncts the optional gloss line comments.
+ \item[\joption{tlr*=\jparam{true|false}}] Default: \emph{false}. A variant of \joption{tlr} which is
+ suitable for setting real free translations (enquoted) right to the gloss (after a small space).
+ Both the gloss and the translation line are placed in a box with limited width in this case.
+ The maximum width of the translation line can be adjusted via the \joption{glosscommentwidth} option
+ described below, the maximum width of the gloss and the space between gloss and translation line via
+ \joption{glosswidth} and \joption{glosssep}, respectively.
\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.
@@ -850,6 +1013,25 @@ Note that:
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{addlinesepi=\{\jparam{length}\}}]. Default: \verb|{0pt}|.
+ Increases or (with negative values) decreases the vertical spacing after the first gloss line.
+ \item[\joption{addlinesepii=\{\jparam{length}\}}] Default: \verb|{0pt}|.
+ Increases or (with negative values) decreases the vertical spacing after the second gloss line
+ (in \jcsmacro{digloss}, this is only done if a translation line follows).
+ \item[\joption{addlinesepiii=\{\jparam{length}\}}] Default: \verb|{0pt}|.
+ Increases or (with negative values) decreases the vertical spacing after the third gloss line
+ if a translation line follows (in case of \jcsmacro{trigloss}).
+ \item[\joption{judge=\{\jparam{arbitrary text}\}}] Insert grammaticality judgments (such as * or ?)
+ to the gloss. This will be prepended to the first gloss line with a small space and uses its own
+ markup. For convenience, the following shorthand options are also provided:
+ \joption{*}, \joption{?}, \joption{*?}, \joption{??}, and \joption{\#} (as alias to
+ \joption{judge=*} etc.).
+ \item[\joption{fsjudge=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the grammaticality judgment.
+ Valid values are \LaTeX\ font switches such as \jfcsmacro{itshape}, \jfcsmacro{bfseries} etc.
+ \item[\joption{addjudgesep=\{\jparam{length}\}}] Default: \verb|{0pt}|.
+ Increases or (with negative values) decreases the spacing between judgment mark and gloss
+ (which amounts to 0.2\,em by default).
\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.
@@ -868,13 +1050,23 @@ Note that:
\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.
+ \item[\joption{glosswidth=\{\jparam{length}\}}] Default: \verb|{0.6\textwidth}|.
+ Sets the maximum width the gloss takes if optional comments or \joption{tlr*=true} are used.
+ \item[\joption{glosssep=\{\jparam{length}\}}] Default: \verb|{1em}|.
+ Sets space between gloss and optional comments or free translation in case of \joption{tlr*=true}.
+ \item[\joption{glosscommentwidth=\{\jparam{length}\}}]
+ Sets the maximum width of gloss comments or free translation in case of \joption{tlr*=true}.
+ By default this is automatically calculated from the above two lengths.
+ \item[\joption{fscomments=\{\jparam{font settings}\}}] Default: \verb|{\normalfont\upshape}|.
+ Adjusts the font settings of the gloss comments.
+ 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
+If passed to a \jcsmacro{digloss} or \jcsmacro{trigloss} macro, the options will only apply to
this very gloss. If you want to make a permanent change, you can use the macro
-\begin{itemize}
- \item \jcsmacro{setglossoptions\{\jparam{options}\}}
-\end{itemize}
+\begin{lstlisting}[moretexcs={setglossoptions}]
+\setglossoptions{<options>}
+\end{lstlisting}
and pass either of the above options to it. This will apply to all subsequent glosses (until further global
change and unless the setting is altered locally via macro option).
@@ -917,7 +1109,10 @@ The following is a complete list of all low-level glossing commands:
\item[\jcsmacro{glot\{\jparam{free translation}\}}] is an alternative to \jcsmacro{glt}
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.
+ translation is empty.
+ This macro also takes an optional argument where a judgment marker can be passed.
+ This is for nice alignment with the gloss lines if such a marker is used.
+
The markup can be customized by redefining the following macro:
\begin{lstlisting}[moretexcs={glosslinetrans,covenquote,cov@fstl,ifcov@enquote@tl}]
\newcommand*\glosslinetrans[1]{%
@@ -1011,7 +1206,7 @@ In order to produce this, we use the \jcsmacro{trigloss} macro for a three-line
and pass the \joption{fsii} option with the respective font switches in order to
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}]
+\begin{lstlisting}[moretexcs={trigloss},morekeywords=fsii]
\trigloss[fsii={\normalfont\scshape}]
{Hoc est aliud exemplum}
{n.sg.nom 3sg n.sg.nom n.sg.nom}
@@ -1023,22 +1218,41 @@ Next, an example with a gloss but no translation, with an example number
at the right:
\digloss[tlr]{Hoc habet numerum}
{This has number}
- {\hfill (\exampleno)}
+ {(\exampleno)}
%
That one was typed using the option \joption{tlr}:
-\begin{lstlisting}[moretexcs={digloss,exampleno}]
+\begin{lstlisting}[moretexcs={digloss,exampleno},morekeywords=tlr]
\digloss[tlr]{Hoc habet numerum}
{This has number}
- {\hfill (\exampleno)}
+ {(\exampleno)}
+\end{lstlisting}
+%
+Third, we showcase the \joption{tlr*} option which is usable if
+you want the free translation to the right:
+\digloss[tlr*,glosscommentwidth={.6\textwidth}]
+ {Tres facet collegium}
+ {Three make society}
+ {Three persons constitute a group.}
+%
+This has been entered like this:
+\begin{lstlisting}[moretexcs={digloss,exampleno},morekeywords=tlr]
+\digloss[tlr*,glosscommentwidth={.6\textwidth}]
+ {Tres facet collegium}
+ {Three make society}
+ {Three persons constitute a group.}
\end{lstlisting}
%
-Third, we'll put a glossed sentence inside the \texttt{example}
+As you note, we also used the \joption{glosscommentwidth} option to
+make the box which holds the translation line in this case a bit
+wider (as the translation is rather long and the gloss itself rather short).
+
+Now, we'll put a glossed sentence inside the \texttt{example}
environment, which is a very common way of using it:
\digloss[ex]{Hoc habet numerum praepositum}
{This has number preposed}
{This one has a number in front of it.}
This last example was, of course, typed as:
-\begin{lstlisting}[moretexcs={digloss}]
+\begin{lstlisting}[moretexcs={digloss},morekeywords=ex]
\digloss[ex]{Hoc habet numerum praepositum}
{This has number preposed}
{This one has a number in front of it.}
@@ -1059,7 +1273,8 @@ cited example: p.~2) and also exemplifies the use of \joption{preamble}:
{now they-\textsc{obl-gen} farm forever behind stay-\textsc{fut-neg}}
{Now their farm will not stay behind forever.}
This has been input as follows:
-\begin{lstlisting}[moretexcs={digloss},basicstyle={\footnotesize\ttfamily}]
+\begin{lstlisting}[moretexcs={digloss},basicstyle={\footnotesize\ttfamily},
+ morekeywords={ex,preamble}]
\digloss[ex,preamble={Lezgian (Haspelmath 1993:207)}]
{Gila abur-u-n ferma hami¨alu\v{g} gü\v{g}üna amuq'-da-\v{c}.}
{now they-\textsc{obl-gen} farm forever behind stay-\textsc{fut-neg}}
@@ -1071,14 +1286,42 @@ Also, if you adhere to the \emph{Leipzig glossing rules}, you might want to chec
\LaTeX\ package \cite{leipzig-ltx} that facilitates the use of the gloss abbreviations that have
been entered and marked-up manually here.
+Next, we showcase grammatical judgment. Similar to how this is done in examples, we
+simply pass the respective \joption{judge} option or shorthand:
+\begin{lstlisting}[moretexcs={digloss},basicstyle={\footnotesize\ttfamily},
+ alsoletter={??}, morekeywords={ex,??}]
+\digloss[ex,??]
+ {Hier werden Sie geholfen!}
+ {Here become.\textsc{aux.pass.2sg.pst} you.\textsc{2sg.acc} help.\textsc{pass.ptcp}}
+ {Here you will be helped!}
+\end{lstlisting}
+%
+resulting in:
+\digloss[ex,??]{Hier werden Sie geholfen!}
+ {Here become.\textsc{aux.pass.2sg.pst} you.\textsc{2sg.acc} help.\textsc{pass.ptcp}}
+ {You will be helped here!}
+%
+Gloss line comments allow you to set arbitrary text right to specific gloss lines, as in:
+\digloss[ex]{Gut Ding will Weile haben}[(German proverb)]
+ {Good thing want while have}
+ {Slow and steady wins the race}
+%
+This was typed in with the help of the optional gloss arguments:
+\begin{lstlisting}[moretexcs={digloss},basicstyle={\footnotesize\ttfamily}, morekeywords={ex}]
+\digloss[ex]{Gut Ding will Weile haben}[(German proverb)]
+ {Good thing want while have}
+ {Slow and steady wins the race}
+\end{lstlisting}
+%
The final example exemplifies the use of \joption{postamble}. In what follows we add a footnote to the
translation line, but outside the translation (as marked-up by quotation marks):
\digloss[ex, postamble={\footnote{Yes, really!}}]
-{Mein Luftkissenboot ist voller Aale}
-{My hovercraft is {full of} eels}
-{Do you have matches?}
+ {Mein Luftkissenboot ist voller Aale}
+ {My hovercraft is {full of} eels}
+ {Do you have matches?}
This has been input as follows:
-\begin{lstlisting}[moretexcs={digloss},basicstyle={\footnotesize\ttfamily}]
+\begin{lstlisting}[moretexcs={digloss},basicstyle={\footnotesize\ttfamily},
+ morekeywords={ex,postamble}]
\digloss[ex, postamble={\footnote{Yes, really!}}]
{Mein Luftkissenboot ist voller Aale}
{My hovercraft is {full of} eels}
@@ -1402,6 +1645,15 @@ it.
\section{Release history}
+\subsection*{2.11 (2023 June 17)}
+\begin{itemize}
+ \item Add support for judgment markers in examples and glosses.
+ \item Add support for customization of spacing between gloss lines.
+ \item Add support for gloss comment lines via optional arguments.
+ \item Add support for translation lines on the right side of glosses
+ (via new \joption{tlr*} option).
+\end{itemize}
+
\subsection*{2.10 (2023 June 2)}
\begin{itemize}
\item Use \LaTeXe's own keyval mechanism rather than \textsf{xkeyval}.