| 1 |
%% linguex-doc.tex version 2.1 |
| 2 |
%% documentation of linguex.sty version 4.3 |
| 3 |
%% Author: [email protected] |
| 4 |
%% Version number updated; minor typos fixed |
| 5 |
%% filedate 2013/05/28 |
| 6 |
\documentclass{article} |
| 7 |
\usepackage{linguex} |
| 8 |
%\usepackage{linguho} |
| 9 |
%\usepackage[*]{linguho} |
| 10 |
\sloppy\raggedbottom |
| 11 |
%\addtolength{\alignSubExnegindent}{.7em} |
| 12 |
%%%%%%%%%%%%%%%%%%%%%%%%%% |
| 13 |
\begin{document} |
| 14 |
\title{linguex.sty Documentation} |
| 15 |
\author{Wolfgang Sternefeld\\ |
| 16 |
Version 4.3 --- May 2013} |
| 17 |
\date{} |
| 18 |
\maketitle |
| 19 |
|
| 20 |
\subsection*{Abstract}% |
| 21 |
{\tt linguex.sty} is a \LaTeX-tool written for the lazy linguist. Its |
| 22 |
handling of example numbering, indentations, indexed brackets, and |
| 23 |
grammaticality judgments reduces the effort of formatting linguistic |
| 24 |
examples to a minimum. It also allows for automatic extraction of a |
| 25 |
handout. |
| 26 |
|
| 27 |
The macro runs with \LaTeXe\ only and requires two additional |
| 28 |
style files: {\tt xspace.sty} from |
| 29 |
the base of and {\tt cgloss4e.sty} (a modification of the |
| 30 |
midnight gloss macro) for glosses. |
| 31 |
|
| 32 |
\subsection*{The Three Basic Commands} The linguex macro defines three |
| 33 |
basic commands: \verb-\ex.-, \verb-\a.-, and \verb-\b.-. The first |
| 34 |
two generate list environments. The third functions basically like an |
| 35 |
\verb-\item-. Here is an example. Type setting |
| 36 |
|
| 37 |
%\begin{samepage} |
| 38 |
\begin{verbatim} |
| 39 |
\ex. This is the first level of embedding |
| 40 |
\a. This is the second level |
| 41 |
\b. This is still the second level, but: |
| 42 |
\a. This is the third level |
| 43 |
\b. This is not the end. |
| 44 |
\b. This is the end |
| 45 |
\end{verbatim} |
| 46 |
will print: |
| 47 |
|
| 48 |
\ex. This is the first level of embedding |
| 49 |
\a. This is the second level |
| 50 |
\b. This is still the second level, but: |
| 51 |
\a. This is the third level |
| 52 |
\b. This is not the end. |
| 53 |
\b. This is the end |
| 54 |
|
| 55 |
%\end{samepage} |
| 56 |
The list environment created by \verb-\ex.- must be closed by a single |
| 57 |
blank line (a \verb-\par-). The text following this list will not be |
| 58 |
indented. In order to get a \verb|\parindent|, a \textit{second} |
| 59 |
blank line must be added, immediately following the first. |
| 60 |
|
| 61 |
The commands \verb-\c.-, \verb-\d.-, \verb-\e.-, and \verb-\f.- are |
| 62 |
equivalent copies of \verb-\b.-; they were defined to produce a kind |
| 63 |
of WYSIWYG-effect. |
| 64 |
|
| 65 |
The blank line at the end of \Last simultaneously closes the three |
| 66 |
lists of \Last (opened by \verb|\ex.|, \verb|\a.|, and the embedded |
| 67 |
\verb|\a.|). To close just one of the embedded lists (introduced by |
| 68 |
\verb|\a.|) put \verb-\z.- at the point of transition from |
| 69 |
level $n$ of the embedding to level $n-1$. This is exemplified by the |
| 70 |
following example: |
| 71 |
|
| 72 |
%\begin{samepage} |
| 73 |
\ex.\a. {\it Government:}\\ |
| 74 |
A governs B iff |
| 75 |
\a. A is a governor; |
| 76 |
\b. A m-commands B; |
| 77 |
\c. no barrier intervenes between A and B |
| 78 |
\z. |
| 79 |
\c. Governors are lexical nodes and tensed I. |
| 80 |
\z. |
| 81 |
(from Haegeman 1991) |
| 82 |
|
| 83 |
% |
| 84 |
\begin{verbatim} |
| 85 |
This is exemplified by the following example: |
| 86 |
\ex.\a. {\it Government:}\\ |
| 87 |
A governs B iff |
| 88 |
\a. A is a governor; |
| 89 |
\b. A m-commands B; |
| 90 |
\c. no barrier intervenes between A and B |
| 91 |
\z. |
| 92 |
\b. Governors are lexical nodes and tensed I. |
| 93 |
\z. |
| 94 |
(from Haegeman 1991) |
| 95 |
\end{verbatim}%\end{samepage} |
| 96 |
% |
| 97 |
|
| 98 |
\subsection*{Cross References}% |
| 99 |
can be handled by \verb-\label{...}- and \verb-\ref{...}- in the usual |
| 100 |
manner. For example, a label between \verb-\ex.- and \verb-\a.- |
| 101 |
stores the main example number for further reference; the same command |
| 102 |
following \verb-\a.- or \verb-\b.- stores the label of a |
| 103 |
(sub-)subexample for further reference. |
| 104 |
|
| 105 |
For cross references in the immediate vicinity of an example, you need |
| 106 |
not \verb|\label| the examples. \verb-\Next- refers to the following |
| 107 |
example number, and \verb-\NNext- to the next but one. Reference to |
| 108 |
the previous example is provided by \verb-\Last-; the penultimate one |
| 109 |
is referred to with \verb-\LLast-. |
| 110 |
|
| 111 |
These shorthands always refer to the first level of embedding. |
| 112 |
Reference to subexamples can only be obtained by adding an (optional) argument |
| 113 |
to the above Next- and Last-commands. For example, saying |
| 114 |
\verb.\NNext[g-ii]. right now yields \NNext[g-ii]. The dash between |
| 115 |
\addtocounter{ExNo}{2}\arabic{ExNo}\addtocounter{ExNo}{-2} and g is |
| 116 |
defined as \verb|\firstrefdash|. It can be suppressed by |
| 117 |
\verb|\renewcommand{\firstrefdash}{}|. |
| 118 |
|
| 119 |
|
| 120 |
\subsection*{Footnotes}% |
| 121 |
Inside a footnote, the \verb-\Next--command presupposes that the next |
| 122 |
example is still inside the footnote rather than within the main body |
| 123 |
of the document. Say \verb-\TextNext- to refer to the next example within the |
| 124 |
main text. (When you intend to make endnotes instead of footnotes, |
| 125 |
all cross references from footnote to text must be handled by |
| 126 |
\verb-\label{...}- and \verb-\ref{...}-.) |
| 127 |
|
| 128 |
In case an \verb-\ex.--environment contains a footnote that contains a |
| 129 |
\verb-\par- (= a blank line --- this will necessarily be the case with a |
| 130 |
footnote containing itself an \verb-\ex.-), the \verb-\par- will be |
| 131 |
misinterpreted as the end of the main text example. It is therefore |
| 132 |
necessary to split the command \verb-\footnote{...}- into |
| 133 |
\verb-\footnotemark- and \verb-\footnotetext{...}- (see |
| 134 |
\LaTeX-manual). The footnotetext must be placed outside the |
| 135 |
\verb-\ex.--environment of the main text. |
| 136 |
|
| 137 |
Some style files (e.g. {\tt endnote.sty}) modify the definition of |
| 138 |
footnotes (as {\tt linguex.sty} itself does so in order to let \verb|\ex.| know |
| 139 |
whether or not it is inside a footnote). Such style files must be |
| 140 |
accommodated to {\tt linguex.sty} by making sure that \verb-\if@noftnote- is |
| 141 |
set false at the beginning of each footnote (by saying |
| 142 |
\verb-\@noftnotefalse- in the modified footnote definition); otherwise |
| 143 |
you will get the arabic style of example numberings (as being used in |
| 144 |
the main text) rather than the roman numbers (being used inside |
| 145 |
footnotes). |
| 146 |
|
| 147 |
|
| 148 |
\subsection*{Glosses}% |
| 149 |
require {\tt cgloss4e.sty}, which is input by {\tt linguex.sty}. |
| 150 |
Instead of writing \verb.\gll. (as would be required by the gloss |
| 151 |
macro), one should append a `g' to the last letter of an example |
| 152 |
command, as shown below: |
| 153 |
|
| 154 |
\begin{samepage}\begin{verbatim} |
| 155 |
\ex.\a. No gloss |
| 156 |
\bg. This is a first gloss\\ |
| 157 |
Dies ist eine erste Glosse\\ |
| 158 |
|
| 159 |
\exg. Dies ist nicht die erste Glosse\\ |
| 160 |
This is not the first gloss\\ |
| 161 |
\end{verbatim} |
| 162 |
% |
| 163 |
\ex.\a. No gloss |
| 164 |
\bg. This is a first gloss\\ |
| 165 |
Dies ist eine erste Glosse\\ |
| 166 |
|
| 167 |
\exg. *Dies ist nicht die erste Glosse\\ |
| 168 |
This is not the first gloss\\ |
| 169 |
|
| 170 |
\end{samepage} |
| 171 |
Using \verb.\gll. still works in principle, but should be avoided, |
| 172 |
for reasons explained in the next section. |
| 173 |
|
| 174 |
|
| 175 |
\subsection*{Grammaticality Judgments}% |
| 176 |
composed out of *, ?, \#, and \%, are automatically prefixed at the |
| 177 |
very beginning of a new list. A standard example like \Next |
| 178 |
looks like this (to increase readability I also removed mathmode from |
| 179 |
subscripting): |
| 180 |
|
| 181 |
\catcode`_=\active |
| 182 |
\def_#1{\ifmmode\sb{#1}\else$\sb{#1}$\fi} |
| 183 |
|
| 184 |
\begin{verbatim} |
| 185 |
\catcode`_=\active |
| 186 |
\def_#1{\ifmmode\sb{#1}\else$\sb{#1}$\fi} |
| 187 |
\exg. \%*Wen_i liebt_k seine_i Mutter t_i t_k?\\ |
| 188 |
Whom loves his mother\\ |
| 189 |
`Who does his mother love?' |
| 190 |
\end{verbatim} |
| 191 |
\exg. \%*Wen_i liebt_k seine_i Mutter t_i t_k?\\ |
| 192 |
Whom loves his mother\\ |
| 193 |
`Who does his mother love?' |
| 194 |
|
| 195 |
Automatic prefixing implies that \textbf{nothing} intervenes between the list |
| 196 |
opening command and the judgment. In particular, labels must {\it |
| 197 |
follow\/} the grammaticality judgment! Likewise, writing |
| 198 |
\verb|\ex.\gll| instead of \verb|\exg.| will have the effect of not |
| 199 |
prefixing the grammaticality judgment. |
| 200 |
|
| 201 |
|
| 202 |
\subsection*{Labelled Brackets}% |
| 203 |
\verb-\exi.- identifies ``words'' by looking for space characters |
| 204 |
between them; it then checks whether the word following a space |
| 205 |
starts with one of the brackets ``['' or ``]''. The material between |
| 206 |
such a bracket and the next space character will be subscripted. A |
| 207 |
standard example would be the following: |
| 208 |
\begin{verbatim} |
| 209 |
\exi. *[CP Wen_i [C$'$ liebt_j [IP [NP seine_i Mutter ]% |
| 210 |
[VP t_i t_j ]]]] |
| 211 |
\end{verbatim} |
| 212 |
\exi. *[CP Wen_i [C$'$ liebt_j [IP [NP seine_i Mutter ]% |
| 213 |
[VP t_i t_j ]]]] |
| 214 |
|
| 215 |
Note that above a blank space between {\tt [IP} and {\tt [NP} is |
| 216 |
crucial, otherwise the bracket of {\tt [NP} would be subscripted as |
| 217 |
well. Note also that a space is required before the grammaticality |
| 218 |
judgment, otherwise the beginning of subscripting cannot be properly |
| 219 |
identified. |
| 220 |
|
| 221 |
As with the gloss macro, grouping suppresses subscripting. |
| 222 |
Consider the effects of spacing and grouping in \Next: |
| 223 |
\begin{verbatim} |
| 224 |
\exi.\a. [[NP Fritz ][ snores ]]S |
| 225 |
\b. [[NP Fritz][snores]]S |
| 226 |
\c. [ [NP Fritz ][snores]]S |
| 227 |
\d. [[NP Fritz {][}snores ]]S |
| 228 |
\e. {[[+N,--V]} Fritz ][VP snores ] \hfill{} [NP Structure] |
| 229 |
\f. *[{}[+N,--V] Fritz ][VP snores ] \hfill [NP-Structure] |
| 230 |
\end{verbatim} |
| 231 |
\exi.\a. [[NP Fritz ][ snores ]]S |
| 232 |
\b. [[NP Fritz][snores]]S |
| 233 |
\c. [ [NP Fritz ][snores]]S |
| 234 |
\d. [[NP Fritz {][}snores ]]S |
| 235 |
\e. {[[+N,--V]} Fritz ][VP snores ] \hfill{} [NP Structure] |
| 236 |
\f. *[{}[+N,--V] Fritz ][VP snores ] \hfill [NP-Structure] |
| 237 |
|
| 238 |
Grouping works the same way as in the gloss macro where it protects |
| 239 |
from glossing. E.g., a group such as \verb.{][}. in \Last[d] is |
| 240 |
ignored for subscripting so that the following material is protected |
| 241 |
from automatic subscripting (but note that something like the opposite |
| 242 |
happens in \Last[e] after \verb|\hfill|!). |
| 243 |
|
| 244 |
Note that commands that look ahead and extend over more than one word |
| 245 |
might not work properly unless two or more words are put into a group. |
| 246 |
Suppose we are inside an \verb-\exi.--environment and we want to say |
| 247 |
something like \verb-\b.[Principle C]-. What will happen? The space |
| 248 |
between ``\texttt{e}'' and ``\texttt{C}'' will make the subscripting |
| 249 |
device read \verb-\b.[Principle- as a ``word.'' This, unfortunately, |
| 250 |
prevents the argument of \verb-\b.- from being interpreted correctly. |
| 251 |
Solutions are to write \verb-\b.[Principle~C]-, \verb-\b.[{Principle C}]-, |
| 252 |
or \verb-{\b.[Principle C]}-. |
| 253 |
|
| 254 |
Subscripting outside the \verb|\exi.|-environment can be done by using |
| 255 |
\verb-\I- as shown below: |
| 256 |
|
| 257 |
\medskip |
| 258 |
\verb|\I[NP Text| $\Longrightarrow$ \I[NP Text, |
| 259 |
|
| 260 |
\verb.\I($\alpha$ Text. $\Longrightarrow$ \I({$\alpha$} Text, |
| 261 |
|
| 262 |
\verb.\I{$\alpha$}NP Text. $\Longrightarrow$ \I{$\alpha$}NP Text, |
| 263 |
|
| 264 |
\verb.\I{Whom}ACC does John\ldots. $\Longrightarrow$ \I{Whom}ACC |
| 265 |
does John\ldots |
| 266 |
|
| 267 |
\medskip\noindent |
| 268 |
For combining glosses with labelled brackets, |
| 269 |
say \verb-\exig.- or \verb-\exgi.-. Note that although the |
| 270 |
list-generating commands \verb-\ex.- and \verb-\a.- can be combined in |
| 271 |
any order, all commands that introduce automatic subscripting can be used |
| 272 |
only at the top level, i.e. cannot be embedded!!!. Note also that |
| 273 |
$n$ nested \verb-\ex.--commands need $n$ consecutive blank lines |
| 274 |
(\verb.\par.s) to properly identify the end of all lists. |
| 275 |
|
| 276 |
\subsection*{Handouts}% |
| 277 |
Since the surface implementation of the list environment does not use |
| 278 |
the begin-end-format, style files that suppress printing between the |
| 279 |
end and the beginning of certain environments (e.g. {\tt |
| 280 |
xcomment.sty}) could unfortunately not be adopted to produce a handout |
| 281 |
(I didn't see a way of doing so, probably because I didn't understand |
| 282 |
what goes on inside {\tt xcomment.sty}). |
| 283 |
|
| 284 |
This deficiency might be compensated for by using {\tt linguho.sty}, |
| 285 |
which removes all examples and headings (of sections and subsections) |
| 286 |
from the \LaTeX-document and stores them in a file whose extension is |
| 287 |
.han (namely \textit{jobname}.han). Putting \verb.\makehandout. |
| 288 |
somewhere at the end of the document (e.g. before the bibliography) will |
| 289 |
print out \textit{jobname}.han at the position of \verb-\makehandout-. If |
| 290 |
\verb-\section*{...}- and \verb-\subsection*{...}- should also go into |
| 291 |
the handout, say \verb-\usepackage[*]{linguho}-. Use |
| 292 |
\verb-\maketitle- to get the title into the handout. |
| 293 |
|
| 294 |
Note that all of \LaTeX's \verb|\setlength| and \verb|\settowidth| |
| 295 |
instructions automatically go into \textit{jobname}.han and are |
| 296 |
executed only there. (The main body of text before |
| 297 |
\verb-\makehandout- is considered irrelevant, but I didn't find a way |
| 298 |
to suppress writing it into the dvi-file. Any help to solve this |
| 299 |
problem will be appreciated; note that I am not a \TeX-wizard, only a lazy |
| 300 |
linguist). |
| 301 |
|
| 302 |
In case you have defined \verb.\active. characters (e.g. Umlaut in |
| 303 |
German) these will most likely turn out troublesome (i.e. these |
| 304 |
commands should normally be protected). For a general solution, |
| 305 |
inspect the definition of \verb.\MkOthersSpecial. in {\tt linguho.sty}. |
| 306 |
Uncommenting any of the lines there will solve the problem for the |
| 307 |
active character contained in the respective line (sometimes it might |
| 308 |
in addition be necessary to use {\tt t1enc.sty} or {\tt germanb.sty} instead of |
| 309 |
{\tt german.sty}). |
| 310 |
|
| 311 |
|
| 312 |
\subsection*{Customizing Lengths and Margins}% |
| 313 |
The user may modify any of the lengths displayed in the following |
| 314 |
scheme, which also shows their predefined default values: |
| 315 |
|
| 316 |
\setlength{\Exlabelwidth}{0pt} |
| 317 |
\setlength{\Exlabelsep}{0pt} |
| 318 |
\ex. \label{diagramm}\footnotesize\arraycolsep2pt |
| 319 |
$\begin{array}[t]{@{}l|l|l|l|l@{}} |
| 320 |
\multicolumn{5}{c}{\backslash{\rm Extopsep} \updownarrow |
| 321 |
0.66\backslash{\rm baselineskip}} |
| 322 |
\\[1ex] |
| 323 |
\underbrace{\backslash\rm Exindent}_{{\rm 0pt}}& |
| 324 |
\fbox{$\backslash$\rm Exlabelwidth} |
| 325 |
\underbrace{\backslash\rm Exlabelsep}_{{\rm 1.3em}} |
| 326 |
& {\rm Text ...} &&\\ |
| 327 |
&& |
| 328 |
\rm a. &\rm Text \ldots & \\ |
| 329 |
&& \underbrace{\backslash\rm SubExleftmargin}_{{\rm 2.4em}} |
| 330 |
&\rm (i) & \rm Text \ldots \\ |
| 331 |
&& & \underbrace{\backslash\rm SubSubExleftmargin}_{{\rm 2em}} |
| 332 |
&\rm\ldots text. \\[2ex] |
| 333 |
\multicolumn{5}{c}{\backslash{\rm Extopsep}\updownarrow |
| 334 |
0.66\backslash{\rm baselineskip}} |
| 335 |
\end{array}$ |
| 336 |
\global\alignSubExtrue |
| 337 |
|
| 338 |
The value of \verb.\Exlabelwidth. is determined by the width of the |
| 339 |
current label. Note that for displaying the table as shown in \Last, |
| 340 |
the leftmargin of the list must be zero; accordingly, both |
| 341 |
\verb|\Exlabelwidth| and \verb|\Exlabelsep| were set to zero. To |
| 342 |
restore all default values of the lenghts shown in \Last |
| 343 |
simultaneously, say \verb-\resetExdefaults-. The exact behavior of |
| 344 |
\verb.\Exlabelwidth. is explained further below. With some non |
| 345 |
standard fonts the default spacing can be defined only |
| 346 |
\verb.\AtBeginDocument. (for reasons I do not understand), therefore |
| 347 |
the default values for the above lengths are declared |
| 348 |
\verb.\AtBeginDocument.. Consequently, any |
| 349 |
deviation from the default must be specified |
| 350 |
after \verb.\begin{document}. |
| 351 |
|
| 352 |
|
| 353 |
Some journals require a different arrangement of margins, e.g.\ one |
| 354 |
which aligns the left edges of examples with the left edges of |
| 355 |
subexamples, as shown in \Next and \NNext: |
| 356 |
|
| 357 |
\resetExdefaults |
| 358 |
\addtolength{\Exlabelsep}{.5em}% |
| 359 |
\addtolength{\alignSubExnegindent}{.5em} |
| 360 |
\ex. \label{align}First example: |
| 361 |
\a. Subexample1 |
| 362 |
\b. Subexample2 |
| 363 |
\a. Subsubexample1 \ldots\global\alignSubExfalse |
| 364 |
|
| 365 |
\addtolength{\Exlabelsep}{-.5em}% |
| 366 |
\addtolength{\alignSubExnegindent}{-.5em}% |
| 367 |
By saying \verb.\alignSubExtrue. before \verb.\begin{document}., |
| 368 |
the sublabels (a. and b. in \Last) |
| 369 |
are given a negative indentation. This is controlled by the lengths |
| 370 |
\verb.\alignSubExnegindent. and \verb.\Exlabelsep., |
| 371 |
which can be customized by \verb-\setlength-. after \verb.\begin{document}.. |
| 372 |
|
| 373 |
The spacing between two subsequent examples is defined by |
| 374 |
\verb.\Exredux., whose default is \verb.-\baselineskip.. Saying |
| 375 |
\verb.\resetExdefaults. returns to all defaults as defined below: |
| 376 |
\begin{verbatim} |
| 377 |
\newcommand{\resetExdefaults}{% |
| 378 |
\setlength{\Exlabelsep}{1.3em}% |
| 379 |
\setlength{\Extopsep}{.66\baselineskip}% |
| 380 |
\setlength{\SubSubExleftmargin}{2.4em}% |
| 381 |
\setlength{\SubExleftmargin}{2em}% |
| 382 |
\setlength{\Exindent}{0pt}% |
| 383 |
\setlength{\Exlabelwidth}{4em}% |
| 384 |
\setlength{\alignSubExnegindent}{\Exlabelsep}% |
| 385 |
\ifalignSubEx\addtolength{\Exlabelsep}{.7em}% |
| 386 |
\addtolength{\alignSubExnegindent}{.7em}\fi |
| 387 |
\setlength{\Exredux}{-\baselineskip}% |
| 388 |
} |
| 389 |
\end{verbatim} |
| 390 |
|
| 391 |
|
| 392 |
\subsection*{Customizing Labels}% |
| 393 |
The labels of the examples are created by the counters \verb-ExNo-, |
| 394 |
\verb-SubExNo-, and \verb-SubSubExNo- for the three levels of |
| 395 |
embedding respectively; \verb-FnExNo- is used for the first level |
| 396 |
inside footnotes. These counters are the default labels of the list |
| 397 |
items. They can be changed anywhere in the document, by using |
| 398 |
\verb.\setcounter. as usual. |
| 399 |
|
| 400 |
There are a number of further possibilities to generate labels that differ |
| 401 |
from the default. One is to |
| 402 |
use \verb-\a.- without embedding it into \verb|\ex.|. This will yield the |
| 403 |
expected result, namely a list that uses the \verb|SubEx| counter at |
| 404 |
the top-level: |
| 405 |
|
| 406 |
\a. First line |
| 407 |
\b. Second line |
| 408 |
\c. Third line |
| 409 |
|
| 410 |
Moreover, any of the list commands can take an optional |
| 411 |
argument, whose specification replaces the default label: |
| 412 |
|
| 413 |
\begin{samepage} |
| 414 |
\a.[{\bf Principle C} (Chomsky{[81]}): ] An R-expression is free only |
| 415 |
\a.[$\alpha$)] with respect to potential binders |
| 416 |
in A-positions, |
| 417 |
\b.[$\beta$)] within the domain of its chain. |
| 418 |
|
| 419 |
\begin{verbatim} |
| 420 |
\a.[{\bf Principle C} (Chomsky{[81]}): ] |
| 421 |
An R-expression is free only |
| 422 |
\a.[$\alpha$)] with respect to potential binders |
| 423 |
in A-positions, |
| 424 |
\b.[$\beta$)] within the domain of its chain. |
| 425 |
\end{verbatim} |
| 426 |
\end{samepage} |
| 427 |
% |
| 428 |
The optional argument must immediately follow ``.'', so don't leave |
| 429 |
space between \verb|\ex.| or \verb|\a.| and ``['' !!!. By contrast, |
| 430 |
it will often be the case that an example starts with a (labelled) |
| 431 |
bracket like \I[NP . If so, it is obligatory to put a space |
| 432 |
between ``.'' and ``['' . |
| 433 |
|
| 434 |
As illustrated above, the topmost \verb#\a.#-command picks up the |
| 435 |
\verb|\Exlabelwidth| of the preceding example. By contrast, using |
| 436 |
\verb-\ex.[{\it Principle C} ...]- instead of % |
| 437 |
\verb-\a.[{\it Principle C} ...]- has the effect of adjusting the |
| 438 |
indentation of the following text to the width of the optional |
| 439 |
argument, as shown below: |
| 440 |
|
| 441 |
\ex.[{\bf Principle C} (Chomsky{[81]}): ] An R-expression is free only |
| 442 |
\a.[$\alpha$)] with respect to potential binders |
| 443 |
in A-positions, |
| 444 |
\b.[$\beta$)] within the domain of its chain. |
| 445 |
|
| 446 |
Assuming that regular example numbers do not exceed (999), this |
| 447 |
departure from the default behavior only occurs for optional arguments |
| 448 |
whose width exceeds that of (999). |
| 449 |
|
| 450 |
Optional arguments can also be used to simulate other environments. |
| 451 |
E.g., \LaTeX-style itemizing at the top level can be simulated as follows: |
| 452 |
\begin{verbatim} |
| 453 |
\ex.[\hfill$\bullet$\hfill] Line 1 |
| 454 |
\b. Line 2 |
| 455 |
\c. Line 3 |
| 456 |
\end{verbatim} |
| 457 |
\ex.[\hfill$\bullet$\hfill] Line 1 |
| 458 |
\b. Line 2 |
| 459 |
\c. Line 3\global\let\oldalph=\alph\global\let\alph=\arabic |
| 460 |
|
| 461 |
Temporarily redefining \verb.\alph., as shown in the following |
| 462 |
example, yields an enumeration: |
| 463 |
\begin{verbatim} |
| 464 |
\let\oldalph=\alph\let\alph=\arabic |
| 465 |
\a. Text 1 |
| 466 |
\b. Text 2 |
| 467 |
\c. Text 3 \global\let\alph=\oldalph |
| 468 |
\end{verbatim} |
| 469 |
|
| 470 |
\a. Text 1 |
| 471 |
\b. Text 2 |
| 472 |
\c. Text 3 \global\let\alph=\oldalph\global\alignSubExtrue |
| 473 |
|
| 474 |
The stylesheet of \textit{English Language |
| 475 |
and Linguistics} requires examples of the following form: |
| 476 |
|
| 477 |
\setlength{\Exlabelsep}{2em} |
| 478 |
\exi. |
| 479 |
[V [V broke_i $\emptyset$ ][VP the vase [V$'$ t_i into |
| 480 |
pieces ]]] |
| 481 |
|
| 482 |
\ex.\def\SubExLBr{(}\def\SubExRBr{)} |
| 483 |
\a. It kept warm |
| 484 |
\b. She kept it warm\global\alignSubExfalse |
| 485 |
|
| 486 |
|
| 487 |
Apart form |
| 488 |
specifying \verb.\alignSubExtrue. before \verb.\begin{document}. |
| 489 |
\Last requires to redefine the brackets of sublabels, as shown below: |
| 490 |
\resetExdefaults |
| 491 |
\begin{verbatim} |
| 492 |
\renewcommand{\SubExLBr}{(} |
| 493 |
\renewcommand{\SubExRBr}{)} |
| 494 |
\setlength{\Exlabelsep}{2em} |
| 495 |
\exi. [V [V broke_i $\emptyset$ ][VP the vase [V$'$ t_i into |
| 496 |
pieces~]]] |
| 497 |
|
| 498 |
\ex.\a. It kept warm |
| 499 |
\b. She kept it warm |
| 500 |
\end{verbatim}% |
| 501 |
In addition, \verb|\renewcommand{\firstrefdash}{}| changes cross |
| 502 |
references from eg. \Last[b] to \renewcommand{\firstrefdash}{}\Last[b]. |
| 503 |
|
| 504 |
The following definitions generate the left (=L) and right (=R) |
| 505 |
environments of example numberings in ordinary text, in footnotes, |
| 506 |
and in cross-references: |
| 507 |
|
| 508 |
\begin{verbatim} |
| 509 |
\newcommand{\ExLBr}{(} |
| 510 |
\newcommand{\ExRBr}{)} |
| 511 |
\newcommand{\FnExLBr}{(} |
| 512 |
\newcommand{\FnExRBr}{)} |
| 513 |
\newcommand{\theExLBr}{(} |
| 514 |
\newcommand{\theExRBr}{)} |
| 515 |
\newcommand{\theFnExLBr}{(} |
| 516 |
\newcommand{\theFnExRBr}{)} |
| 517 |
\newcommand{\SubExLBr}{} |
| 518 |
\newcommand{\SubExRBr}{.} |
| 519 |
\newcommand{\SubSubExLBr}{(} |
| 520 |
\newcommand{\SubSubExRBr}{)} |
| 521 |
\end{verbatim} |
| 522 |
For example, one might want to replace \LLast--\Last with |
| 523 |
{\def\theExRBr{}\LLast}--{\def\theExLBr{}\Last} by saying |
| 524 |
|
| 525 |
\begin{verbatim} |
| 526 |
{\renewcommand{\theExRBr}{}\LLast}--{\renewcommand{\theExLBr}{}\Last} |
| 527 |
\end{verbatim} |
| 528 |
|
| 529 |
|
| 530 |
|
| 531 |
\subsection*{$\backslash$\tt Exlabelwidth}% |
| 532 |
By default, the value of \verb.\Exlabelwidth. is determined by the |
| 533 |
width of the example numbering. More precisely, for labels between |
| 534 |
(1) and (9) the labelwidth is by default the width of the narrowest |
| 535 |
number with two digits plus brackets; accordingly, the |
| 536 |
actual labelwidth is a bit larger than the natural size of the |
| 537 |
label. Digits may differ in size depending on the font in use, so |
| 538 |
the calculation is done on the fly. |
| 539 |
Similarly, \verb.\Exlabelwidth. has the width of three digits for |
| 540 |
\verb-\theExNo-'s between (10) and (99). Finally, |
| 541 |
\verb,\Exlabelwidth, has the width of four digits for example numbers |
| 542 |
between (100) and (999). For even wider labels (usually specified by |
| 543 |
an optional argument, cf. above), the label retains its natural |
| 544 |
size. I hope that fonts are cooperative by keeping the difference |
| 545 |
between the width of digits minimal. Otherwise you might experience |
| 546 |
weird behavior of \verb.\Exlabelwidth. |
| 547 |
|
| 548 |
Since the space between the \verb.\Exlabelwidth. and the text |
| 549 |
remains the same, the transition from (9) to (10) and from (99) |
| 550 |
to (100) will cause a change of indentation, which might look |
| 551 |
ugly, particularly in handouts. In order to |
| 552 |
suppress the default behavior of \verb|\Exlabelwidth|, it must be |
| 553 |
assigned a particular length. For example, saying |
| 554 |
\verb.\settowidth{\Exlabelwidth}{(110)}. will cause the labelwidth of |
| 555 |
all examples from (1) to (99) to be identical. |
| 556 |
|
| 557 |
Since wide labels should still retain their natural size, the user's |
| 558 |
specification of \verb|\Exlabelsep| should not be wider than (1100), |
| 559 |
otherwise the default mechanism is still active, and the value of |
| 560 |
\verb|\Exlabelsep| is ignored. E.g., saying |
| 561 |
\verb|\setlength{\Exlabelwidth}{3em}| will most likely cause the list |
| 562 |
declaration to take up its default behavior, because ``3em'' is wider |
| 563 |
than ``(1100)''. (The default value of |
| 564 |
\verb|\Exlabelwidth| is 4em). |
| 565 |
|
| 566 |
|
| 567 |
\subsection*{cgloss4e.sty} |
| 568 |
I found two problems with {\tt cgloss4e.sty}. The first relates to AMS-\TeX. |
| 569 |
Writing a translation immediately below the glossed material normally |
| 570 |
behaves as one would expect, but with AMS-\TeX the translation becomes |
| 571 |
indented, for reasons I do not understand. To remedy this, one has to |
| 572 |
(re-)define the list indentation, e.g. as shown below (from \LaTeX): |
| 573 |
|
| 574 |
\begin{verbatim} |
| 575 |
\makeatletter |
| 576 |
\def\@listi{\leftmargin\leftmargini |
| 577 |
\parsep 5\p@ \@plus2.5\p@ \@minus\p@ |
| 578 |
\topsep 10\p@ \@plus4\p@ \@minus6\p@ |
| 579 |
\itemsep5\p@ \@plus2.5\p@ \@minus\p@} |
| 580 |
\let\@listI\@listi |
| 581 |
\@listi |
| 582 |
\makeatother |
| 583 |
\end{verbatim} |
| 584 |
The second problem concerns the use of \verb.\gll. at a position |
| 585 |
other than the beginning of a list. Then the gloss starts a new |
| 586 |
paragraph and puts unwanted vspace above and below the list. One way |
| 587 |
to suppress this is to change the flushleft commands used within |
| 588 |
{\tt cgloss4e.sty} into raggedright by saying |
| 589 |
\verb.\renewenvironment{flushleft}{\raggedright}{}.. |
| 590 |
|
| 591 |
|
| 592 |
%\makehandout |
| 593 |
\end{document} |