% -*- LaTeX -*- %%%% Latex2e: \documentclass[11pt,a4paper]{article} \usepackage{gb4e} %%%% LaTeX209: %\documentstyle[a4,11pt,gb4e]{article} %% \def\bs{$\backslash$} \frenchspacing\parskip1.2ex \parindent0pt \def\bit{\vskip.05\baselineskip\hspace*{1em}\hangindent4em\hangafter1} \title{Preliminary documentation for {\tt gb\gbVersion.sty}\thanks{% Parts of ``Government-Binding style'' {\tt gb\gbVersion.sty} are loosely based on ideas and code by M.~Covington, M.~van der Goot, J.~Frampton and L.~Holt. In particular it automatically includes {\tt cgloss\gbVersion.sty}, a (heavily adapted) version of M.~Covington's \LaTeX-adaptation of M.~van der Goot's plain\TeX{} Midnight gloss macros.} and {\tt cgloss\gbVersion.sty}} \author{Hans-Peter Kolb \\[2pt] Craig Thiersch $<${\sf c\_thiersch@alum.mit.edu}$>$} \date{} \begin{document} \maketitle \tableofcontents \vspace*{1cm} \vfill \subsection*{Important note:} The file {\tt gb\gbVersion.sty}\footnote{% This version of {\tt gb{\em x}.sty} redesigns the entire series of {\tt \bs ex} commands. It also contains changes to the gloss-macros to make them work in footnotes etc. {\bf NB: The {\em {\tt e}xport\/} version does not provide a soft-landing system of command-compatibility with earlier versions}. NB: Make sure to get {\tt cgloss\gbVersion.sty} together with {\tt gb\gbVersion.sty}. This version of gb4e includes some \emph{minimal} bug-fixes and enhancements by Alexis Dimitriadis, with emphasis on backward compatibility. } allows \verb"_" (subscript) and \verb"^" (superscript) to be used in ordinary text, which is handy, but because it changes their definitions it must be loaded {\bf after} any file that uses them in their \TeX\ meaning. \pagebreak \section{Linguistic examples in \LaTeX} {\tt gb\gbVersion.sty} is a style option to be used with \LaTeX's major document styles. To make its commands available, add it to your document's preamble like this: \bit (in LaTex2e:)~~~~~~\verb,\usepackage{gb4e}, \bit (in LaTex 2.09:)~~{\tt \bs documentstyle[\ldots gb\gbVersion]\{\ldots\}} Its core is an environment for the formatting of linguistic examples. The format is simple:\\ (Batches of) examples are introduced by \verb,\begin{exe}, which sets up the top level example environment. Obviously, this environment has to be closed after the example(s) by \verb,\end{exe},. You can create sub- and subsubexamples by embedding several {\tt xlist}-environments (up to three levels deep). Here is an elaborate example: \begin{verbatim} \begin{exe} % sets up the top-level example environment \ex\label{here} Here is one. % example with running number \ex[*]{Here another is.} % judged ex. with running number \ex Here are some with judgements. \begin{xlist} % first embedding (alphabetical numbering) \ex[]{A grammatical sentence am I.} \ex[*]{An ungrammatical sentence is you.} \ex[??]{A dubious sentence is she.} \ex % just the number \begin{xlist} % second embedding (roman numbering) \ex[**]{Need one a second embedding?} \ex[\%]{sometime.} \end{xlist} % end second embedding \ex Dare to judge me! \end{xlist} % end first embedding \ex This concludes our demonstration. \end{exe} % end example environment \end{verbatim} This produces: \begin{exe} % sets up the top-level example environment \ex\label{here} Here is one. % example with running number \ex[*]{Here another is.} % judged ex. with running number \ex Here are some with judgements. \begin{xlist} % first embedding (alphabetical numbering) \ex[]{A grammatical sentence am I.} \ex[*]{An ungrammatical sentence is you.} \ex[??]{A dubious sentence is she.} \ex % just the number \begin{xlist} % second embedding (roman numbering) \ex[**]{Need one a second embedding?} \ex[\%]{sometime.} \end{xlist} % end second embedding \ex Dare to judge me! \end{xlist} % end first embedding \ex This concludes our demonstration. \end{exe} % end example environment All example-list commands have an optional argument which allows you to set the labelwidth to, e.g., the widest label to come (in the style of \verb,\begin{bibliography},). So, \verb,\begin{exe}[(234)], will set the labelwidth to the width of ``{\tt (234)}''---which is also the default. The other defaults are ``{\tt m.}'' for {\tt xlist}, and ``{\tt iii.}'' for {\tt xlisti}. The default labelwidth for the {\tt exe}-environment can also be changed globally by issuing a \verb,\exewidth{}, command in the preamble of your document (i.e.\ between \verb'\documentclass' and \verb'\begin{document}'). \subsection{Examples with running numbers} As just shown, every example with a running number is introduced by \verb'\ex'. Obviously, \verb,\ex, is {\em context-sensitive\/}: at the top level the number produced is {\em arabic} and accumulative throughout the document; in embedded {\tt xlist}-environments it is {\em alphabetic\/} on the first level, {\em roman\/} on the second, and {\em arabic\/} on the third, starting with $a.$, $i.$, and $1.$, repectively. For total control over the shape of your subexample-numbering there are some special forms listed below:\footnote{% Note that for all {\tt \bs begin\{\}} \ldots {\tt \bs end\{\}} pairs the forms {\tt \bs} \ldots {\tt \bs end} are also permissible in \LaTeX. So if you like you can go on using {\tt\bs xlist} \ldots {\tt\bs endxlist} for {\tt \bs begin\{xlist\}} \ldots {\tt \bs end\{xlist\}} etc., but \LaTeX-syntaxcheckers and utilities like AUC-\TeX\ won't recognize them as necessarily paired and won't report unmatched expressions. (Have you ever tried {\tt -C -C} (= LaTeX-environment) or {\tt -C -F} (= LaTeX-close-environment) in EMACS' AUC-\TeX\ mode? You should---it saves a lot of typing.)} \begin{center} \begin{tabular}{|l|l|}\hline {\em Environment}& {\em Default numbering}\\ \hline\hline \verb,\begin{exe}, \ldots \verb,\end{exe},& (1) arabic (Toplevel)\\ \hline\hline \verb,\begin{xlist}, \ldots \verb,\end{xlist},& depends on level of embedding\\ \hline \verb,\begin{xlista}, \ldots \verb,\end{xlista},& a. alphabetical\\ \verb,\begin{xlisti}, \ldots \verb,\end{xlisti},& ii. roman\\ \verb,\begin{xlistn}, \ldots \verb,\end{xlistn},& 3. arabic\\ \verb,\begin{xlistI}, \ldots \verb,\end{xlistI},& IV. Roman\\ \verb,\begin{xlistA}, \ldots \verb,\end{xlistA},& E. Alphabetical\\ \hline \end{tabular} \end{center} In all cases, \verb,\label,/\verb,\ref, commands will do The Right Thing. The syntax of \verb,\ex, is as follows: \bit\verb'\ex' $\Longrightarrow$ a label with running number (e.g., if a sublist of examples follows). \bit\verb'\ex ' $\Longrightarrow$ a numbered example. \bit\verb'\ex[]{}' $\Longrightarrow$ a numbered example with judgement. The space reserved for judgements can be controlled by the command\break \verb,\judgewidth{},, which sets it to the width of \verb,, (Default: ``{\tt ??}''). It can be issued in the preamble to change the default globally, or within an {\tt exe}-environment for a local change. \paragraph*{In short:} Use \verb"\ex" for all numbered examples; if they have no optional argument (judgement) they will be flush left; if they have {\tt [ ] }'s then there will be a space reserved for judgements. (NB: In this case you have to indicate the scope of the example itself with \{\ldots\}'s.) \subsection{Examples with other identifiers} Sometimes it is necessary not to use running numbers but to specify the identifier of an example manually as in: \begin{quote} \ldots let us now contemplate Chomsky (1981:264, ex.29f): \begin{exe} \exi{(29)} \al\lb{INFL} AGR]\lb{VP} V\ldots] \exi{(30)} \begin{xlist}[(ii)] \exi{(i)} \be\lb{VP} V-AGR\ldots] \exi{(ii)} \be\lb{VP}\lb{VP} V-AGR\ldots] NP] \end{xlist} \end{exe} \end{quote} For cases like this there is the command \verb'\exi{}' which works exactly like \verb'\ex': \bit\verb'\exi{}' $\Longrightarrow$ the identifier as label \bit\verb'\exi{} ' $\Longrightarrow$ the example labelled with identifier \bit\verb'\exi{}[]{}' $\Longrightarrow$ the judged example,\\ labelled with identifier.\\ So the example above is produced by: \pagebreak[2] \begin{verbatim} \ldots let us now contemplate Chomsky (1981:264, ex.29f): \begin{exe} \exi{(29)} \al\lb{INFL} AGR]\lb{VP} V\ldots] \exi{(30)} \begin{xlist}[(ii)] \exi{(i)} \be\lb{VP} V-AGR\ldots] \exi{(ii)} \be\lb{VP}\lb{VP} V-AGR\ldots] NP] \end{xlist} \end{exe} \end{verbatim} \verb'\exi' can be used to deal with many labelling problems. The three most commons ones are predefined: \begin{itemize} \item Crossreferences (\verb'\exr{