summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2019-05-12 20:17:53 +0000
committerKarl Berry <karl@freefriends.org>2019-05-12 20:17:53 +0000
commit6896186577e9edaddc27b28d3e51e8457b422c3a (patch)
treea5e890b6ba3eac02f8e54d4ddfec9f32ffa2a60e
parenta9c3cb196735c7a45172b3c36740cd3c00ff7d59 (diff)
covington (12may19)
git-svn-id: svn://tug.org/texlive/trunk@51104 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/covington/README7
-rw-r--r--Master/texmf-dist/doc/latex/covington/covington.pdfbin543118 -> 552074 bytes
-rw-r--r--Master/texmf-dist/doc/latex/covington/covington.tex97
-rw-r--r--Master/texmf-dist/tex/latex/covington/covington.sty131
4 files changed, 172 insertions, 63 deletions
diff --git a/Master/texmf-dist/doc/latex/covington/README b/Master/texmf-dist/doc/latex/covington/README
index b91c40dca89..e9bda5efc03 100644
--- a/Master/texmf-dist/doc/latex/covington/README
+++ b/Master/texmf-dist/doc/latex/covington/README
@@ -3,7 +3,7 @@ The covington package
LaTeX macros for Linguistics
-Copyright 1991--2018 Michael A. Covington
+Copyright 1991--2019 Michael A. Covington
Robin Fairbairns
Juergen Spitzmueller
@@ -31,6 +31,11 @@ The package consists of the following files:
== CHANGES ==
+* Version 2.1 (2019-05-12):
+ - Add new option noglossbreaks that tries to prevent page breaks within glosses.
+ - Add \glosspreamble command and preamble gloss macro option for arbitrary text
+ preceding glosses.
+
* Version 2.0 (2018-12-10):
- Add new gloss macros (\digloss and \trigloss) for a more convenient,
flexible and robust gloss insertion.
diff --git a/Master/texmf-dist/doc/latex/covington/covington.pdf b/Master/texmf-dist/doc/latex/covington/covington.pdf
index 7c899277e73..4016207e8dc 100644
--- a/Master/texmf-dist/doc/latex/covington/covington.pdf
+++ b/Master/texmf-dist/doc/latex/covington/covington.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/covington/covington.tex b/Master/texmf-dist/doc/latex/covington/covington.tex
index f741391120d..c874e5e96f5 100644
--- a/Master/texmf-dist/doc/latex/covington/covington.tex
+++ b/Master/texmf-dist/doc/latex/covington/covington.tex
@@ -94,8 +94,8 @@
%
% Titling
%
-\def\pversion{Version 2.0}
-\def\pdate{December 10, 2018}
+\def\pversion{Version 2.1}
+\def\pdate{May 12, 2019}
\title{\textbf{The \cvt\ Package\\Macros for Linguistics}}
\author{Michael A. Covington \and J\"urgen Spitzm\"uller\thanks{Current maintainer.
@@ -118,7 +118,7 @@ example numbering, and semantic markup.
\clearpage
-\section{Introduction}
+\section{Introduction}\label{sec:intro}
This is the documentation for \MakeLowercase{\pversion}
of \cvt\ (\pdate), which is a \LaTeX\ package providing macros
@@ -138,22 +138,33 @@ The package has the following options:
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}:} Do not tweak the layout.
\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.
\end{description}
%
+Please note the following package-related caveats:
+\begin{itemize}
+ \item If you are using \cvt\ and the \textsf{uga} (University of Georgia thesis style) package together, you should load \textsf{uga} before \cvt.
+ \item If you are using \cvt\ with \textsf{beamer-article}, you should load \textsf{beamer-article} before \cvt.
+\end{itemize}
+%
In what follows we presume that you know how to use \LaTeX\ and have
-access to \LaTeX\ manuals. Note that \cvt\ does not
-provide any special fonts or character sets. However, it can be used in
-combination with other style sheets that do.
-
-If you are using \cvt\ and \texttt{uga.sty} (UGa thesis style)
-together, you should load \texttt{uga} before \cvt.
+access to \LaTeX\ manuals.
+\pagebreak[4]
\section{Stacked diacritics}\label{sec:accents}
@@ -442,6 +453,9 @@ Note that:
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
+ \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.
\end{itemize}
\medskip
@@ -461,6 +475,12 @@ Note that:
Valid values are \LaTeX\ font switches such as \jfcsmacro{textit}, \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{textit}, \jfcsmacro{bfseries} etc.
+ \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).
\end{description}
%
If given as the argument to a \jcsmacro{digloss} or \jcsmacro{trigloss} macro, the options will only apply to
@@ -527,6 +547,14 @@ 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.
+ \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.
+ 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.
\end{description}
%
@@ -605,10 +633,16 @@ it uses its language-sensitive \jcsmacro{enquote*} macro for enquoting the trans
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={glosslinetrans,covenquote}]
+\newcommand*\glosslinepreamble[1]{#1}
+\end{lstlisting}
+
\subsection{Examples}\label{sec:glossex}
-This section gives some further examples. First, a sentence with three lines aligned,
+This section gives some further examples. First, a sentence with three lines aligned,
instead of just two:
\trigloss[fsii={\normalfont\scshape}]
{Hoc est aliud exemplum}
@@ -638,7 +672,8 @@ That one was typed using the option \joption{tlr}:
{This has number}
{\hfill (\exampleno)}
\end{lstlisting}
-Finally we'll put a glossed sentence inside the \texttt{example}
+%
+Third, 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}
@@ -657,6 +692,25 @@ although you could also construct it manually as:
{This one has a number in front of it.}
\end{example}
\end{lstlisting}
+%
+And finally, an example that uses the \emph{Leipzig glossing rules} (\cite{leipzig},
+cited example: p.~2) and also exemplifies the use of \joption{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}}
+ {Now their farm will not stay behind forever.}
+This has been input as follows:
+\begin{lstlisting}[moretexcs={digloss},basicstyle={\footnotesize\ttfamily}]
+\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}}
+ {Now their farm will not stay behind forever.}
+\end{lstlisting}
+%
+Of course, you would use \jfcsmacro{cite} in a real document for the citation.
+Also, if you adhere to the \emph{Leipzig glossing rules}, you might want to check out the \textsf{leipzig}
+\LaTeX\ package \cite{leipzig-ltx} that facilitates the use of the gloss abbreviations that have
+been entered and marked-up manually here.
\section{Phrase structure rules}
@@ -811,6 +865,7 @@ the alias environment \jenv{covexercise} which can be used in order to produce \
If you use the package option \joption{force}, \cvt\ will override existing \jenv{exercise}
environments. In any case, the package will issue a warning if \jenv{exercise} is already defined.
+\clearpage
\section{Reference Lists}\label{sec:reflists}
To type a simple \textsc{lsa}-style hanging-indented reference list, you can use the \jenv{reflist}
@@ -921,6 +976,13 @@ it.
\section{Release history}
+\subsection*{2.1 (2019 May 12)}
+
+\begin{itemize}
+ \item Add new option \joption{noglossbreaks} that tries to prevent page breaks within glosses.
+ \item Add \jcsmacro{glosspreamble} command and \joption{preamble} gloss macro option for arbitrary text preceding glosses.
+\end{itemize}
+
\subsection*{2.0 (2018 December 10)}
\begin{itemize}
@@ -1044,11 +1106,18 @@ it.
\end{itemize}
\begin{thebibliography}{99}
+ \bibitem{leipzig} Bickel, Balthasar, Bernard Comrie, and Martin Haspelmath:
+ \emph{The Leipzig glossing rules: Conventions for interlinear morpheme
+ 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{csquotes} Lehman, Philipp and Joseph Wright:
- \emph{csquotes -- Context sensitive quotation facilities}. April 4, 2018.
- \url{http://www.ctan.org/pkg/csquotes}.
+ \emph{csquotes: Context sensitive quotation facilities}. April 4, 2018.
+ \url{https://www.ctan.org/pkg/csquotes}.
\bibitem{pakin} Pakin, Scott: The Comprehensive \LaTeX\ Symbol List.
- November 30, 2015. \url{http://www.ctan.org/pkg/comprehensive}.
+ November 30, 2015. \url{https://www.ctan.org/pkg/comprehensive}.
+ \bibitem{leipzig-ltx} Weber, Nathalie: \emph{leipzig: Typeset and index linguistic
+ gloss abbreviations}. June 16, 2017. \url{https://ctan.org/pkg/leipzig}.
\end{thebibliography}
\end{document}
diff --git a/Master/texmf-dist/tex/latex/covington/covington.sty b/Master/texmf-dist/tex/latex/covington/covington.sty
index 437fb55395c..5925f74eb08 100644
--- a/Master/texmf-dist/tex/latex/covington/covington.sty
+++ b/Master/texmf-dist/tex/latex/covington/covington.sty
@@ -42,14 +42,16 @@
%%% Metadata
%%%
-\def\filedate{2018/12/10}
-\def\fileversion{2.0}
+\def\filedate{2019/05/12}
+\def\fileversion{2.1}
\def\filename{covington.sty}
% Force redefinition of environments?
\newif\ifforceredef\forceredeffalse
% Tweak text layout?
\newif\iftweaklayout\tweaklayouttrue
+% Prevent page breaks in glosses
+\newif\ifnoglossbreaks\noglossbreaksfalse
\@ifundefined{ProvidesPackage}{%
\typeout{* covington.sty : Covington's linguistic macros, \fileversion\ \filedate *}
@@ -58,6 +60,7 @@
[\filedate\space v\fileversion\space Covington's linguistic macros]
\DeclareOption{force}{\forceredeftrue}
\DeclareOption{keeplayout}{\tweaklayoutfalse}
+\DeclareOption{noglossbreaks}{\noglossbreakstrue}
\ProcessOptions
}
@@ -357,27 +360,38 @@
{\def\cov@selfnt{\selectfont}}
% Thanks to Hans-Peter Kolb for this macro.
-\def\gll % Introduces 2-line text-and-gloss.
- {\begin{flushleft}
-\vskip\baselineskip% % Added 1992 Nov 8 to force single spacing
-\def\baselinestretch{1}%
-\cov@selfnt%
-\vskip-\baselineskip%
- \bgroup
- \catcode`\^^M=12
- \twosent
- }
+% Try to prevent page breaks in glosses if noglossbreaks option is set
+\def\cov@nopagebreak{}
+\ifnoglossbreaks
+\def\cov@nopagebreak{\let\reserved@e\vadjust\let\reserved@f\nobreak}
+\fi
-\def\glll % Introduces 3-line text-and-gloss.
- {\begin{flushleft}
-\vskip\baselineskip% % Added 1992 Nov 8 to force single spacing
-\def\baselinestretch{1}%
-\cov@selfnt%
-\vskip-\baselineskip%
- \bgroup
- \catcode`\^^M=12
- \threesent
- }
+% 2019-05.07: optional preceding gloss text (non-interlinearized)
+\newcommand*\glosslinepreamble[1]{#1}
+\def\cov@glp{}
+\newcommand*\glosspreamble[1]{\def\cov@glp{#1}}
+
+\def\gll{% % Introduces 2-line text-and-gloss.
+ \begin{flushleft}
+ \vskip\baselineskip% % Added 1992 Nov 8 to force single spacing
+ \def\baselinestretch{1}%
+ \cov@selfnt%
+ \vskip-\baselineskip%
+ \bgroup
+ \catcode`\^^M=12
+ \twosent
+}
+
+\def\glll{% % Introduces 3-line text-and-gloss.
+ \begin{flushleft}
+ \vskip\baselineskip% % Added 1992 Nov 8 to force single spacing
+ \def\baselinestretch{1}%
+ \cov@selfnt%
+ \vskip-\baselineskip%
+ \bgroup
+ \catcode`\^^M=12
+ \threesent
+}
% The following two \x.. versions introduce special forms of glossing
@@ -386,27 +400,27 @@
% Inspired by this post of David Carlisle to the mentioned stackexchange thread:
% http://tex.stackexchange.com/a/169744/19291
% These macros require the gloss lines to be ended explicitly with \xgle
-\def\xgll % Introduces 2-line text-and-gloss.
- {\begin{flushleft}
-\vskip\baselineskip% % Added 1992 Nov 8 to force single spacing
-\def\baselinestretch{1}%
-\cov@selfnt%
-\vskip-\baselineskip%
- \bgroup
- \ignorespaces\xtwosent
- }
+\def\xgll{% % Introduces 2-line text-and-gloss.
+ \begin{flushleft}
+ \vskip\baselineskip% % Added 1992 Nov 8 to force single spacing
+ \def\baselinestretch{1}%
+ \cov@selfnt%
+ \vskip-\baselineskip%
+ \bgroup
+ \ignorespaces\xtwosent
+}
-\def\xglll % Introduces 3-line text-and-gloss.
- {\begin{flushleft}
-\vskip\baselineskip% % Added 1992 Nov 8 to force single spacing
-\def\baselinestretch{1}%
-\cov@selfnt%
-\vskip-\baselineskip%
- \bgroup
- \ignorespaces\xthreesent
- }
+\def\xglll{% % Introduces 3-line text-and-gloss.
+ \begin{flushleft}
+ \vskip\baselineskip% % Added 1992 Nov 8 to force single spacing
+ \def\baselinestretch{1}%
+ \cov@selfnt%
+ \vskip-\baselineskip%
+ \bgroup
+ \ignorespaces\xthreesent
+}
-\def\glt{{\hskip -\glossglue}\unhbox\gline\smallskip\newline} % \newline was \\
+\def\glt{{\hskip -\glossglue}\cov@nopagebreak\unhbox\gline\smallskip\cov@nopagebreak\newline} % \newline was \\
% Introduces translation.
% Required even if no translation follows.
@@ -414,7 +428,10 @@
% Alternative to glt, when one wants to
% put a number but no translation.
-\def\glend{\end{flushleft}} % Ends the gloss environment.
+\def\glend{%
+ \end{flushleft}%
+ \def\cov@glp{}%
+} % Ends the gloss environment.
% The following TeX code is adapted, with permission, from:
% gloss.tex: Macros for vertically aligning words in consecutive sentences.
@@ -488,11 +505,13 @@
\gdef\twosent#1^^M#2^^M% #1 = first line, #2 = second line
{\getwords(\lineone,\eachwordone)#1 ^^M%
\getwords(\linetwo,\eachwordtwo)#2 ^^M%
+ \ifx\cov@glp\empty\else\glosslinepreamble{\cov@glp}\cov@nopagebreak\newline\fi%
\loop\lastword{\eachwordone}{\lineone}{\wordone}%
\lastword{\eachwordtwo}{\linetwo}{\wordtwo}%
\global\setbox\gline=\hbox{\unhbox\gline
\hskip\glossglue
- \vtop{\box\wordone % vtop was vbox
+ \vtop{% vtop was vbox
+ \box\wordone
\nointerlineskip
\box\wordtwo
}%
@@ -507,12 +526,14 @@
{\getwords(\lineone,\eachwordone)#1 ^^M%
\getwords(\linetwo,\eachwordtwo)#2 ^^M%
\getwords(\linethree,\eachwordthree)#3 ^^M%
+ \ifx\cov@glp\empty\else\glosslinepreamble{\cov@glp}\cov@nopagebreak\newline\fi%
\loop\lastword{\eachwordone}{\lineone}{\wordone}%
\lastword{\eachwordtwo}{\linetwo}{\wordtwo}%
\lastword{\eachwordthree}{\linethree}{\wordthree}%
\global\setbox\gline=\hbox{\unhbox\gline
\hskip\glossglue
- \vtop{\box\wordone % vtop was vbox
+ \vtop{% vtop was vbox
+ \box\wordone
\nointerlineskip
\box\wordtwo
\nointerlineskip
@@ -546,11 +567,13 @@
\gdef\xtwosent#1\xgle#2\xgle% #1 = first line, #2 = second line
{\xgetwords(\lineone,\eachwordone)#1 \xgle%
\xgetwords(\linetwo,\eachwordtwo)#2 \xgle%
+ \ifx\cov@glp\empty\else\glosslinepreamble{\cov@glp}\cov@nopagebreak\newline\fi%
\loop\lastword{\eachwordone}{\lineone}{\wordone}%
\lastword{\eachwordtwo}{\linetwo}{\wordtwo}%
- \global\setbox\gline=\hbox{\unhbox\gline
- \hskip\glossglue
- \vtop{\box\wordone % vtop was vbox
+ \global\setbox\gline=\hbox{\unhbox\gline%
+ \hskip\glossglue%
+ \vtop{% vtop was vbox
+ \box\wordone
\nointerlineskip
\box\wordtwo
}%
@@ -565,12 +588,14 @@
{\xgetwords(\lineone,\eachwordone)#1 \xgle%
\xgetwords(\linetwo,\eachwordtwo)#2 \xgle%
\xgetwords(\linethree,\eachwordthree)#3 \xgle%
+ \ifx\cov@glp\empty\else\glosslinepreamble{\cov@glp}\cov@nopagebreak\newline\fi%
\loop\lastword{\eachwordone}{\lineone}{\wordone}%
\lastword{\eachwordtwo}{\linetwo}{\wordtwo}%
\lastword{\eachwordthree}{\linethree}{\wordthree}%
\global\setbox\gline=\hbox{\unhbox\gline
\hskip\glossglue
- \vtop{\box\wordone % vtop was vbox
+ \vtop{% vtop was vbox
+ \box\wordone
\nointerlineskip
\box\wordtwo
\nointerlineskip
@@ -647,6 +672,11 @@
\define@key{gcovington}{fsii}{\def\glosslinetwo{#1}}
\define@key{gcovington}{fsiii}{\def\glosslinethree{#1}}
%
+% 4. Gloss preamble text
+\def\cov@gglp{}
+\define@key{covington}{preamble}{\def\cov@lglp{#1}}
+\define@key{gcovington}{preamble}{\def\cov@gglp{#1}}
+%
% General setting option
\newcommand*\setglossoptions[1]{\setkeys{gcovington}{#1}}
%
@@ -669,6 +699,8 @@
\@ifundefined{lglosslineone}{}{\def\glosslineone{\lglosslineone}}%
\@ifundefined{lglosslinetwo}{}{\def\glosslinetwo{\lglosslinetwo}}%
\@ifundefined{lglosslinethree}{}{\def\glosslinethree{\lglosslinethree}}%
+ \@ifundefined{cov@lglp}{}{\def\cov@gglp{\cov@lglp}}%
+ \ifx\cov@gglp\empty\else\def\cov@glp{\cov@gglp}\fi%
\xgll #2\xgle
#3\xgle
\ifgtright
@@ -683,6 +715,7 @@
\let\lglosslineone\relax%
\let\lglosslinetwo\relax%
\let\lglosslinethree\relax%
+ \let\cov@lglp\relax%
}
% 2. \trigloss[<opts>]{<line 1>}{<line 2>}{<line 3>}{<translation>}
@@ -704,6 +737,8 @@
\@ifundefined{lglosslineone}{}{\def\glosslineone{\lglosslineone}}%
\@ifundefined{lglosslinetwo}{}{\def\glosslinetwo{\lglosslinetwo}}%
\@ifundefined{lglosslinethree}{}{\def\glosslinethree{\lglosslinethree}}%
+ \@ifundefined{cov@lglp}{}{\def\cov@gglp{\cov@lglp}}%
+ \ifx\cov@gglp\empty\else\def\cov@glp{\cov@gglp}\fi%
\xglll #2\xgle
#3\xgle
#4\xgle