diff options
Diffstat (limited to 'Master/texmf-dist')
-rw-r--r-- | Master/texmf-dist/doc/latex/covington/README | 8 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/covington/covington.pdf | bin | 441218 -> 518125 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/covington/covington.tex | 119 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/covington/covington.sty | 105 |
4 files changed, 180 insertions, 52 deletions
diff --git a/Master/texmf-dist/doc/latex/covington/README b/Master/texmf-dist/doc/latex/covington/README index 615411a72c9..12cbf42ab50 100644 --- a/Master/texmf-dist/doc/latex/covington/README +++ b/Master/texmf-dist/doc/latex/covington/README @@ -33,6 +33,14 @@ The package consists of the following files: == CHANGES == +* Version 1.3 (2017-04-05): + + - Gloss variants \xgll and \xglll that work inside macros (such as footnotes) + but require explicit gloss line end markers (\xgle). + + - Provide way to globally alter indentation and vertical distance of reflists + (new lengths \reflistindent, \reflistparsep and \reflistitemsep). + * Version 1.2 (2016-08-26): - New length \examplenumbersep to adjust (increase) the horizontal space diff --git a/Master/texmf-dist/doc/latex/covington/covington.pdf b/Master/texmf-dist/doc/latex/covington/covington.pdf Binary files differindex ef680b4f428..0b0540f506d 100644 --- a/Master/texmf-dist/doc/latex/covington/covington.pdf +++ b/Master/texmf-dist/doc/latex/covington/covington.pdf diff --git a/Master/texmf-dist/doc/latex/covington/covington.tex b/Master/texmf-dist/doc/latex/covington/covington.tex index 93b5b6b972e..c242bbdae27 100644 --- a/Master/texmf-dist/doc/latex/covington/covington.tex +++ b/Master/texmf-dist/doc/latex/covington/covington.tex @@ -1,7 +1,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% File covington.tex %% -%% Documentation of covington.sty +%% Documentation of covington %% %% This file is part of the covington LaTeX package %% @@ -53,7 +53,7 @@ colorlinks=false ]{hyperref} \hypersetup{% - pdftitle={The covington.sty manual}, + pdftitle={The covington manual}, pdfauthor={Jürgen Spitzmüller}, pdfkeywords={latex,linguistics} } @@ -83,29 +83,27 @@ \newcommand*\jfenv[1]{\texttt{#1}} \newcommand*\jfcsmacro[1]{\jfmacro{\textbackslash{#1}}} +% Strings +\newcommand*{\cvt}{\textsf{covington}} + % % Titling % -\def\pversion{Version 1.2} -\def\pdate{August 26, 2016} +\def\pversion{Version 1.3} +\def\pdate{April 5, 2017} -\title{\textbf{Typing Linguistics with \texttt{covington.sty}}} -\author{Michael A. Covington \\ - \small Artificial Intelligence Center \\ - \small The University of Georgia \\ - \small Athens, Georgia 30602 \textsc{u.\,s.\,a.}\\ - mcovingt@ai.uga.edu\\ - \url{http://www.ai.uga.edu/~mc}} +\title{\textbf{The \cvt\ Package\\Macros for Linguistics}} +\author{Michael A. Covington \and J\"urgen Spitzm\"uller\thanks{Current maintainer. + Please report issues via \protect\url{https://github.com/jspitz/covington}}} -\date{\pversion, \pdate\thanks{Current maintainer: J\"urgen Spitzm\"uller. - Please report issues via \protect\url{https://github.com/jspitz/covington}}} +\date{\pversion, \pdate} \begin{document} \maketitle \begin{abstract} -\noindent This package, initially a collection of Michael Covington's private macros, provides +\noindent This package, initially a collection of Michael A. Covington's private macros, provides numerous minor \LaTeX\ enhancements for linguistics, including multiple accents on the same letter, interlinear glosses (word-by-word translations), Discourse Represenation Structures, and example numbering. The package works both with \LaTeX\ 2.09 and \LaTeXe. @@ -116,22 +114,22 @@ and example numbering. The package works both with \LaTeX\ 2.09 and \LaTeXe. \section{Introduction} -This file, \texttt{covington.tex}, is the documentation for \MakeLowercase{\pversion} -of \texttt{covington.sty} (\pdate), which is a \LaTeX\ package providing macros +This file is the documentation for \MakeLowercase{\pversion} +of \cvt\ (\pdate), which is a \LaTeX\ package providing macros 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 \texttt{covington.sty} and adapted to \LaTeXe. Its \LaTeX\ 2.09 traces +Eventually, it has been renamed to \cvt\ and adapted to \LaTeXe. Its \LaTeX\ 2.09 traces are however still visible, and the style should actually still work with \LaTeX\ 2.09 (if not, drop us a note).} -To use \texttt{covington.sty} with \LaTeXe, simply add the command +To use \cvt\ with \LaTeXe, simply add the command \lstinline"\usepackage{covington}" to your document preamble. \begin{quote} \footnotesize In \LaTeX\ 2.09, - include \texttt{covington} among the optional parameters of + include \cvt\ among the optional parameters of \lstinline"\documentstyle", as in:\\ \lstinline"\documentstyle[12pt,"\underline{covington}\verb"]{article}" \end{quote} @@ -139,17 +137,17 @@ The package has the following options: \begin{itemize} \item \joption{force}: Force the redefinition of environments that are already defined. This applies to the \jenv{example}, \jenv{examples} and \jenv{exercise} environments, which are by default not touched if they -are already defined before \texttt{covington} is loaded. See sec.~\ref{sec:ex}, \ref{sec:exs} and \ref{sec:exercises} +are already defined before \cvt\ is loaded. See sec.~\ref{sec:ex}, \ref{sec:exs} and \ref{sec:exercises} for details. \end{itemize} - +% In what follows we presume that you know how to use \LaTeX\ and have -access to \LaTeX\ manuals. Note that \texttt{covington.sty} does not +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 \texttt{covington.sty} and \texttt{uga.sty} (UGa thesis style) -together, you should load \texttt{uga} before \texttt{covington}. +If you are using \cvt\ and \texttt{uga.sty} (UGa thesis style) +together, you should load \texttt{uga} before \cvt. \section{Stacked accents}\label{sec:accents} @@ -174,7 +172,7 @@ via the macros: \end{lstlisting} But out of the box, \LaTeX\ doesn't give you a convenient way to put \emph{two} -accents on the same letter. To fill this gap, \texttt{covington.sty} provides +accents on the same letter. To fill this gap, \cvt\ provides the following macros: \begin{flushleft} \jcsmacro{twoacc[\ldots|\ldots]} \quad to combine any two accents, e.\,g., @@ -260,12 +258,12 @@ If you need more space between the example number and the text, you can increase the length \jcsmacro{examplenumbersep} (which is preset to \texttt{0pt}). Doing \lstinline|\setlength\examplenumbersep{1em}|, for instance, will increase the space by 1\,em. -Note that, as of version 1.1, \texttt{covington} checks if there is already an \jenv{example} environment defined -(e.\,g., by the class). If so, \texttt{covington} does not +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}, \texttt{covington} will override +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 \texttt{covington} with the \texttt{beamer} class). +(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: @@ -311,15 +309,15 @@ This prints as: \item This is the first sentence. \item This is the second sentence. \end{examples} -As for \jenv{example}, \texttt{covington} checks if there is already an \jenv{examples} environment defined, -and if this is the case, \texttt{covington} 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}, \texttt{covington} will override +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 \texttt{covington} with the \texttt{beamer} class), telling you +(this is the case, for instance, if you use \cvt\ with the \texttt{beamer} class), telling you how it has dealt with the situation. -\section{Glossing sentences word-by-word} +\section{Glossing sentences word-by-word}\label{sec:gloss} To gloss a sentence is to annotate it word-by-word. Most commonly, a sentence in a foreign language is followed by a word-for-word @@ -353,14 +351,25 @@ you would type: \glt `This is a little example in Dutch.' \glend \end{lstlisting} -All together, \texttt{covington.sty} provides five macros for dealing with +Note that \cvt\ locally activates the end of line in glosses in order to identify the different lines of the gloss (via category code change). This does not work inside macros (e.\,g., if the gloss is in a footnote). To work around this, a special version of the \jcsmacro{gll} macro is provided that does without the character activation: \jcsmacro{xgll}. This can also be used in macro arguments; however, the end of each gloss line needs to be explicitly specified by the \jcsmacro{xgle} macro in this case. If you want to put the above gloss in a footnote, thus, you would type: +\begin{lstlisting}[moretexcs={xgll,xgle,glt,glend}] +\xgll Dit is een voorbeeldje in het Nederlands.\xgle + This is a {little example} in {} Dutch.\xgle +\glt `This is a little example in Dutch.' +\glend +\end{lstlisting} +% +All together, \cvt\ provides eight macros for dealing with glosses: \begin{itemize} \item \jcsmacro{gll} introduces two lines of words vertically aligned, and -activates an environment very similar to \jfenv{flushleft}. +activates an environment very similar to \jfenv{flushleft}. The two lines are separated by a normal line break (carriage return). \item \jcsmacro{glll} is like \jcsmacro{gll} except that it introduces \emph{three} lines of lined-up words (useful for cited forms, morphology, and translation). +\item \jcsmacro{xgll} is similar to \jcsmacro{gll} except that it does not make the line ending active. It thus works inside macros such as footnotes but requires explicit gloss line termination via \jcsmacro{xgle}. +\item \jcsmacro{xglll} is similar to \jcsmacro{glll} except that it does not make the line ending active. It thus works inside macros such as footnotes but requires explicit gloss line termination via \jcsmacro{xgle}. +\item \jcsmacro{xgle} is a gloss line ending marker to be used with \jcsmacro{xgll} and \jcsmacro{xglll}. \item \jcsmacro{glt} ends the set of lined-up lines and introduces a line (or more) of translation. \item \jcsmacro{gln} is like \jcsmacro{glt} but does not start a new line @@ -463,7 +472,7 @@ which was obviously coded as: \section{Discourse Representation Structures} -Several macros in \texttt{covington.sty} facilitate display of discourse +Several macros in \cvt\ facilitate display of discourse Representation Structures (\textsc{drs}es) in the box notation introduced by Hans Kamp. The simplest one is \jcsmacro{drs}, which takes two arguments: a list of discourse variables joined by \verb"~", and a list of \textsc{drs} @@ -564,13 +573,13 @@ Prove that the above assertion is true. \end{lstlisting} The argument (\verb"[Project]" in the example) is optional. -Note that, as of version 1.1, \texttt{covington} checks if there is already an \jenv{exercise} environment -defined (e.\,g., by the class). If so, \texttt{covington} does not define its own one. However, there is always +Note that, as of version 1.1, \cvt\ checks if there is already an \jenv{exercise} environment +defined (e.\,g., by the class). If so, \cvt\ does not define its own one. However, there is always the alias environment \jenv{covexercise} which can be used in order to produce \texttt{covington's} exercise. -If you use the package option \joption{force}, \texttt{covington} will override existing \jenv{exercise} +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. -\section{Reference Lists} +\section{Reference Lists}\label{sec:reflists} To type a simple \textsc{lsa}-style hanging-indented reference list, you can use the \jenv{reflist} environment. (\emph{Note:} \jenv{reflist} is not integrated with Bib\TeX\ in any way.% @@ -608,6 +617,14 @@ Massachusetts: MIT Press. Covington, Michael A. 1993. Natural language processing for Prolog programmers. Englewood Cliffs, New Jersey: Prentice-Hall. \end{reflist} +By default, the references have a hanging indentation of 3\,em. This can +be globally changed by altering the length \jcsmacro{reflistindent}. +Doing \lstinline|\setlength\reflistindent{1.5em}|, for instance, +will shorten the indentation by half. Likewise, the length \jcsmacro{reflistitemsep} +(6\,pt by default) and \jcsmacro{reflistparsep} (ca. 4\,pt by default) can be adjusted +to alter the vertical separation (\jfcsmacro{itemsep} and \jfcsmacro{parsep}, for that +matter) of reference entries. + Notice that within the reference list, ``French spacing'' is in effect --- that is, spaces after periods are no wider than normal spaces. Thus you do not have to do anything special to avoid excessive space after @@ -637,13 +654,25 @@ within a sentence or \textsc{ps}-rule: \end{flushleft} That's all there is for now. -Suggestions for improving \texttt{covington.sty} are welcome, and bug +Suggestions for improving \cvt\ are welcome, and bug reports are actively solicited (via \url{https://github.com/jspitz/covington}). Please note, however, that this is free software, and the authors make no commitment to do any further work on it. \section{Release history} +\subsection*{1.3 (2017 April 5)} + +\begin{itemize} + \item Gloss variants \jcsmacro{xgll} and \jcsmacro{xglll} that work + inside macros (such as footnotes) but require explicit gloss + line end markers (\jcsmacro{xgle}). See sec.~\ref{sec:gloss} for details. + \item New lengths \jcsmacro{reflistindent}, \jcsmacro{reflistparsep} and + \jcsmacro{reflistitemsep} to globally adjust the indentation or vertical + space, respectively, of reflist items. + See sec.~\ref{sec:reflists} for details. +\end{itemize} + \subsection*{1.2 (2016 August 26)} \begin{itemize} @@ -664,7 +693,7 @@ it. \item The package now uses \textsc{nfss} font commands if available (fallback for \LaTeX\ 2.09 is still provided). \item Work around clash with classes\slash packages that define their own \jenv{example} and \jenv{examples} environments (most notably the \texttt{beamer} class) as well as \jenv{execise} environments. - The \texttt{covington} package no longer blindly attempts to define these environments. By default, it does not + The \cvt\ package no longer blindly attempts to define these environments. By default, it does not define them if they are already defined (\texttt{covington's} own environments, however, are still available via aliases). By means of a new package option, a redefinition can also be forced. See sec.~\ref{sec:ex} and \ref{sec:exs} for details. \item New length \jcsmacro{twoaccsep} allows for the adjustment of the distance between stacked accents (see sec.~\ref{sec:accents}). @@ -695,7 +724,7 @@ it. \begin{itemize} \item Multiple accents on a single letter (e.\,g., \emph{\acm{a}}) are supported. - \item This package is now called \texttt{covington} (with the o) + \item This package is now called \cvt\ (with the o) and is compatible with \LaTeXe\ and \textsc{nfss} as well as \LaTeX\ 2.09. \item The vertical placement of labeled feature structures has been changed @@ -705,7 +734,7 @@ it. \begin{thebibliography}{99} \bibitem{pakin} Pakin, Scott. The Comprehensive \LaTeX\ Symbol List. - 30 November 2015. \url{http://www.ctan.org/tex-archive/info/symbols/comprehensive}. + 30 November 2015. \url{http://www.ctan.org/pkg/comprehensive}. \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 a9993405f84..9baf62e69f9 100644 --- a/Master/texmf-dist/tex/latex/covington/covington.sty +++ b/Master/texmf-dist/tex/latex/covington/covington.sty @@ -42,8 +42,8 @@ %%% Metadata %%% -\def\filedate{2016/08/26} -\def\fileversion{1.2} +\def\filedate{2017/04/05} +\def\fileversion{1.3} \def\filename{covington.sty} % Force redefinition of environments? @@ -227,7 +227,7 @@ %%% Sentences with word-by-word glosses %%% -% See covingtn.tex for full documentation. Some examples: +% See covington.tex for full documentation. Some examples: % % Displayed sentence with gloss and translation: % @@ -294,6 +294,33 @@ \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) +% 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\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 \\ % Introduces translation. % Required even if no translation follows. @@ -409,6 +436,63 @@ } } % restore \catcode`\^^M +% An explicit gloss line ending (for \xgll and \xglll variants= +\gdef\xgle{} +% Special versions of \getwords, \donewords, \twosent and \threesent for the \x.. +% variants of gloss introducers (using \xgle as separator instead of active newline) +\gdef\xgetwords(#1,#2)#3 #4\xgle% #1=linebox, #2=\each, #3=1st word, #4=remainder + {\setbox#1=\vbox{\hbox{#2\strut#3 }% adds space + \unvbox#1% + }% + \def\more{#4}% + \ifx\more\empty\let\more=\xdonewords + \else\let\more=\xgetwords + \fi + \more(#1,#2)#4\xgle% + } + +\gdef\xdonewords(#1,#2)\xgle{}% + +\gdef\xtwosent#1\xgle#2\xgle% #1 = first line, #2 = second line + {\xgetwords(\lineone,\eachwordone)#1 \xgle% + \xgetwords(\linetwo,\eachwordtwo)#2 \xgle% + \loop\lastword{\eachwordone}{\lineone}{\wordone}% + \lastword{\eachwordtwo}{\linetwo}{\wordtwo}% + \global\setbox\gline=\hbox{\unhbox\gline + \hskip\glossglue + \vtop{\box\wordone % vtop was vbox + \nointerlineskip + \box\wordtwo + }% + }% + \testdone + \ifnotdone + \repeat + \egroup % matches \bgroup in \gloss + } + +\gdef\xthreesent#1\xgle#2\xgle#3\xgle% #1 = first line, #2 = second line, #3 = third + {\xgetwords(\lineone,\eachwordone)#1 \xgle% + \xgetwords(\linetwo,\eachwordtwo)#2 \xgle% + \xgetwords(\linethree,\eachwordthree)#3 \xgle% + \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 + \nointerlineskip + \box\wordtwo + \nointerlineskip + \box\wordthree + }% + }% + \testdone + \ifnotdone + \repeat + \egroup % matches \bgroup in \gloss + } + %\def\gloss % raw TeX macro for 2 aligned lines % {\bgroup % \catcode`\^^M=12 @@ -612,14 +696,21 @@ \fi } +\newlength\reflistindent +\setlength\reflistindent{3em} +\newlength\reflistitemsep +\setlength\reflistitemsep{6pt} +\newlength\reflistparsep +\setlength\reflistparsep{\parsep} \@ifundefined{reflist}{ \newenvironment{reflist}{\begin{list}{}% {\setlength{\labelwidth}{0pt} \setlength{\labelsep}{0pt} - \setlength{\leftmargin}{3em} - \setlength{\itemindent}{-3em} - \setlength{\listparindent}{-3em} - \setlength{\itemsep}{6pt}}\item}{\end{list}} + \setlength{\leftmargin}{\reflistindent} + \setlength{\itemindent}{-\reflistindent} + \setlength{\listparindent}{-\reflistindent} + \setlength{\itemsep}{\reflistitemsep} + \setlength{\parsep}{\reflistparsep}}\item}{\end{list}} } % Modified 1992 Nov 8 to skip defining reflist if reflist is already % defined. Permits using uga.sty with covingtn.sty. |