texlive[51104] Master/texmf-dist: covington (12may19)

commits+karl at tug.org commits+karl at tug.org
Sun May 12 22:17:53 CEST 2019


Revision: 51104
          http://tug.org/svn/texlive?view=revision&revision=51104
Author:   karl
Date:     2019-05-12 22:17:53 +0200 (Sun, 12 May 2019)
Log Message:
-----------
covington (12may19)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/covington/README
    trunk/Master/texmf-dist/doc/latex/covington/covington.pdf
    trunk/Master/texmf-dist/doc/latex/covington/covington.tex
    trunk/Master/texmf-dist/tex/latex/covington/covington.sty

Modified: trunk/Master/texmf-dist/doc/latex/covington/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/covington/README	2019-05-12 20:17:39 UTC (rev 51103)
+++ trunk/Master/texmf-dist/doc/latex/covington/README	2019-05-12 20:17:53 UTC (rev 51104)
@@ -3,7 +3,7 @@
 
 LaTeX macros for Linguistics
 
-Copyright 1991--2018 Michael A. Covington
+Copyright 1991--2019 Michael A. Covington
                      Robin Fairbairns
                      Juergen Spitzmueller
 
@@ -31,6 +31,11 @@
 
 == 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.

Modified: trunk/Master/texmf-dist/doc/latex/covington/covington.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/covington/covington.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/covington/covington.tex	2019-05-12 20:17:39 UTC (rev 51103)
+++ trunk/Master/texmf-dist/doc/latex/covington/covington.tex	2019-05-12 20:17:53 UTC (rev 51104)
@@ -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 @@
 
 \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,6 +138,7 @@
 	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.
@@ -144,16 +145,26 @@
 	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.
+access to \LaTeX\ manuals.
 
-If you are using \cvt\ and \texttt{uga.sty} (UGa thesis style) 
-together, you should load \texttt{uga} before \cvt.
-
+\pagebreak[4]
  
 \section{Stacked diacritics}\label{sec:accents}
 
@@ -442,6 +453,9 @@
           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 @@
 	        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 @@
 	     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 @@
 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 @@
              {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 @@
         {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\xA8alu\v{g} g\xFC\v{g}\xFCna 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\xA8alu\v{g} g\xFC\v{g}\xFCna 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 @@
 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 @@
 
 \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 @@
 \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}

Modified: trunk/Master/texmf-dist/tex/latex/covington/covington.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/covington/covington.sty	2019-05-12 20:17:39 UTC (rev 51103)
+++ trunk/Master/texmf-dist/tex/latex/covington/covington.sty	2019-05-12 20:17:53 UTC (rev 51104)
@@ -42,8 +42,8 @@
 %%% 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?
@@ -50,6 +50,8 @@
 \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,29 +360,40 @@
    {\def\cov at 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 at selfnt%
-\vskip-\baselineskip%
-    \bgroup
-    \catcode`\^^M=12
-    \twosent
-   }
+% Try to prevent page breaks in glosses if noglossbreaks option is set
+\def\cov at nopagebreak{}
+\ifnoglossbreaks
+\def\cov at nopagebreak{\let\reserved at e\vadjust\let\reserved at 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 at selfnt%
-\vskip-\baselineskip%
-    \bgroup
-    \catcode`\^^M=12
-    \threesent
-   }
+% 2019-05.07: optional preceding gloss text (non-interlinearized)
+\newcommand*\glosslinepreamble[1]{#1}
+\def\cov at glp{}
+\newcommand*\glosspreamble[1]{\def\cov at 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 at 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 at selfnt%
+   \vskip-\baselineskip%
+   \bgroup
+   \catcode`\^^M=12
+   \threesent
+}
+
+
 % The following two \x.. versions introduce special forms of glossing
 % macros that do not activate the newline char. The latter does not
 % work inside arguments (see http://tex.stackexchange.com/questions/169740)
@@ -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 at 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 at 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 at 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 at selfnt%
+   \vskip-\baselineskip%
+   \bgroup
+   \ignorespaces\xthreesent
+}
 
-\def\glt{{\hskip -\glossglue}\unhbox\gline\smallskip\newline}  % \newline was \\
+\def\glt{{\hskip -\glossglue}\cov at nopagebreak\unhbox\gline\smallskip\cov at 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 at 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 at glp\empty\else\glosslinepreamble{\cov at glp}\cov at 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 at glp\empty\else\glosslinepreamble{\cov at glp}\cov at 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 at glp\empty\else\glosslinepreamble{\cov at glp}\cov at 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 at glp\empty\else\glosslinepreamble{\cov at glp}\cov at 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 at key{gcovington}{fsii}{\def\glosslinetwo{#1}}
 \define at key{gcovington}{fsiii}{\def\glosslinethree{#1}}
 %
+% 4. Gloss preamble text
+\def\cov at gglp{}
+\define at key{covington}{preamble}{\def\cov at lglp{#1}}
+\define at key{gcovington}{preamble}{\def\cov at 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 at lglp}{}{\def\cov at gglp{\cov at lglp}}%
+  \ifx\cov at gglp\empty\else\def\cov at glp{\cov at gglp}\fi%
   \xgll #2\xgle
         #3\xgle
   \ifgtright
@@ -683,6 +715,7 @@
   \let\lglosslineone\relax%
   \let\lglosslinetwo\relax%
   \let\lglosslinethree\relax%
+  \let\cov at 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 at lglp}{}{\def\cov at gglp{\cov at lglp}}%
+  \ifx\cov at gglp\empty\else\def\cov at glp{\cov at gglp}\fi%
   \xglll #2\xgle
          #3\xgle
          #4\xgle



More information about the tex-live-commits mailing list