diff options
author | Karl Berry <karl@freefriends.org> | 2013-08-05 21:51:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-08-05 21:51:41 +0000 |
commit | c495f66dfac5dde94407dee8238424860488d9e1 (patch) | |
tree | 29c8d0f050333d85a6059c30b62805d98da6d254 | |
parent | 86333beef4a7032767b6ec83fc87ec8376439965 (diff) |
expex (5aug13)
git-svn-id: svn://tug.org/texlive/trunk@31356 c570f23f-e606-0410-a88d-b1316a301751
34 files changed, 6806 insertions, 9 deletions
diff --git a/Master/texmf-dist/doc/generic/expex/source/0-index.tex b/Master/texmf-dist/doc/generic/expex/source/0-index.tex new file mode 100644 index 00000000000..f645c31c6fe --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/0-index.tex @@ -0,0 +1,132 @@ +|*|, parameter\enspace 30 +|+|, exceptional gloss item\enspace 39 +|@|, exceptional gloss item\enspace 40 +|[|, exceptional gloss item\enspace 40 +|]|, exceptional gloss item\enspace 40 +|~|, tilde modification\enspace 11 +|\a[]|\enspace 13 +|aboveexskip|\user\enspace 8 +|aboveglbskip|\user\enspace 35 +|aboveglcskip|\user\enspace 35 +|aboveglftskip|\user\enspace 35 +|abovemoreglskip|\enspace 41 +|\actualexno|\enspace 24 +|\anextx|\enspace 52 +|appendtopexarg|\enspace 24 +|autoglskip|\enspace 41 +|avoidnumlabelclash|\enspace 24 +|\a|\enspace 13 +|\bblastx|\enspace 52 +|\begingl[]|\enspace 32 +|\beginglpanel[]|\enspace 48 +|belowexskip|\user\enspace 8 +|belowglpreambleskip|\user\enspace 35 +|belowgpreambleskip|\user\enspace 13 +|\blastx|\enspace 52 +|\crnb|\enspace 64 +|crskip|\enspace 63 +|\crs|\enspace 63 +|\defineglwlevels|\enspace 46 +|\definelabeltype|\enspace 21 +|\definelingstyle|\enspace 28 +|\deftagex|\enspace 53 +|\deftaglabel|, in tables\enspace 62 +|\deftaglabel|\enspace 53 +|\deftagpage|\enspace 53 +|\deftag|\enspace 53 +|dima|\user\enspace 63 +|dimb|\user\enspace 63 +|dimc|\user\enspace 63 +|\endgl|\enspace 32 +|\endpanel|\enspace 48 +|everyex|\user\enspace 28 +|Everyex|\user\enspace 28 +|everygla|\enspace 35 +|everyglb|\enspace 35 +|everyglc|\enspace 35 +|everyglft|\enspace 35 +|everyglpreamble|\enspace 35 +|everygluf|\enspace 51 +|everygl|\enspace 35 +|everylabel|\enspace 18 +|everypanel|\user\enspace 48 +|exbreakfil|\enspace 69 +|exbreakpenalty|\enspace 69 +|\exbreak|\enspace 69 +|\excnt|\enspace 8 +|\exdisplay[]|\enspace 64 +|exnoformat|\enspace 11 +|\exnoprint|\enspace 64 +|exno|\enspace 11 +|exno|, setting by reference\enspace 56 +|exskip|\enspace 8 +|extraglskip|\enspace 41 +|\ex|\enspace 8 +|fullrefformat|\enspace 57 +|\gathertags|\enspace 55 +|\getfullref|\enspace 53 +|\getref|\enspace 53 +|\gla[]|\enspace 32 +|\glb[]|\enspace 32 +|glbrackbracksep|\user\enspace 40 +|glbrackwordsep|\user\enspace 40 +|\glc[]|\enspace 32 +|\glft[]|\enspace 32 +|glftpos|\enspace 47 +|glhangstyle|\enspace 47 +|gllineskip|\enspace 43 +|\glpreamble[]|\enspace 32 +|glrightskip|\enspace 45 +|glspace|\enspace 45 +|glspace|\user\enspace 35 +|glstruts|\enspace 43 +|glufcloseup|\enspace 51 +|\gluf|\enspace 51 +|\hwit|\enspace 59 +|interpartskip|\user\enspace 13 +|\judge|\enspace 30 +|\keepexcntlocal|\enspace 27 +|labelalign|\enspace 19 +|labelanchor|\enspace 17 +|labelformat|\enspace 18 +|labelgen|\enspace 21 +|labellist|\enspace 21 +|labeloffset|\user\enspace 13 +|\labels[]|\enspace 61 +|labeltype|\enspace 13 +|labelwidth|\user\enspace 13 +|\label|, use of the LaTex macro\enspace 59 +|\lastlabel|\enspace 55 +|\lastx|\enspace 52 +|\lingset|\enspace 7 +|\Lingset|\enspace 67 +|\ljudge|\enspace 30 +|\nextx|\enspace 52 +|\nl|\enspace 61 +|\noexno|\enspace 64 +|nopreamble|\enspace 14 +|numoffset|\user\enspace 8 +|\pexcnt|\enspace 13, 21 +|pexcnt|, parameter\enspace 21 +|\pex~[]|\enspace 13 +|preambleanchor|\enspace 17 +|preambleoffset|\user\enspace 13 +|\printlbrack|\enspace 40 +|\printrbrack|\enspace 40 +|\refproofing|\enspace 54 +|\ref|, use of the LaTex macro\enspace 59 +|\rightcomment|\enspace 38 +|sampleexno|\enspace 23 +|samplelabel|\enspace 13 +|splitpartspenalty|\enspace 69 +|ssratio|\enspace 47 +|ssrightskip|\enspace 47 +|sssep|\enspace 47 +|\tagfilesuffix|\enspace 55 +|tag|\enspace 53 +|textanchor|\enspace 17 +|textoffset|\user\enspace 8 +|\tl|\enspace 61 +|\trailingcitation|\enspace 38 +|\tspace|\enspace 63 +|\xe|\enspace 8 diff --git a/Master/texmf-dist/doc/generic/expex/source/0-tags.tex b/Master/texmf-dist/doc/generic/expex/source/0-tags.tex new file mode 100644 index 00000000000..3706a9b1a01 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/0-tags.tex @@ -0,0 +1,53 @@ +\relax +\@fd@f {pg} {{3}} +\@fd@f {pg.A} {{{\char 98}}{{3\char 98}}} +\@fd@f {Pre} {{97}} +\@fd@f {advanced} {{6}} +\@fd@f {anchors} {{6.2}} +\@fd@f {everylabel1} {{105}} +\@fd@f labelformatpage {{18}} +\@fd@f {sometimes} {{108}} +\@fd@f {triplea1} {{110}} +\@fd@f {triplea3} {{112}} +\@fd@f {tripleb1} {{113}} +\@fd@f {tripleb3} {{115}} +\@fd@f {nonum} {{\unhcopy \exnobox }} +\@fd@f {IJAL1} {{5}} +\@fd@f {fns} {{6.8}} +\@fd@f {starsec} {{8}} +\@fd@f {wapm} {{126}} +\@fd@f {sicher} {{127}} +\@fd@f {um} {{128}} +\@fd@f {sicher2} {{131}} +\@fd@f {wiye} {{135}} +\@fd@f {@period} {{136}} +\@fd@f {Chung1} {{137}} +\@fd@f {Ti} {{138}} +\@fd@f {seq} {{142}} +\@fd@f {panelex} {{150}} +\@fd@f {unnamedref} {{11.1}} +\@fd@f {named-reference} {{11.2}} +\@fd@f {FP} {{the first part of example {\advance \excnt by -1 153}}} +\@fd@f {snoopy} {{153}} +\@fd@f {snoopy.dog} {{{\char 98}}{{153\char 98}}} +\@fd@f {snoopy.a} {{{\char 99}}{{153\char 99}}} +\@fd@f {snoopy} {{{\advance \excnt by -1 155}{\it \char 98}}} +\@fd@f {dog} {{156}} +\@fd@f {dog.G} {{{2}}{{156.2}}} +\@fd@f {K} {{157}} +\@fd@f {K.A} {{{2}}{{157-2}}} +\@fd@f {1st} {{Someone loves everyone.}} +\@fd@f {2nd} {{Everyone loves someone.}} +\@fd@f {A} {{158}} +\@fd@f {A.X} {{{\char 98}}{{158\char 98}}} +\@fd@f {A.Z} {{{\char 100}}{{158\char 100}}} +\@fd@f {explicit-sec} {{11.8}} +\@fd@f {labelsec} {{11.9}} +\@fd@f {A} {{161}} +\@fd@f {A.B} {{{\char 97}}{{161\char 97}}} +\@fd@f {A.C} {{{\char 98}}{{161\char 98}}} +\@fd@f {A.D} {{{\char 99}}{{161\char 99}}} +\@fd@f {Washo} {{166}} +\@fd@f {Washo.A} {{{\char 99}}{{166\char 99}}} +\@fd@f {Washo.B} {{{\char 100}}{{166\char 100}}} +\@fd@f exbreakpage {{69}} diff --git a/Master/texmf-dist/doc/generic/expex/source/0.idx b/Master/texmf-dist/doc/generic/expex/source/0.idx new file mode 100644 index 00000000000..fd5bb43e283 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/0.idx @@ -0,0 +1,143 @@ +\indexentry{|\lingset|}{7} +\indexentry{|\lingset|}{7} +\indexentry{|\ex|}{8} +\indexentry{|\xe|}{8} +\indexentry{|\excnt|}{8} +\indexentry{|numoffset|\user}{8} +\indexentry{|textoffset|\user}{8} +\indexentry{|aboveexskip|\user}{8} +\indexentry{|belowexskip|\user}{8} +\indexentry{|exskip|}{8} +\indexentry{|~|, tilde modification}{11} +\indexentry{|exno|}{11} +\indexentry{|exnoformat|}{11} +\indexentry{|\pexcnt|}{13} +\indexentry{|\pex~[]|}{13} +\indexentry{|\a[]|}{13} +\indexentry{|labeltype|}{13} +\indexentry{|labeloffset|\user}{13} +\indexentry{|labelwidth|\user}{13} +\indexentry{|preambleoffset|\user}{13} +\indexentry{|interpartskip|\user}{13} +\indexentry{|belowgpreambleskip|\user}{13} +\indexentry{|samplelabel|}{13} +\indexentry{|\a|}{13} +\indexentry{|nopreamble|}{14} +\indexentry{|labelanchor|}{17} +\indexentry{|preambleanchor|}{17} +\indexentry{|textanchor|}{17} +\indexentry{|everylabel|}{18} +\indexentry{|labelformat|}{18} +\indexentry{|labelalign|}{19} +\indexentry{|labelalign|}{19} +\indexentry{|\definelabeltype|}{21} +\indexentry{|\pexcnt|}{21} +\indexentry{|labelgen|}{21} +\indexentry{|pexcnt|, parameter}{21} +\indexentry{|labellist|}{21} +\indexentry{|sampleexno|}{23} +\indexentry{|\actualexno|}{24} +\indexentry{|avoidnumlabelclash|}{24} +\indexentry{|appendtopexarg|}{24} +\indexentry{|\keepexcntlocal|}{27} +\indexentry{|\definelingstyle|}{28} +\indexentry{|everyex|\user}{28} +\indexentry{|Everyex|\user}{28} +\indexentry{|\judge|}{30} +\indexentry{|\ljudge|}{30} +\indexentry{|*|, parameter}{30} +\indexentry{|\begingl[]|}{32} +\indexentry{|\glpreamble[]|}{32} +\indexentry{|\gla[]|}{32} +\indexentry{|\glb[]|}{32} +\indexentry{|\glc[]|}{32} +\indexentry{|\glft[]|}{32} +\indexentry{|\endgl|}{32} +\indexentry{|glspace|\user}{35} +\indexentry{|everygl|}{35} +\indexentry{|everyglpreamble|}{35} +\indexentry{|everygla|}{35} +\indexentry{|everyglb|}{35} +\indexentry{|everyglc|}{35} +\indexentry{|everyglft|}{35} +\indexentry{|belowglpreambleskip|\user}{35} +\indexentry{|aboveglbskip|\user}{35} +\indexentry{|aboveglcskip|\user}{35} +\indexentry{|aboveglftskip|\user}{35} +\indexentry{|\trailingcitation|}{38} +\indexentry{|\rightcomment|}{38} +\indexentry{|+|, exceptional gloss item}{39} +\indexentry{|@|, exceptional gloss item}{40} +\indexentry{|[|, exceptional gloss item}{40} +\indexentry{|]|, exceptional gloss item}{40} +\indexentry{|\printlbrack|}{40} +\indexentry{|\printrbrack|}{40} +\indexentry{|glbrackbracksep|\user}{40} +\indexentry{|glbrackwordsep|\user}{40} +\indexentry{|abovemoreglskip|}{41} +\indexentry{|autoglskip|}{41} +\indexentry{|extraglskip|}{41} +\indexentry{|gllineskip|}{43} +\indexentry{|glstruts|}{43} +\indexentry{|glspace|}{45} +\indexentry{|glrightskip|}{45} +\indexentry{|\defineglwlevels|}{46} +\indexentry{|glftpos|}{47} +\indexentry{|sssep|}{47} +\indexentry{|ssratio|}{47} +\indexentry{|ssrightskip|}{47} +\indexentry{|glhangstyle|}{47} +\indexentry{|\beginglpanel[]|}{48} +\indexentry{|\endpanel|}{48} +\indexentry{|everypanel|\user}{48} +\indexentry{|\gluf|}{51} +\indexentry{|glufcloseup|}{51} +\indexentry{|everygluf|}{51} +\indexentry{|\lastx|}{52} +\indexentry{|\nextx|}{52} +\indexentry{|\blastx|}{52} +\indexentry{|\anextx|}{52} +\indexentry{|\bblastx|}{52} +\indexentry{|\deftag|}{53} +\indexentry{|\deftagex|}{53} +\indexentry{|\deftaglabel|}{53} +\indexentry{|\deftagpage|}{53} +\indexentry{|\getref|}{53} +\indexentry{|\getfullref|}{53} +\indexentry{|tag|}{53} +\indexentry{|\deftag|}{53} +\indexentry{|\getref|}{53} +\indexentry{|\deftagex|}{53} +\indexentry{|\deftagpage|}{53} +\indexentry{|\deftaglabel|}{53} +\indexentry{|\refproofing|}{54} +\indexentry{|\gathertags|}{55} +\indexentry{|\tagfilesuffix|}{55} +\indexentry{|\gathertags|}{55} +\indexentry{|\tagfilesuffix|}{55} +\indexentry{|\lastlabel|}{55} +\indexentry{|exno|, setting by reference}{56} +\indexentry{|fullrefformat|}{57} +\indexentry{|\label|, use of the LaTex macro}{59} +\indexentry{|\ref|, use of the LaTex macro}{59} +\indexentry{|\hwit|}{59} +\indexentry{|\labels[]|}{61} +\indexentry{|\tl|}{61} +\indexentry{|\nl|}{61} +\indexentry{|\deftaglabel|, in tables}{62} +\indexentry{|\tspace|}{63} +\indexentry{|\crs|}{63} +\indexentry{|dima|\user}{63} +\indexentry{|dimb|\user}{63} +\indexentry{|dimc|\user}{63} +\indexentry{|crskip|}{63} +\indexentry{|\exdisplay[]|}{64} +\indexentry{|\noexno|}{64} +\indexentry{|\exnoprint|}{64} +\indexentry{|\crnb|}{64} +\indexentry{|\noexno|}{64} +\indexentry{|\Lingset|}{67} +\indexentry{|\exbreak|}{69} +\indexentry{|exbreakfil|}{69} +\indexentry{|exbreakpenalty|}{69} +\indexentry{|splitpartspenalty|}{69} diff --git a/Master/texmf-dist/doc/generic/expex/source/0.tex b/Master/texmf-dist/doc/generic/expex/source/0.tex new file mode 100644 index 00000000000..0e00d8f5d95 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/0.tex @@ -0,0 +1,40 @@ +\input eplain +\input X-mybasics.tex +\input pstricks +\input pst-node \catcode`\@=12 +\input expex +\input X-lingdoc +\input X-code-beta +\input X-timesfonts +\input X-sections +\input X-local-doc +\input eptexfn + +%\gathertags +%\gathercontents +%\gathernotes + +%\refproofing +%\indexproofingtrue + +\pageno=-1 +\get 000doc-cover +\get X-contents +\get 01_intro +\get 02_Examples +\get 03_XKV +\get 04_Ex +\get 05_MultiPart-Basics +\get 06_MoreExamples +\get 07_UserStyles +\get 08_Judgments +\get 09_Glosses-Basic +\get 10_Glosses-Advanced +\get 11_Refs +\get 12_Tables +\get 13_PSTricks +\get 14_PageBreaks +\input X-mkindex \bye + +\bye + diff --git a/Master/texmf-dist/doc/generic/expex/source/0.toc b/Master/texmf-dist/doc/generic/expex/source/0.toc new file mode 100644 index 00000000000..fe28019fec2 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/0.toc @@ -0,0 +1,55 @@ +\sec {1} {Introduction } \writefill 1\par +\subsec {1.1} {Changes } \writefill 1\par +\subsec {1.2} {LaTex/Tex cooperation } \writefill 2\par +\subsec {1.3} {Acknowledgements } \writefill 2\par +\sec {2} {Some preliminary examples } \writefill 3\par +\sec {3} {XKV parameterization } \writefill 7\par +\sec {4} {Examples without parts } \writefill 8\par +\subsec {4.1} {Explicit example numbers } \writefill 11\par +\sec {5} {Examples with labeled parts: Basics } \writefill 13\par +\subsec {5.1} {{\fam \ttfam \twelvett nopreamble} } \writefill 14\par +\subsec {5.2} {Stipulated labels } \writefill 16\par +\sec {6} {More on examples, with and without labeled parts } \writefill 16\par +\subsec {6.1} {Relative versus fixed dimensions } \writefill 16\par +\subsec {6.2} {Anchoring } \writefill 17\par +\subsec {6.3} {Formatting the labels } \writefill 18\par +\subsec {6.4} {Aligning the labels } \writefill 19\par +\subsec {6.5} {User designed labeling } \writefill 21\par +\subsec {6.6} {The parameter {\fam \ttfam \twelvett sampleexno} } \writefill 23\par +\subsec {6.7} {IJAL style format of multiline examples } \writefill 24\par +\subsec {6.8} {Footnotes and endnotes } \writefill 27\par +\sec {7} {User defined styles } \writefill 28\par +\sec {8} {Judgment marks } \writefill 30\par +\sec {9} {Glosses } \writefill 32\par +\subsec {9.1} {Parameters } \writefill 35\par +\subsec {9.2} {The width of the gloss } \writefill 36\par +\subsec {9.3} {Comments and citations } \writefill 38\par +\subsec {9.4} {Exceptional {\fam \ttfam \twelvett \char "5C gla} items } \writefill 39\par +\subsec {9.5} {Line spacing in wrapped glosses } \writefill 41\par +\sec {10} {More on Glosses } \writefill 46\par +\subsec {10.1} {User defined levels } \writefill 46\par +\subsec {10.2} {Positioning the free translation to the right of the interlinear gloss } \writefill 47\par +\subsec {10.3} {Glosses with a side panel } \writefill 48\par +\subsec {10.4} {Cascading hanging indentation in glosses } \writefill 50\par +\subsec {10.5} {Gloss underfixes } \writefill 51\par +\sec {11} {Referring to examples and labeled parts of examples } \writefill 52\par +\subsec {11.1} {Unnamed reference } \writefill 52\par +\subsec {11.2} {Named reference } \writefill 53\par +\subsec {11.3} {Proofing references } \writefill 54\par +\subsec {11.4} {The tag/reference file } \writefill 55\par +\subsec {11.5} {References to references, references as values } \writefill 55\par +\subsec {11.6} {Extensions of the tag/reference mechanism } \writefill 57\par +\subsec {11.7} {The parameter {\fam \ttfam \twelvett fullreformat} } \writefill 57\par +\subsec {11.8} {Reference to a part of a multipart example } \writefill 58\par +\subsec {11.9} {Support for the LaTex {\fam \ttfam \twelvett \char "5C label} and {\fam \ttfam \twelvett \char "5C ref} commands} \writefill 59\par +\sec {12} {Tables in examples } \writefill 59\par +\subsec {12.1} {Tables with labeled lines } \writefill 61\par +\subsec {12.2} {Tagging implicit labels in tables } \writefill 62\par +\subsec {12.3} {Some useful table making tools } \writefill 63\par +\subsec {12.4} {Tables that can break between pages } \writefill 64\par +\subsec {12.5} {Squeezing tables into tight places } \writefill 66\par +\sec {13} {ExPex and PSTricks } \writefill 67\par +\sec {14} {Control over page breaking inside examples } \writefill 68\par +\subsec {14.1} {Discouraging page breaks in examples } \writefill 69\par +\subsec {14.2} {Controlling where page breaks occur in examples (if they must) } \writefill 70\par +\tocidx {Index of control sequences, parameters, and special symbols} {} \writefill 71\par diff --git a/Master/texmf-dist/doc/generic/expex/source/000doc-cover.tex b/Master/texmf-dist/doc/generic/expex/source/000doc-cover.tex new file mode 100644 index 00000000000..3b1074f8983 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/000doc-cover.tex @@ -0,0 +1,56 @@ +\everymath={} +\parindent=0pt +\font\namefont=t1xr at 16pt +\font\namefontsl=t1xsl at 16pt + +\leavevmode \vfil +\hfil\psscalebox{8}{\sl ExPex} +\vskip1.5em +\hfil\psscalebox{3}{for linguists} +\vskip2em +\line{\hss\psscalebox{2}{Example formatting, glosses, and +reference}\hss} +\vfil\vfil\vfil\kern2em + +\framedisplay +\pex[nopreamble,aboveglftskip=.6ex,interpartskip=2ex] +\everymath={}% +\def\\#1{-{\tenrm #1}}% +\a +\begingl +\gla Mary$_i$ ist sicher, [ dass es den Hans nicht st\"oren w\"urde +[ seiner Freundin ihr$_i$ Herz auszusch\"utten ] ] @ .// +\glb Mary is sure that it the\\{ACC} Hans not annoy would +his\\{DAT} girlfriend\\{DAT} her\\{ACC} heart\\{ACC} {out to +throw} // +\glft `Mary is sure that it would not annoy John to reveal her +heart to his girlfriend.'// +\endgl +\a +\begingl +\gla Mary$_i$ ist sicher, [ dass seiner Freunden ihr$_i$ Herz +auszuch\"utten [ dem Hans nicht schaden w\"urde ] ] @ .// +\glb Mary is sure that his\\{DAT} girlfriend\\{DAT} her\\{ACC} +heart\\{ACC} {out to throw} the\\{DAT} Hans not damage would// +\glft `Mary is sure that to reveal her heart to his girlfriend +would not damage John.'// +\endgl +\xe +\endframedisplay + +\vfil +\vfil\vfil\kern2em +\hfil\psscalebox{3}{User's Guide} +\vskip1ex + +{\leftskip=0pt plus 1fil \parfillskip=0pt +\rightskip=0pt plus 1fil \openup4pt +\parindent=0pt \namefont +John Frampton\par +{\namefontsl j.frampton@neu.edu}\vskip14pt +December 2012\par +Version 4.1\par} + + +\vfil\break + diff --git a/Master/texmf-dist/doc/generic/expex/source/01_intro.tex b/Master/texmf-dist/doc/generic/expex/source/01_intro.tex new file mode 100644 index 00000000000..37966586429 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/01_intro.tex @@ -0,0 +1,138 @@ + +\vfil +\eject +\global\pageno=1 +\section Introduction + +Many of the needs of linguists who wish to produce +typographically attractive papers using \Tex\ or \LaTex\ +are not specific to linguistic papers. There are therefore many +macro packages which deal with tables of contents, references, +section headings, font selection, indexing, etc. But linguistics +does have some special typographic needs. I addressed two of +these with the macro packages {\sl PST-JTree\/} and {\sl +PST-ASR\/}, which typeset syntactic trees and autosegmental +representations. \ExPex\ addresses the main remaining special +\Tex\ need in linguistics: formatting examples, examples with +multiple parts, glosses, and the like, and referring to examples +and parts of examples. The name comes from the two central +macros, |\ex| and |\pex|, used to typeset examples and examples +with labeled parts. + +{\sl PST-JTree\/} and {\sl PST-ASR\/} rely heavily on Hendri +Adriaens' \XKeyVal\ package, which has become the standard for +\PSTricks\ based macro packages. Although \ExPex\ is not based +on \PSTricks\relax, it does handle parameterization the same +way that {\sl PST-JTree\/} and {\sl PST-ASR\/} do. When +{\sl expex.tex} is loaded, it immediately checks to see +whether {\sl xkeyval.tex} has already been loaded. If not, +it does so. + +The goal in writing a macro package for general use is to make it +simple to use if only simple things need to be done, but powerful +enough so that users who have complex needs can get those needs +satisfied if they are willing to deal with the complexities that +complex needs inevitably involve. If you think there are simple +things that are not simple to do, or complex things that cannot +be done, please write to me at {\sl j.frampton@neu.edu}. The +\ExPex\ macros have evolved over the last 15 or so years +and like anything which evolves, various features of the current +state may have more to do with history than with optimal design. +Please let me know about departures from optimal design. Perhaps +the next version can be improved. + +This User's Guide begins with four examples which demonstrate +\ExPex\ in action. It serves as a ``A Quick Guide to {\sl +Expex\/}''. Each page gives some code at the top, with the +product of this code below. Its main purpose is to give a sense +of how \ExPex\ works, so that curious readers have some +basis for determining whether they want to proceed with the +details. It is possible to begin to use \ExPex\ solely on +the basis of the four demo pages and learn the more subtle +capabilities as needed. A quick survey of the index and the table +of contents should give you some idea of what is available, if +you need it. + +\subsection Changes + +The most recent previous version of \ExPex\ is version 4.0c. That +version will still be available on my website, zipped as {\it +expex40c.zip}. Aside from bug fixes, the changes in this version +are to the control of line spacing in wrapped glosses. Several +new parameters have been introduced and some initial settings of +parameters controlling glosses have been changed. Executing the +macro |\gloldstyle| will return \ExPex\ to a state in which +glosses written using version 4.0 should display as they did +using version 4.0. The parameter |abovemoreglskip| which was +used to control wrap spacing in glosses is still recognized, but +it should now be considered obsolete and should be avoided in +future work. It will be eliminated at some point in the future. + +There was an undocumented feature of v4.0 that was used by some +people, but has now been eliminated. \ExPex\ no longer looks for +a file {\it expex-add.tex\/} and loads it automatically if it is +found. This led to some very mysterious behavior when the user +forgot about the presence of this file. Such a file should be +loaded explicitly. + +\subsection LaTex/Tex cooperation + +\ExPex\ is designed to be used by either {\sl Plain Tex\/} or \LaTex\ +users. \LaTex\ users need to say |\usepackage{expex}| and \Tex\ users +|\input expex|. All of the code for the examples in this +documentation should run equally well in either system, subject +to the notes below. + +\subsubsection Note to \LaTex\ users + +|\it| (now a deprecated \LaTex\ command) is used in a few places. +In case \ExPex\ detects that \LaTex\ is being used, it executes +|\let\it=\itshape|. + +\subsubsection Note to \Tex\ users + +Three macros are used in the examples in this documentation which +are defined in \LaTex\ but not in {\it Plain Tex}: |\footnotesize|, +|\sc|, and |\textsc|. Assuming, for example, that text is set in +10pt computer modern, the following would suffice for all the +examples in this documentation. + +\codedisplay +\font\eightrm=cmr8 +\font\eightit=cmti8 +\def\footnotesize{\eightrm \let\it=\eightit \baselineskip=9pt} +\font\tensc=cmcsc10 +\let\sc=\tensc +\def\textsc#1{{\sc #1}} +|endcodedisplay + +Most {\sl Plain Tex\/} users will have other fonts and much more +general size changing macros at their disposal. The code above +is barely sufficient to handle the examples in this is +documentation, but it will do the job. For what it is worth, this +documentation was typeset using {\it Plain Tex}. |\twelvepoint| and +|\tenpoint| were defined modeled on pages 414--415 in the {\sl +TeXbook\/} and |\let\footnotesize=\tenpoint| was executed to +define |\footnotesize|. The running text is \textdim{12 pt}. +|\sc| was defined by |\font\twelvesc=cmcsc10 scaled\magstep1|% +\footnote{cmcsc10 scaled was used rather than +cmcsc12 because Postscript fonts for cmcsc10 are more readily +available than those for cmcsc12.} +and |\let\sc=\twelvesc|% +\footnote{Small caps are used only in text size}% +. + +\subsection Acknowledgements + +Many participants in the {\sl Ling-Tex\/} discussion group have +contributed to the development of \ExPex\relax, either by posing +good questions, solving problems, or providing informed +discussion of desirable features. In particular, I thank Alexis +Dimitriadis, Claude Dionne, Kevin Donnely, Antonio Fortin, Jeremy +Hammond, Daniel Harbor, Joshua Jensen, Joost Kremers, John Lyon, +Alan Munn, Christos Vlachos, and Natalie Weber. + + + + + diff --git a/Master/texmf-dist/doc/generic/expex/source/02_Examples.tex b/Master/texmf-dist/doc/generic/expex/source/02_Examples.tex new file mode 100644 index 00000000000..1908504f05c --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/02_Examples.tex @@ -0,0 +1,10 @@ + +\vfil\break +\section Some preliminary examples + +\medskip +\input example1 +\input example2 +\input example3 +\input example4 + diff --git a/Master/texmf-dist/doc/generic/expex/source/03_XKV.tex b/Master/texmf-dist/doc/generic/expex/source/03_XKV.tex new file mode 100644 index 00000000000..0a5831f3121 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/03_XKV.tex @@ -0,0 +1,142 @@ + +%\def\typedim#1{\typed@m#1\@nil} +%\def\typed@m#1 #2\@nil{$#1\,\rm #2$} +\def\!{\kern-1.6pt} + +\section XKV parameterization + +\begininventory +\macros* \idx{|\lingset|}\endmc +\endinventory +% +(Here and in following sections and subsections, an inventory of +the macros, parameters, and count registers which are described +in what follows appears at the beginning of the section. ``What +follows'' refers to the text up to the next section or subsection +heading.) + +The key-value approach to parameter setting in \Tex, which +originated with David Carlisle's |keyval| package, is illustrated +by the key |glspace|. \ExPex\ uses to it set one of the +parameters used in typesetting glosses. Executing the command + + +\sidx{|\lingset|} +\exfrag +|\lingset{glspace=1.3em}| +\xe + +\noindent results in the definition (or redefinition) of the +macro |\lingglspace| so that it expands to the value \textdim{1.3 +em}. +The macro |\begingl|, which is used to typeset glosses, uses +|\lingglspace|, typesetting the gloss so that the minimal +interword separation is the dimension which |\lingglspace| +expands~to. But \ExPex\ users never have to concern themselves +with the macro |\lingglspace|. If they are not satisfied with +the default spacing, they simply have to know that |glspace| is +the key to setting the word spacing in glosses. + +The argument of |\lingset| can be a comma separated sequence of +key/value pairs. The syntax is: + +\exfrag \everymath={}% +|\lingset{«key$_1$»=«value$_1$»,«\dots»,«key$_n$»=«value$_n$»}| +\xe +% +The comma separated key/value pairs are processed sequentially, +from left to right. If a value contains a comma, it must be +hidden from the mechanism which parses the list by putting the +value in braces. The braces are removed by the parser. + +Several \ExPex\ macros take an optional argument, delimited by +brackets, which is passed to |\lingset|. |\begingl|, used to +typeset glosses, takes an optional argument. You might say, for +example, + +\exfrag +|\begingl[glspace=.9em,everyglft=\it]| +\xe + +\noindent The optional argument of |\begingl| will be passed to +|\lingset| and the result evaluated, so that the gloss will be +typeset with these parameter settings. This is carried out +inside a group, so the global settings of the parameters are not +affected. As we will see later, |everyglft=\it| will result in an +italicized translation. + +\ExPex\ has various kinds of keys. The distinctions depend on +the effect of executing (\nextx) and the restrictions on the +possible values which can appear. + +\ex +|\lingset{«key»=«value»}| +\xe + +\noindent {\it Command key\/}:\enspace +After (\lastx) is executed, the macro |\ling«key»| or +|\ling@«key»| expands to {\sl value}. It will be made clear when +the key is introduced whether it is |\ling«key»| or |\ling@«key»| +that is +defined. + + +\smallskip +\noindent {\it Incremental dimension parameter\/}:\enspace {\sl +value\/} must be a dimension or a dimension prefixed by |!|. If +{\sl value\/} is a dimension, it is stored in |\ling«key»|. If it +is a !-prefixed dimension, the prefixed dimension is added to its +former dimension and the result stored in |\ling«key»|. If +|\ling@«key»| is undefined or does not expand to a dimension, a +fatal error results. Incremental parameters are very useful if +minor adjustments to the format are desired. There are {\it +incremental skip parameters\/} as well, which operate on an +entirely parallel manner. + +\smallskip +\noindent {\it Choice parameter\/}:\enspace +{\sl value\/} must be drawn from a prescribed list. Although the +\ExPex\ choice parameters do store {\sl value\/} when (\lastx) +is executed, the main purpose of executing (\lastx) is the side +effects which are coded into the definition of the key. + +The parameter |labelalign| illustrates this. +|\lingset{labelalign=«value»}| is valid only if {\sl value\/} is +one of |left|, |center|, or |right|. A fatal error results +otherwise. The effect is to appropriately define the macro +|\@labelprint| which is used to typeset the labels of subparts in +multipart examples. +\smallskip + +\smallskip +\noindent {\it Pseudo parameter\/}: (\lastx) is executed for its +side effects. {\sl value\/} is not stored. The key |samplelabel| +illustrates this. When |\lingset{samplelabel=A.}| is executed, +for example, the macro |\ling@samplelabel| is not defined. +Instead, the parameter |labelwidth| is set to the width of +``A.'' in the current font. + +\medskip +In the interest of clarity, the exposition above was somewhat +oversimplified (i.e. told some lies, but small lies). The macro +in which a value associated with {\sl key\/} is stored was +assumed to be |\ling@«key»|. In fact, some keys use +|\ling«key»|, with no |@| in the macro name so that they are +easier for the user to access. In those cases in which it +appeared that there is a significant chance that some users will +want easy access to the value of a parameter at some point, the +macro name |\ling«key»| was used rather than |\ling@«key»|. + +When keys are defined, they can be given default values, as part +of their definitions. If a key |foo|, for example, is given the +default value |2pt|, then executing |\lingset{foo}| is equivalent +to executing |\lingset{foo=2pt}|. Only a few \ExPex\ keys have +default values, but most are set to an initial value in {\sl +expex.tex}. + + + + + + + diff --git a/Master/texmf-dist/doc/generic/expex/source/04_Ex.tex b/Master/texmf-dist/doc/generic/expex/source/04_Ex.tex new file mode 100644 index 00000000000..f2270cc1653 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/04_Ex.tex @@ -0,0 +1,290 @@ + +\section Examples without parts + +\lingset{dima=1.3em} +\noindent +\begininventory +\macros \idx{|\ex|}|~[]|, \idx{|\xe|}\endmc +\counter \idx{|\excnt|}\endmc +\parameters +\idx{|numoffset|\user} & \inc dimension& \textdim{0 pt}\cr +\idx{|textoffset|\user}& \inc dimension& \textdim{1 em}\cr +\idx{|aboveexskip|\user}& \inc skip& + 2.7\dimskip ex plus .4\dimskip ex minus .4\dimskip ex\cr +\idx{|belowexskip|\user}& \inc skip& + 2.7\dimskip ex plus .4\dimskip ex minus .4\dimskip ex\cr +\idx{|exskip|}& skip& (pseudo-parameter)\cr +\endinventory +% +Sections will usually begin with an inventory of the parameters and +user friendly macros and registers that are introduced in the section, +The initial settings of parameters will be given if they are relevant. +Pseudo parameters are set for their immediate effect, not to store a +setting associated with the parameter, so the initial setting of +pseudo parameters is not relevant. +|\ex~[]| above should be taken to mean that the macro +|\ex| will be described, that it is optionally modified by a +following diacritical tilde |~| (as described below), and that it +optionally takes an argument. The text will describe what +arguments are permitted. A $\dag$ supersript on a parameter in these +inventories indicates a parameter whose value is +accessible by the macro |\ling«key»|. A \inc\ prefix on ``dimension'' +or ``skip'' indicates that the parameter is incrementable, by a +dimension or a skip as the case may be. + +|\ex| constructions are terminated by |\xe|. The following +sample paragraph illustrates the use of |\ex| \dots|\xe|. The +convention in this manual is that text, {\it as it would appear in +a document}, is displayed in a framed box, usually with the code +immediately following or preceding. The code assumes that the +initial parameter settings are in effect at the point that the +code is executed. + +\framedisplay +\exdisplay +The following example is well-known from the literature on +parasitic gaps. Here we are concerned with example formatting, +not with the interesting syntax. +\ex +I wonder which article John filed {\sl t\/} without reading {\sl e}. +\xe +Various aspects of the format are controlled by parameters, which +can be set either globally or via an optional argument. +\xe +\endframedisplay +\codedisplay~ +The following example is well-known from the literature on +parasitic gaps. Here we are concerned with example formatting, +not with the interesting syntax. + +\ex +I wonder which article John filed {\sl t\/} without reading {\sl e}. +\xe + +\noindent Various aspects of the format are controlled by +parameters, which can be set either globally or via an optional +argument.|endcodedisplay + +Those users who try to save virtual paper can equally +use: + +\codedisplay +The following example is well-known from the literature on +parasitic gaps. Here we are concerned with example formatting, +not with the interesting syntax.\ex I wonder which article John +filed {\sl t\/} without reading {\sl e}.\xe Various aspects of +the format are controlled by parameters, which can be set either +globally or via an optional argument.|endcodedisplay + +With different parameter settings, we get: + +\framedisplay +\exdisplay +The following example is well-known from the literature on +parasitic gaps. Here we are concerned with example formatting, +not with the interesting syntax. + +\ex[numoffset=2em,textoffset=.5em,aboveexskip=1ex,belowexskip=1ex] +I wonder which article John filed {\sl t\/} without reading {\sl e}. +\xe + +\noindent Various aspects of the format are controlled by +parameters, which can be set either globally or via an optional +argument. +\xe +\endframedisplay + +\codedisplay~ +The following example is well-known from the literature on +parasitic gaps. Here we are concerned with example formatting, +not with the interesting syntax. + +\ex[numoffset=2em,textoffset=.5em,aboveexskip=1ex,belowexskip=1ex] +I wonder which article John filed {\sl t\/} without reading {\sl e}. +\xe + +\noindent Various aspects of the format are controlled by +parameters, which can be set either globally or via an optional +argument.|endcodedisplay + +The horizontal dimensions are illustrated below. |numoffset| is +measured from the left margin. + +\bigskip +\noindent +\pspicture(0,-.9em)(4.9in,3em) +\psscalebox{1.5}{% +\psset{linewidth=.5pt,yunit=.2in} +\def\vline#1{\psline[linestyle=dashed](#1,1)(#1,-.4)\ignorespaces}% +\vline0 +\dimpuba=.35in +\vline\dimpuba +\pcline{<->}(0,1)(\dimpuba,1) +\Aput{\eightrm numoffset} +\setbox0=\hbox{(23)}% +\rput[l](\dimpuba,0){\copy0} +\dimpubb=\dimpuba \advance\dimpubb by\wd0 +\vline\dimpubb +\dimpuba=\dimpubb \advance\dimpubb by .5in +\vline\dimpubb +\pcline{<->}(\dimpuba,1)(\dimpubb,1) +\Aput{\eightrm textoffset} +\rput[l](\dimpubb,0){This is the example text.} +}\endpspicture +\bigskip + +\noindent Example numbering is automatic. The count is kept in +|\excnt|. It is incremented when |\ex| is expanded, before the +number is typeset. Outside examples, |\excnt| gives the count +of the next example. Inside examples, it also gives the count of the +next example, not the current one. Vertical skip is inserted +before and after examples, of amounts determined by the values of +|aboveexskip| and |belowexskip|. + +Inside |\ex| constructions, the example text is wrapped as +ordinary text, with |\leftskip| set by |\ex|. Since |\ex| +sets |\leftskip| and relies on this setting, changes in |\leftskip| +inside \hbox{|\ex| \dots|\xe|} must be made with care, but can be made +after the first paragraph (i.e. after the first explicit or +implicit |\par|). + +\makeatletter +\framedisplay +\ex +Und hier k\"onnen wir sehen was f\"ur Unfug wird gemacht +wenn er einen ganz langen Satz binnen kriegt.\par\nobreak +\xe + +\ex~ +$\alpha$ {\it governs\/} $\beta$ if $\alpha=X^0$ (in the +sense of X-bar theory), $\alpha$ c-commands $\beta$, and $\beta$ +is not protected by a maximal projection. +\xe +\endframedisplay +\resetatcatcode + +The code which was used to typeset the pair of examples above has +two useful features which are worth highlighting. + +\codedisplay +\ex +Und hier k\"onnen wir sehen was f\"ur Unfug wird gemacht +wenn er einen ganz langen Satz binnen kriegt.\par\nobreak +\xe +|exbreak +\ex[aboveexskip=0pt] +$\alpha$ {\it governs\/} $\beta$ if $\alpha=X^0$ (in the +sense of X-bar theory), $\alpha$ c-commands $\beta$, and $\beta$ +is not protected by a maximal projection. +\xe|endcodedisplay + +\noindent |\par\nobreak| is used to illustrate how a page break +between two consecutive examples can be suppressed. This is +sometimes desirable. |\par| puts \Tex\ in the mode of adding +lines to the page, and |\nobreak| tells \Tex\ to avoid a break +(which is a page break when \Tex\ is in the mode of adding +lines), essentially until after more text is added to the page. +|aboveexskip=0pt| is used in the second example to avoid double +spacing between the examples. Otherwise vertical skip would be +added both below the first example and above the second example. + +Since the need to suppress vertical skip above examples arises +with some frequency, a shortcut is made available to accomplish +this. Simply say |\ex~|. \sidx{|~|, tilde modification}Tilde +modification of |\ex| can be used with parameters; |\ex~[|\dots|]| will be interpreted correctly. + +|exskip| is a pseudo parameter which can be used to +simultaneously set both |aboveexskip| and |belowexskip|. The +effect of |\lingset{exskip=«value»}| is + +\exfrag +|\lingset{aboveexskip=«value»,belowexskip=«value»}| +\xe + +\subsection Explicit example numbers + +\begininventory +\parameters +\idx{|exno|}& token list& (pseudo parameter)\cr +\idx{|exnoformat|}& token list of the form $\;\ldots\,|X|\,\ldots$& |(X)|\cr +\endinventory +% +Suppose that you want to repeat an example that was given earlier +in your document. Something like. + +\framedisplay +\excnt=94 +\ex This is a crucial example.\xe +It is clear that this example is related to the earlier +example (14), which is repeated below. +\ex[exno=14] +This is an example that was given many pages earlier.\xe +If we are on the right track, as the saying goes, +we expect the next example to be grammatical. But it is not. +\ex * \dots\xe +\endframedisplay + +\codedisplay~ +\ex This is a crucial example.\xe +It is clear that this example is related to the earlier +example (14), which is repeated below. +\ex[exno=14] +This is an example that was given many pages earlier.\xe +If we are on the right track, as the saying goes, +we expect the next example to be grammatical. But it is not. +\ex * \dots\xe +|endcodedisplay + +|\excnt| is not incremented if the example number is +supplied by |exno|. + +|exno| does not have to be set to an integer, as shown below. + +\framedisplay +\ex[exno=$\Delta$] Earlier example.\xe +\endframedisplay + +\codedisplay~ +\ex[exno=$\Delta$] Earlier example.\xe |endcodedisplay + + +\framedisplay +\ex[exno={[14, repeated]},exnoformat=X] Earlier example.\xe +\endframedisplay +\codedisplay~ +\ex[exno={[14, repeated]},exnoformat=X] Earlier example.\xe|endcodedisplay + +\noindent Note the use of braces to hide the comma in the setting +of |exno|. Otherwise, the key-value parser would get +confused, interpreting |[14| as the setting of |exno| and +reporting that |repeated| is an undefined key. The initial setting of +|exnoformat| is |(X)|, so this parameter must be reset to prevent +putting parentheses around the special exno. The label formatting mechanism is primitive. +|labelformat| must +be of the form\medskip +\centerline{$\rm \langle balanced\ +text\rangle\thinspace|X|\thinspace \langle balanced\ text\rangle$} +\medskip +\noindent The pre-X text is inserted before the label (including +the material specified by |everypar|) and the post-X text is +inserted after the label. The balanced text cannot contain the +character |X|. {\it Balanced text\/} is a string of tokens with +properly nested (explicit) braces. No error checking is done to +ensure that the format specification has the required form, so be +careful. An error might lead to very obscure error messages. + +Note that +\exfrag +|\ex[exno={14, repeated},exnoformat={[X]}] Earlier example.\xe| +\xe +and +\exfrag +|\ex[exno={[14, repeated]},exnoformat=X] Earlier example.\xe| +\xe +give the same result. + +Section (\getref{named-reference}) will show how to name example +numbers, so that |exno| can be set by giving the name of +an example number. + + diff --git a/Master/texmf-dist/doc/generic/expex/source/05_MultiPart-Basics.tex b/Master/texmf-dist/doc/generic/expex/source/05_MultiPart-Basics.tex new file mode 100644 index 00000000000..089d3d34b9e --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/05_MultiPart-Basics.tex @@ -0,0 +1,269 @@ + +\section Examples with labeled parts: Basics + +\begininventory +\counter \idx{|\pexcnt|}\endmc +\macros \idx{|\pex~[]|}, \idx{|\a[]|}\endmc +\parameters +\idx{|labeltype|}& name of a key-value list& |alpha|\cr +\idx{|labeloffset|\user} & \inc dimension& \textdim{1 em}\cr +\idx{|labelwidth|\user} & \inc dimension& \textdim{.72 em}\cr +\idx{|preambleoffset|\user} & \inc dimension& \textdim{1 em}\cr +\idx{|interpartskip|\user} & \inc skip& + 1\dimskip ex plus .2\dimskip ex minus .2\dimskip ex\cr +\idx{|belowgpreambleskip|\user} & \inc skip& + 1\dimskip ex plus .2\dimskip ex minus .2\dimskip ex\cr +\idx{|samplelabel|}& token list& (pseudo-parameter)\cr +\endinventory +% +Typical examples are given below, with the initial parameter +settings.\medskip + +\framedisplay +\pex +\a This is the first example. +\a This is the second example. +\xe + +\pex~<Pre> Multipart examples often have a title or preamble of some +kind. +\a This is the first example. +\a This is the second example. +\xe +\endframedisplay + +\codedisplay~ +\pex +\a This is the first example. +\a This is the second example. +\xe + +\pex~ Multipart examples often have a title or preamble of some kind. +\a This is the first example. +\a This is the second example. +\xe |endcodedisplay + +\noindent +Just like |\ex|, |\pex| must be closed by |\xe|, can be +modified by a tilde diacritic to suppress adding vertical space +above the example, and accepts parameters. The macro \idx{|\a|}, +which introduces each labeled part, is defined only +within \hbox{|\pex| \dots|\xe|}. It accepts certain parameters. +Extra vertical skip (set by |interpartskip|) is inserted +between the parts; and extra vertical skip (determined by +|belowpreambleskip|) is inserted between +the {\it preamble\/} and the first part. The preamble is the +visible material, if any, that appears after the example number +and before the first part. + +The horizontal dimensions are parameterized as pictured below, +provided that the anchoring parameters have their initial values. +The parameters |numoffset| and |textoffset| are used in both +|\ex| and |\pex| constructions. +The effects of changing the settings of the +anchoring parameters (|labelanchor| and |textanchor|) will be +considered in Section \getref{anchors}. + +\exdisplay +\makeatletter +\vrule height1.6em depth3.5em width0pt +\psscalebox{1.5}{% +\parindent=0pt +\leavevmode +\lingset{numoffset=4.5em,preambleoffset=4em,labeloffset=3em, + textoffset=4em,labelwidth=.8em} +\pnode(0,0){A} +\lower5ex\vbox{\hsize=3.8in +\psset{arrows=<->} +\pex[exno=24] +\a \pnode{E6}% +This is an example.% +\SpecialCoor +\rput(A|E6){\pnode{E1}} +\rput(E1){\pnode(\lingnumoffset,0){E2}} +\rput(E6){\pnode(-\lingtextoffset,0){E5}} +\rput(E5){\pnode(-\linglabelwidth,0){E4}} +\rput(E4){\pnode(-\linglabeloffset,0){E3}} +\psset{nodesep=0,labelsep=0} +\pcline[offset=2.5ex](E1)(E2) +\Aput{\strut\eighttt numoffset} +\pcline[offset=2.5ex](E3)(E4) +\Aput{\strut\eighttt labeloffset} +\pcline[offset=2.5ex](E5)(E6) +\Aput{\strut\eighttt textoffset} +%\pcline[offset=-1.5ex,arrows=>-<,nodesep=-.65ex](E4)(E5) +\pcline[offset=-1.5ex](E4)(E5) +\Bput{\strut\eighttt labelwidth} +\psset{offset=0,angle=90,linestyle=dotted,arrows=-} +\XKV@for@n{1,2,3,4,5,6}\which{% + \pcline(E\which)([nodesep=3ex]E\which)} +\pcline([nodesep=1.5ex]E4)([nodesep=-2ex]E4) +\pcline([nodesep=1.5ex]E5)([nodesep=-2ex]E5) +\xe}}% +\xe +Adjustment for the width of the example number is automatic, but +the width of the label slot is a parameter setting, not adjusted +to the width of the particular label which appears in the label +slot. The initial setting of |labelwidth| is the width of ``a.'' +at the point that the default setting is established. This does +not automatically change if the font is changed, in a footnote +for example. It can be set by the user explicitly by setting +|labelwidth| to the desired dimension, or as an incremental +change to its previous value (|labelwidth=!3pt|, for example, +increases the width of the label slot by 3pt). It can also be +set indirectly by giving a sample label. |labelwidth| is then +set to the current width of that sample. \ExPex\ sets the +default label width by |samplelabel=a.|. + +\ExPex\ comes with three label types predefined: |alpha|, +|caps|, and |numeric|. + +\beginss +\pex[labeltype=alpha] +\a First part. +\a Second part. +\xe |midss +\pex[labeltype=alpha] +\a First part. +\a Second part. +\xe +\endss + +\beginss +\pex[labeltype=caps] +\a First part. +\a Second part. +\xe |midss +\pex[labeltype=caps] +\a First part. +\a Second part. +\xe +\endss + +\beginss +\pex[labeltype=numeric] +\a First part. +\a Second part. +\xe |midss +\pex[labeltype=numeric] +\a First part. +\a Second part. +\xe +\endss + +Section \getref{advanced} will detail all the parameters relevant +to the label types and how additional label types can be defined +by the user. + +%-------------------------------------- +\subsection {\tt nopreamble} + +\begininventory +\parametersdef* +\idx{|nopreamble|}& boolean& (not relevant)& \hfil true\cr +\endinventory +% +In order to properly format examples with parts, there are +various reasons that |\pex| must be able to figure out whether +or not there is a preamble. One reason is fairly obvious. If +there is a preamble, every part introduced by |\a| must start on +a new line, otherwise only parts after the first part start a new +line. |\pex| tries to figure it out without help. If |\a| +directly follows |\pex|(|~|)(|[|\dots|]|) and perhaps a following +space, |\pex| knows there is no preamble and acts accordingly. +There are a few other following tokens, considered later in this +manual, that |\pex| also knows are not signals that there is a +preamble. But |\pex|'s preamble detection abilities are +primitive. The following, for example, will confuse |\pex|. + +\beginss +\pex \it +\a first +\a second +\xe|midss +\pex \it +\a first +\a second +\xe +\endss +The |\it| command is interpreted as a preamble. + +|\pex| needs some guidance in this case. It is provided by the +parameter |nopreamble|. + +\beginss +\pex[nopreamble=true] \it +\a first +\a second +\xe|midss +\pex[nopreamble=true] \it +\a first +\a second +\xe +\endss + +In fact, it is a little simpler than this. XKV parametrization +allows one to stipulate a default value for each key that is +defined. If the key is given to the parameter setting machinery +with no value, then the key is set to the default value. +|nopreamble| has the default value |true|. So the following is +sufficient. + +\beginss +\pex[nopreamble] \it +\a first +\a second +\xe|midss +\pex[nopreamble] \it +\a first +\a second +\xe +\endss + +The global setting of |nopreamble| is irrelevant to |\pex|, which +always assumes there is a preamble unless it sees an immediately +following |\a| or |\pex| or is told directly that there is no +preamble. In the following, for example, the setting of +|nopreamble| outside |\pex| has no effect. + +\beginss +\lingset{nopreamble=true} +\pex \it +\a first +\a second +\xe|midss +\lingset{nopreamble=true} +\pex \it +\a first +\a second +\xe +\endss + +%\font\titlett=txtt at 13.3pt + +\subsection Stipulated labels + +\begininventory +\parameters* +|label|& token list& |{}|\cr +\endinventory +% +|label| is recognized as a key only by the |\a| macro. % =«value» +If |label=«value»| is passed to |\a|, that value is inserted as the +label, ignoring automatic label generation. + +\beginss +\pex[exno=47] +\a[label=b] +\a[label=d] +\a[label=g] +\xe|midss +\pex[exno=47] +\a[label=b] +\a[label=d] +\a[label=g] +\xe +\endss + +\noindent Besides |label|, the only other key that |\a| +recognizes is |tag|. See Section \getref{named-reference}. diff --git a/Master/texmf-dist/doc/generic/expex/source/06_MoreExamples.tex b/Master/texmf-dist/doc/generic/expex/source/06_MoreExamples.tex new file mode 100644 index 00000000000..49ff970782d --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/06_MoreExamples.tex @@ -0,0 +1,1021 @@ + +%\makeatletter +%\def\showpex{% +% \edef\resetexcnt{\noexpand\global\noexpand\excnt=\the\excnt}% +% \quad +% \psscalebox{1.5}{% +% \vrule height.5em depth4.6em width0pt +% \parindent=0pt +% \leavevmode +% \Lingset{numoffset=4.5em,preambleoffset=4em,labeloffset=3em, +% textoffset=4em,labelwidth=.8em,arrows=<->} +% \pnode(0,0){A} +% \lower10ex\vbox{\hsize=3.8in +% \excnt=23 +% \pex +% \pnode(-\lingpreambleoffset,0){B3}\pnode{B4} +% This is the preamble. +% \a \pnode{E4}% +% This is an example.% +% \SpecialCoor +% \rput(A|B3){\pnode{B1}} +% \rput(B1){\pnode(\lingnumoffset,0){B2}} +% \rput(E4){\pnode(-\lingtextoffset,0){E3}} +% \rput(E3){\pnode(-\linglabelwidth,0){E2}} +% \rput(E2){\pnode(-\linglabeloffset,0){E1}} +% \psset{nodesep=0,labelsep=0} +% \pcline[offset=2.5ex](B1)(B2) +% \Aput{\strut\eighttt numoffset} +% \pcline[offset=2.5ex](B3)(B4) +% \Aput{\strut\eighttt preambleoffset} +% \pcline[offset=-1.5ex](E1)(E2) +% \Bput{\strut\eighttt labeloffset} +% \pcline[offset=-1.5ex](E3)(E4) +% \Bput{\strut\eighttt textoffset} +% \psset{offset=0,angle=90,linestyle=dotted,arrows=-} +% \XKV@for@n{1,2,3,4}\which{% +% \pcline(B\which)([nodesep=3ex]B\which)}% +% \XKV@for@n{1,2,3,4}\which{% +% \pcline([nodesep=1.5ex]E\which)([nodesep=-2ex]E\which)}% +% \xe}}% +% \resetexcnt +%} +%\resetatcatcode +%-------------------------------------- +\section More on examples, with and without labeled parts + +\deftagsec{advanced} +In this section, we take up complications and fine points. Users +should ignore it until they face a problem that the earlier +sections do not deal with. + +\subsection Relative versus fixed dimensions + +{\it Tex\/} has two kinds of dimensional units. Dimensions +specified in term of ``pts'', ``inches'', ``cm'', etc. are fixed. +Dimensions specified in terms of the units ``em'' or ``ex'' are +relative to the particular text font that is current. +Historically, an em is the width of a capital M and an ex is the +height of a lowercase x. This is still more or less true, but +each font is free to specify the equivalents in any way that it +sees fit. The difference has important implications for +parameter setting. A value specified in terms of em or ex units +can be used without change in both the main text and footnotes, +for example. If we set |textoffset=1em| at the beginning of a +document, the proportions will stay the same whether we used 10pt +or 12pt type, or 8 or 9 pt type in footnotes. +If the document is set in 12pt type, and 1em is specified to be +12pt in that main text font, it makes no difference for +typesetting in the main text font whether we set |textoffset=1em| +or |textoffset=12pt|. But it does make a difference in sections +of the document where a font with a different em dimension is +used. If we switch to a font with a 10pt em unit, then the first +specification will give a physical offset of 10pt, but the second +will give a physical offset of 12pt. + +When a dimension or skip parameter is reset by incrementing the old +value, the new value is specified as a fixed dimension, which will +not scale with font changes. The same is true of setting lengths +indirectly by setting |labelwidth| or |exnowidth|. Adjusting a +parameter by incrementing the old value, or using |samplelabel| +or |exnowidth| to set the width of the label slot or the +effective width of the example number, should only be used to +make local adjustments, not at a level which has font size +changes in its scope. For this reason, {\sl expex.tex\/} +specifies the label width in the label type |alpha| by +|labelwidth=.72em|, not by |samplelabel=a.|.\footnote{% +In the font +that I happen to be using to write this section, the alphabetical +labels (including the period) a--d have widths varying from +\textdim{.694 em} to \textdim{.75 em}; the capital labels A--D +have widths varying from \textdim{.917 em} to \textdim{.972 em}; +and the integer labels for 1 to 9 all have width \textdim{.75 +em}. The label width settings for the label types |alpha| +(\textdim{.72 em}) and |caps| (\textdim{.94 em}) are good +compromises.} +Setting |labelwidth| via the second method would only be +satisfactory if the fonts in force at the points that |\pex| is +used is the same as the font in force when {\sl expex.tex\/} is +input and the |alpha| style defined. + +\subsection Anchoring + +\deftagsec{anchors}% +\begininventory +\parameters +\idx{|labelanchor|}& |numright|, |numleft|, or |margin|& + |numright|\cr +\idx{|preambleanchor|}& |numright|, |labelleft|, or |text|& + |numright|\cr +\idx{|textanchor|}& |numleft| or |normal|& |normal|\cr +\endinventory +%\sidx{|numleft| (|textanchor| value)}% +%\sidx{|normal| (|textanchor| value)}% +% +Initially, the left edge of the label slot is determined by its +offset from the right edge of the number, the left edge of the +preamble is also determined by its offset from the left edge of +the number, and the left edge of the text is determined by its +offset from the right edge of the label slot. But the ``anchor'' +for an offset is parametrized. In the example below, it is +useful to anchor the labeloffset at the left edge of the example +number. + +\begingroup +\setss .55 .38 +\beginss +\pex[exno={[47, partially repeated from + p. 32]},labelanchor=numleft, + exnoformat=X,labeloffset=1.5em] +\par +\a[label=b] first +\a[label=d] second +\a[label=g] third +\xe|midss +%\pex[exno={47, partially repeated from +% p. 32},labelanchor=numleft,exnoformat={[X]}, +% labeloffset=1.5em] +\pex[exno={[47, partially repeated from + p. 32]},labelanchor=numleft,exnoformat=X, + labeloffset=1.5em] +\par +\a[label=b] first +\a[label=d] second +\a[label=g] third +\xe +\endss +\endgroup +\noindent Braces are needed in the specification of the +value of |exno|, otherwise |\pex| would think that the key |exno| +was set to the value |[47| and try to set the key |partially +repeated from p. 32| to its default value. |exnoformat| is set to |X| +so that parentheses are not put around the special exno. + +The following would work equally well: + +\def\stuff{$\vdots$} +\codedisplay +\pex[exno={47, partially repeated from + p. 32},labelanchor=numleft,exnoformat={[X]}, + labeloffset=1.5em] + |stuff +|endcodedisplay +Braces are needed around |[X]| so that the mechanism that reads the +optional argument of |\pex| does not interpret the right bracket as +the right delimiter of the optional argument. + +The |normal| setting of |textanchor| anchors the text at the +right edge of the number for |\ex| constructions and the right edge +of the label slot for |\pex| constructions. + +Here is another example: +\beginss +\lingset{textanchor=numleft, + labelanchor=numleft, + labeloffset=.35in, + textoffset=.7in} +\pex[exno=9] +\a first +\a second +\xe +\bigskip +\pex[exno=10] +\a first +\a[label=aa] second +\xe|midss +\lingset{textanchor=numleft, + labelanchor=numleft, + labeloffset=.35in, + textoffset=.7in} +\pex[exno=9] +\a first +\a second +\xe +\bigskip +\pex[exno=10] +\a first +\a[label=aa] second +\xe +\endss +\noindent Some publications demand this style, in which both the +label and text offsets are measured from the left edge of the +number, or from the margin. It is a relic of typewriter days with +mechanical tabs. + +\subsection Formatting the labels + +\begininventory +\parameters +\idx{|everylabel|}& token list\qquad& |{}|\cr +\idx{|labelformat|}& \dots\ |A| \dots & |A.|\cr +\endinventory +\deftagpage{labelformatpage} +% +\noindent The token list |everylabel| is inserted just before labels +are typeset. It is grouped so that it affects only the label. The +main use is to set the font used for the labels if it differs from the +font in the running text. For example: + +\beginss +\pex[everylabel=\it] +\a one +\a two +\xe|midss +\pex[everylabel=\it]<everylabel1> +\a one +\a two +\xe +\endss + +There are other uses aside from setting the label font. + +\beginss +\pex[everylabel=A,labeltype=numeric, + samplelabel=A1.] +\a An example +\a An example +\a An example +\xe|midss +\pex[everylabel=A,labeltype=numeric, + samplelabel=A1.] +\a An example +\a An example +\a An example +\xe +\endss + +The effect of the value of |labelformat| is illustrated in +(\nextx). + +\setss .6 .35 + +\beginss +\pex[labelformat=$\langle$A$\rangle$, + samplelabel=$\langle$a$\rangle$] +\a first +\a second +\xe|midss +\pex[labelformat=$\langle A\rangle$, + samplelabel=$\langle A\rangle$] +\a first +\a second +\xe +\endss + +The example above is fanciful, but one sometimes sees examples in the +format below. + +\beginss +\pex[exnoformat=X.,labeltype=roman, + labelformat=(A),samplelabel=(iii)] +\a first +\a second +\a third +\a fourth +\xe|midss +\pex[exnoformat=X.,labeltype=roman, + labelformat=(A),samplelabel=(iii)]<sometimes> +\a first +\a second +\a third +\a fourth +\xe +\endss + +The label formatting mechanism is primitive. +|labelformat| must +be of the form\medskip +\centerline{$\rm \langle balanced\ +text\rangle\thinspace|A|\thinspace \langle balanced\ text\rangle$} +\medskip +\noindent The pre-A text is inserted before the label (including +the material specified by |everylabel|) and the post-A text is +inserted after the label. The balanced text cannot contain the +character |A|. {\it Balanced text\/} is a string of tokens with +properly nested (explicit) braces. No error checking is done to +ensure that the format specification has the required form, so be +careful. An error might lead to very obscure error messages. + +There is some redundancy. The following is an alternate way to get +the effect in (\getref{everylabel1}) using |labelformat| instead of +|everylabel|. + +\beginss +\pex[labelformat=\it A.] +\a one +\a two +\xe|midss +\pex[labelformat=\it A.] +\a one +\a two +\xe +\endss + +Another style sometimes found in footnotes is like the one in +(\getref{sometimes}), except that the labels are right aligned in the +label slot. + +\subsection Aligning the labels + +\begininventory +\parameters +\idx{|labelalign|}& |left|, |right|, or |margin|& + \hfil |left|\cr +\endinventory + +\noindent There is a choice of left, right, or center alignment of the +labels in the label slot. This is chosen by the parameter +\idx{|labelalign|}, which can be set to |left|, |center|, or |right|. +For example, + +\beginss +\pex[exno=43,labeltype=roman, + labelformat=(A),labelalign=right, + samplelabel=(iii)] +\a first +\a second +\a third +\a fourth +\xe|midss +\pex[exno=43,labeltype=roman, + labelformat=(A),labelalign=right, + samplelabel=(iii)] +\a first +\a second +\a third +\a fourth +\xe +\endss +This style looks odd to me, but this is the style for multipart examples +{\it in the main text\/} in Chomsky's {\it Lectures on Government +and Binding}. In footnotes, the style is: + +\beginss +\pex[exno=i,labeltype=alpha, + samplelabel=(a),labelformat=(A)] +\a first +\a second +\a third +\a fourth +\xe|midss +\pex[exno=i,labeltype=alpha, + samplelabel=(a),labelformat=(A)] +\a first +\a second +\a third +\a fourth +\xe +\endss + +If you look carefully, the vertical column of parts labels in the last +example looks somewhat ragged because the width of ``(b)'' is +slightly larger than the width of ``(c)''. Center alignment of the +labels gives a neater appearance. + +\beginss +\pex[exno=i,labeltype=alpha, + samplelabel=(a),labelformat=(A), + labelalign=center] +\a first +\a second +\a third +\a fourth +\xe|midss +\pex[exno=i,labeltype=alpha, + samplelabel=(a),labelformat=(A), + labelalign=center] +\a first +\a second +\a third +\a fourth +\xe +\endss + +For more ordinary |\pex| constructions which use the letters or +numbers which have roughly the same width, label alignment is not +a significant concern. But if labels include, for example, the +narrow letter ``i'' and the wide letter ``m'', as below, label +alignment has a noticeable effect on the appearance. Individual +tastes (and publisher's demands) may differ, but I prefer center +alignment in these cases. + +\line{% +\lingset{belowpreambleskip=.4ex,interpartskip=.3ex, + everyex=\advance\pexcnt by 8,samplelabel=m.}% +\hsize=.33\hsize +\vbox{% +\pex[labelalign=left]<triplea1> +{\it left aligned labels} +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\xe}% +\vbox{% +\pex[labelalign=center] +{\it center aligned labels} +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\xe} +\vbox{% +\pex[labelalign=right]<triplea3> +{\it right aligned labels} +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\xe}} + +If the labels are numeric, label alignment can have an even bigger +effect. Again, individual tastes and publishers' demands may +differ. My preference is right alignment in this case. + +\line{% +\lingset{interpartskip=.3ex,labeltype=numeric, + everyex=\advance\pexcnt by 6,samplelabel=10.}% +\hsize=.33\hsize +\vbox{% +\pex[labelalign=left]<tripleb1> +{\it left aligned labels} +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\xe}\hfil +\vbox{% +\pex[labelalign=center] +{\it center aligned labels} +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\xe}\hfil +\vbox{% +\pex[labelalign=right]<tripleb3> +{\it right aligned labels} +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\a A typical example. +\xe}} + +The initial setting is left alignment for letters (either +uppercase or lowercase) and right alignment for numbers. Unless +numbers or letters of significantly different widths appear as +labels, most users will not notice the difference and can safely +ignore the issue. + +It is a side issue, but the reader may have wondered how +(\getref{triplea1}--\getref{triplea3}) and +(\getref{tripleb1}--\getref{tripleb3}) were typeset. The idea is +simple. You say: + +\codedisplay +\line{\divide\hsize by 3 + \vbox{\pex|verbdots \xe}\hss + \vbox{\pex|verbdots\xe}\hss + \vbox{\pex|verbdots \xe}} +|endcodedisplay +|\hss| is used to give a little stretch or shrink so that +dimensional rounding does not lead to an under or overfull +|\line{| \dots|}|. It is important in examples like this that +|\pexcnt| is incremented globally, so that the latter vboxes see +the |\excnt| which results from an operation inside a previous +vbox. We will see later that in some situations this behaviour +is not desirable and how it can be altered. + +Variations are useful. One can easily imagine a situation in +which something like the following is appropriate for two side by +side examples. + +\codedisplay +\line{% + \vbox{\hsize=.55\hsize \pex|verbdots \xe}\hss + \vbox{\hsize=.45\hsize \pex|verbdots \xe}} +|endcodedisplay + + +\subsection User designed labeling + +\begininventory +\macros* \idx{|\definelabeltype|}\endmc +\counter \idx{|\pexcnt|}\endmc +\parameters +\idx{|labelgen|}& |char|, |number|, or |list|& + |char|\cr +|pexcnt|\sidx{|pexcnt|, parameter}& integer& |97|\cr +\idx{|labellist|}& comma separated list& |{}|\cr +\endinventory +% +If |labeltype| is set to |alpha|, the counter |\pexcnt| is set to +97, the character code of lowercase a in standard roman font +sets, and |labelgen| is set to |char|. The successive labels are +generated by taking the character corresponding to |\pexcnt| and +stepping the counter by 1. This relies on the fact that the +alphabetical sequence of characters corresponds to the numerical +order of the character codes of the characters. Setting +|labeltype| to |caps| is almost the same, except that |\pexcnt| +is initialized to 65, the character code of uppercase A. If +|labeltype| is set to |numeric|, |labelgen| is set to |number| +and |\pexcnt| is initialized to 1. The labels are generated by +taking the number corresponding to the value of |\pexcnt|. + +\let\mit=\twelvei +Something like the following might be useful. In the format I am +using, |\mit| selects a math italics font which has the lowercase +greek letters starting with the position 11. + +\beginss +\pex[labelgen=char,pexcnt=11, + everylabel=\mit] +\a +\a +\a +\a +\xe|midss +\pex[labelgen=char,pexcnt=11, + everylabel=\mit] +\a +\a +\a +\a +\xe +\endss +\noindent This scheme has a quirk if labels above $\xi$ are +needed because the correspondence between numerical order and +alphabetical order breaks down at this point. {\it o} will be +missing, with $\pi$ following $\xi$. + +This labeling scheme can be defined by: +\codedisplay +\definelabeltype{greekmath}{labelgen=char,pexcnt=11,everylabel=\mit, + labelformat=A.} +|endcodedisplay +% +Then |\pex[labeltype=greekmath]| is sufficient to +invoke this labeling style. + +If a sequence of character labels is needed which does not appear +in sequence in a font, it is necessary to generate the labels +from a list. Documents in Greek, for example, face the following +problem. Roman letters were largely borrowed from the Greek +alphabet, but Greek alphabetical order was not. Common greek +fonts place letters in the position of the borrowing, not in +their natural order in the Greek alphabet. Documents written in +Greek, therefore, will have to generate the labels in multipart +examples from a list. The solution is to set |labelgen| to +|list|, and |labellist| to the desired list of labels. + +For example, suppose the label type |greek| is defined by +\codedisplay +\definelabeltype{greek}{labelgen=list, + labellist={a,b,g,d,e,z,h,j,i,k,l,m,n,x,o,p,r,sv,t,u,f,q,y,w}} +|endcodedisplay +% +and that |\gr| selects one of the grmn series of fonts +in the cb family of Greek fonts. + +\begingroup +%\let\gr=\twelverm +\font\gr=grmn1200 +\gr + +\definelabeltype{greek}{labelgen=list, + labellist={a,b,g,d,e,z,h,j,i,k,l,m,n,x,o,p,r,sv,t,u,f,q,y,w}} +\lingset{labeltype=greek} + +\beginss +\gr +\pex[labeltype=greek] +\a {\rm a,b,g,d,e,z} +\a a,b,g,d,e,z +\a {\rm a,b,c,d,e,f} +\a a,b,c,d,e,f +\a {\rm A,B,G,D,E,Z} +\a A,B,G,D,E,Z +\xe|midss +\pex[labeltype=greek] +\a {\rm a,b,g,d,e,z} +\a a,b,g,d,e,z +\a {\rm a,b,c,d,e,f} +\a a,b,c,d,e,f +\a {\rm A,B,G,D,E,Z} +\a A,B,G,D,E,Z +\xe +\endss +\endgroup + +\noindent ``sv'' appears in the list rather than ``v'' so that a +nonfinal sigma is produced rather than a final sigma. They +differ. ``v'' produces what amounts to a vertical strut of zero +width, making the sigma nonfinal, but contributing no visible +material. (Thanks to Christos Vlachos for this idea.) + +Of course, if the entire document is written in Greek, then +\exfrag +|\lingset{labeltype=greek}| +\xe +should have global scope, so that parameter +setting is not necessary in each |\pex| construction. + +The computation is more efficient if the label list is shorter, +so the label list should not be much longer than the longest list +you anticipate using. If more labels are called for than the +list provides, labeling starts over again at the beginning and a +warning is issued. + +\subsection The parameter {\tt sampleexno} + +\begininventory +\parameters* +\idx{|sampleexno|}& token list& \hfil |{}|\cr +\endinventory +% +In some publications, if two examples are close together in the +running text and the widths of the typeset example numbers are +different, the offsets are modified so that the texts in the two +examples are aligned. The following is considered, under this +stringent aesthetic, to be less than ideal. + +\framedisplay +\keepexcntlocal \excnt=9 +\pex +\a I consider firemen available. (generic only) +\a I consider firemen intelligent. (generic only) +\xe +Exceptional case marking (ECM) verbs seem more or less to allow both +existential and generic interpretations of complement subjects: +\pex +\a I believe firemen to be available. (both generic and existential) +\a I believe violists to be intelligent. (generic only) +\xe +\endframedisplay + +\ExPex\ provides the parameter |sampleexno| to handle this formatting +problem. If the parameter is set to the empty token list, it has no +effect of the formatting. If it is set to a nonempty token list, that +token list is put in an hbox and its width is taken to be the +effective typeset width of the example number. + +\framedisplay +\keepexcntlocal \excnt=9 +\pex[sampleexno=(10)] +\a I consider firemen available. (generic only) +\a I consider firemen intelligent. (generic only) +\xe +Exceptional case marking (ECM) verbs seem more or less to allow both +existential and generic interpretations of complement subjects: +\pex +\a I believe firemen to be available. (both generic and existential) +\a I believe violists to be intelligent. (generic only) +\xe +\endframedisplay +\codedisplay~ +\pex[sampleexno=(10)] +\a I consider firemen available. (generic only) +\a I consider firemen intelligent. (generic only) +\xe +Exceptional case marking (ECM) verbs seem more or less to allow both +existential and generic interpretations of complement subjects: +\pex +\a I believe firemen to be available. (both generic and existential) +\a I believe violists to be intelligent. (generic only) +\xe +|endcodedisplay + +This kind of fine tuning should only be done at the immediately +pre-publication point because it depends upon the final +assignment of example numbers and an aesthetic judgement of when +two multipart examples are ``visually close'' in the finished +product. + +It seems to be common for publishers to do fine tuning of this +sort in footnotes. There are two reasons for this. First, +lowercase roman numerals are commonly used and their widths vary +noticeably. Second, only a few examples are involved, assuming +that examples numbers in a footnote start at (i), so the final +assignments of example numbers is relatively easy to determine. +The role of |sampleexno| in footnotes is taken up in Section +\getref{fns}. + +\subsection IJAL style format of multiline examples + +\begininventory +\macros* \idx{|\actualexno|}\endmc +\parametersdef +\idx{|avoidnumlabelclash|}& boolean& |false|& |true|\cr +\idx{|appendtopexarg|}& token list& |{}|\cr +\endinventory +The formatting demands of the International Journal of +American Linguistics (IJAL) require some additional +parametrization. Multipart examples look like this: + +\definelingstyle{IJAL}{% + avoidnumlabelclash=true, + labelanchor=numleft,labeloffset=0pt, + textanchor=normal,textoffset=1em, + preambleanchor=text,preambleoffset=0pt, + labelformat=(A), + everylabel=\actualexno, + appendtopexarg={samplelabel=(\actualexno a)} + }% +\begingroup + +\lingset{lingstyle=IJAL} +\pex[exno=4]<nonum> +\a first +\a second +\xe + +\pex~[exno=64] +Preamble +\a first +\a second +\xe + +\pex~[exno=1025] +Preamble +\a first +\a second +\xe +\endgroup + +A first approximation is + +\codedisplay +\lingset{labelanchor=numleft,labeloffset=0pt, + textanchor=normal,textoffset=1.8em, + preambleanchor=text,preambleoffset=0pt, + labelformat=(A),everylabel=\actualexno} +|endcodedisplay +|\actualexno| expands to the numerical value in |\excnt|, provided +no special example number is set by |exno|, otherwise to the +special example number. But the results (below) have some +major problems. + +\begingroup +\lingset{labelanchor=numleft,labeloffset=0pt, + textanchor=normal,textoffset=1.8em, + preambleanchor=text,preambleoffset=0pt, + labelformat=(A),everylabel=\actualexno} +\pex[exno=5] +\a first +\a second +\deftag{5}{IJAL1} +\xe + +\pex~[exno=65] +Preamble +\a first +\a second +\xe + +\pex~[exno=102] +Preamble +\a first +\a second +\xe + +There are two things that need to be done. First, in order to +avoid printing both the example number and the label of the first +part in examples with no preamble, as is the case in +(\getref{IJAL1}), printing the example number must be suppressed +if there is no preamble. Second, in order to avoid the shrinking +gap between the label and the text as more digits appear in the +example number and it gets wider, the label width must be made +dependent on the example number. + +\ExPex\ provides the boolean parameter |avoidnumlabelclash| +which, if set to |true|, suppresses printing the example number +in |\pex| constructions {\it if there is no preamble}. It has +the XKV default value |true|, so that it can be set by giving the +key with no label. Although it has the default value |true|, it +has the initial value |false|. So, with the parameters set as +above, we get: + +\beginss +\pex[exno=5,avoidnumlabelclash] +\a first +\a second +\xe|midss +\lingset{labelanchor=numleft,labeloffset=0pt, + textanchor=normal,textoffset=1.8em, + preambleanchor=text,preambleoffset=0pt, + labelformat=(A),everylabel=\actualexno} +\pex[exno=5,avoidnumlabelclash] +\a first +\a second +\xe +\endss + +In order to solve the problem of the shrinking gap between the +label and text, we could try something like +|samplelabel=(\actualexno a)|. But it is considerably less than +elegant to have to write this in every |\pex| example. It will +not produce the desired result to put +|\lingset{samplelabel=(\actualexno a)}| at the beginning of the +document. |labelwidth| will be set to whatever the current width +of |(\actualexno a)| is, which is not likely to be what you want +for the entire document even if |\actualexno| happens to be +defined at the point that the |\lingset| is +executed. To circumvent the global/local problem, \ExPex\ +provides the parameter |appendtopexarg|. Its value (unexpanded) +is appended to whatever other arguments are given to +|\pex| and evaluated locally. + +\exfrag +|\lingset{appendtopexarg={samplelabel=(\actualexno a)}| +\xe +accomplishes what we want. + +We can summarize the discussion by defining the IJAL style. + +\codedisplay +\definelingstyle{IJAL}{labelwidth=2em,labelanchor=numleft, + labeloffset=0pt,labelformat=(A),everylabel=\actualexno, + textanchor=normal,textoffset=1em,preambleanchor=text, + preambleoffset=0pt,avoidnumlabelclash, + appendtopexarg={samplelabel=(\actualexno a)}} +|endcodedisplay +Then + +\definelingstyle{IJAL}{labelwidth=2em,labelanchor=numleft, + labeloffset=0pt,labelformat=(A),everylabel=\actualexno, + textanchor=normal,textoffset=1em,preambleanchor=text, + preambleoffset=0pt,avoidnumlabelclash, + appendtopexarg={samplelabel=(\actualexno a)}}% +\edef\\{\noexpand\vskip\lingbelowexskip}% +\beginss +\lingset{lingstyle=IJAL} +\pex[exno=5] +\a first +\a second +\xe + +\pex~[exno=65] +Preamble +\a first +\a second +\xe + +\pex~[exno=1026] +Preamble +\a first +\a second +\xe|midss +\lingset{lingstyle=IJAL} +\pex~[exno=5] +\a first +\a second +\xe +\\ +\pex[exno=65] +Preamble +\a first +\a second +\xe +\\ +\pex~[exno=1026] +Preamble +\a first +\a second +\xe +\endss + +\endgroup + +%\excnt=34 + +\subsection Footnotes and endnotes + +\deftagsec{fns} +\begininventory +\macros* \idx{|\keepexcntlocal|}\endmc +\endinventory +% +Footnotes and endnotes pose a somewhat thorny problem since many different +\Tex\ and \LaTex\ macros are used to typeset footnotes and endnotes. +Further, there are different ways of assigning example numbers and +labels in multipart examples in footnotes. The footnote +referenced at the end of this sentence is representative. +\footnote{% +\lingset{sampleexno=(ii)} +The existential reading does not seem to be available for subjects of +small clause complements of {\it consider\/}: +\pex +\a I consider firemen available. (generic only) +\a I consider firemen intelligent. (generic only) +\xe +Exceptional case marking (ECM) verbs seem more or less to allow both +existential and generic interpretations of complement subjects: +\pex +\a I believe firemen to be available. (both generic and existential) +\a I believe violists to be intelligent. (generic only) +%\a \ljudge{??}I believe opera singers to know Hittite. +\xe +} +It is an abbreviated version of footnote 17 in Chapter 2 of +Diesing's {\sl Indefinites}, MIT Press.% +This footnote style is fairly common. + +The \ExPex\ distribution contains two files, {\it eptexfn.tex\/} and +{\it exltxfn.sty\/} which may be helpful in producing footnotes in +this style. They do two things. First, they each define a macro +(|\everyfootnote|) which, if evaluated at the start of processing a +footnote, ensures that examples are correctly formatted. Second, they +each perform surgery on a standard |\footnote| macro so that +(among other things) |\everyfootnote| is inserted in the +appropriate place. + +I intend these macro files both to be used directly or to serve as +models for the creation of variations which satisfy user needs. To the +latter end, I will go through {\it expex.sty\/} and explain how it +works. The file listing is: + +\CLnum +\makeatletter +\def\everyfootnote{% + \keepexcntlocal + \excnt=1 + \lingset{exskip=1ex,exnotype=roman,sampleexno=, + labeltype=alpha,labelanchor=numright,labeloffset=.6em, + textoffset=.6em} +} +\renewcommand{\@makefntext}[1]{% + \everyfootnote + \parindent=1em + \noindent + \@thefnmark.\enspace #1% +} +\resetatcatcode|endCLnum + +Lines 2--8 define the macro |\everyfootnote| which will be +inserted into the footnote macro. It first ensures that changes +in |excnt| that are made in the footnote are kept local to the +footnote. |\keepexcntlocal| is an \ExPex\ macro whose execution +causes changes in |\exnt| to be kept local to the group in which +|\keepexntlocalo| is executed. Without |\keepexcntlocal|, +changes in |excnt| inside a footnote would be visible outside the footnote group in +which the changes occur. |excnt| is then initialized. Finally, +parameters are set which control the formatting of examples in +the footnote. The LaTex |\footnote| command uses |\@makefntext| to +typeset the footnote. It is defined in the cls file +which is used. The redefinition in lines 9--14 is a modification +of the |\@makefntext| macro defined in {\it article.cls}. It +first executes |\everyfootnote|, then prints the footnote number +flush left at full footnote size, not as a superscript. + +Assuming that |\usepackage{epltxfn}| has been executed, the +following code produces fn.~\the\fnno. +\codedisplay +\footnote{% +\lingset{sampleexno=(ii)} +The existential reading does not seem to be available for subjects of +small clause complements of {\it consider\/}: +\pex +\a I consider firemen available. (generic only) +\a I consider firemen intelligent. (generic only) +\xe +Exceptional case marking (ECM) verbs seem more or less to allow both +existential and generic interpretations of complement subjects: +\pex +\a I believe firemen to be available. (both generic and existential) +\a I believe violists to be intelligent. (generic only) +\xe +} +|endcodedisplay + +The code in {\sl eptexfn.tex\/} is somewhat more complicated +because {\it Plain Tex\/} does not number footnotes and uses the +same font for running text and footnotes. |\everyfootnote| is +identical. If it is compared with the footnote macros in the +{\sl TexBook\/} (p. 363), on which it is modeled, it is easy to +see the significance of the various modifications. + +I anticipate that although the footnote macros in {\sl epltxfn.sty\/} +and {\sl eptexfn.tex\/} will be useful to some readers without +modification, other users will need to modify them for one reason or +the other. Endnotes, in particular, will require work. I hope that +these two files will serve as useful models. Of course, trivial +modifications of the various dimensions can be done easily. More +extensive modification require appropriate levels of expertise. Users +should feel free to write to me directly ({\sl j.frampton@neu.edu\/}) or +post questions to the {\sl Ling-Tex\/} discussion group, or to send me +modifications that might prove useful to others. A file {\it +epltxfn-endnotes.sty}, for example, would be useful. + + diff --git a/Master/texmf-dist/doc/generic/expex/source/07_UserStyles.tex b/Master/texmf-dist/doc/generic/expex/source/07_UserStyles.tex new file mode 100644 index 00000000000..9deb5edf58f --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/07_UserStyles.tex @@ -0,0 +1,125 @@ + +\section User defined styles + +\begininventory +\macros* \idx{|\definelingstyle|}\endmc +\parameters +\idx{|everyex|\user}& token list& |{}|\cr +\idx{|Everyex|\user}& token list& |{}|\cr +\endinventory +% +Aside from all the \ExPex\ parameters introduced to this point, +there are numerous \Tex\ parameters that affect the appearance +of examples: line spacing, hsize, font selection, etc. These are +all quantities that \Tex\ itself provides mechanisms for setting +to suit the user. You may want to make adjustments of these +parameters every time a particular kind of example is typeset, so +that special settings hold inside these examples independently of +the contextual settings. For example, suppose you have many +examples that, for some reason, you want to format like~(\nextx), +with a narrow width, italic font, an oversized gap between the +example number and the text, and a somewhat greater than normal +separation between baselines. + +\framedisplay +\leftline{\vbox{% +\ex[textoffset=3em] +\hsize=3in \rightskip=0pt plus 2em \it \advance\baselineskip by 2pt +Und hier k\"onnen wir sehen was f\"ur Unfug wird gemacht +wenn er einen ganz langen Satz binnen kriegt. +\xe +}\hfil} +\endframedisplay + +One way to do this is: + +\codedisplay~ +\ex[textoffset=3em] +\hsize=3in \rightskip=0pt plus 2em \it \advance\baselineskip by 2pt +Und hier k\"onnen wir sehen was f\"ur Unfug wird gemacht +wenn er einen ganz langen Satz binnen kriegt. +\xe +|endcodedisplay +Some rightskip is included because with such a narrow width it is +otherwise difficult to avoid overfull lines. + +If you have many examples that you want to typeset in this way +that are scattered throughout a document, it is awkward to have +to remember all of these settings and enter them each time an +example of this kind needs to be formatted. Furthermore, if you +change your mind about some detail of this special formatting, +you need to go through the document and change each instance of +this formatting. \ExPex\ allows you to package all the +formatting changes into one named unit, called a ``style''. If +this style is called ``narrow italic'', then you can write the following +to achieve the format of (\lastx). + +\codedisplay +\ex[lingstyle=narrow italic] +|endcodedisplay + +The various format specifications are packaged into a style +by saying: + +\codedisplay +\definelingstyle{narrow italic}{textoffset=3em, + everyex={\hsize=3in \rightskip=0pt plus 2em + \it \advance\baselineskip by 2pt}} +|endcodedisplay +Thereafter, setting the parameter |lingstyle| to |narrow italic| +has the effect of setting all the parameters as specified in the +style definition (the two parameters |textoffset| and |everyex| +in this example). The parameter |everyex| works in the following +way. If |everyex| is set to {\sl value\/}, a macro |\lingeveryex| +is defined whose expansion is {\sl value}. When +an |\ex| or |\pex| construction is initiated, {\it after\/} any +parameter settings take effect, |\lingeveryex| is executed. + +\ExPex\ provides a second parameter, |Everyex|, which is similar to +|expex|. If |Expex| is set to value, a macro |ling@Everypex| is +defined. When +an |\ex| or |\pex| construction is initiated, {\it before\/} after any +local parameter changes take effect, |\lingEveryex| is executed. +The reasons for providing both |everyex| and |Everyex| are +subtle. Different stages of the writing/rewriting/editing process +may call for different treatments of example formatting, +particularly if the final aim is a camera ready product. Suppose +you normally make double spaced drafts with an hsize of +\textdim{6.5 in} and that your final aim is to produce camera ready copy with +an hsize of \textdim{4.375 in}. Suppose also that you are at +editing stage where you want to see exactly how the examples +will be formatted in the finished product, but still want full width +double spaced text. One way to accomplish this is to say + +\codedisplay +\lingset{everyex={\hsize=4.375in \normalbaselines}} +|endcodedisplay +at the beginning of your document. |\normalbaselines| +is a standard \Tex\ macro which establishes the normal line +spacing for the current font. This makes the hsize and line +spacing inside examples independent of the hsize and line spacing +you select for the text (outside examples). + +This will accomplish what you want. But it makes the further use +of |everyex| in your document awkward. If you want a particular +example to be set in italics, for example, you might think to +use: + +\codedisplay +\ex[everyex=\it] +|endcodedisplay + +\noindent This will certainly produce an italicized example +because |\it| will be evaluated early on in typesetting the +example. But it has the unfortunate consequence of overwriting +the initial setting of |everyex|, removing the special line +spacing within examples. + +|Everyex| is provided to accommodate situations like this. The +intention is that special settings that should hold inside +examples throughout the document are assigned to |Everyex|, with +|expex| reserved for local variations. Since |\lingEveryex| is +evaluated before local parameter changes take effect, parameter +settings specified by |Expex| will be overridden by any local +parameter settings. + diff --git a/Master/texmf-dist/doc/generic/expex/source/08_Judgments.tex b/Master/texmf-dist/doc/generic/expex/source/08_Judgments.tex new file mode 100644 index 00000000000..55556f3a277 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/08_Judgments.tex @@ -0,0 +1,137 @@ + +\section Judgment marks + +\deftagsec{starsec} +\begininventory +\macros \idx{|\judge|}, \idx{|\ljudge|}\endmc +\parametersdef* +\hfil |*|\sidx{|*|, parameter}& sample judgment string& \hfil |*|& \hfil |*|\cr +\endinventory + +\noindent +In examples without parts, not much needs to be said. + +\codedisplay +\ex *Jack and Jill wented up the hill.\xe|endcodedisplay + +\framedisplay~ +\ex *Jack and Jill wented up the hill.\xe +\endframedisplay + +In my view (\nextx), with a little whitespace inserted between +the asterisk and the example sentence, looks somewhat better than +(\lastx), but the difference is slight. + +\codedisplay +\ex \judge* Jack and Jill is going up the hill.\xe|endcodedisplay + +\framedisplay~ +\ex \judge* Jack and Jill wented up the hill.\xe +\endframedisplay + +\noindent \ExPex\ provides the macro |\judge| to +accomplish this. |\judge| takes one argument. A multi-character +judgment diacritic therefore needs to be surrounded in braces. +|\judge| also ignores following spaces. So +|\judge{??}Mary|\dots\ and \hbox{|\judge{??} Mary|\dots} produce +the same thing, as do |\judge*Mary|\dots\ and |\judge* Mary|\dots + +Multipart examples are more complex, if alignment is to be +maintained. If you find (\nextx) satisfactory, what follows will +not be of much interest. But it you would like the text (not +including the judgment marks) to be aligned, read on. + +\framedisplay +\pex +\a There is a pair of pants on the floor. +\a \judge{?*}There are a pair of pants on the floor. +\a \judge*There is the pair of pants on the floor. +\xe +\endframedisplay + +\ExPex\ provides the macro |\ljudge| which pushes the judgment +diacritics into the gap between the labels and the examples, +instead of pushing the examples to the right to make room for the +judgment diacritics. So + +\codedisplay +\pex +\a There is a pair of pants on the floor. +\a \ljudge{?*}There are a pair of pants on the floor. +\a \ljudge*There is the pair of pants on the floor. +\xe |endcodedisplay + +\noindent produces + +\framedisplay +\pex +\a There is a pair of pants on the floor. +\a \ljudge{?*}There are a pair of pants on the floor. +\a \ljudge*There is the pair of pants on the floor. +\xe +\endframedisplay + +\noindent Unfortunately, depending on the setting of +|textoffset|, there is unlikely to be sufficient room for +judgment diacritics in between the labels and the examples. +|textoffset| needs to be increased to make room. + +\ExPex\ provides the pseudo parameter to +facilitate adjusting the text offset. + +\codedisplay +\pex[*=?*] +\a There is a pair of pants on the floor. +\a \ljudge{?*}There are a pair of pants on the floor. +\a \ljudge*There is the pair of pants on the floor. +\xe |endcodedisplay + +\framedisplay +\pex[*=?*] +\a There is a pair of pants on the floor. +\a \ljudge{?*}There are a pair of pants on the floor. +\a \ljudge*There is the pair of pants on the floor. +\xe +\endframedisplay + +\noindent |textoffset| is increased by the width of the judgment +diacritic which is furnished as the value of the parameter |*|. + +If you say |\lingset{*}|, with no value assigned to |*|, it is +given a default value, which happens to be |*|. So |\lingset{*}| +is equivalent to |\lingset{*=*}|. So, for example: + +\codedisplay +\pex[*] +\a There is a pair of pants on the floor. +\a \ljudge* There are a pair of pants on the floor. +\a \ljudge* There is the pair of pants on the floor. +\xe |endcodedisplay + +\framedisplay~ +\pex[*] +\a There is a pair of pants on the floor. +\a \ljudge* There are a pair of pants on the floor. +\a \ljudge* There is the pair of pants on the floor. +\xe +\endframedisplay + +If you think that the text offset in (\blastx) is too large, +|textoffset| can be further adjusted directly, so you could write + +\codedisplay +\pex[*=?*,textoffset=!-.3em] +\a There is a pair of pants on the floor. +\a \ljudge{?*} There are a pair of pants on the floor. +\a \ljudge* There is the pair of pants on the floor. +\xe |endcodedisplay + +\framedisplay~ +\pex[*=?*,textoffset=!-.3em] +\a There is a pair of pants on the floor. +\a \ljudge{?*} There are a pair of pants on the floor. +\a \ljudge* There is the pair of pants on the floor. +\xe +\endframedisplay + + diff --git a/Master/texmf-dist/doc/generic/expex/source/09_Glosses-Basic.tex b/Master/texmf-dist/doc/generic/expex/source/09_Glosses-Basic.tex new file mode 100644 index 00000000000..6927698442a --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/09_Glosses-Basic.tex @@ -0,0 +1,1005 @@ +\everymath={} + +\section Glosses + +\begininventory +\macros +\idx{|\begingl[]|}, +\idx{|\glpreamble[]|}, +\idx{|\gla[]|}, +\idx{|\glb[]|}, +\idx{|\glc[]|}, +\idx{|\glft[]|}, +\idx{|\endgl|} +\endmc +\endinventory +% +Before I introduce the parameters that control the +characteristics of gloss displays, here are a few examples done +with the initial settings of the parameters. + +\medskip +\framedisplay +\ex<wapm> +\begingl +\gla k- wapm -a -s'i -m -wapunin -uk // +\glb CL V AGR NEG AGR TNS AGR // +\glb 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} // +\glft `you (pl) didn't see them'// +\endgl +\xe +\endframedisplay +\codedisplay~ +\ex +\begingl +\gla k- wapm -a -s'i -m -wapunin -uk // +\glb CL V AGR NEG AGR TNS AGR // +\glb 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} // +\glft `you (pl) didn't see them'// +\endgl +\xe +|endcodedisplay + +\framedisplay +\ex<sicher> +\begingl +\gla Mary$_i$ ist sicher, dass es den Hans nicht st\"oren w\"urde +seiner Freundin ihr$_i$ Herz auszusch\"utten.// +\glb Mary is sure that it the-{\sc acc} Hans not annoy would +his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} heart-{\sc acc} {out to +throw}// +\glft `Mary is sure that it would not annoy John to reveal her +heart to his girlfriend.'// +\endgl +\xe +\endframedisplay +\codedisplay~ +\ex +\begingl +\gla Mary$_i$ ist sicher, dass es den Hans nicht st\"oren w\"urde +seiner Freundin ihr$_i$ Herz auszusch\"utten.// +\glb Mary is sure that it the-{\sc acc} Hans not annoy would +his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} +heart-{\sc acc} {out to throw}// +\glft `Mary is sure that it would not annoy John to reveal her +heart to his girlfriend.'// +\endgl +\xe +|endcodedisplay + + +\framedisplay +\ex<um> +\begingl +\glpreamble Um-\"asudda' h\"am yan i taotao ni si Juan +ilek-\~na nu guahu mal\"agu' gui +asudd\"a'-\~na.// +\gla Um-\"asudda' h\"am yan [ i taotao [ {\it O\/} ni si Juan +ilek-\~na nu guahu [ mal\"agu' gui [ asudd\"a'-\~na {\it +t\/} ] ] ] ] @ .// +\glb agr-meet we with the person Op Comp the Juan say-agr Obl me +agr.want he {\it WH\/}[obl].meet-agr// +\glft ``I met the person who Juan told me he wanted to +meet.''// +\endgl +\xe +\endframedisplay +\codedisplay~ +\ex +\begingl +\glpreamble Um-\"asudda' h\"am yan i taotao ni si Juan + ilek-\~na nu guahu mal\"agu' gui asudd\"a'-\~na.// +\gla Um-\"asudda' h\"am yan [ i taotao [ {\it O\/} ni si Juan + ilek-\~na nu guahu [ mal\"agu' gui [ asudd\"a'-\~na {\it + t\/} ] ] ] ] @ .// +\glb agr-meet we with the person Op Comp the Juan say-agr Obl me + agr.want he {\it WH\/}[obl].meet-agr// +\glft ``I met the person who Juan told me he wanted to + meet.''// +\endgl +\xe +|endcodedisplay + +Glosses (|\begingl| \dots\ |\endgl|) have up to three +parts. First, an optional preamble (|\glpreamble| \dots\ |//|). +Second, an interlinear gloss, which is also optional provided there is +a preamble.\footnote{% +Contrary to first impressions, there are good reasons to allow the +interlinear gloss to be omitted in certain situations.} Third, a free +translation (|\glft| \dots\ |//|), which can be omitted if there is an +interlinear gloss. They are illustrated below, which repeats (\lastx) +with a narrower hsize. + +\begingroup +\input pstricks-add +\ex +\def\TOP{\pnode(3.4in,1.5ex)}% +\def\BOT{\pnode(0,-.5ex)}% +\begingl[glwidth=3.2in] +\glpreamble \TOP{A1}Um-\"asudda' h\"am yan i taotao ni si Juan +ilek-\~na nu guahu mal\"agu' gui +asudd\"a'-\~na.\BOT{B1}// +\gla \TOP{A2}Um-\"asudda' h\"am yan [ i taotao [ {\it O\/} ni si Juan +ilek-\~na nu guahu [ mal\"agu' gui [ asudd\"a'-\~na {\it +t\/} ] ] ] ] @ .// +\glb agr-meet we with the person Op Comp the Juan say-agr Obl me +agr.want he {\it WH\/}[obl].meet-agr\BOT{B2}// +\glft \TOP{A3}``I met the person who Juan told me he wanted to +meet.''\BOT{B3}// +\endgl +\SpecialCoor +\psbrace[ref=lC](A1|B1)(A1){ preamble} +\psbrace[ref=lC](A1|B2)(A2){ interlinear gloss} +\psbrace[ref=lC](A1|B3)(A3){ free translation} +\xe +\endgroup + +The interlinear gloss consists of a sequence of lines of the form +$$\hbox{|\gl|{\it levelname\/} \dots\ |//|}$$ +where {\it levelname\/} is |a|, |b|, or |c|.\footnote{% +This will be extended later to allow the user to define new level +names.} There must be one and only one |\gla| line, which must come +first in the interlinear gloss. |\glb| and |\glc| lines can come in +any order and can be repeated arbitrarily. + +The material delineated by |\gl|{\it levelname\/} and |//| is parsed +as a sequence of space separated items. The parser only looks for +spaces at the top-level. Consequently, in (\blastx), for example, it +is not sensitive to the space in items like |the-{\sc acc}| since the +space is inside a group, therefore not at the top level. Spaces that +directly precede terminating |//| are disregarded. A line in the +interlinear gloss can have fewer items on it than the line above it. It +acts as if it ended with empty |{}| items. But {\it no line in the +interlinear gloss can have more items than the line above it}. If +there are ``excess'' items on a line, they will act as if they are on +the higher line (recursively). + +\subsection Parameters + +\def\\#1{\noalign{\smallskip}\quad #1\cr}% +\hrule +\medskip +\parinventory +\\{Horizontal spacing\hidewidth} +\quad & \idx{|glspace|\user}& \inc dimension& \textdim{1 em}\cr +\\{Font changes, struts, etc.\hidewidth} +& \idx{|everygl|}& token list& |{}|\cr +& \idx{|everyglpreamble|}& token list& |{}|\cr +& \idx{|everygla|}& token list& |\it|\cr +& \idx{|everyglb|}& token list& |{}|\cr +& \idx{|everyglc|}& token list& |{}|\cr +& \idx{|everyglft|}& token list& |{}|\cr +\\{Vertical spacing\hidewidth} +& \idx{|belowglpreambleskip|\user}& (!)dimension& \textdim{1 ex}\cr +& \idx{|aboveglbskip|\user}& (!)dimension& \textdim{0 pt}\cr +& \idx{|aboveglcskip|\user}& (!)dimension& \textdim{0 pt}\cr +& \idx{|aboveglftskip|\user}& (!)dimension& \textdim{1 ex}\cr +\endparinventory +\vskip-1ex +\hrule +\medskip + +Suppose for example that rather than the gloss in (\getref{wapm}) the +following style is desired. + +\framedisplay +\ex +\begingl[glspace=2em] +\gla[everygla=] k- wapm -a -s'i -m -wapunin -uk // +\glb[everyglb=\sc,aboveglbskip=-.4ex] + cl v agr neg agr tns agr // +\glb 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} // +\glft[everyglft=\it,aboveglftskip=0pt] `you (pl) didn't see them'// +\endgl +\xe +\endframedisplay +There are several differences with (\getref{wapm}). The words are +more widely separated; the font in the |\gla| line is not italic; the +font in the free translation is italic; the first |\glb| line is set +in a smaller font and is moved up closer to the |\gla| line; and there +is no extra vertical skip between the free translation and the last +line of the interlinear gloss, as there is in (\getref{wapm}). + +Here is one way to write the code: + +\codedisplay +\ex +\begingl[glspace=2em] +\gla[everygla=] k- wapm -a -s'i -m -wapunin -uk // +\glb[everyglb=\sc,aboveglbskip=-.4ex] + cl v agr neg agr tns agr // +\glb 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} // +\glft[everyglft=\it,aboveglftskip=0pt] `you (pl) didn't see them'// +\endgl +\xe +|endcodedisplay + +Here is an alternative which produces the same output. It has the +advantage that all of the parameter settings are gathered in one +place, making it easier to modify. + +\codedisplay +\ex +\begingl[glspace=2em,everygla=,everyglb=\sc, + aboveglbskip=-.4ex,everyglft=\it,aboveglftskip=0pt] +\gla k- wapm -a -s'i -m -wapunin -uk // +\glb cl v agr neg agr tns agr // +\glc 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} // +\glft `you (pl) didn't see them'// +\endgl +\xe +|endcodedisplay + +If you use multiple instances of the same gloss format, a style should +be defined + +\codedisplay +\definelingstyle{Potawatami}{glspace=2em,everygla=,everyglb=\sc, + aboveglbskip=-.4ex,everyglft=\it,aboveglftskip=0pt} +|endcodedisplay + +Then, typesetting a gloss in that style is done simply. + +\codedisplay +\ex +\begingl[lingstyle=Potawatami] +\gla k- wapm -a -s'i -m -wapunin -uk // +\glb Ccl V Agr Neg Agr Tns Agr // +\glc 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} // +\glft `you (pl) didn't see them'// +\endgl +\xe +|endcodedisplay + +If you want a sequence of glosses to all be done in this style, you can say: + +\def\goop{\quad $\vdots$} +\codedisplay +\begingroup +\lingset{lingstyle=Potawatami} +|goop +\endgroup +|endcodedisplay + +\subsection The width of the gloss + +In the wrap style (the only gloss style currently implemented), +the gloss is built in a vbox whose width is determined implicitly +if the parameter |glwidth| is set to \textdim{0 pt}. The width is +$h-l-r$, where $h$, $l$, and $r$, are the current values of +|\hsize|, |\leftskip|, and |\rightskip|, respectively. This +implicit determination of the width of the gloss is appropriate +for use with the \ExPex\ macros which typeset examples because +they adjust the leftskip appropriately inside examples. + +If you want to supply an example number or explicit label, it will not +work to say something like the following if |glwidth| is set to +\textdim{0 pt}. + +\def\goop{\dots\ } +\codedisplay +[A]\quad \begingl |goop \endgl +|endcodedisplay +% +The vbox built by the gloss macro will not fit on the same line with +the [A]. + +You must say: + +\def\temp{\dots } +\codedisplay +\ex[exno=A,exnoformat={[X]}] \begingl |temp \endgl +|endcodedisplay +The braces around |[A]| are needed to so that the optional argument +is correctly delineated. For example: + +\framedisplay +\ex[exno={(6), p. 14},exnoformat={[X]}] +\begingl +\gla Mary$_i$ ist sicher, dass es den Hans nicht st\"oren w\"urde +seiner Freundin ihr$_i$ Herz auszusch\"utten.// +\glb Mary is sure that it the-{\sc acc} Hans not annoy would +his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} heart-{\sc acc} {out to +throw}// +\endgl +\xe +\endframedisplay +\codedisplay~ +\ex[exno={(6), p. 14},exnoformat={[X]}] +\begingl +\gla Mary$_i$ ist sicher, dass es den Hans nicht st\"oren w\"urde +seiner Freundin ihr$_i$ Herz auszusch\"utten.// +\glb Mary is sure that it the-{\sc acc} Hans not annoy would +his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} heart-{\sc acc} {out to +throw}// +\endgl +\xe +|endcodedisplay + +If the parameter |glwidth| is set to a nonzero dimension, the width of +the vbox that the gloss is constructed in is the specified dimension. + +The following example illustrates the usefulness of the explicit +width option. + +\ex[glwidth=2.6in]<sicher2> +a.\quad +\begingl +\gla Mary$_i$ ist sicher, dass es den Hans nicht st\"oren w\"urde +seiner Freundin ihr$_i$ Herz auszusch\"utten.// +\glb Mary is sure that it the-{\sc acc} Hans not annoy would +his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} heart-{\sc acc} {out to +throw}// +\glft `Mary is sure that it would not annoy John to reveal her +heart to his girlfriend.'// +\endgl +\hfil +b.\quad +\begingl +\gla Mary$_i$ ist sicher, dass seiner Freunden ihr$_i$ Herz +auszuch\"utten dem Hans nicht schaden w\"urde.// +\glb Mary is sure that his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} +heart-{\sc acc} {out to throw} the-{\sc dat} Hans not damage would// +\glft `Mary is sure that to reveal her heart to his girlfriend +would not damage John.'// +\endgl +\xe + +\codedisplay~ +\ex[glwidth=2.6in] +a.\quad +\begingl +\gla Mary$_i$ ist sicher, dass es den Hans nicht st\"oren w\"urde +seiner Freundin ihr$_i$ Herz auszusch\"utten.// +\glb Mary is sure that it the-{\sc acc} Hans not annoy would +his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} heart-{\sc acc} {out to +throw}// +|exbreak\glft `Mary is sure that it would not annoy John to reveal her +heart to his girlfriend.'// +\endgl +\hfil +b.\quad +\begingl +\gla Mary$_i$ ist sicher, dass seiner Freunden ihr$_i$ Herz +auszuch\"utten dem Hans nicht schaden w\"urde.// +\glb Mary is sure that his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} +heart-{\sc acc} {out to throw} the-{\sc dat} Hans not damage would// +\glft `Mary is sure that to reveal her heart to his girlfriend +would not damage John.'// +\endgl +\xe +|endcodedisplay + + +\subsection Comments and citations + +\begininventory +\macros +\idx{|\trailingcitation|}, \idx{|\rightcomment|}\endmc +\parameters* +|mincitesep|& dimension& \hfil \textdim{1.5 em}\cr +\endinventory + +The following illustrates two different ways to append a comment or +citation to a gloss. + +\framedisplay +\ex +\begingl +\gla \rightcomment{[Potawatami]}k- wapm -a -s'i -m -wapunin -uk // +\glb \rightcomment{category}Cl V Agr$_1$ Neg Agr$_2$ Tns Agr$_3$// +\glb 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} // +\glft `you (pl) didn't see them'\trailingcitation{(Hockett 1948, + p. 143)}// +\endgl +\xe +\endframedisplay +\codedisplay~ +\ex +\begingl +\gla \rightcomment{[Potawatami]}k- wapm -a -s'i -m -wapunin -uk // +\glb \rightcomment{category}Cl V Agr$_1$ Neg Agr$_2$ Tns Agr$_3$// +\glb 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} // +\glft `you (pl) didn't see them'\trailingcitation{(Hockett 1948, + p. 143)}// +\endgl +\xe +|endcodedisplay +|\trailingcitation| will put the citation on the same line as the last +line of the free translation if there is enough room for it, otherwise at the +end of the following line. The parameter |mincitesep| determines the +minimum whitespace between the end of the free translation and the +citation that is tolerated; the default is \textdim{1.5 em}. + +|\rightcomment{|\dots|}| must come first in the first item on the +line. The macro is very primitive. It does not +consider the width of the citation or the amount of whitespace at +the right of the gloss. The citation will overlap the gloss if +there is not room for it at the right. For example, if the gloss +(\lastx) is attempted with an hsize of \textdim{3.5 in} and +|glspace=.5em|, the result is (\nextx). + +\framedisplay +\hsize=3.5in +\ex +\rightcomment{[Potawatami]} +\begingl +\gla k- wapm -a -s'i -m -wapunin -uk // +\glb \rightcomment{category}Cl V Agr$_1$ Neg Agr$_2$ Tns Agr$_3$// +\glb 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} // +\glft `you (pl) didn't see them'\trailingcitation{(Hockett 1948, + p. 143)}// +\endgl +\xe +\endframedisplay + +In spite of its limitations, |\rightcomment| is occasionally +quite useful. + +\subsection Exceptional {\tt \char"5C gla} items + +Items on the |\gla| line are generally associated with items on +the other lines of the interlinear gloss. There are however a +few items, called here {\it exceptional items}, which are +interpreted in an exceptional fashion. There are four exceptional +items, all consisting of a single character: |+|, |@|, |[|, and +|]|. + +\subsubsection {\tt +} + +\sidx{|+|, exceptional gloss item}% +Sometimes it is desirable to override natural wrapping and +break up the gloss so that the syntax is emphasized, as in the +following. + +\framedisplay +\ex +\begingl +\gla Mary$_i$ ist sicher, + dass es den Hans nicht st\"oren w\"urde ++ seiner Freundin ihr$_i$ Herz auszusch\"utten.// +\glb Mary is sure that it the-{\sc acc} Hans not annoy would +his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} heart-{\sc acc} {out to +throw}// +\glft `Mary is sure that it would not annoy John to reveal her +heart to his girlfriend.'// +\endgl +\xe +\endframedisplay + +\bigskip +This is accomplished by inserting `|+|' appropriately, as shown in the +code below. When |+| is encountered, the line is broken and a new +line started, ignoring any hanging indentation. + +\codedisplay +\ex\begingl +\gla Mary$_i$ ist sicher, + dass es den Hans nicht st\"oren w\"urde ++ seiner Freundin ihr$_i$ Herz auszusch\"utten.// +\glb Mary is sure that it the-{\sc acc} Hans not annoy would +his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} heart-{\sc acc} {out to +throw}// +|exbreak +\glft `Mary is sure that it would not annoy John to reveal her +heart to his girlfriend.'// +\endgl +\xe +|endcodedisplay + +\subsubsection {\tt @} + +\sidx{|@|, exceptional gloss item}% +Sometimes it is desirable to omit the space between two entries. + +\framedisplay +\ex<wiye> +\begingl +\gla wiye kepi e- @ ca// +\glb two whitemen {\sc 1p:3d}- found// +\endgl +\xe +\endframedisplay + +This is accomplished by inserting `|@|' appropriately, as shown +in the code below. + +\codedisplay +\ex +\begingl +\gla wiye kepi e- @ ca// +\glb two whitemen {\sc 1p:3d}- found// +\endgl +\xe +|endcodedisplay +In the unlikely event that you need an entry which +would normally be entered as |@|, enter it as |{{@}}| +so that it is not interpreted as a directive to omit a space. +(\getref{@period}) below shows another use for the |@| diacritic. + +\exbreak +\subsubsection {\tt [} and {\tt ]}: Bracketing in glosses + +\sidx{|[|, exceptional gloss item}% +\sidx{|]|, exceptional gloss item}% +\begininventory +\macros \idx{|\printlbrack|}, \idx{|\printrbrack|}\endmc +\parameters +\idx{|glbrackbracksep|\user}& dimension& \hfil \textdim{.05 em}\cr +\idx{|glbrackwordsep|\user}& dimension& \hfil \textdim{.1 em}\cr +\endinventory +% +Suppose you want to produce a gloss display like the one below. + +\framedisplay +\pex[everygla=,glhangstyle=normal]<@period> +\a +\begingl +\gla Fa'nu'i yu' ni [ [ {\it O} t{\it in\/}aitai-mu {\it t\/} ] na +lepblu ] @ .// +\glb show me Obl Op {\it WH\/}[obj].read-agr {} L book// +\glft ``Show me the book that you read.''// +\endgl +\a \begingl +\gla Um-\"asudda' h\"am yan [ i taotao [ {\it O\/} ni si Juan +ilek-\~na nu guahu [ mal\"agu' gui [ asudd\"a'-\~na {\it +t\/} ] ] ] ] @ .// +\glb agr-meet we with the person Op Comp the Juan say-agr Obl me +agr.want he {\it WH\/}[obl].meet-agr// +\glft ``I met the person who Juan told me he wanted to meet.''// +\endgl +\xe +\endframedisplay +\noindent The brackets are not glossed; there is a little extra space +between brackets; and there is a little extra space between words and +brackets. + +(\lastx) is produced by: + +\codedisplay +\pex[everygla=] +\a \begingl +\gla Fa'nu'i yu' ni [ [ {\it O} t{\it in\/}aitai-mu {\it t\/} ] na +lepblu ] @ .// +\glb show me Obl Op {\it WH\/}[obj].read-agr {} L book// +\glft ``Show me the book that you read.''// +\endgl +\a \begingl +\gla Um-\"asudda' h\"am yan [ i taotao [ {\it O\/} ni si Juan +ilek-\~na nu guahu [ mal\"agu' gui [ asudd\"a'-\~na {\it +t\/} ] ] ] ] @ .// +\glb agr-meet we with the person Op Comp the Juan say-agr Obl me +agr.want he {\it WH\/}[obl].meet-agr// +\glft ``I met the person who Juan told me he wanted to meet.''// +\endgl +\xe +|endcodedisplay + +\noindent |@| is used in the gla-line to eliminate an unwanted +space before the period. + +\ExPex\ uses the macros |\printrbrack| and +|\printlbrack| to typeset the brackets. The definitions of +these macros could be changed to cause [ and ] in glosses to +insert something other than simple brackets. + + +\everymath={} +\lingset{glwidth=2.4in,everygl=,glhangstyle=none} +\psset{framesep=1ex} + + +\def\minigloss#1#2{\outlinebox{% + \vtop{\halign{\ministrut ##\hfil\cr #1\cr #2\cr}}}\hskip1pt}% +\let\ministrut=\relax +\def\miniglossbare#1#2{\vtop{\halign{##\hfil\cr + #1\cr #2\cr}}} +\psset{linewidth=.4pt} +\def\outlinebox{\psframebox[framesep=0,boxsep=false,linewidth=.4pt]} + +\subsection Line spacing in wrapped glosses + +\subsubsection Changes from version 4.0 + +\begininventory +\parameters* +\idx{|abovemoreglskip|}\user& (!)skip& \hfil \textdim{1 ex}& now obsolete\cr +\endinventory + +\noindent +Executing the macro |\gloldstyle| will return \ExPex\ to a state in +which glosses written using version 4.0 should display as they +did using version 4.0. The parameter |abovemoreglskip| which +was used to control wrap spacing in glosses is still recognized, +but it is now considered obsolete and should be avoided in future +work. + +\subsubsection Simple control + +\begininventory +\parameters* +\idx{|autoglskip|}& boolean& \hfil true\cr +\idx{|extraglskip|}\user& \inc skip& \hfil \textdim{0 pt}\cr +\endinventory + +\noindent In deciding on a gloss format, the main decision is +the value of what I call the {\it glskip}, as illustrated +below. + +\ex[textoffset=1in,dima=.5em]<Chung1> +\begingl[extraglskip=1.2ex] +\gla Ti ma'a'\~nao hao kumuentusi\pnode(\lingdima,0){B2} \pnode(-\lingdima,0){A1}ni h\'ayiyi ha'.// +\glb \pnode(-.5em,0){A2}not agr.afraid you +Infin.speak.to\pnode(\lingdima,0){B1} not anyone Emp// +\glft ``You're not afraid to talk to anyone.''// +\endgl +\pcline{|*-|*}(A2)(A1) +\pcline{<->}(A2)(A1) +\nbput[ref=r]{glskip\ } +\pcline{|*-|*}(B1|B2)(B1) +\pcline{<->}(B1|B2)(B1) +\naput[ref=l]{\ baselineskip} +\xe +Generally, the desired glskip is equal to the baselineskip or +equal to the baselineskip plus some specified increment. When I +have occasion to typeset glosses, I generally make the glskip +equal to the baselineskip plus \textdim{.6 ex}. The extra space, +although small, makes it much easier to parse the gloss visually. +The extra glskip in (\lastx) is \textdim{1.2 ex}. + +ExPex initializes the glossing algorithm so that it produces +glosses like~(\nextx). The glskip is equal to the baselineskip. +This is done in {\it expex.tex\/} by setting |autoglskip| to true +and |extraglskip| to \textdim{0 pt}. In adjusting the glskip, +struts are used. It is assumed that the strut height plus the +strut depth is equal to the baselineskip. Most users will never +reset |autoglskip|. The next section discusses vertical spacing +when |autoglskip| is set to false. (|glwidth| is set to +\textdim{2.4 in} in all of the examples in this section in the +interests of ``economy of space''.) + +\setss .52 .48 + +\beginss +\ex +\begingl +\gla Ti ma'a'\~nao hao kumuentusi + ni h\'ayiyi ha'.// +\glb not agr.afraid you + Infin.speak.to not anyone Emp// +\endgl +\xe|midss +\ex<Ti> +\begingl +\gla Ti ma'a'\~nao hao kumuentusi ni h\'ayiyi ha'.// +\glb not agr.afraid you Infin.speak.to not anyone Emp// +\endgl +\xe +\endss + +It is easy to produce glosses like (\nextx) by adjusting the +parameter |extraglskip|. In (\nextx), the glskip is \textdim{1.2 +ex} larger than the baselineskip. + +\beginss +\ex +\begingl[extraglskip=1.2ex] +\gla Ti ma'a'\~nao hao kumuentusi + ni h\'ayiyi ha'.// +\glb not agr.afraid you + Infin.speak.to not anyone Emp// +\endgl +\xe|midss +\ex +\begingl[extraglskip=1.2ex] +\gla Ti ma'a'\~nao hao kumuentusi ni h\'ayiyi ha'.// +\glb not agr.afraid you Infin.speak.to not anyone Emp// +\endgl +\xe +\endss + +If |extraglskip| is expressed in font dependent units, the format +for glosses will not need adjustment for glosses in footnotes +which are set in smaller type with tighter baselines. This +assumes that the footnote environment adjusts the strut size +appropriately, as it should, with the height plus depth of struts +made equal to the baselineskip. The text in (\nextx) is set in a +\textdim{12 pt} font with \textdim{14 pt} baselines. Struts are +\textdim{10 pt} high and 4pt deep. |\fnenvironment| switches to a +\textdim{10 pt} font with \textdim{12 pt} baselines, with struts +that are 8.5pt high and 3.5pt deep. + +\lingset{autoglskip=true} + +\beginss +\ex +\begingl[extraglskip=1ex] +\gla Ti ma'a'\~nao hao kumuentusi + ni h\'ayiyi ha'.// +\glb not agr.afraid you + Infin.speak.to not anyone Emp// +\endgl +\xe|midss +\ex +\begingl[extraglskip=1ex] +\gla Ti ma'a'\~nao hao kumuentusi ni h\'ayiyi ha'.// +\glb not agr.afraid you Infin.speak.to not anyone Emp// +\endgl +\xe +\endss +\vskip-2ex + +\beginss +\fnenvironment +\ex +\begingl[extraglskip=1ex] +\gla Ti ma'a'\~nao hao kumuentusi + ni h\'ayiyi ha'.// +\glb not agr.afraid you + Infin.speak.to not anyone Emp// +\endgl +\xe|midss +\lingset{autoglskip=true,extraglskip=1ex} +\baselineskip=12pt +\setbox\strutbox=\hbox{\vrule height 8.5pt depth 3.5pt width 0pt} +\footnotesize +\ex +\begingl[extraglskip=1ex] +\gla Ti ma'a'\~nao hao kumuentusi ni h\'ayiyi ha'.// +\glb not agr.afraid you Infin.speak.to not anyone Emp// +\endgl +\xe +\endss + +Most users will never need to know more about glossing than that +provided in this section. But some, at some point, might face +some unusual situation requiring more control over the line +spacing than the control which |extraglskip| allows. The +next section is for such users only. + +\subsubsection The techonology behind vertical spacing in glosses + +\begininventory +\parameters +\idx{|gllineskip|}\user & \inc skip& \hfil\textdim{1 ex}\cr +\idx{|glstruts|}& boolean& \hfil true\cr +\endinventory + + + +\noindent Wrapping is carried out by first forming a sequence of +boxes, as in (\nextx) and then feeding this sequence to Tex's +apparatus for breaking paragraphs into lines and stacking +sequences of lines into pages. The baseline of these boxes is +the baseline of the top line. As far as Tex is concerned, the +sequence of boxes is a sequence of words; a paragraph. We use +(\getref{Ti}) as an illustration. If struts are inserted before +every word of every box, we get (\nextx b), otherwise (\nextx a). +Generally, struts are inserted because this gives much better +control of the line spacing. + +\pex[nopreamble,interpartskip=3ex]<seq> +\let\\=\minigloss +\spaceskip=\lingglspace +\a \\{Ti}{not}, \\{ma'a'\~nao}{agr.afraid}, \\{hao}{you}, +\\{kumuentusi}{Infin.speak.to}, \\{ni}{not}, \\{h\'ayiyi}{anyone}, +\\{ha'}{Emp} +\let\ministrut=\strut +\a \\{Ti}{not}, \\{ma'a'\~nao}{agr.afraid}, \\{hao}{you}, +\\{kumuentusi}{Infin.speak.to}, \\{ni}{not}, \\{h\'ayiyi}{anyone}, +\\{ha'}{Emp} +\xe +The boxes will be called {\it glwords}. + +Suppose we feed (\lastx b), for example, to Tex's page formation +machinery. The outcome, will depend on many Tex parameters. Of +particular interest for the line spacing are |\baselineskip| and +|\lineskip|. |\lineskiplimit| is set to \textdim{0 pt} in +glosses. There are nested environments; one governing stacking +words into glwords, the other governing stacking lines of +glwords. Call these the interior and exterior environments. If +we consider (\nextx), for example, note that the dimension of +most interest, the vertical spacing between the {\it b\/} and +{\it c\/} lines is not a distance between baselines in either the +interior or exterior environments. When glwords are built, the +baseline spacing is between the {\it a\/} and {\it b\/} lines +(the {c-d\/} spacing is the same). When the glwords are formed +into a paragraph, the baseline spacing is between the {\it a\/} +and {\it c\/} lines. Line {\it a\/} is the baseline of the top +row of glwords and line {\it c\/} is the baseline of bottom row. + +\ex[linestyle=dotted,linewidth=1pt] +\begingl[extraglskip=1ex] +\gla \pnode{A1}Ti ma'a'\~nao hao kumuentusi\pnode{B1} ni h\'ayiyi +ha'.\pnode{B3}// +\glb not agr.afraid you Infin.speak.to\pnode(1em,0){B2} not anyone +Emp\pnode{B4}// +\endgl +\pcline(A1|B1)(B2|B1) +\pcline(A1|B2)(B2|B2) +\pcline(A1|B3)(B2|B3) +\pcline(A1|B4)(B2|B4) +\rput(B2|B1){\pnode(1em,0){C1}} +\rput(C1){\tenit a} +\rput(C1|B2){\tenit b} +\rput(C1|B3){\tenit c} +\rput(C1|B4){\tenit d} +\xe +A desired value for the {\it b-c\/} line spacing must be achieved +indirectly. + +ExPex leaves both the baselineskip in the exterior environment +the same as it is inside the glwords. This means that the +baselineskip will have no effect when the paragraph (\lastx a) or +(\lastx b) is typeset because the glwords are deeper than the +baselineskip. \ExPex\ adjusts the |\lineskip| in the exterior +environment to achieve the desired {\it b-c\/} line spacing; that +is, to achieve the desired glskip. + +(\nextx) illustrates the relation between |\lineskip| and the +glskip, assuming that strut insertion has taken place. + +\ex[textoffset=.8in,aboveexskip=!1ex] +\def\outlinebox{\psframebox[framesep=0,boxsep=false,linewidth=.15pt]} +\let\\=\minigloss +\let\ministrut=\strut +\psscalebox{2}{\vtop{\leftskip=0pt \raggedright \hsize=2.4in +\lineskip=2ex +\leavevmode +\\{\pnode{Y1}Ti}{\pnode{Y3}not}\ +\\{ma'a'\~nao}{agr.\pnode(0,-\dp\strutbox){A1}afraid}\ +\\{hao}{you}\ +\\{kumuentusi}{Infin.speak.to}\ +\\{\pnode(-.2em,0){Y2}ni}{not}\ +\\{h\'ayiyi\pnode(0,\ht\strutbox){A2}}{anyone}\ +\\{ha'}{Emp}% +}} +\pcline[linewidth=1pt]{<->}(A1)(A1|A2) +\naput[ref=l]{lineskip} +\pcline[linewidth=1pt]{<->}(Y2|Y3)(Y2|Y2) +\pcline[linewidth=1pt]{|*-|*}(Y2|Y3)(Y2|Y2) +\nbput[ref=r]{glskip} +\xe + +If autoglskip is turned on, |\lineskip| is adjusted so that the +glskip is equal to the baselineskip plus the value of +|extraglskip|. If $|\baselineskip|=b$, $|\dp\strutbox|=d$, +$|\ht\strutbox|=h$, and $|extraglskip|=e$, then |\lineskip| +is set to $b+e-d-h$. + +If |autoglskip| is turned off, struts are inserted only if +|glstruts| is turned on; |\lineskip| is made equal to +|gllineskip|. With |glstruts| turned off, the glskip will depend +on |gllineskip|, the depth of the deepest character on the bottom +row of the top line of glwords, and the height of the tallest +character on the top row of the bottom line of glwords. + +%\def\showchar#1{\setbox0=\hbox{#1}\writeln{#1: \the\ht0, \the\dp0}} +%\showchar{g} +%\showchar{p} +%\showchar{y} +%\showchar{\it h} +%\showchar{\it \'a} +%\showchar{\it '} +%\showchar{\it i} + +The above will be clearer if you do the following exercise: +Calculate the glskip in the 3~examples below. The font is +\textdim{12 pt} with struts that are \textdim{10 pt} high and +\textdim{4 pt} deep. The baselineskip is \textdim{18 pt}. Roman +g, y, and p are all \textdim{2.60 pt} deep; italic h, italic ', +and italic i are all \textdim{7.96 pt} tall; and italic \'a is +\textdim{7.93 pt} tall. + +\beginss +\ex +\begingl[autoglskip=true, + extraglskip=4pt] +\gla Ti ma'a'\~nao hao kumuentusi + ni h\'ayiyi ha'.// +\glb not agr.afraid you + Infin.speak.to not anyone Emp// +\endgl +\xe|midss +\ex +\baselineskip=18pt +\begingl[autoglskip=true,extraglskip=4pt] +\gla Ti ma'a'\~nao hao kumuentusi ni h\'ayiyi ha'.// +\glb not agr.afraid you Infin.speak.to not anyone Emp// +\endgl +\xe +\endss + +\beginss +\ex +\begingl[autoglskip=false, + glstruts=true,gllineskip=8pt] +\gla Ti ma'a'\~nao hao kumuentusi + ni h\'ayiyi ha'.// +\glb not agr.afraid you + Infin.speak.to not anyone Emp// +\endgl +\xe|midss +\ex +\baselineskip=18pt +\begingl[autoglskip=false,glstruts=true,gllineskip=8pt] +\gla Ti ma'a'\~nao hao kumuentusi ni h\'ayiyi ha'.// +\glb not agr.afraid you Infin.speak.to not anyone Emp// +\endgl +\xe +\endss + +\def\goop{$\,^{\the\fnno}$} +\beginss +\ex +\begingl[autoglskip=false, + glstruts=false,gllineskip=8pt] +\gla Ti ma'a'\~nao hao kumuentusi + ni h\'ayiyi ha'.// +\glb not agr.afraid you + Infin.speak.to not anyone Emp// +\endgl +\xe|putfnno|midss +\ex +\baselineskip=18pt +\begingl[autoglskip=false,glstruts=false,gllineskip=8pt] +\gla Ti ma'a'\~nao hao kumuentusi ni h\'ayiyi ha'.// +\glb not agr.afraid you Infin.speak.to not anyone Emp// +\endgl +\xe +\endss +\footnotebody{\hbox{\rput[tr]{180}{Answers: \textdim{22 pt}, \textdim{22 pt}, +and \textdim{18.56 pt}}} +} + +\subsubsection How to avoid overfull boxes in glosses + +\begininventory +\parameters +\idx{|glspace|}& skip& \textdim{.5 em} plus \textdim{.4 em} minus + \textdim{.15 em}\hfil\cr +\idx{|glrightskip|}& skip& 0\dimskip pt plus .1|\hsize|\hfil \cr +\endinventory +% +Hopefully, you will never encounter the problem which the +parameterization in this section is designed to solve, the +``overfull line'' error message. The default setting puts +\textdim{.5 em} of glue between the glwords on a line, plus +\textdim{.4 em} of stretchability and \textdim{.15 em} of +shrinkage. The interglword spacing on a line can therefore vary +from \textdim{.35 em} up to \textdim{.9 em} to accommodate the +needs of the Tex linebreaking algorithm.\footnote{% +This is a much larger range than is typical in running text, but +it is appropriate in glosses, which typically have many large +whitespace gaps on one line or the other.} +Further, the default settings allow up to 10\% of the hsize of +whitespace to appear at the end of the line of glwords. The +possible extra space at the right edge and +stretchability/shrinkability of the space between glwords means +that line breaking in glosses will rarely encounter problems with +overfull lines. + +In unusual cases, there may be a problem. Your publisher (or +you) may be particularly fussy and demand a particular spacing +and/or better right alignment in glosses. Or you might want to make a +unusually narrow gloss, which increases the chances that there +might not be enough flexibility in the spacing. + +If you do run into the problem of overfull lines in a gloss, two +parameters allow for a great deal of flexibility; |glspace| and +|glrightskip|. |glspace| is an incremental parameter, so you could say, +for example, |\lingset{glspace=!0pt plus .2em}|, increasing the +stretchability of the interglword space by \textdim{.2 em}. Or, +you might want to increase the stretchability of the rightskip +in a particular troublesome gloss to allow more whitespace at the +right edge. An acceptable solution will depend on your +particular typesetting aesthetics. Solving line breaking problems +is often troublesome and requires experimentation. + +\medskip +The Chamorro examples in (\getref{@period}) and (\getref{Chung1}) +are adapted from Sandy Chung's {\it The Design of Agreement}. See +(59a) on page 237, (82a) on page 247, and (59b) on page 97. The +Potawatami example (\getref{wapm}) is from Halle and Marantz's +``Distributed Morphology'' article. The German examples in +(\getref{sicher2}) are from an article by Idan Landau. The Kiowa +example (\getref{wiye}) was contributed by Daniel Harbour. + diff --git a/Master/texmf-dist/doc/generic/expex/source/10_Glosses-Advanced.tex b/Master/texmf-dist/doc/generic/expex/source/10_Glosses-Advanced.tex new file mode 100644 index 00000000000..37959810bcd --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/10_Glosses-Advanced.tex @@ -0,0 +1,378 @@ + +\section More on Glosses + +\vskip-2ex +\subsection User defined levels + +\begininventory +\macros* \idx{|\defineglwlevels|}\endmc +\endinventory +% +|\glb| and |\glc| are given definitions in {\it expex.tex\/} +by the command |\defineglwlevels{b,c}|. The command also creates the +parameters |everyglb|, |everyglc|, |aboveglbskip|, and |aboveglcskip|. +|everyglb| and |everyglc| are initialized to empty token lists and +|aboveglbskip| and |aboveglcskip| to \textdim{0 pt}. The user may want +to use |\defineglwlevels| to create and name new gloss +levels. + +For example, suppose more suggestive level names are +desired. + +\codedisplay +\defineglwlevels{cat,gloss} +\lingset{everyglcat=\footnotesize,aboveglcatskip=-.5ex}|exbreak + +\ex +\begingl +\gla k- wapm -a -s'i -m -wapunin -uk // +\glcat Cl V Agr Neg Agr Tns Agr //|par|allowbreak +\glgloss 2 see 3{\sc acc} {} {2\sc pl} preterit {3\sc pl} // +\glft `you (pl) didn't see them'// +\endgl +\xe +|endcodedisplay +produces + +\framedisplay +\defineglwlevels{cat,gloss} +\lingset{everyglcat=\footnotesize,aboveglcatskip=-.5ex} + +\ex +\begingl +\gla k- wapm -a -s'i -m -wapunin -uk // +\glcat Cl V Agr Neg Agr Tns Agr // +\glgloss 2 see {3\sc acc} {} {2\sc pl} preterit {3\sc pl} // +\glft `you (pl) didn't see them'// +\endgl +\xe +\endframedisplay + +Another instance in which the user might want to define a new gloss level +or levels is if more than 3 lines of interlinear gloss are needed and +the desired flexibility cannot be obtained by repeated use of |\glb| +or |\glc|. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\subsection Positioning the free translation to the right of the +interlinear gloss + +\begininventory +\parameters +\idx{|glftpos|}& choice (|below| or |right|)& |below|\cr +\idx{|sssep|}& dimension& 3\dimskip em\cr +\idx{|ssratio|}& decimal& |.6 |\cr +\idx{|ssrightskip|}& skip& 0\dimskip pt plus 2\dimskip em\cr +\idx{|glhangstyle|}& |normal|, |none|, or |cascade|& |normal|\cr +\endinventory + +\lingset{everygl=\openup.5ex, + everyglword=\normalbaselines,everyglft=\normalbaselines, + glhangindent=2em} + +\framedisplay +\ex[glftpos=right,glhangstyle=none] +\let\\=\textsc +\begingl +\gla +Hom\^{a}o sa \v{c}\^{o} p\^{o} tha \~{n}u nao ng\u{a} hmua. \~{N}u +dj\u{a} g\u{a}, \~{n}u dj\u{a} \v{c}\u{o}ng \~{n}u, laih gui r\^{e}o +\~{n}u. Todang bboi r\^{o}k jolan \~{n}u nao hma, \~{n}u bb\^{o}h sa +droi mr\u{a} d\u{o} bboi gah, a, hruh \~{n}u.// +\glb +\\{exist} one \\{clf} person old \\{3s} go do field \\{3s} hold +machete \\{3s} hold hoe \\{3s} and carry.on.back back.basket \\{3s} +while at along trail \\{3s} go field \\{3s} see one \\{clf} peacock +stay at \\{drct} -- nest \\{3s}// +\glft +`There was an old person who went to work in the field. He took +along his machete, he took along his hoe, and he carried his +basket on his back. While he was on his way to the farm, he saw a +peacock beside its nest.'// +\endgl +\xe +\endframedisplay + +\noindent is achieved by +\codedisplay~ +\ex[glftpos=right,glhangstyle=none] +\let\\=\textsc +\begingl +\gla +Hom\^{a}o sa \v{c}\^{o} p\^{o} tha \~{n}u nao ng\u{a} hmua. \~{N}u +dj\u{a} g\u{a}, \~{n}u dj\u{a} \v{c}\u{o}ng \~{n}u, laih gui r\^{e}o +\~{n}u. Todang bboi r\^{o}k jolan \~{n}u nao hma, \~{n}u bb\^{o}h sa +droi mr\u{a} d\u{o} bboi gah, a, hruh \~{n}u.// +\glb +\\{exist} one \\{clf} person old \\{3s} go do field \\{3s} hold +machete \\{3s} hold hoe \\{3s} and carry.on.back back.basket \\{3s} +while at along trail \\{3s} go field \\{3s} see one \\{clf} peacock +stay at \\{drct} -- nest \\{3s}// +\glft +`There was an old person who went to work in the field. He took +along his machete, he took along his hoe, and he carried his +basket on his back. While he was on his way to the farm, he saw a +peacock beside its nest.'// +\endgl +\xe +|endcodedisplay +(This example, as well as (\getref{panelex}), was contributed by +Joshua Jensen. It is from Jarai, an Austronesian language. The +story teller was Hyech Ksor. The orthography here is somewhat +simplified in order to keep the font requirements for the +examples in this documentation elementary.) + +|ss| stands for ``side-by-side''. |sssep| gives the separation of the +gloss and the free translation. |ssratio| gives the proportion of the +available width that the gloss occupies. The point of hanging +indentation is to visually separate the free translation and the +gloss, so |glhangstyle=none| is completely satisfactory if the +tree translation is on the right. But \ExPex\ will happily use +hanging indentation with the free translation on the right. + +Line breaking in the free translation is delicate because it will +generally set in a narrow column. The default setting of |ssrightskip| +allows up to \textdim{2 em} departure from right alignment. This usually avoids +overfull lines and awkward hyphenation. |ssrightskip| can be +increased (all the way to \textdim{0 pt} plus \textdim{1 fil}) if there is a +problem, at the cost of a more ragged appearance. This can be done +globally, or simply in troublesome examples. + +\subsection Glosses with a side panel + +\begininventory +\macros +\idx{|\beginglpanel[]|}, \idx{|\endpanel|}\endmc +\parameters* +\idx{|everypanel|\user}& token list& |{}|\cr +\endinventory +The mechanism for positioning the free translation to the right of the +interlinear gloss can be adapted to create a side panel for +glosses which can be used for other purposes, as illustrated +below. + +\framedisplay +\ex[everypanel=\footnotesize]<panelex> +\let\\=\textsc +\beginglpanel[ssratio=.5,glhangstyle=none] +\gla Hom\^{a}o$^1$ sa \v{c}\^{o} p\^{o} tha \~{n}u nao ng\u{a} +hmua. \~{N}u dj\u{a} g\u{a}, \~{n}u dj\u{a} \v{c}\u{o}ng \~{n}u, +laih gui r\^{e}o \~{n}u. Todang bboi r\^{o}k jolan \~{n}u nao +hma, \~{n}u bb\^{o}h sa droi mr\u{a} d\u{o}$\,^4$ bboi gah, a, hruh +\~{n}u.// +\glb \\{exist} one \\{clf} person old \\{3s} go$^2$ do field +\\{3s} hold machete \\{3s} hold hoe \\{3s} and$^3$ carry.on.back +back.basket \\{3s} while at along trail \\{3s} go field \\{3s} +see one \\{clf} peacock stay at \\{drct} -- nest \\{3s} +// +\endgl +1.\enspace {\it hom\^{a}o} also means `have', reflecting the +strong tendency across languages to use the same word for +possession and the existential. {\it hom\^{a}o} is clause-initial +in existential clauses, but it comes after the subject in +possession clauses. + +2.\enspace All verbs are glossed with a bare form, as Jarai has +no inflectional morphology. Although Jarai has lexical items that +encode tense, they are relatively infrequent in text. + +3.\enspace The word {\it laih} is literally `after; finish', but +that is clearly not the meaning here. Probably {\it laih} here is +an abbreviation for {\it laih an\u{u}n}, `after that; and', hence +the gloss `and'. + +4.\enspace {\it d\u{o}} `sit, stay' is used like a copula in +locative clauses, which is what I assume here (`a~peacock +[which was] beside its nest'); however, this could just as well +mean `a peacock sitting beside its nest', retaining the posture +semantics. +\endpanel +\bigskip +`There was an old person who went to work in the field. He took +along his machete, he took along his hoe, and he carried his +basket on his back. While he was on his way to the farm, he saw a +peacock beside its nest.' +\xe +\endframedisplay + +The syntax is: +\codedisplay +\beginglpanel |dots \endgl |dots \endpanel +|endcodedisplay +The first part is the gloss, with the usual syntax. The second +part is put in a vbox and set alongside the gloss. The tokens +|lingeverypanel| are inserted when the vbox begins. All of the +parameters which are special to positioning the free translation +to the right of the gloss apply here as well, with the obvious +meanings. + +The complete code for the example above is: + +\codedisplay +\ex[everypanel=\footnotesize]<panelex> +\def\\#1{{\footnotesize\uppercase{#1}}}% +\let\\=\textsc +\beginglpanel[ssratio=.5,glhangstyle=none] +\gla Hom\^{a}o$^1$ sa \v{c}\^{o} p\^{o} tha \~{n}u nao ng\u{a} +hmua. \~{N}u dj\u{a} g\u{a}, \~{n}u dj\u{a} \v{c}\u{o}ng \~{n}u, +laih gui r\^{e}o \~{n}u. Todang bboi r\^{o}k jolan \~{n}u nao +hma, \~{n}u bb\^{o}h sa droi mr\u{a} d\u{o}$\,^4$ bboi gah, a, hruh +\~{n}u.// +\glb \\{exist} one \\{clf} person old \\{3s} go$^2$ do field +\\{3s} hold machete \\{3s} hold hoe \\{3s} and$^3$ carry.on.back +back.basket \\{3s} while at along trail \\{3s} go field \\{3s} +see one \\{clf} peacock stay at \\{drct} -- nest \\{3s}// +\endgl +1.\enspace {\it hom\^{a}o} also means `have', reflecting the +strong tendency across languages to use the same word for +possession and the existential. {\it hom\^{a}o} is clause-initial +in existential clauses, but it comes after the subject in +possession clauses. + +2.\enspace All verbs are glossed with a bare form, as Jarai has +no inflectional morphology. Although Jarai has lexical items that +encode tense, they are relatively infrequent in text. + +3.\enspace The word {\it laih} is literally `after; finish', but +that is clearly not the meaning here. Probably {\it laih} here is +an abbreviation for {\it laih an\u{u}n}, `after that; and', hence +the gloss `and'. + +4.\enspace {\it d\u{o}} `sit, stay' is used like a copula in +locative clauses, which is what I assume here (`a~peacock [which +was] beside its nest'); however, this could just as well mean `a +peacock sitting beside its nest', retaining the posture +semantics. +\endpanel +\bigskip +`There was an old person who went to work in the field. He took +along his machete, he took along his hoe, and he carried his +basket on his back. While he was on his way to the farm, he saw a +peacock beside its nest.' +\xe +|endcodedisplay +Note that the free translation here comes after |\endpanel| and is +typeset the way any material inside an |\ex| construction is +typeset. This allows it to have full width, spanning both the +gloss and notes. It could have been part of the gloss, with a +different result. + +No support is given to side note numbering. It must be done ``by +hand''. If the construction turns out to be sufficiently useful +and hand numbering is sufficiently tedious, a more automatic +scheme might be possible. It would not be trivial, because the +order in which the notes appear inside the gloss before it is +typeset is not necessarily the same as the order in which they +appear after it is typeset. + +\subsection Cascading hanging indentation in glosses + +\raggedbottom +\lingset{glhangindent=.25in,everygl=\openup.5ex, + everyglword=\normalbaselines,everyglft=\normalbaselines, + abovemoreglskip=1ex} + +\lingset{glhangstyle=none} +\framedisplay +\ex[glhangstyle=cascade] +\let\\=\textsc +\begingl +\gla +Hom\^{a}o sa \v{c}\^{o} p\^{o} tha \~{n}u nao ng\u{a} hmua. \~{N}u +dj\u{a} g\u{a}, \~{n}u dj\u{a} \v{c}\u{o}ng \~{n}u, laih gui r\^{e}o +\~{n}u. Todang bboi r\^{o}k jolan \~{n}u nao hma, \~{n}u bb\^{o}h sa +droi mr\u{a} d\u{o} bboi gah, a, hruh \~{n}u.// +\glb +\\{exist} one \\{clf} person old \\{3s} go do field \\{3s} hold +machete \\{3s} hold hoe \\{3s} and carry.on.back back.basket \\{3s} +while at along trail \\{3s} go field \\{3s} see one \\{clf} peacock +stay at \\{drct} -- nest \\{3s}// +\glft +`There was an old person who went to work in the field. He took +along his machete, he took along his hoe, and he carried his +basket on his back. While he was on his way to the farm, he saw a +peacock beside its nest.'// +\endgl +\xe +\endframedisplay + +is achieved by +\codedisplay~ +\ex[glhangstyle=cascade] +\let\\=\textsc +\begingl +\gla +Hom\^{a}o sa \v{c}\^{o} p\^{o} tha \~{n}u nao ng\u{a} hmua. \~{N}u +dj\u{a} g\u{a}, \~{n}u dj\u{a} \v{c}\u{o}ng \~{n}u, laih gui r\^{e}o +\~{n}u. Todang bboi r\^{o}k jolan \~{n}u nao hma, \~{n}u bb\^{o}h sa +droi mr\u{a} d\u{o} bboi gah, a, hruh \~{n}u.// +\glb +\\{exist} one \\{clf} person old \\{3s} go do field \\{3s} hold +machete \\{3s} hold hoe \\{3s} and carry.on.back back.basket \\{3s} +while at along trail \\{3s} go field \\{3s} see one \\{clf} peacock +stay at \\{drct} -- nest \\{3s}// +\glft +`There was an old person who went to work in the field. He took +along his machete, he took along his hoe, and he carried his +basket on his back. While he was on his way to the farm, he saw a +peacock beside its nest.'// +\endgl +\xe +|endcodedisplay + +\subsection Gloss underfixes + +\begininventory +\macros* \idx{|\gluf|}\endmc +\parameters +\idx{|glufcloseup|}& dimension& \textdim{.4 ex}\cr +\idx{|everygluf|}& token list& |{}|\cr +\endinventory + +\noindent Sometimes, gloss displays like the following are +desired, with grammatical markings written below the gloss. + +\framedisplay +\ex[glhangstyle=normal,glufcloseup=.4ex,everygluf=\footnotesize] +\begingl +\gla Mary$_i$ ist sicher, dass es den Hans nicht st\"oren + w\"urde seiner Freundin ihr$_i$ Herz auszusch\"utten.// +\glb Mary is sure that it \gluf/the/ACC/ Hans not annoy would + \gluf/his/DAT/ \gluf/girlfriend/DAT/ \gluf/her/ACC/ + \gluf/heart/ACC/ {out to throw}// +\glft `Mary is sure that to reveal her heart to his girlfriend +would not damage John.'// +\endgl +\xe +\endframedisplay + +\ExPex\ provides the macro |\gluf| which can be used to +construct such a display. + +\codedisplay +\ex[glhangstyle=normal,glufcloseup=.4ex,everygluf=\footnotesize] +\begingl +\gla Mary$_i$ ist sicher, dass es den Hans nicht st\"oren + w\"urde seiner Freundin ihr$_i$ Herz auszusch\"utten.// +\glb Mary is sure that it \gluf/the/ACC/ Hans not annoy would + \gluf/his/DAT/ \gluf/girlfriend/DAT/ \gluf/her/ACC/ + \gluf/heart/ACC/ {out to throw}// +\glft `Mary is sure that to reveal her heart to his girlfriend +would not damage John.'// +\endgl +\xe +|endcodedisplay + +The grammatical markings are essentially ``underfixes'' (rather than +prefixes or suffixes), hence the name ``gluf'' (gl underfix). When the +underfix is typeset, the value of |everygluf| is first inserted. It +is provided so that the user has control of the font used to typeset +the underfixes. The value of |glufcloseup| determines how much the +baselineskip between the underfix and the underfixed word is closed +up. Without some closeup, the underfixes are not positioned close +enough to the glosses they modify (in my opinion). The macro |\gluf| +centers the underfix below the word it annotates. Its syntax should +be clear from the example above. + + diff --git a/Master/texmf-dist/doc/generic/expex/source/11_Refs.tex b/Master/texmf-dist/doc/generic/expex/source/11_Refs.tex new file mode 100644 index 00000000000..03d2aeecfac --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/11_Refs.tex @@ -0,0 +1,521 @@ + + +\ifnum\secno < 1 \secno=11 \excnt=34 \fi + +\section Referring to examples and labeled parts of examples + +\nobreak\vskip-2ex +\subsection*Unnamed reference + +\deftagsec{unnamedref} +\begininventory +\macros \idx{|\lastx|}, \idx{|\nextx|}, \idx{|\blastx|}, +\idx{|\anextx|}, \idx{|\bblastx|}\endmc +\endinventory + +\noindent If $x$ is the value of |\excnt|, these macros produce +$x-1$, $x$, $x-2$, $x+1$, $x-3$, respectively, expressed as an +either an arabic or roman numeral, depending on the setting of +|exnotype|. The example number counter is incremented early in +the expansion of |\ex| +and |\pex|, so if one of these macros is used inside an example, +``last example'' has the meaning ``current example number''. +Although |\excnt| is incremented early, it is incremented after +local parameters are set. Consequently, if +any of these macros is used in setting parameters in the optional +argument of |\ex| or |\pex|, it acts as if it were being +evaluated just before |\ex| or |\pex|. + +It is potentially dangerous to use macros like |\bblastx| or +|\anextx| for reference to an example because later additions or +deletions in the document can throw off the reference. This kind +of misreference is particularly easy to overlook in proofing a +document. It is better to assign names to the things you want to +refer to and to refer to them by name, particularly in a document +that will undergo a lot of rewriting. If reference by name is +used and an intervening example is deleted or added, no problem +arises. If the example which is referred to is deleted, then +\Tex\ will report a missing reference. + +\subsection Named reference + +\deftagsec{named-reference} +\begininventory +\macros \idx{|\deftag|}, \idx{|\deftagex|}, \idx{|\deftaglabel|}, + \idx{|\deftagpage|}, \idx{|\getref|}, + \idx{|\getfullref|}\endmc +\parameters* +\idx{|tag|}& character string& \hfil (none)\cr +\endinventory + +\noindent The core macros are \idx{|\deftag|} and +\idx{|\getref|}. |\deftag| takes two (obligatory) arguments. +After |\deftag{«reference»}{«tag»}| is executed, |\getref{«tag»}| +expands to {\sl reference}, where the value of the reference is +determined at the point the |\deftag| command was evaluated. +\idx{|\deftagex|}|{«tag»}| expands to +|\deftag{\the\exno}{«tag»}|. \idx{|\deftagpage|}|{«tag»}| expands +to |\deftag{\the\pageno}{«tag»}|, but the expansion is delayed +until after \Tex's page breaking mechanism has decided what page +the |\deftag| command appears on. The tag/page pair which is +generated in this case is written to a file only, so |\getref| +cannot recover a page number until a tag-ref file is read. + +The evaluation of \idx{|\deftaglabel|}|{«tag»}| is more complex. +|\pexcnt|, the setting of |labeltype|, and the setting of +|everylabel| are used to construct the reference (either a letter +or a number). The tag which is submitted to |\deftag| is $\sl +tag'\!|.|tag$, where $\sl tag'$ is the example number tag. + +The code below produces (\nextx). + +\codedisplay +\pex[interpartskip=0pt] +\a First\deftag{the first part of example \lastx}{FP} +\a Second\deftagex{snoopy}\deftaglabel{dog} +\a Third\deftaglabel{a} +\xe|endcodedisplay + +\framedisplay~ +\pex[interpartskip=0pt] +\a First\deftag{the first part of example \lastx}{FP} +\a Second\deftagex{snoopy}\deftaglabel{dog} +\a Third\deftaglabel{a} +\xe +\endframedisplay + +\noindent Afterwards, assuming that the tag |snoopy| has not been +redefined in the interim\par\nobreak\medskip + +\hskip3em +\vtop{\openup1pt +\halign{#\hfil& \quad$\to$\quad #\hfil\cr +|\getref{snoopy}|& \getref{snoopy}\cr +|\getref{snoopy.dog}|& \getref{snoopy.dog}\cr +|\getfullref{snoopy.dog}|& \getfullref{snoopy.dog}\cr +|\getref{snoopy.a}|& \getref{snoopy.a}\cr +|\getfullref{snoopy.a}|& \getfullref{snoopy.a}\cr +|\getref{dog}|& \it undefined tag warning, or spurious reference\cr +|\getref{FP}|& \getref{FP}\cr +}} + +\medskip +\noindent |\getref{dog}| will produce a spurious reference if the +tag |dog| is defined somewhere else in your document. +|\deftaglabel| must know, at the point that it is expanded, what +tag has been attached to the example number. If the example +number has not been tagged at that point, a warning message is +issued. + +There are two alternatives to the explicit use of |\deftagex| and +|\deftaglabel|. One is the use of the parameter |tag|. After + +\codedisplay +\pex[interpartskip=0pt,labeltype=alpha,tag=snoopy] +\a First +\a[tag=dog] Second +\a Third\deftaglabel{A} +\xe |endcodedisplay + +\noindent |\getref{snoopy}|, |\getref{snoopy.dog}|, +and |\getref{snoopy.A}| are interpreted as expected, as are +|\getfullref{snoopy.dog}| and +|\getfullref{snoopy.A}|. + +The other alternative is a special ``tagging notation'' which, +unlike most shortcuts, makes the code easier to read as well. +After + +\codedisplay +\pex[interpartskip=0pt,labeltype=alpha]<snoopy> +\a First +\a<dog> Second +\a[tag=A] Third +\xe |endcodedisplay + +\noindent |\getref{snoopy}|, |\getref{snoopy.dog}|, and +|\getref{snoopy.A}| are interpreted as expected, as are +|\getfullref{snoopy.dog}| and |\getfullref{snoopy.A}|. + +If |\getref{sometag}| is evaluated and the tag is undefined, a +warning message to this effect is generated +and~\hbox{$\bullet$|sometag|} is typeset instead of the intended +reference. + +\subsection Proofing references + +\begininventory +\macros* |\refproofing|\endmc +\endinventory +It is tedious to check that references to example numbers and the +like are correct (i.e. refer to what you think they refer to). +\ExPex\ provides a little help. If you execute +\idx{|\refproofing|}, then all the references that are generated +by |\bblastx|, |\blastx|, |\lastx|, |\nextx|, |\anextx|, +|\getref|, and |\getfullref| are highlighted. If \PSTricks\ is +loaded at the point that |\refproofing| is evaluated, the +highlighting consists of a box around the reference. If not, the +reference is under- and overlined. Highlighting is helpful +in copy editing. The difference is illustrated below. + +\pex +\a Consider (\getfullref{snoopy.dog}), for +example.\qquad default behavior +\refproofing +\a Consider (\getfullref{snoopy.dog}), for example.\qquad +|\refproofing|, \PSTricks\ available +\a {\let\PSTricksLoaded\relax \refproofing +\makeatletter +\let\@highlightprint\mathhigh@lightref +\resetatcatcode +Consider (\getfullref{snoopy.dog}), for example.}\qquad +|\refproofing|, \PSTricks\ not available +\xe + + + +\subsection The tag/reference file + +\begininventory +\macros \idx{|\gathertags|}, \idx{|\tagfilesuffix|}\endmc +\endinventory + +\noindent Forward references require writing tag/reference +associations to a file in one run, then reading this file in a +second run. Forward reference is only one reason for such a +system. If you work on a document in pieces, say one section at +a time, and need to refer to things in prior sections, then the +tag/reference pairs from previous sections must be stored in a +file so that they can be used in the section that you are working +on. If you say \idx{|\gathertags|}, the tag/reference pairs will +be written to a file as they are established. If your main file +is named {\sl foop.tex}, for example, the default is to write the +tag/ref pairs to {\sl foop-tags.tex}. But you can modify this by +using the command \idx{|\tagfilesuffix|}. \slname{expex.tex} +contains |\tagfilesuffix{-tags}|, but you can overrule this with +|\tagfilesuffix{«your suffix»}|. + +When the first |\getref|, |\getfullref|, or |\gathertags| command +is encountered, \ExPex\ checks to see if there is a tag file. If +the file does exist, it is read and all the tag/reference pairs +it encodes are established. No testing is done for conflicting +tag/reference pairs with the same tag, so it is the +responsibility of the user to see that this does not occur to a +bad effect. If the user wants to be absolutely sure that bad +references have not accidentally occurred because of using the +same tag twice, he/she can look directly at the tag file in a +text editor. If the lines are alphabetized, it is relatively +easy to find tags for which multiple references have been +established. If you are a careful copy editor, this may be worth +doing in a complex project (a book length manuscript) during +final copy editing. Of course, the printed final manuscript +should be checked in any event to make sure that the references +refer to what you want them to refer to. + +For what it is worth, my own style of work is to break up +projects into multiple pieces and have a main file which calls +the various pieces. Then I simply comment out the calls to +pieces that I am not working on. From time to time I will run +the main file calling on all the various pieces, invoking +|\gathertags|. Then I comment out |\gathertags|. The tag-ref +file which is created then remains intact until |\gathertags| is +invoked at some future time. All of the tag/reference pairs it +encodes are available in subsequent work until a new tags file is +created. + +\subsection References to references, references as values + +\begininventory +\macros* \idx{|\lastlabel|}\endmc +\endinventory +% +If, for some reason, you want to refer to a specific +part of a multipart example without tagging the example number, +it can be done as follows, assuming that the part labels are +alphabetical. + +\codedisplay +\pex[everylabel=\it] +\a First Example. +\a Second Example.\deftag{\lastx\lastlabel}{snoopy} +\a Third Example. +\xe +|endcodedisplay +\framedisplay +\pex[everylabel=\it] +\a First Example. +\a Second Example.\deftag{\lastx\lastlabel}{snoopy} +\a Third Example. +\xe +\endframedisplay + +\noindent You can then use |\getref{snoopy}| to retrieve +\getref{snoopy}. |\lastlabel| expands to the most recent label, +in the form in which it is printed (i.e. containing the expansion +of |\everylabel|). If the part labels are numerical, then +|\deftag{\lastx.\lastlabel}| is required. + +You can also say: + +\sidx{|exno|, setting by reference}% +\codedisplay +\ex[exno=\getref{snoopy}] Second example.\xe|endcodedisplay + +\framedisplay~ +\ex[exno=\getref{snoopy}] Second example.\xe +\endframedisplay +\medskip + +Or you can say: + +\codedisplay +\ex[exno={\getref{snoopy}, repeated},exnoformat={[X]}] +Second example.\xe +|endcodedisplay + +\framedisplay~ +\ex[exno={\getref{snoopy}, repeated},exnoformat={[X]}] +Second example.\xe +\endframedisplay +% +Braces must hide the comma in the value which sets the key. + +If you say + +\codedisplay +\pex[labeltype=numeric]<dog> +\a First Example. +\a<G> Second Example. +\a Third Example. +\xe|endcodedisplay + +\framedisplay~ +\pex[labeltype=numeric]<dog> +\a First Example. +\a<G> Second Example. +\a Third Example. +\xe +\endframedisplay + +\noindent then, if you want to repeat (\getfullref{dog.G}) at +some point, you can use: + +\codedisplay +\ex[exno=\getfullref{dog.G}] Second example\xe +|endcodedisplay + +\framedisplay~ +\ex[exno={\getfullref{dog.G}}] Second example\xe +\endframedisplay + +\subsection Extensions of the tag/reference mechanism + +The tag/reference mechanism can easily be extended to reference +to chapters, sections, and subsections. Suppose, for example, +that there are counters for the chapter number, section number, +subsection number, and subsubsection number. One might define: + +\codedisplay +\def\currsec{\the\chapterno + \ifnum\secno>0 .\the\secno + \ifnum\subsecno>0 .\the\subsecno + \ifnum\subsubsecno>0 .\the\subsubsecno \fi\fi\fi} +\def\deftagsec#1{\deftag\currsec{#1}}|endcodedisplay + +\noindent This assumes that there are counters |\chapterno|, +|\secno|, |\subsecno|, and |\subsecsecno| and that when a chapter +is initiated, |\secno| is set to 0, when a section is initiated, +|\secsecno| is set to 0, and that when a subsection is initiated, +|\subsubsecno| is set to 0. (Lines 1--5, commented out, +are included at the end of {\sl expex.tex\/} for the user to +use, modify, or ignore.) + + +\subsection The parameter {\tt fullreformat} + +\begininventory +\parameters* +\idx{|fullrefformat|}& $\ldots\,|X|\,\ldots\,|A|\,\ldots$ & |XA|\cr +\endinventory + +\begingroup +\parindent=0pt \leftskip=1.2em + +1. |labelformat| (see page \getref{labelformatpage}) determines how the labels are formatted. +Generally they are followed by a period, but this parameter +allows other possibilities. +\smallskip + +2. |fullrefformat| determines how references retrieved by +|\getfullref| are formatted. Generally, example numbers and +labels are concatenated if the labels are characters and +separated by a period if the labels are numbers. This parameter +allows other possibilities. The format specification is +primitive. The value of |fullrefformat| is analyzed as +|#1X#2A#3|, with |X| preceding |A|. Then the full reference is +found by substituting the example number for |X| and the part +label for |A|. +\smallskip +\endgroup + +Consider the artificial example below, with unusual formatting +for illustrative purposes. + +\begingroup +\setss .65 .35 +\beginss +\pex[labeltype=numeric,labelformat={[A]}, + fullrefformat=X-A,samplelabel={[1]}]<K> +\a first +\a<A> second +\xe|midss +\pex[labeltype=numeric,labelformat={[A]}, + fullrefformat=X-A,samplelabel={[1]}]<K> +\a first +\a<A> second +\xe +\endss +\endgroup +|\getref{K.A}| produces \getref{K.A} and |\getfullref{K.A}| +produces \getfullref{K.A}. + +\subsection Reference to a part of a multipart example + +Suppose there is a multipart example which you want to partially +repeat at a later point, giving only some of the parts. There are +many opportunities to make a mistake. The reference to the +example number may be wrong, the references to the part labels my +be wrong, or a particular part may not be repeated the way it +originally appeared. Here is one way to (partially) automate the +references to avoid most of the possible reference +errors. + +\begingroup +\setss .53 .43 +\beginss +\deftag{Someone loves everyone.}{1st} +\deftag{Everyone loves someone.}{2nd} + +\pex<A> +\a \dots +\a<X> \getref{1st} +\a \dots +\a<Z> \getref{2nd} +\xe + +\ex An intervening example.\xe + +The two crucial examples in +(\getref{A}) are repeated below: + +\pex[exno=\getref{A}] +\a[label=\getref{A.X}] \getref{1st} +\a[label=\getref{A.Z}] \getref{2nd} +\xe + +\ex Numbering resumes.\xe|midss +\deftag{Someone loves everyone.}{1st} +\deftag{Everyone loves someone.}{2nd} + +\pex<A> +\a \dots +\a<X> \getref{1st} +\a \dots +\a<Z> \getref{2nd} +\xe + +\bigskip +\ex An intervening example.\xe + +\bigskip +The two crucial examples in +(\getref{A}) are repeated below: + +\bigskip +\deftag{\the\secno.\the\subsecno}{explicit-sec}% +\pex[exno=\getref{A}] +\a[label=\getref{A.X}] \getref{1st} +\a[label=\getref{A.Z}] \getref{2nd} +\xe + +\bigskip +\ex Numbering resumes.\xe +\endss +% +{\bf Important limitation}:\enspace Inside an example that sets +|exno| to a nonempty value, the use of |\deftaglabel| or +|\deftagex|, or their implicit versions using the |<|\dots|>| +notation, or |\label|, will result in an error or (more +dangerously) an unexpected outcome. This is a minor limitation +because there should be no need to tag items which themselves are +referenced by tags. It is important only because violating it +can generate Tex errors.\endgroup + +\subsection Support for the LaTex \ttcs{label} and +\ttcs{ref} commands% + +\deftag{\the\secno.\the\subsecno}{labelsec} + +\sidx{|\label|, use of the LaTex macro} +\sidx{|\ref|, use of the LaTex macro} +\noindent LaTex users, if so inclined, may wish to use the LaTex +|\label|-|\ref| mechanism to tag example numbers and example part +labels. + +Assuming that LaTex is in use, + +\beginss +\pex \label{A} +\a Tom\label{B} +\a Dick\label{C} +\a Harry\label{D}, etc. +\xe + +\ex~ Intervening example.\xe + +\noindent Consider example (\ref{A}). +Tom is in example (\ref{B}), Dick is +in example (\ref{C}), and Harry is in +example (\ref{D}).|midss +%%%% +\pex[aboveexskip=1ex,nopreamble]\deftagex{A} +\a Tom\deftaglabel{B} +\a Dick\deftaglabel{C} +\a Harry\deftaglabel{D}, etc. +\xe + +\bigskip +\ex~ Intervening example\xe + +\bigskip +\noindent Consider example (\getref{A}). Tom is in example +(\getfullref{A.B}), Dick is in example (\getfullref{A.C}), and +Harry is in example (\getfullref{A.D}). +\medskip +%%%% +\endss + +There are important differences between the LaTex mechanism and +the |\deftag|-|\getref| mechanism. + +\smallskip +\noindent 1.\enspace +|\ref{|{\it tag}|}| cannot be used as a special example number, +nor can it be given as an optional argument to |\a|. + +\smallskip +\noindent 2.\enspace +The |\label| name space is flat. No distinction is made between +names of examples and names of parts of examples. This makes it +much harder to remember and manage the names, at least for me. + +\smallskip +\noindent 3.\enspace +LaTex provides no control over the generation of the file +containing the tag-reference pairs. One cannot work on Chapter 5 +(for example) and have all the tag-reference information for the +earlier chapters available without actually submitting all of the +Chapters 1 to 4 to LaTex while you are working on Chapter 5. + + + diff --git a/Master/texmf-dist/doc/generic/expex/source/12_Tables.tex b/Master/texmf-dist/doc/generic/expex/source/12_Tables.tex new file mode 100644 index 00000000000..7aa389e5bca --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/12_Tables.tex @@ -0,0 +1,446 @@ + +\section Tables in examples + +\begininventory +\macros* \idx{|\hwit|}\endmc +\endinventory +Most of the difficulty of formatting example displays which +contain tables comes from formatting the table itself. This +manual will not teach the reader how to use \Tex\ to format +tables. It will be assumed that the reader knows how to use the +\Tex\ primitive |\halign| or the \LaTex\ macros based on +|\halign|. But this section might contribute something to +understanding how to use the table making tools in linguistics +examples. + +Many tabular examples have the form + +\def\goop{\enspace\dots\enspace} +\codedisplay +\ex \vtop{\halign{|goop}}\xe +|endcodedisplay + +For example: + +\framedisplay +\ex +\vtop{\halign{#\hfil&& \qquad #\hfil\cr +baudh& bu-baudh& know, wake\cr +smai& si-smai& smile\cr +suap& su-suap& sleep\cr +miaks& mi-miaks& glitter\cr +auc& u-auc& please\cr +}} +\xe +\endframedisplay + +\codedisplay +\ex \vtop{\halign{% +#\hfil&& \qquad #\hfil\cr +baudh& bu-baudh& know, wake\cr +smai& si-smai& smile\cr +suap& su-suap& sleep\cr +miaks& mi-miaks& glitter\cr +auc& u-auc& please\cr +}}\xe|endcodedisplay + +A more elaborate version of (\lastx), with a title and labeled +columns, is given below. |\hwit| is described below. + +\framedisplay +\ex The perfect stems of some roots with a +high vowel in their nucleus\par\nobreak\medskip +\quad\vbox{\halign{% +#\hfil&& \hskip3em #\hfil\cr +\hfil\hwit{root}& \hfil\hwit{perfect stem}& + \hfil\hwit{gloss}\cr +\noalign{\smallskip} +baudh& bu-baudh& `know, wake'\cr +smai& si-smai& `smile'\cr +suap& su-suap& `sleep'\cr +miaks& mi-miaks& `glitter'\cr +auc& u-auc& `please'\cr +}}\xe +\endframedisplay + +\codedisplay~ +\ex The perfect stems of some roots with a +high vowel in their nucleus\par\nobreak\medskip +\quad\vbox{\halign{% +#\hfil&& \hskip3em #\hfil\cr +\hfil\hwit{root}& \hfil\hwit{perfect stem}& + \hfil\hwit{gloss}\cr +\noalign{\smallskip} +baudh& bu-baudh& `know, wake'\cr +smai& si-smai& `smile'\cr +suap& su-suap& `sleep'\cr +miaks& mi-miaks& `glitter'\cr +auc& u-auc& `please'\cr +}}\xe |endcodedisplay +% +|\hwit| (hidewidth italics) inserts the italicized +label into the alignment in such a way that it is centered over +the nonwhite portion of the column it heads. It hangs over +equally on both sides if necessary. Hiding the width of column +labels is often important so that the column labels do not affect +the column widths. + +|\par\nobreak| appears after the title so that page breaking does +not detach the title from the table that follows. + +\subsection Tables with labeled lines + +\begininventory +\macros \idx{|\labels[]|}, \idx{|\tl|}, \idx{|\nl|}\endmc +\endinventory +If reference must be made to particular lines in (\lastx), the +lines need labels of some sort. One approach is to explicitly +enter the line labels a--e: + +\framedisplay +\ex The perfect stems of some roots with a +high vowel in their nucleus\par\nobreak\medskip +\quad\vbox{\halign{% +#\hfil& \quad #\hfil&& \hskip3em #\hfil\cr +& \hfil\hwit{root}& \hfil\hwit{perfect stem}& + \hfil\hwit{gloss}\cr +\noalign{\smallskip} +a.& baudh& bu-baudh& `know, wake\cr +b.& smai& si-smai& `smile'\cr +c.& suap& su-suap& `sleep'\cr +d.& miaks& mi-miaks& `glitter'\cr +e.& auc& u-auc& `please'\cr +}}\xe +\endframedisplay + +\codedisplay +\ex The perfect stems of some roots with a +high vowel in their nucleus\par\nobreak\medskip +\quad\vbox{\halign{% +#\hfil& \quad #\hfil&& \hskip3em #\hfil\cr +& \hfil\hwit{root}& \hfil\hwit{perfect stem}& + \hfil\hwit{gloss}\cr +\noalign{\smallskip} +a.& baudh& bu-baudh& `know, wake'\cr +b.& smai& si-smai& `smile'\cr +c.& suap& su-suap& `sleep'\cr +d.& miaks& mi-miaks& `glitter'\cr +e.& auc& u-auc& `please'\cr +}}\xe |endcodedisplay + +\noindent If a line is deleted or added, or if lines are +interchanged for some reason, considerable relabeling may be +required. + +\ExPex\ provides some macros which simplify this code and make +it easier to manipulate. They are used in the alternate code for +(\lastx) below and described below. |\labels| initializes +the counter |\pexcnt|, which is then used to generate the labels. +It also activates the macros |\tl| (table label) and +|\nl| (no label). |\tl| inserts the appropriate label, with +following period, and increments the counter. |\nl| abbreviates +|\omit\hfil|, so that it can be used to prevent the appearance of +a label in a cell. |\labels| takes parameters, so you can say +things like |\labels[labeltype=caps,everylabel=\it]|. Of course, +these parameters can also be set at the |\ex| level, if desired, or +even globally. + +\codedisplay +\ex The perfect stems of some roots with a +high vowel in their nucleus\par\nobreak\medskip +\quad\vbox{\labels\halign{% +\tl #\hfil& #\hfil& \quad #\hfil&& \hskip3em #\hfil\cr +\nl & \hfil\hwit{root}& \hfil\hwit{perfect stem}& + \hfil\hwit{gloss}\cr +\noalign{\smallskip} +& baudh& bu-baudh& `know, wake'\cr +& smai& si-smai& `smile'\cr +& suap& su-suap& `sleep'\cr +& miaks& mi-miaks& `glitter'\cr +& auc& u-auc& `please'\cr +}}\xe |endcodedisplay + +The advantages of implicit line label insertion should be +obvious. One often decides to insert another entry, or to delete +an entry. If the labels are inserted explicitly, this usually +requires changing multiple labels. If the table has many lines, +this is particularly onerous. References in the text to +particular lines also need to changed to match the new labeling. +We will see below that lines in tables can be named and reference +made by name, using implicit line numbering. + +\subsection Tagging implicit labels in tables + +\sidx{|\deftaglabel|, in tables} +|\deftaglabel| can be used to associate a tag with a label that is +introduced into a table by |\tl|~(``table label''). |\tl| can +also read an optional tag using the |<|\dots|>| mechanism. + +\codedisplay +\ex<Washo> +\vtop{\labels\halign{\tl #\hfil&& \quad #\hfil\cr +\nl & \hwit{Root}& \hwit{Plural}& \hwit{Gloss}\cr +& baloxat& baloxaxat& bows\cr +& moya& moyaya& shoulder\cr +<A>& nent'us& net'unt'us& old women\cr +<B>& mokgo& mogokgo& shoes\cr +}} +\xe +Examples (\getfullref{Washo.A}) and (\getfullref{Washo.B}) are the most +complex, and therefore the most revealing. Examples +(\getref{Washo}\getref{Washo.A},\getref{Washo.B}) are the most complex, +and therefore the most revealing. +|endcodedisplay + +\framedisplay~[fdcorrect=top] +\ex<Washo> +\vtop{\labels\halign{\tl #\hfil&& \quad #\hfil\cr +\nl & \hwit{Root}& \hwit{Plural}& \hwit{Gloss}\cr +& baloxat& baloxaxat& bows\cr +& moya& moyaya& shoulder\cr +\deftaglabel{A}& nent'us& net'unt'us& old women\cr +\deftaglabel{B}& mokgo& mogokgo& shoes\cr +}}\xe +Examples (\getfullref{Washo.A}) and (\getfullref{Washo.B}) are +the most complex, and therefore the most revealing. +Examples (\getref{Washo}\getref{Washo.A},\getref{Washo.B}) are +the most complex, and therefore the most revealing. +\endframedisplay +\medskip +\noindent + +\subsection Some useful table making tools + +\begininventory +\macros* % \idx{|\lingdima|}, \idx{|\lingdimb|}, \idx{|\lingdimc|}, + \idx{|\tspace|}|[]|, \idx{|\crs|}\endmc +\parameters +\idx{|dima|\user}& dimension& \textdim{2.4 em}\cr +\idx{|dimb|\user}& dimension& (not set)\cr +\idx{|dimc|\user}& dimension& (not set)\cr +\idx{|crskip|}& skip& \textdim{1.2 ex}\cr +\endinventory +% +Tables often need considerable adjustment in order to +balance the needs of readability, space limitations, and matching +the typographic structure to the conceptual structure. +Sometimes this requires a delicate balancing act. \ExPex\ +provides three parameters (scratch dimensions) |dima|, |dimb|, +and |dimc|, and corresponding macros which expand to their +settings, which can be used for this. Additionally, +|\tspace[«key»]| expands to |\hskip\ling«tag»|, so that +horizontal skip like |\tspace[dima]| or |\tspace[textoffset]| can +be easily used in table construction. The code for (\lastx) +could be written: + +\codedisplay +\ex[textoffset=1em,dima=1em,dimb=3em] +The perfect stems of some roots with a high vowel in their +nucleus\par\nobreak\medskip +\tspace[dima]\vbox{\labels\halign{% +\tl #\hfil& \tspace[textoffset]#\hfil&& \tspace[dimb]#\hfil\cr +\nl & \hfil\hwit{root}& \hfil\hwit{perfect stem}& + \hfil\hwit{gloss}\cr |endcodedisplay +\removelastskip\vskip-1ex +$\vdots$ +\bigskip + +\noindent Localizing all the parameters which might need +adjustment in the optional argument of |\ex| helps organize the +adjustment process. + +If no optional argument is supplied to |\tspace|, it expands to +|\hskip\lingdima|. + +The macro |\crs| and command key |crskip| are +provided to assist in fine tuning the vertical spacing inside an +alignment. |\ling@crskip| expands to the setting of |crskip|, and + +\exfrag |\crs|\quad $\to$\quad |\cr \noalign{\vskip\ling@crskip}| +\xe + +\subsection Tables that can break between pages + +\begininventory +\macros \idx{|\exdisplay[]|}, \idx{|\noexno|}, \idx{|\exnoprint|}, + \idx{|\crnb|}\endmc +\endinventory +Up to this point, only tables that are typeset in a vbox have +been considered. The \Tex\ page breaking algorithm does not +split a box between pages. Sometimes, an especially tall table +is needed and one has the choice of floating the table to the top +of the next page (using \Tex's |\topinsert|) or constructing a +breakable table. The latter choice is often preferable and can +be implemented using \Tex's primitive |\halign|. + +The example number must be part of the |\halign|, not inserted by +|\ex|. |\exdisplay| is designed to accommodate an unboxed +|\halign|. Like |\ex|, |\exdisplay| must be closed by |\xe|. +|\exdisplay| \dots|\xe| is just like |\ex| \dots|\xe| except that +an example number is not printed and the horizontal dimensions +|\numoffset| and |\textoffset| are irrelevant. |aboveexskip| and +|belowexskip| play the same role, paragraph indentation is +cancelled, |\lingeveryex| and |\lingEveryex| are executed, and +|\excnt| is advanced. + +|\noexno| is provided in case the user wants to use |\exdisplay| +for something other than a numbered example. It cancels the +automatic advancement of |\excnt|. You can say +|\exdisplay|\idx{|\noexno|}\ or |\exdisplay[« \dots»]\noexno| to +cancel |\excnt| advancement. + +Now consider the `tall display' (\nextx). It is sufficiently +tall that it either must be put in an insertion or typeset so +that it can be split by a page break. + +\exdisplay[labeloffset=2em,dima=2em,dimb=1em,dimc=-.8em] +\def\\#1-{{\bf #1}-}% +\labels +\openup1pt +\halign{% + #\tspace[labeloffset]\hfil& % example number + #\tl\tspace[textoffset]\hfil& % line label + #\tspace \hfil& % root + #\tspace \hfil& % perfect stem + `#'\hfil\cr % gloss +(\the\excnt)& \omit\tspace[dimc] High vowel in the nucleus of the + root\hidewidth\crnb +& \nl & \hwit{root}& \hwit{perfect stem}& + \omit\tspace\hwit{gloss}\crnb +&& baudh& \\bu-baudh& know, wake\cr +&& stau& \\tu-stau& praise\cr +&& smai& \\si-smai& smile\cr +\noalign{\exbreak} +&& suap& \\su-suap& sleep\cr +&& miaks& \\mi-miaks& glitter\cr +&& auc& \\u-auc& please\cr +\noalign{\exbreak\smallskip} +& \omit\tspace[dimc] No high vowel in the nucleus of the + root\hidewidth\crnb +&& suaj& \\sa-suaj& embrace\cr +&& krand& \\ka-krand& cry out\cr +\noalign{\exbreak} +&& skand& \\ka-skand& leap\cr +&& mard& \\ma-mard& rub, crush\cr +&& mnaa& \\ma-mnaa& note\cr +}\xe + +The example number in the code below is inserted by +|\exnoprint|, which is how |\ex| inserts example numbers. +If, by the way, you don't like the way example numbers are +inserted (surrounded by parentheses), you can redefine +|\exnoprint|. The code uses |\crnb|, which expands to +|\cr\noalign{\par\nobreak}|, to prevent a page +break between a heading and the remainder of the table which +follows. Page breaks are encouraged by |\exbreak| at a few points +where it is judged that the logic of the table can tolerate it. +|\exbreak| encourages a page break at the cost of allowing a +certain amount of white space at the bottom of the broken +page.\footnote{See page \getref{exbreakpage} for a more complete +discussion of |\exbreak|. The amount of encouragement and the amount of +whitespace are parametrized.} +A +negative horizontal skip |\tspace[dimc]| is used to highlight the +subheadings (and to show the reader that it is a possibility, if +you need it). + +\vbox{\codedisplay +\exdisplay[labeloffset=2em,dima=2em,dimb=1em,dimc=-.8em] +\def\\#1-{{\bf #1}-}% +\labels +\openup1pt +\halign{% + #\tspace[labeloffset]\hfil& % example number + #\tl\tspace[textoffset]\hfil& % line label + #\tspace \hfil& % root + #\tspace \hfil& % perfect stem + `#'\hfil\cr % gloss +(\the\excnt)& \omit\tspace[dimc] High vowel in the nucleus of the + root\hidewidth\crnb +& \nl & \hwit{root}& \hwit{perfect stem}& + \omit\tspace\hwit{gloss}\crnb +&& baudh& \\bu-baudh& know, wake\cr +&& stau& \\tu-stau& praise\cr +&& smai& \\si-smai& smile\cr +\noalign{\exbreak} +&& suap& \\su-suap& sleep\cr +&& miaks& \\mi-miaks& glitter\cr +&& auc& \\u-auc& please\cr +\noalign{\exbreak\smallskip} +& \omit\tspace[dimc] No high vowel in the nucleus of the + root\hidewidth\crnb +&& suaj& \\sa-suaj& embrace\cr +&& krand& \\ka-krand& cry out\cr|par|nobreak +\noalign{\exbreak}|par|nobreak +&& skand& \\ka-skand& leap\cr|par|nobreak +&& mard& \\ma-mard& rub, crush\cr|par|nobreak +&& mnaa& \\ma-mnaa& note\cr|par|nobreak +}\xe |endcodedisplay +\vskip-2ex} + +\subsection Squeezing tables into tight places + +Foregoing |\ex| and directly using |\halign| inside |\exdisplay| +\dots|\xe| has other uses besides constructing tables in numbered +examples which can be broken between pages. The technique is +also sometimes useful in fitting a table in a numbered example +into a narrow page width. The table below was constructed to fit +on a page of width $4.3\,\rm in$, with no room to spare. It gives +the present indicative conjunction of the Sanskrit verb root {\sl +dve\.s\kern.6pt/dvi\.s\/} `hate'. + +\framedisplay +\hsize=4.3in +\exdisplay[dima=.5em,dimb=.4em,textoffset=.5em] +\def\\#1{$\acute{\hbox{\=#1}}$}% +\tabskip=0pt +\openup.4ex +\halign to \hsize{\tspace[dima]#\tspace[textoffset]\hfil& + #\hfil\tabskip=0pt plus 1fil& + #\hfil& #\hfil& \tspace[dimb]#\hfil& + #\hfil & #\hfil\tabskip=0pt\cr +\omit\exnoprint\hidewidth& + \multispan6 \hwit{Present Indicative}\crnb +&\multispan3 \hwit{active}& \multispan3 \hwit{middle}\cr +& \hwit{sg}& \hwit{du}& \hwit{pl}& + \hwit{sg}& \hwit{du}& \hwit{pl}\cr +\it 1& {\bf dv\'e\.s}-mi& dvi\.s-v\'as& dvi\.s-m\'as& + dvi\.s-\'e& dvi\.s-v\'ahe& dvi\.s-m\'ahe\cr +\it 2& {\bf dv\'ek}-\.si& dvi\.s-\.th\'as& dvi\.s-\.th\'a& + dvik\.s-\'e& dvi\.s-\\athe& dvi\.d-\.dhv\'e\cr +\it 3& {\bf dv\'e\.s}-\.ti& dvi\.s-\.t\'as& dvi\.s-\'anti& + dvi\.s-\.t\'e& dvi\.s-\\ate& dvi\.s-\'ate\cr +} +\xe +\endframedisplay + +Assuming that the page width has been set to $4.3\,\rm in$ +(|\hsize=4.3in|), the following code produces (\lastx), which is +precisely $4.3\,\rm in$ wide. + +\codedisplay +\exdisplay[dima=.5em,dimb=.4em,textoffset=.5em] +\def\\#1{$\acute{\hbox{\=#1}}$}% +\tabskip=0pt +\openup.4ex +\halign to \hsize{\tspace[dima]#\tspace[textoffset]\hfil& + #\hfil\tabskip=0pt plus 1fil& + #\hfil& #\hfil& \tspace[dimb]#\hfil& + #\hfil & #\hfil\tabskip=0pt\cr +\omit\exnoprint\hidewidth& + \multispan6 \hwit{Present Indicative}\crnb +&\multispan3 \hwit{active}& \multispan3 \hwit{middle}\cr +& \hwit{sg}& \hwit{du}& \hwit{pl}& + \hwit{sg}& \hwit{du}& \hwit{pl}\cr +\it 1& {\bf dv\'e\.s}-mi& dvi\.s-v\'as& dvi\.s-m\'as& + dvi\.s-\'e& dvi\.s-v\'ahe& dvi\.s-m\'ahe\cr +\it 2& {\bf dv\'ek}-\.si& dvi\.s-\.th\'as& dvi\.s-\.th\'a& + dvik\.s-\'e& dvi\.s-\\athe& dvi\.d-\.dhv\'e\cr +\it 3& {\bf dv\'e\.s}-\.ti& dvi\.s-\.t\'as& dvi\.s-\'anti& + dvi\.s-\.t\'e& dvi\.s-\\ate& dvi\.s-\'ate\cr +} +\xe +|endcodedisplay + + + diff --git a/Master/texmf-dist/doc/generic/expex/source/13_PSTricks.tex b/Master/texmf-dist/doc/generic/expex/source/13_PSTricks.tex new file mode 100644 index 00000000000..3562e9f5cf0 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/13_PSTricks.tex @@ -0,0 +1,94 @@ + +\everymath={}% + +\section ExPex and PSTricks + +\begininventory +\macros* \idx{|\Lingset|}\endmc +\endinventory +Several features of \ExPex\relax, listed in (\nextx), come into +play only if {\sl pstricks.tex\/} has been loaded at the point +that {\sl expex.tex\/} is loaded. They are intended to make it +easier to use {\sl PSTricks\/} in examples. + +\pex[labeltype=numeric] +\a |\Lingset| is activated. It works like |\lingset|, but if +there are parameters which are not in the family {\sl ling}, they are +passed to |\psset|. +\a The family {\sl ling\/} is added to the set of parameter families +which |\psset| can set. +\a The optional argument of |\ex|, |\pex|, and |\exdisplay| is +passed to |\Lingset|. +\xe + +\noindent |\Lingset| first scans its argument from left to right +and sets all the parameters from the family {\sl ling}. The +remaining keys are then passed to |\psset|. If {\sl PSTricks\/} +has not been loaded, |\Lingset| is defined, but its meaning is +the meaning of |\lingset|. + +This is illustrated by (\nextx). + +\medskip +\framedisplay%[exclude] +\ex[angle=-90,nodesep=0pt,arrows=->,labelsep=.25ex,linearc=.7ex, + dima=.2em] +\def\\#1(#2){\rnode{#2}{\strut #1}}% +% +\vrule height0pt depth5.3ex width0pt +\\Whom(A) did John persuade \\t(B) [ PRO to visit \\whom(C) ] +\ncbar[armA=3.5ex,offsetB=\lingdima]{B}{A} +\bput{0}{$M_{sp}=2$} +\ncbar[armA=4.5ex,offsetB=-\lingdima]{C}{A} +\bput{0}(1.2){$M_{sp}=6$} +\xe +\endframedisplay + +\noindent (The example is from Juan Uriagereka, in {\sl The Role +of Economy Principles in Linguistic Theory}.) + +In the code below, note that the optional argument of |\ex| is +used to set the \PSTricks\ parameters |angle|, |arrows|, +|nodesep|, |labelsep|, and |linearc|, and the \ExPex\ parameter +|dima|. Note also that the \ExPex\ scratch dimension +|\lingdima| is used seamlessly by the {\sl PST-Node\/} macros. + +\CLnum +\ex[angle=-90,nodesep=0pt,arrows=->,dima=.2em, labelsep=.25ex, + linearc=.7ex] +\def\\#1(#2){\rnode{#2}{\strut #1}}% +% +\vrule height0pt depth5.3ex width0pt +\\Whom(A) did John persuade \\t(B) [ PRO to visit \\whom(C) ] +\ncbar[armA=3.5ex,offsetB=\lingdima]{B}{A} +\bput{0}{$M_{sp}=2$} +\ncbar[armA=4.5ex,offsetB=-\lingdima]{C}{A} +\bput{0}(1.2){$M_{sp}=6$} +\xe |endCLnum + +\noindent Since the connections which \PSTricks\ draws are +dimensionless, a zero width |\vrule| is used to give correct +spacing. (The width can first be made nonzero so it is visible, +and the depth adjusted.) + +The following gives the same result.\exbreak + +\CLnum +\ex +\psset{angle=-90,nodesep=0pt,arrows=->,dima=.2em,labelsep=.25ex, + linearc=.7ex}|endCLnum +\removelastskip +\hskip.7in $\vdots$ +\vskip1em + +|\Lingset| and |\psset| are not entirely equivalent, even when +\PSTricks\ is active. If a key name in the family {\sl ling\/} +is the same as a key name in another family which has also been +added as part of the \PSTricks\ extended family, |\Lingset| will +treat it unambiguously as in the {\sl ling\/} family. |\psset|, +on the other hand, does not give priority to keys in the {\sl +ling\/} family. Exactly how |\psset| establishes priority is a +complex matter, depending on the history of the formation of the +\PSTricks\ extended family. + + diff --git a/Master/texmf-dist/doc/generic/expex/source/14_PageBreaks.tex b/Master/texmf-dist/doc/generic/expex/source/14_PageBreaks.tex new file mode 100644 index 00000000000..6de0627cfb9 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/14_PageBreaks.tex @@ -0,0 +1,179 @@ +\def\TEX{T\kern-.1em\lower.5ex\hbox{E}X} + +\section Control over page breaking inside examples + +Page breaking is generally much more disruptive if it occurs +inside an example than if it occurs in a paragraph of text. Steps +can be taken to minimize the possibility that examples are +disrupted by page breaks. Avoiding disruption can mean either +that a page break does not occur, or if it does, it happens at a +``good place''. If the parts of a multi-part example naturally +form subgroups, it is desirable to encourage a break between +subgroups and discourage a break inside a subgroup. + +\ExPex\ attempts to provide tools to help avoid breaking examples +between pages and, if they must be split, making it easy to +specify where in the example splitting should be encouraged or +discouraged. This must be balanced with limitations on how much +white space at the bottom of pages is allowable. + +The amount of whitespace at the bottom of pages and how much +variability in the vertical skip between examples and the +surrounding text is acceptable will probably vary between +different intended purposes: handout, draft, paper, camera-ready +paper, lecture notes, camera-ready book manuscript, etc. It will +also vary between different stages of production. Different +editors may have different views of the tradeoff between keeping +examples intact and allowing whitespace at the bottom of pages. +There is no sense in spending time on formatting while you are +still working on a draft. \ExPex\ therefore provides a number of +parameters which can be adjusted to control various aspects of +page breaking. + +In spite of efforts to guide \Tex\ in making good decisions about +page breaking, the results are not always satisfactory. +\medskip +\begingroup \leftskip=3em \rightskip=3em +\noindent +\noindent Every once and a while, +\TEX\ will produce a really awful looking page and you will +wonder what happened. For example, you might get just one +paragraph and a whole lot of white space, when some of the text +on the following page would easily fit into the white space. The +reason for such apparently anomalous behavior is almost always +that no good page break is possible; even the alternative that +looks better to you +is quite terrible as far as \TEX\ is concerned!\par +\hfill +(from Knuth's +\TEX book, p. 115)\par +\endgroup +\medskip +\noindent In situations like this, one has to give up on +encouraging \Tex\ to do the right thing and give explicit orders +to break the page by inserting |\eject| or |\vfil\eject| in the +appropriate place. The drawback to an explicit order is that it +remains in force after revisions are made to the document. If it +causes page breaking that is obviously bad, the problem will +usually be seen when editing. The biggest danger is that +the output is not terrible, but it is less than ideal and the +discrepancy is missed in less than meticulous copy editing. + +\subsection Discouraging page breaks in examples + +\deftagpage{exbreakpage}% +\begininventory +\macros* \idx{|\exbreak|}\endmc +\parameters +\idx{|exbreakfil|}& skip& 0\dimskip pt plus 4\dimskip ex\cr +\idx{|exbreakpenalty|}& integer& |-500|\cr +\idx{|splitpartspenalty|}& integer& |200|\cr +\endinventory + +\noindent \Tex\ carries out page breaking by assigning a cost +(via penalties) to each possible page break and choosing the +lowest cost option. Plain \Tex\ defines a macro |\goodbreak| +which ends the current paragraph and gives a negative penalty +($-500$) if a page break is taken after the paragraph. A +negative penalty is a reward, which encourages page breaking at +that point. The \ExPex\ macro |\exbreak| is a variant of +|\goodbreak|. It not only ends the current paragraph and awards a +penalty (a reward if the penalty is negative) if a page break is +taken at that point, but makes it easier for a satisfactory page +break to be taken by allowing the page to end with some vertical +fill, allowing some whitespace to appear at the bottom of the +broken page. + +|\exbreak| is inserted at the beginning of every |\ex| or |\pex| +block. The penalty and amount of fill are parameterized. The +default values are suitable for camera-ready copy, assuming that +the publisher is willing to tolerate a small amount of whitespace +at the bottom of a page in return for keeping an example intact. +$4\,\rm\,ex$ is about $1.5$ times the distance between baselines +in most fonts. For drafts, I set |exbreakfil=.3\vsize|, which +keeps almost all examples intact at the cost of allowing substantial +whitespace to appear at the bottom of a page. + +The setting of |exbreakfil| can be overridden by supplying a +value directly as an optional argument of |\exbreak|. For +example, |\exbreak[5ex]| acts like |\exbreak| (with no argument) +with |exbreakfil| is set to \textdim{5 ex}. + +Page breaks right before an example part in a |\pex| construction +introduced by |\a| are discouraged by imposing a penalty +determined by the setting of |splitpartspenalty|. +If |splitpartspenalty| is set to 10000, such breaks will +be completely disallowed. I use this setting for writing drafts. +Coupled with a generous setting of |\exbreakfil|, almost all page +breaks in examples are eliminated, which is what I prefer in +writing a draft. The default value is more suitable for finished +documents. + +In older versions of \ExPex\relax, |\exbreak| was called |\goodpar|. +The present name is more consistent with \Tex's naming habits. + + +\subsection Controlling where page breaks occur in examples (if +they must) + +If a page break within an example cannot be avoided +because it would require too much vertical fill to be inserted, +it is often important to control where within the example the +page break is made. Consider for example a display like +(\nextx). + +\framedisplay +\pex[exbreakpenalty=-10,interpartskip=.25ex] +\a example A +\a contrast with example A\exbreak +\a example B +\a variation on B +\a another variation on B +\a a third variation on B\exbreak +\a example C +\a contrast with example C +\xe +\endframedisplay + +Suppose the logic of the examples pairs a and b, c--f, and g and +h. How do you avoid a page break which interrupts the logic of +the collection of examples? One option is the standard \Tex\ +method of using |\nobreak| to prevent a page break, as in the +code below: + + \codedisplay +\pex[interpartskip=.25ex] +\a example A\par\nobreak +\a contrast with example A +\a example B\par\nobreak +\a variation on B\par\nobreak +\a another variation on B\par\nobreak +\a a third variation on B +\a example C\par\nobreak +\a contrast with example C +\xe |endcodedisplay + +\noindent Note that |\par| must precede |\nobreak|. We are +interested in preventing a page break in the process of adding +lines to the current page, not in preventing a break in the +process of building the lines which are added to the current +page. |\par| breaks the line, which takes \Tex\ out of line +building mode and puts it into page building mode. + +|\exbreak| offers an alternative. + +\codedisplay +\pex[interpartskip=.25ex] +\a example A +\a contrast with example A\exbreak +\a example B +\a variation on B +\a another variation on B +\a a third variation on B\exbreak +\a example C +\a contrast with example C +\xe |endcodedisplay + + + + diff --git a/Master/texmf-dist/doc/generic/expex/source/README-manual.txt b/Master/texmf-dist/doc/generic/expex/source/README-manual.txt new file mode 100644 index 00000000000..0bd07c78f60 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/README-manual.txt @@ -0,0 +1,7 @@ + +In order to produce the pdf file for the User's Manual, do: + + etex 0 + dvips 0 + ps2pdf 0.ps expex-doc.pdf + diff --git a/Master/texmf-dist/doc/generic/expex/source/X-code-beta.tex b/Master/texmf-dist/doc/generic/expex/source/X-code-beta.tex new file mode 100644 index 00000000000..284ac183f72 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/X-code-beta.tex @@ -0,0 +1,105 @@ + +\makeatletter +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% various strategies for typesetting \tt material + +\chardef\other=12 +\def\allnormal{\catcode`\\=\other \catcode`\{=\other + \catcode`\}=\other \catcode`\$=\other \catcode`\&=\other + \catcode`\#=\other \catcode`\%=\other \catcode`\~=\other + \catcode`\_=\other \catcode`\^=\other} +\def\ttverbatim{\begingroup + \allnormal \obeyspaces\obeylines \tt} +{\obeyspaces\gdef {\ }} + +\catcode`\|=\active +\catcode`\¦=\active % for | in \tt territory +\catcode`\»=\active % escape inside | ... | +\catcode`\«=\active % resume +{\obeylines % +\gdef\begintt{\ttverbatim % + \let^^M=\ \let|=\endgroup}% +} +\let|\begintt +\def¦{\char"7C\relax} +\def«{\endgroup \kern1.2pt\bgroup\sl} +\def»{\egroup\kern.4pt\begintt} + +{\catcode`\^^M=\active +\gdef\CL{% (codelines) + \vskip\lingaboveexskip + \par \begingroup \parindent=0pt \leftskip=1em + \allnormal \tt % + \catcode`^^M=\active \let^^M=\par % + \catcode`\|=0 \obeyspaces \@gobble}% +\gdef\CLboxed{% + \leavevmode\vtop \bgroup \begingroup \allnormal \tt + \catcode`^^M=\active \let^^M=\cr % + \catcode`\|=0 % + \obeyspaces\halign\bgroup ##}% +\gdef\@CLnum{% + \parindent=0pt + \catcode`\^^M=\active \let^^M=\specialpar % + \catcode`\|=0 }% +} +\def\endCL{\endgroup \vskip\lingbelowexskip}% +\def\endCLboxed{\egroup \endgroup\egroup}% +\def\specialpar{% + \par + \@specialpar +} +\def\@specialpar{% + \leavevmode + \hbox to1.8em{\hbox to10pt{\hfil\tenrm \the\pexcnt}% + \hfil + \global\advance\pexcnt by 1}% +} +\def\CLnum{\smallskip\pexcnt=1 \morecode} +\def\morecode{% + \smallskip \begingroup + \allnormal\obeyspaces\@CLnum\tt% +} +\def\endCLnum{\endgroup\medskip} + + +\def\exCL{\ex \tt \pexcnt=1 \allnormal + \catcode`\|=0 + \@exCL +} +{\catcode`\^^M=\active % + \gdef\@exCL{% + \catcode`\^^M=\active % + \let^^M=\sp@cialpar % + }% +}% +\def\sp@cialpar{% + \ifnum\pexcnt>1 \obeyspaces\par \fi + \@specialpar +% \leavevmode +% \hbox to1.8em{\hbox to10pt{\hfil\tenrm \the\pexcnt}% +% \hfil +% \global\advance\pexcnt by 1}% +} +% +\def\@#1{$^{\>#1}$} % |@ for footnotes inside \CL +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\def\CLframed{% + \medskip + \line\bgroup + \vrule\hss + \vbox\bgroup\leftskip=1em + \hrule + \medskip + \CL\relax} +\def\endCLframed{% + \endCL + \medskip + \hrule + \egroup + \hss\vrule + \egroup + \medskip +} +\resetatcatcode + + diff --git a/Master/texmf-dist/doc/generic/expex/source/X-contents.tex b/Master/texmf-dist/doc/generic/expex/source/X-contents.tex new file mode 100644 index 00000000000..19621dc770d --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/X-contents.tex @@ -0,0 +1,19 @@ +%\global\pageno=1 +\setbox0=\hbox{14} +\edef\sec#1{\par\noexpand\leavevmode + \noexpand\hbox to\the\wd0{\hfil#1}\quad \ignorespaces} +\edef\app#1{\par\noexpand\leavevmode + \noexpand\hbox to\the\wd0{\hfil#1}\quad \ignorespaces} +\setbox0=\hbox{14.1} +\edef\subsec#1{\hskip3em\noexpand\leavevmode + \noexpand\hbox to\the\wd0{\hfil#1}\quad \ignorespaces} +\def\tocidx#1{#1\ignorespaces} +\let\TT=\tt + +\openup.6ex + +\centerline{\titlefont{sec} Contents}\bigskip + +\input 0.toc + +\vfil\break diff --git a/Master/texmf-dist/doc/generic/expex/source/X-lingdoc.tex b/Master/texmf-dist/doc/generic/expex/source/X-lingdoc.tex new file mode 100644 index 00000000000..c4c29ce8bdb --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/X-lingdoc.tex @@ -0,0 +1,283 @@ + +\makeatletter +% +% ------ headline, footline, \psteverypage ------ +% +\def\jfoutput{% + \shipout\vbox{% + \hbox to0pt{\the\psteverypage\hss}\pagebody} + \advancepageno + \ifnum\outputpenalty>-20000 \else\dosupereject\fi} +\let\plainoutput=\jfoutput +\newtoks\psteverypage +% only commands with dimensionless results allowed in \psteverypage +\psteverypage={\mkheadline} +%\psteverypage={\mkheadline\showindexproofs} +%\def\showindexproofs{\showbox\@indexproof} +\def\mkheadline{\rput[Bl](0,\lingheadlinelevel)% + {\hbox to\hsize{\spaceskip=0pt \ling@headline}}} +\define@ling@cmdkeys{headline} +\define@linginckey\dimen{headlinelevel} +%\define@ling@inckey{headlinelevel} +\lingset{headline=\HLfilename,headlinelevel=.5truein} +\def\HLfilename{% + \fulldate\qquad + \edef\temp{\topmark}\edef\Temp{\botmark}% + [ {\ifx\temp\Temp\else + \ifx\temp\@empty\else + \temp\ / \fi\fi\Temp} ]\hfill Page \the\pageno +} +\def\fulldate{% + {\the\day} {% + \ifcase\month \or January\or February\or March\or + April\or May\or June\or July\or August\or September\or + October\or November\or December\fi} \the\year +} +\def\HLpageonly{\hfil\ifnum\pageno>1 \the\pageno\fi} +\def\HLpageonlybb{% + \ifodd\pageno\hfill\fi + \ifnum\pageno>1 Page \the\pageno\fi \hfil +} +\def\HLdateandpage{% + \ifnum\pageno>1 + \fulldate\hfil \the\pageno \else \hfil\fulldate\fi +} +\def\bottomnumbers{% + \ifnum\pageno>1 + {\advance\vsize by3em + \rput(.5\hsize,-\vsize){\tenrm\the\pageno}}\fi +} +% +% ------ sections ------ +% + +\newcount\secno +\secno=0 +\newcount\subsecno +\newcount\subsubsecno +\newcount\subsubsubsecno +\define@ling@cmdkeys{secno,subsecno,subsubsecno,subsubsubsecno} +\outer\def\section #1\par{% + \global\advance\secno by 1 \global\subsecno=0 + \vskip0pt plus.3\vsize\penalty0 + \vskip0pt plus-.3\vsize\bigskip\vskip\parskip + {\noindent \titlefont{sec} + \the\secno.\enskip #1}\par\nobreak + \medskip\noindent +} +\def\subsection{\@getoptionalarg\@subsection} +\def\@subsection{% + \global\advance \subsecno by 1 \global\subsubsecno=0 + \vskip0pt plus.1\vsize\penalty0 + \vskip0pt plus-.1\vsize\bigskip\vskip\parskip + \noindent \@optionalarg \bgroup\titlefont{sub} + \the\secno .\the\subsecno. \enskip + \@@subsection +} +\def\@@subsection #1\par{#1\egroup\par\nobreak + \medskip\noindent +} +\outer\def\subsubsection #1 \par{% + \global\advance \subsubsecno by 1 \global\subsubsubsecno=0 + \vskip0pt plus.1\vsize\penalty0 + \vskip0pt plus-.1\vsize\bigskip\vskip\parskip + {\noindent \titlefont{subsub} + \the\secno .\the\subsecno.\the\subsubsecno \enskip #1}\par\nobreak + \medskip\nobreak\noindent +} +\def\subsubsubsection #1 \par{\advance\subsubsubsecno by 1 + \vskip0pt plus.1\vsize\penalty0 + \vskip0pt plus-.1\vsize\medskip + \noindent {\it \the\secno.\the\subsecno.\the\subsubsecno + .\the\subsubsubsecno\enspace #1}:\hskip.5em +} +\def\bulletsection #1\par{% + \vskip0pt plus.1\vsize\penalty0 + \vskip0pt plus-.1\vsize\medskip + \noindent $\bullet$\enspace + {\it #1}\par\nobreak\medskip\nobreak\noindent +} +% +% ------ index ------ +% +\newif\ifgatherindex +\gatherindexfalse +\newwrite\ling@indexfile +\def\write@index{\write\ling@indexfile} +\def\gatherindex{% + \gatherindextrue + \immediate\openout\ling@indexfile=G-index +} +% +% ------ contents +% +\newif\ifgathercontents +\gathercontentsfalse +\newwrite\ling@contentsfile +\def\write@contents{\write\ling@contentsfile} +\def\gathercontents{% + \gathercontentstrue + \immediate\openout\ling@contentsfile=\jobname.toc +} +% +% ----- title, disclaimer ------ +% +\def\title{% + \bgroup + \leftskip=0pt plus 1fil \rightskip=0pt plus 1fil + \parindent=0pt \parfillskip=0pt + \titlefont{main}% +} +\def\author{\vskip.7em \titlefont{subsub}} +\def\endtitle{\vskip1.6em \egroup} +\def\disclaimer{% + \leavevmode + \bgroup \parindent=0pt + \baselineskip=13pt + \vskip-.8truein + \hrule + \medskip +} +\def\enddisclaimer{% + \medskip + \egroup + \hrule + \vskip2.5em plus 2em minus .2em +} +% +% ------ footnotes ------ +% +\newif\ifgathernotes +\gathernotesfalse +\newwrite\ling@notesfile +\def\write@notes{\write\ling@notesfile} +\def\gathernotes{% + \gathernotestrue + \immediate\openout\ling@notesfile=G-notes.tex +} +%\def\footnote{\footsetup \footbody} +%\def\footsetup{% +% \edef\fntempsf{\the\spacefactor}% +% \putfnno +% \spacefactor=\fntempsf +%} +%\def\putfnno{% +% \global\advance\fnno by 1 +% ${}^{\the\fnno}$% +%} +%\newcount\fnno +%\fnno=0 +%\def\footbody{% +% \ifgathernotes\immediate\write\ling@notesfile{}\fi +% \edef\n@xt{\noexpand\noexpand\noexpand \note\the\fnno}% +% \ifgathernotes +% \immediate\write\ling@notesfile{\n@xt}\fi +% \fnverbatim +%} +%\def\fnverbatim{\begingroup\setupcopyfn\copyfnfirst} +%\def\setupcopyfn{% +% \def\do##1{\catcode`##1=12 }% +% \dospecials +% \obeylines% +%} +%{\obeylines +%\gdef\copyfnfirst#1 +% {\def\n@xt{#1}% +% \ifx\n@xt\empty% +% \else% +% \ifgathernotes\immediate\write\ling@notesfile{\n@xt}\fi% +% \fi% +% \copyfn% +%} +%\gdef\copyfn#1 +% {\def\n@xt{#1}% +% \ifx\n@xt\endfn% +% \ifgathernotes\immediate\write\ling@notesfile{}\fi% +% \let\n@xt=\endgroup% +% \else% +% \ifgathernotes\immediate\write\ling@notesfile{\n@xt}\fi% +% \let\n@xt=\copyfn% +% \fi% +% \n@xt }% +%} +%\def\endfn{"endfootnote} +\def\raisedasterisk{\raise3pt\rlap{\twelverm *}} +\def\ackmark{$\,{}^1$ \global\fnno=1} +%% ???? check code below +\long\def\acknowledgement#1{% + \global\advance\fnno by 1 + {\edef\next{% + \immediate\write@notes{\noexpand\note\the\fnno}}\next}% + \immediate\write\ling@notesfile{#1}% + \immediate\write\ling@notesfile{}} +\def\dumpnotes{% + \immediate\closeout\ling@notesfile + \vskip30pt + \vskip.3\vsize\penalty-30\vskip-.3\vsize + \centerline{\normalsize Notes} + \medskip + \def\note ##1 {% + \smallskip\penalty10\noindent ##1.\quad}% + \footnotesize + \input G-notes.tex +} +% +% ------ references ------ +% +\def\dumprefs{% + \vskip30pt + \vskip.3\vsize\penalty-30\vskip-.3\vsize + \footnotesize + \parindent=0pt + \parskip=0pt plus 1pt + \rightskip=0pt + \tolerance=350 \interlinepenalty=400 + \centerline{\normalsize References} + \bigskip + \input @@refs.tex +} +\def\dump{% + \ifling@printnotes \dumpnotes \fi + \ifling@printrefs \dumprefs \fi +} +% +% ------ right arrows ------ +% +\def\to{% + \ifmmode \rightarrow \else + \hskip\ling@toskip$\rightarrow$\hskip\ling@toskip \fi +} +\define@ling@cmdkeys{toskip} +\def\normaltoskip{\lingset{toskip=1em minus .5em}} +\normaltoskip +\def\lingbuildrel#1#2{% + \hskip\ling@toskip + \hbox{$\buildrel {\rm #2} + \vrule width0pt depth\lingtorise height0pt + \over#1$}% + \hskip\ling@toskip +} +\def\tooby #1 {\lingbuildrel\longrightarrow{#1}} +% \hskip\ling@toskip +% \hbox{$\buildrel {\rm #1} +% \vrule width0pt depth\lingtorise height0pt +% \over\longrightarrow$}% +% \hskip\ling@toskip +%} +\define@linginckey\dimen{torise} +\def\normaltorise{\lingset{torise=1ex}} +\normaltorise +% +% ------ utilities ------ +% +\def\clap#1{\hbox to 0pt{\hss#1\hss}} + +\resetatcatcode + +\everymath={\rm} + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +\expandafter\def\expandafter\dospecials\expandafter{\dospecials\do\|} + + diff --git a/Master/texmf-dist/doc/generic/expex/source/X-local-doc.tex b/Master/texmf-dist/doc/generic/expex/source/X-local-doc.tex new file mode 100644 index 00000000000..a92c5b778ca --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/X-local-doc.tex @@ -0,0 +1,290 @@ +\makeatletter +\def\slname#1{\@ifnextchar\relax{{\sl #1}}{{\sl #1\/}}} +\def\ExPex{\slname{ExPex}} +\def\LaTex{\slname{LaTex}} +\def\Tex{\slname{Tex}} +\def\XKeyVal{\slname{XKeyVal}} +\def\PSTricks{\slname{PSTricks}} + +\def\index#1{% + \ifgatherindex + \write@index{#1, \the\pageno}% + \fi +} +% abbreviations +\def\pst#1{{\sl pst-#1}} +\def\backslash{\char"5C } +\def\titlemacro#1{{\tt \backslash #1}} +\def\titlekey#1{{\tt #1}} +\def\value#1{\hbox{$\vert|#1|\vert$}} +% headline for finished version +\dimpuba=-\vsize \advance\dimpuba by -.4in +\lingset{headline=\hfil \ifnum\pageno<1 \else \the\pageno\hfil \fi, + headlinelevel=\dimpuba} +% formatting +\def\parinventory{\pst@ifstar\parinventory@a} +%\def\parinventory@a{% +% \par \noindent Parameter{\if@star\else s\fi}:\par\nobreak +% \noindent\qquad +% \vtop\bgroup\openup1pt +% \halign\bgroup##\hfil&& \qquad ##\hfil\cr} +\def\parinventory@a{% + \par\bgroup \parindent=0pt + \halign\bgroup ##\hfil& \quad ##\hfil&& \qquad ##\hfil\cr + \omit Parameter{\if@star\else s\fi}:\hidewidth\cr + \noalign{\par\nobreak}} +\def\endparinventory{\egroup\egroup\bigskip\noindent} +%\def\begininventory{\@getoptionalarg\begininventory@a} +%\def\begininventory@a{\medskip\vbox\bgroup\hrule\medskip \bgroup +% \openup2pt +% \halign\bgroup \quad ##\hfil&& +% \hskip \ifx\@optionalarg\empty 2em \else\@optionalarg\fi ##\hfil\cr +%} +%\def\endinventory{\egroup\egroup \medskip\hrule\bigskip\egroup\noindent} +\def\parameters{\omit Parameters:\hidewidth\cr + \hfil\it key& \hfil\it value& \hfil\it initial setting} +\def\parameter{\omit Parameter:\hidewidth\cr + \hfil\it key& \hfil\it value& \hfil\it initial setting} + +\def\begininventory{\@getoptionalarg\begininventory@a} +\def\begininventory@a{\medskip\vbox\bgroup\line{\leaders\hrule\hfil}\bgroup + \openup2pt + \halign\bgroup \quad ##\hfil&& + \hskip \ifx\@optionalarg\empty 2em \else\@optionalarg\fi ##\hfil\cr +} +\def\endinventory{\egroup\egroup \medskip\hrule\egroup\bigskip\noindent} +\def\parameters{\omit Parameters:\hidewidth\cr + \hfil\it key& \hfil\it value& \hfil\it initial setting} +\def\parameter{\omit Parameter:\hidewidth\cr + \hfil\it key& \hfil\it value& \hfil\it initial setting} +\def\parameters{\omit\pst@ifstar\parameters@a} +\def\parameters@a{Parameter\if@star\else s\fi:\hidewidth\cr + \hfil\it key& \hfil\it value& \hfil\it initial + value\cr} +\def\parametersdef{\omit\pst@ifstar\parametersdef@a} +\def\parametersdef@a{Parameter\if@star\else s\fi:\hidewidth\cr + \hfil\it key& \hfil\it value& \hfil\it initial + value& \hfil\it default value\cr} +\def\macros{\omit\pst@ifstar\macros@a} +\def\counter{\omit Counter:\enspace} +\def\endmc{\hidewidth\cr} +\def\macros@a{Macro\if@star\else s\fi:\enspace} + +\def\beginmacinventory{\pst@ifstar\beginmacinventory@a} +\def\beginmacinventory@a{\bgroup\parindent=0pt \hrule\medskip + Macro{\if@star \else s\fi}:\enspace} +\def\endmacinventory{\medskip\egroup\hrule\bigskip\noindent} + + +%\def\begininventory{\bigskip\bgroup +% \setbox0=\vtop\bgroup\openup2pt +% \halign\bgroup \quad ##\hfil&& \tspace ##\hfil\cr +%} +%\def\endinventory{\egroup\egroup +% \noindent +% \psframebox[framesep=1ex,boxsep=false,doubleline=true]{\box0}% +% \egroup\bigskip} + + +\def\smalldisplay{\medskip\noindent\hfil} +\def\endsmalldisplay{\medskip\noindent} +\def\excentered{\@getoptionalarg\exc@a} +\def\exc@a{% +\vbox\bgroup\bigskip \leftskip=0pt plus 1fil + \rightskip=0pt plus 1.2fil \parindent=0pt \parfillskip=0pt + \ifx\@optionalarg\@empty \else \hsize=\jf@pars \fi + \let\xe=\exc@b + \hrule + \par\nobreak + \bigskip +} +\def\exc@b{\par\nobreak\bigskip\hrule\bigskip\egroup} +% \tfb (tight frame box) +\def\tfb{\medskip \setbox\tmpbox=\hbox\bgroup} +\def\endtfb{\egroup\noindent + \psframebox[boxsep=true,framesep=3pt]{\box\tmpbox}\medskip} + +% pst-asr utilities + +\def\slant#1{{\sl #1}} + +\parindent=2em +\rightskip=0pt plus 2em + +\newbox\@framedisplaybox +\newskip\abovefdskip +\newskip\abovefdtildeskip +\newskip\aboveexskipfd +\abovefdskip=\lingaboveexskip +\abovefdtildeskip=1ex +\define@ling@cmdkeys{abovefdskip,belowfdskip, + fdtopcorrect,fdbotcorrect,everyfd} +\Lingset{% + boxsep=false, + framesep=1.5ex, + abovefdskip=2.8ex plus .5ex, + belowfdskip=2ex plus .3ex minus .1ex, + fdtopcorrect=\lingaboveexskip, + fdbotcorrect=\lingbelowexskip +} +\def\framedisplay{\@tildecheck\framedisplay@a} +\def\framedisplay@a{\@getoptionalarg\framedisplay@aa} +\def\framedisplay@aa{\bgroup + \Ling@usearg + \setbox\@framedisplaybox=\vbox\bgroup\vskip-\ling@fdtopcorrect +} +\def\endframedisplay{% + \vskip-\ling@fdbotcorrect + \egroup + \vskip\ling@abovefdskip + \noindent + \psframebox[boxsep=false,linewidth=1.2pt]% + {\copy\@framedisplaybox}% + \vskip\ling@belowfdskip + \egroup +} +\define@choicekey{ling}{fdcorrect}[\ling@fdcorrect\@N]% + {none,both,bottom,top}{% + \ifcase\@N + \lingset{fdtopcorrect=0pt,fdbotcorrect=0pt} + \or + \lingset{fdtopcorrect=\lingaboveexskip, + fdbotcorrect=\lingbelowexskip} + \or + \lingset{fdtopcorrect=0pt, + fdbotcorrect=\lingbelowexskip} + \or + \lingset{fdtopcorrect=\lingaboveexskip, + fdbotcorrect=0pt} + \fi +} +\lingset{fdcorrect=both} + +% code fragment display +\def\codefragment{\medskip\begingroup \leftskip=3em \parindent=0pt + \obeylines} +\def\endcodefragment{\medskip\endgroup \noindent} +\def\exfrag{% + \exdisplay[exskip=1.3ex plus.4ex minus.4ex]\noexno} +% #2 can be \par, so \long is needed +\long\def\if@tildeverb#1#2{\ifx#2~\@tildetrue\def\next{#1}\else + \@tildefalse\def\next{\expandafter #1\string#2}\fi \next} +\def\codedisplay{\if@tildeverb\codedisplay@a} +\def\codedisplay@a{% + \edef\@@aboveexskip{\ifx\next\empty 0pt\else 1.5ex\fi}% + \exdisplay[aboveexskip=\@@aboveexskip, + belowexskip=1.5ex]\noexno + \verbatim} +\def\endcodedisplay{\endverbatim\xe} +\def\ellide{\kern.6em\dots\kern.3em} +\def\verbdots{\endverbatim \ellide\verbatim} + +\def\normalss{\def\leftss{.55}\def\rightss{.35}} +\def\setss #1 #2 {\def\leftss{#1}\def\rightss{#2}} +\normalss + +% side by side, code and output +\def\beginss{\if@tildeverb\beginss@a} +\def\beginss@a{% + \if@tilde\else\bigskip\fi + \bgroup + \parindent=0pt + \noindent + \line + \bgroup\vtop\bgroup + \hsize=\leftss\hsize + \verbatim +} +\def\midss{% + \endverbatim + \egroup + \hsize=\rightss\hsize + \setbox\@framedisplaybox=\vtop\bgroup + \lingset{exskip=0pt} + +} +\def\endss{% + \egroup + \hfill + \vtop{% + \psframebox[boxsep=false]{\box\@framedisplaybox}% + \bigskip}% + \egroup\egroup + \bigskip + \noindent +} +% auxiliary fonts +\font\spacefont=txsya at 10pt +\font\titlett=txtt at 13.3pt + +\edef\spacesym{\lower1.6pt + \hbox to\wd0{\spacefont \kern.3pt\char"78 \hss\char"79 \kern.3pt}} +\def\ttcs#1{{\tt \char"5C #1}} + +\outer\def\section #1\par{% + \global\advance\secno by 1 \global\subsecno=0 + \global\subsubsecno=0 + \vfil\eject + {\noindent \sectiontitlefont + \the\secno.\enskip #1\par}\nobreak + \xdef\sectiontitle{\twelverm Section \the\secno:\enspace #1}% + \ifgathercontents \edef\temp{{\the\secno}}% + \expandafter\writecontents\temp{#1}\sec\fi \nobreak + \medskip\nobreak\noindent +} +%\def\mkheadline{%\rput[Bl](0,\lingheadlinelevel){% +% \rput[Bl](0,5.5ex){\hbox to\hsize{\sectiontitle\hfil +% \ifnum\pageno>0 \the\pageno \fi}}} +\def\sectiontitle{} +\font\sectiontitlefont=t1xss at 14pt + +\def\chapscurrsec{\ifnum\chapno>0 \the\chapno + \ifnum\secno>0 .\the\secno + \ifnum\subsecno>0 .\the\subsecno + \ifnum\subsubsecno>0 .\the\subsubsecno \fi\fi\fi\fi} +\def\nochapscurrsec{\ifnum\secno>0 \the\secno + \ifnum\subsecno>0 .\the\subsecno + \ifnum\subsubsecno>0 .\the\subsubsecno \fi\fi\fi} +\let\currsec\nochapscurrsec +\def\deftagsec#1{\deftag\currsec{#1}} +\def\introsec#1{% + \noindent \the\introsecno.\enspace + \advance\introsecno by 1 + {\it #1} + \medskip +} +\newcount\introsecno +\introsecno=1 +\define@lingcmdkeys{secfil} +\outer\def\section #1\par{% + \global\advance\secno by 1 + \global\subsecno=0 + \global\subsubsecno=0 + \vskip0pt plus \lingsecfil + \penalty-20 + \vskip0pt plus -\lingsecfil + \bigskip + \vskip\parskip + {\noindent \titlefont{main} + \the\secno.\enskip #1}\par\nobreak + \ifgathercontents \edef\temp{{\the\secno}}% + \expandafter\writecontents\temp{#1}\sec\fi + \medskip\noindent +} +\lingset{secfil=.2\vsize} + +\resetatcatcode + +\lingset{exbreakfil=8ex} +\raggedbottom +\def\dimskip{\hskip.12em} +\def\textdim#1{\textdimA#1 } +\def\textdimA#1 #2 {\hbox{#1\dimskip #2}} +\def\user{\raise.2ex\hbox{$\dag $}} +\def\inc{(!)\kern.7pt} +% ---- small caps +%\font\twelvesc=cmcsc10 scaled\magstep1 +\let\sc=\twelvesc +\def\textsc#1{{\sc #1}} +% + diff --git a/Master/texmf-dist/doc/generic/expex/source/X-mkindex.tex b/Master/texmf-dist/doc/generic/expex/source/X-mkindex.tex new file mode 100644 index 00000000000..f1d855a3a83 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/X-mkindex.tex @@ -0,0 +1,61 @@ + +\vfil\break +\tocentry{Index of control sequences, parameters, and +special symbols}\tocidx{} + +%\def\indexentry#1#2{#1\hfill #2} +% + +\newbox\indexbox +\newbox\leftcol +\newbox\rightcol + + +\def\beginindexbox{% + \setbox\indexbox=\vbox\bgroup\parskip=0pt plus .4pt + \everypar={\hangindent=1em \hangafter=1}% + \linepenalty=200 \hsize=.45\hsize \rightskip=0pt plus 1em + \parindent=0pt + \obeylines} +\let\endindexbox\egroup + +\beginindexbox% +\obeylines\input ./0-index.tex +\endindexbox + +\splittopskip=0pt +\dimpubb=\dimexpr \vsize -55pt \relax +\dimpuba=\dimexpr \vsize -10pt \relax + +\def\firstpage{\setbox\leftcol=\vsplit\indexbox to \dimpubb + \setbox\rightcol=\vsplit\indexbox to \dimpubb + \line{\vtop{\vskip\splittopskip\unvbox\leftcol}\hfil + \vtop{\unvbox\rightcol}}% + \vfil\break +} +\def\fullpage{\setbox\leftcol=\vsplit\indexbox to \dimpuba + \setbox\rightcol=\vsplit\indexbox to \dimpuba + \line{\vtop{\vskip\splittopskip\unvbox\leftcol}\hfil + \vtop{\unvbox\rightcol}} + \vfil\break +} +\def\lastpage{% + \setbox\leftcol=\vsplit\indexbox to .54\ht\indexbox + \setbox\rightcol=\vsplit\indexbox to \ht\indexbox + \line{\vtop{\vskip\splittopskip\unvbox\leftcol}\hfil + \vtop{\unvbox\rightcol}}% +} + + +\vfil\eject +\xdef\sectiontitle{Index}% +\leavevmode\vskip-1ex +\centerline{\sectiontitlefont Index of control sequences, +parameters, and special symbols\qquad} +\bigskip + +\firstpage +\lastpage + +\endinput + diff --git a/Master/texmf-dist/doc/generic/expex/source/X-mybasics.tex b/Master/texmf-dist/doc/generic/expex/source/X-mybasics.tex new file mode 100644 index 00000000000..07e96cca611 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/X-mybasics.tex @@ -0,0 +1,22 @@ + +\def\writeln#1{\immediate\write16{#1}\ignorespaces} +\def\makeatletter{% + \edef\resetatcatcode{\catcode`\noexpand\@\the\catcode`\@\relax}% + \catcode`\@11\relax +}% +\makeatletter +% \get is like \input, but is more tolerant of special characters +% and groups the input +\def\get{\begingroup \get@A \get@B} +\def\get@A{\bgroup \catcode`_=11 \catcode`~=11} +\def\get@B #1 {\get@C #1 \endgroup} +% \getinput reads funny file names, but doesn't group +\def\getinput{\get@A \get@C} +\def\get@C #1 {\gdef\@filename{#1}\egroup \mark{\@filename} + \input\@filename} +%% public dimensions and skips (for general use) +\newdimen\dimpuba +\newdimen\dimpubb +\def\@enamedef#1{\expandafter\edef\csname #1\endcsname} +\resetatcatcode + diff --git a/Master/texmf-dist/doc/generic/expex/source/X-sections.tex b/Master/texmf-dist/doc/generic/expex/source/X-sections.tex new file mode 100644 index 00000000000..2c6a4163167 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/X-sections.tex @@ -0,0 +1,84 @@ +% sections +\makeatletter + +\outer\def\section #1\par{% + \global\advance\secno by 1 \global\subsecno=0 + \global\subsubsecno=0 + \vskip0pt plus.4\vsize\penalty-120 + \vskip0pt plus-.4\vsize\bigskip\vskip\parskip + {\noindent \titlefont{sec} + \the\secno.\enskip #1\par}\nobreak + \tocentry{\the\secno}\sec +% \ifgathercontents \edef\temp{{\the\secno}}% +% \expandafter\writecontents\temp{#1}\sec\fi + \nobreak + \medskip + \nobreak + \noindent +} +% The starred version does not introduce a breakpoint, so that an +% immediately preceeding section heading is not orphaned. +\def\subsection{\pst@ifstar\sub@section} +\def\sub@section #1\par{% + \global\advance \subsecno by 1 + \global\subsubsecno=0 + \if@star + \else + \vskip0pt plus.1\vsize\penalty-100 + \vskip0pt plus-.1\vsize + \fi + \bigskip\vskip\parskip + {\noindent \titlefont{sub}% + \the\secno .\the\subsecno.\enskip \ignorespaces #1}\par\nobreak + \tocentry{\the\secno.\the\subsecno}\subsec{#1} + \par\nobreak\medskip\nobreak\noindent +} +\outer\def\subsubsection #1 \par{% + \global\advance \subsubsecno by 1 \global\subsubsubsecno=0 + \vskip0pt plus.1\vsize\penalty0 + \vskip0pt plus-.1\vsize\bigskip\vskip\parskip + {\noindent \titlefont{subsub} + \the\secno .\the\subsecno.\the\subsubsecno \enskip #1}\par\nobreak +% \tocentry{\the\secno.\the\subsecno.\the\subsubsecno}\subsubsec{#1} + \medskip\nobreak\noindent +} +\def\tocentry#1#2#3{% + \ifgathercontents \edef\temp{{#1}}% + \expandafter\writecontents\temp{#3}#2\fi +} +\def\writecontents#1#2#3{% + \write@contents{\noexpand#3{#1} {#2} + \noexpand\writefill \the\pageno \noexpand\par}% +} +\def\writefill{% + \leaders\hbox to 2ex{\hfil.\hfil}\hfill\enspace +} +\outer\def\appendix#1#2\par{% + \vskip0pt plus.4\vsize\penalty-20 + \vskip0pt plus-.4\vsize\bigskip\vskip\parskip + \def\app@name{#1}\subsecno=0% + {\noindent \titlefont{sec} + Appendix #1.\enspace + \ignorespaces#2\par}\nobreak + \ifgathercontents \edef\temp{{#1}}% + \expandafter\writecontents\temp{#2}\sec\fi + \medskip\nobreak\noindent +} +\def\subappendix#1\par{% + \medskip + \noindent + \advance\subsecno by 1 + {\titlefont{sub}\app@name.\the\subsecno.\enspace + \ignorespaces#1\medskip\noindent}% + \ifgathercontents \edef\temp{{\app@name.\the\subsecno}}% + \expandafter\writecontents\temp{#1}\subsec\fi \nobreak +} +\def\currsec{\ifnum\secno>0 \the\secno + \ifnum\subsecno>0 .\the\subsecno + \ifnum\subsubsecno>0 .\the\subsubsecno \fi\fi\fi} +\def\deftagsec#1{\deftag\currsec{#1}} + +%\newif\iftracingtagrefs + + +\resetatcatcode diff --git a/Master/texmf-dist/doc/generic/expex/source/X-timesfonts.tex b/Master/texmf-dist/doc/generic/expex/source/X-timesfonts.tex new file mode 100644 index 00000000000..b354bd897ab --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/X-timesfonts.tex @@ -0,0 +1,472 @@ +%%%%%%%%%%% fonts +% Cork encoding is used so that accents work properly with +% tipa fonts. Accents must be redefined (below). +% rm +\font\twelverm=t1xr at 12pt +\font\elevenrm=t1xr at 11pt +\font\tenrm=t1xr at 10pt +\font\ninerm=t1xr at 9pt +\font\eightrm=t1xr at 8pt +\font\sevenrm=t1xr at 7pt +\font\sixrm=t1xr at 6pt +\font\fiverm=t1xr at 5pt +% mit +\font\twelvei=txmi at 12pt +\font\eleveni=txmi at 11pt +\font\teni=txmi at 10pt +\font\eighti=txmi at 8pt +\font\seveni=txmi at 7pt +\font\sixi=txmi at 6pt +\font\fivei=txmi at 5pt +% bold mit +\font\sevenbi=txbmi at 7pt +% mita +\font\twelveia=txmia at 12pt +\font\elevenia=txmia at 11pt +\font\tenia=txmia at 10pt +% symbol +\font\twelvesy=txsy at 12pt +\font\elevensy=txsy at 11pt +\font\tensy=txsy at 10pt +\font\eightsy=txsy at 8pt +\font\sevensy=txsy at 7pt +\font\sixsy=txsy at 6pt +\font\fivesy=txsy at 5pt +% extended symbol +\font\twelveex=txex at 12pt +\font\elevenex=txex at 11pt +\font\tenex=txex at 10pt +\font\eightex=txex at 8pt +\font\sevenex=txex at 7pt +\font\sixex=txex at 6pt +\font\fiveex=txex at 5pt +% sl +\font\twelvesl=t1xsl at 12pt +\font\elevensl=t1xsl at 11pt +\font\tensl=t1xsl at 10pt +\font\eightsl=t1xsl at 8pt +\font\sevensl=t1xsl at 7pt +\font\sixsl=t1xsl at 6pt +\font\fivesl=t1xsl at 5pt +% bf +\font\twelvebf=t1xb at 12pt +\font\elevenbf=t1xb at 11pt +\font\tenbf=t1xb at 10pt +\font\eightbf=t1xb at 8pt +\font\sevenbf=t1xb at 7pt +\font\sixbf=t1xb at 6pt +\font\fivebf=t1xb at 5pt +% tt +\font\twelvett=txtt at 12pt +\font\eleventt=txtt at 11pt +\font\tentt=txtt at 10pt +\font\eighttt=txtt at 8pt +\font\seventt=txtt at 7pt +\font\sixtt=txtt at 6pt +% it +\font\twelveit=t1xi at 12pt +\font\elevenit=t1xi at 11pt +\font\tenit=t1xi at 10pt +\font\eightit=t1xi at 8pt +\font\sevenit=t1xi at 7pt +\font\sixit=t1xi at 6pt +\font\fiveit=t1xi at 5pt +% bold symbol +\font\twelvebsy=txbsy at 12pt +\font\elevensy=txbsy at 11pt +\font\tenbsy=txbsy at 10pt +\font\ninebsy=txbsy at 9pt +\font\eightbsy=txbsy at 8pt +\font\sevenbsy=txbsy at 7pt +\font\sixbsy=txbsy at 6pt +\font\fivebsy=txbsy at 5pt +% bold slant +\font\twelvebsl=t1xbsl at 12pt +\font\tenbsl=t1xbsl at 10pt +\font\eightbsl=t1xbsl at 8pt +\font\sevenbsl=t1xbsl at 7pt +\font\sixbsl=t1xbsl at 6pt +% ipr +\font\twelveipr=xipa10 at 12pt +\font\tenipr=xipa10 at 10pt +\font\eightipr=xipa10 at 8pt +\font\sevenipr=xipa10 at 7pt +\font\sixipr=xipa10 at 6pt +\font\fiveipr=xipa10 at 5pt +% ips +\font\twelveips=xipasl10 at 12pt +\font\tenips=xipasl10 at 10pt +\font\eightips=xipasl10 at 8pt +\font\sevenips=xipasl10 at 7pt +\font\sixips=xipasl10 at 6pt +\font\fiveips=xipasl10 at 5pt +% ipb +\font\twelveipb=xipab10 at 12pt +\font\tenipb=xipab10 at 10pt +\font\eightipb=xipab10 at 8pt +\font\sevenipb=xipab10 at 7pt +\font\sixipb=xipab10 at 6pt +\font\fiveipb=xipab10 at 5pt +% ipbs +\font\twelveipbs=xipabs10 at 12pt +\font\tenipbs=xipabs10 at 10pt +\font\eightipbs=xipabs10 at 8pt +\font\sevenipbs=xipabs10 at 7pt +\font\sixipbs=xipabs10 at 6pt +\font\fiveipbs=xipabs10 at 5pt +% small caps +\font\twelvesc=t1xsc at 12pt +\font\tensc=t1xsc at 10pt +\makeatletter +\define@ling@cmdkeys{titles} +%%%% title fonts +\def\settitlefont[#1,#2,#3]#4={% + \expandafter\def\expandafter\temp\expandafter + {\csname #2titlefont#1#3\endcsname}% + \@ifnextchar={\expandafter\let\temp}{\expandafter\font\temp}% +} +\def\notitles{\def\titlefont##1{\sl}} +\def\sstitles{% + \settitlefont[ss,main,] =t1xss at 16pt + \settitlefont[ss,main,sl] =t1xsssl at 16pt + \settitlefont[ss,sec,] =t1xss at 12.5pt + \settitlefont[ss,sec,sl] =t1xsssl at 13pt + \settitlefont[ss,sec,tt] =txtt at 14pt + \settitlefont[ss,sub,] =t1xss at 12pt + \settitlefont[ss,sub,sl] =t1xsssl at 12pt + \settitlefont[ss,sub,tt] =txtt at 13pt + \settitlefont[ss,subsub,] =t1xss at 12pt + \settitlefont[ss,subsubsub,] =t1xsssl at 12pt + \def\titlefont##1{\csname ##1titlefontss\endcsname + \expandafter\let\expandafter\sl + \csname ##1titlefontsssl\endcsname + \expandafter\let\expandafter\tt + \csname ##1titlefontsstt\endcsname + \ignorespaces}} +\def\rmtitles{% + \settitlefont[rm,main,] =txb at 16pt + \settitlefont[rm,main,sl] =txbsl at 16pt + \settitlefont[rm,sec,] =txb at 14pt + \settitlefont[rm,sec,sl] =txbsl at 14pt + \settitlefont[rm,sub,] =txb at 13pt + \settitlefont[rm,sub,sl] =txbsl at 13pt + \settitlefont[rm,subsub,] \twelvebf + \settitlefont[rm,subsub,sl] \twelvebs + \def\titlefont##1{\csname ##1titlefontrm\endcsname + \expandafter\let\expandafter\sl + \csname ##1titlefontrmsl\endcsname + \expandafter\let\expandafter\tt + \csname ##1titlefontrmtt\endcsname \ignorespaces}% +} +%%%% title fonts +\def\settitlefont[#1,#2,#3]#4={% + \expandafter\def\expandafter\temp\expandafter + {\csname #2@TF#1@#3\endcsname}% + \@ifnextchar={\expandafter\let\temp}{\expandafter\font\temp}% +} +\def\notitles{\def\titlefont##1{\sl}} +\def\sstitles{% + \settitlefont[ss,main,] =t1xss at 16pt + \settitlefont[ss,main,sl] =t1xsssl at 16pt + \settitlefont[ss,sec,] =t1xss at 12.5pt + \settitlefont[ss,sec,sl] =t1xsssl at 13pt + \settitlefont[ss,sec,tt] =txtt at 14pt + \settitlefont[ss,sub,] =t1xss at 12pt + \settitlefont[ss,sub,sl] =t1xsssl at 12pt + \settitlefont[ss,sub,tt] =txtt at 13pt + \settitlefont[ss,subsub,] =t1xss at 12pt + \settitlefont[ss,subsubsub,] =t1xsssl at 12pt + \def\titlefont##1{% + \csname ##1@TFss@\endcsname + \expandafter\let\expandafter\sl + \csname ##1@TFss@sl\endcsname + \expandafter\let\expandafter\tt + \csname ##1@TFss@tt\endcsname + \ignorespaces}% +} +\def\rmtitles{% + \settitlefont[rm,main,] =txb at 16pt + \settitlefont[rm,main,sl] =txbsl at 16pt + \settitlefont[rm,sec,] =txb at 14pt + \settitlefont[rm,sec,sl] =txbsl at 14pt + \settitlefont[rm,sub,] =txb at 13pt + \settitlefont[rm,sub,sl] =txbsl at 13pt + \settitlefont[rm,subsub,] ==\twelvebf + \settitlefont[rm,subsub,sl] ==\twelvebs + \def\titlefont##1{\csname ##1@TFrm@\endcsname + \expandafter\let\expandafter\sl + \csname ##1@TFrm@sl\endcsname + \expandafter\let\expandafter\tt + \csname ##1@TFrm@tt\endcsname \ignorespaces}% +} +\ifx\ling@titles\undefined \lingset{titles=ss}\fi +\csname \ling@titles titles\endcsname + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% already allocated 0,1,2,3,\itfam (4), \slfam (5), +% \bffam (6), \ttfam (7) + +\newfam\bcalfam % 8 bold math symbol +\newfam\smallcalfam % 9 small math symbol +\newfam\smallrmfam % A +\newfam\mitafam % B alternate math symbol +\newfam\iprfam % C +\newfam\ipsfam % D +\newfam\ipbfam % E +\newfam\ipbsfam % F + +\newtoks\everysizechange \everysizechange={} + +\def\twelvepoint{% + \textfont0=\twelverm + \scriptfont0=\eightrm + \scriptscriptfont0=\sixrm + \textfont1=\twelvei + \scriptfont1=\eighti + \scriptscriptfont1=\sixi + \textfont2=\twelvesy + \scriptfont2=\eightsy + \scriptscriptfont2=\sixsy + \textfont3=\twelveex + \scriptfont3=\eightex + \scriptscriptfont3=\sixex + \textfont\itfam=\twelveit + \scriptfont\itfam=\eightit + \textfont\slfam=\twelvesl + \scriptfont\slfam=\eightsl + \scriptscriptfont\slfam=\sixsl + \textfont\bffam=\twelvebf + \scriptfont\bffam=\eightbf + \scriptscriptfont\bffam=\sixbf + \textfont\ttfam=\twelvett + \scriptfont\ttfam=\eighttt + \textfont\bcalfam=\twelvebsy + \scriptfont\bcalfam=\eightbsy + \textfont\smallcalfam=\tensy + \scriptfont\smallcalfam=\sevensy + \textfont\smallrmfam=\tenrm + \scriptfont\smallrmfam=\sevenrm + \textfont\mitafam=\twelveia + \textfont\iprfam=\twelveipr + \textfont\ipsfam=\twelveips + \textfont\ipbfam=\twelveipb + \textfont\ipbsfam=\twelveipbs + \def\rmr{\fam0 \twelverm }% + \def\rms{\fam\slfam \twelvesl }% + \def\rmb{\fam\bffam \twelvebf }% + \def\rmbsl{\fam\bslfam \twelvebsl }% + \def\rm{\rmr \let\sl\rms \let\bf\rmb \let\bsl\rmbs} + \let\ipr=\twelveipr + \let\ips=\twelveips + \let\ipb=\twelveipb + \let\ipbs=\twelveipbs + \def\ip{\ipr \let\sl\ips \let\bsl\ipbs} + \def\tt{\fam\ttfam \twelvett }% + \def\it{\fam\itfam \twelveit }% + \let\mita=\twelveia + \normalbaselineskip=14pt + \def\examplebaselines{% + \baselineskip=\normalbaselineskip + \lineskip=\normallineskip + \lineskiplimit=\normallineskiplimit}% + \bigskipamount=12pt plus4pt minus4pt + \setbox\strutbox=\hbox{\vrule height10pt depth4pt width0pt}% + \let\sc=\twelvesc + \let\big=\twelvebig + \normalbaselines + \rm + \the\everysizechange +} + +%% fix the baselineskip +\def\elevenpoint{\def\jf@fontsize{eleven}% + \textfont0=\elevenrm \scriptfont0=\eightrm \scriptscriptfont0=\sixrm + \textfont1=\eleveni \scriptfont1=\eighti \scriptscriptfont1=\sixi + \textfont2=\elevensy \scriptfont2=\eightsy \scriptscriptfont2=\sixsy + \textfont3=\elevenex \scriptfont3=\eightex \scriptscriptfont3=\sixex + \textfont\slfam=\elevensl \scriptfont\slfam=\eightsl + \scriptscriptfont\slfam=\sixsl + \textfont\bffam=\elevenbf \scriptfont\bffam=\eightbf + \scriptscriptfont\bffam=\sixbf + \textfont\ttfam=\eleventt \scriptfont\ttfam=\eighttt + \textfont\itfam=\elevenit \scriptfont\itfam=\eightit + \def\rm{\fam0 \elevenrm }% + \def\tt{\fam\ttfam \eleventt }% + \def\it{\fam\itfam \elevenit }% + \def\sl{\fam\slfam \elevensl }% + \def\bf{\fam\bffam \elevenbf }% + \let\mita=\elevenia + \normalbaselineskip=13pt + \bigskipamount=13pt plus2pt minus2pt + \def\examplebaselines{% + \baselineskip=13pt plus 2pt minus 1pt + \lineskiplimit=2pt + \lineskip=2pt plus 1pt + }% + \setbox\strutbox=\hbox{\vrule height10pt depth3pt width0pt}% + \normalbaselines + \rm + \the\everysizechange +} + +\def\tenpoint{\def\jf@fontsize{ten}% + \textfont0=\tenrm \scriptfont0=\sevenrm \scriptscriptfont0=\fiverm + \textfont1=\teni \scriptfont1=\seveni \scriptscriptfont1=\fivei + \textfont2=\tensy \scriptfont2=\sevensy \scriptscriptfont2=\fivesy + \textfont3=\tenex \scriptfont3=\sevenex \scriptscriptfont3=\fiveex + \textfont\slfam=\tensl \scriptfont\slfam=\sevensl + \textfont\bffam=\tenbf \scriptfont\bffam=\sevenbf + \textfont\ttfam=\tentt \scriptfont\ttfam=\seventt + \textfont\itfam=\tenit \scriptfont\itfam=\sevenit +% \textfont\bslfam=\tenbsl \scriptfont\bslfam=\sevenbsl +% \textfont\bcalfam=\tenbsy +% \scriptfont\bcalfam=\sevenbsy +% \textfont\smallrmfam=\eightrm +% \scriptfont\smallrmfam=\sixrm +% \textfont\smallcalfam=\eightsy +% \scriptfont\smallcalfam=\sevensy +% \textfont\iprfam=\tenipr \scriptfont\iprfam=\sevenipr +% \scriptscriptfont\iprfam=\fiveipr +% \textfont\ipsfam=\tenips \scriptfont\ipsfam=\sevenips +% \scriptscriptfont\ipsfam=\fiveips +% \textfont\ipbfam=\tenipb \scriptfont\ipbfam=\sevenipb +% \scriptscriptfont\ipbfam=\fiveipb +% \textfont\ipbsfam=\tenipbs \scriptfont\ipbsfam=\sevenipbs +% \scriptscriptfont\ipbsfam=\fiveipbs + \def\rm{\fam0 \tenrm }% + \def\tt{\fam\ttfam \tentt }% + \def\it{\fam\itfam \tenit }% + \def\sl{\fam\slfam \tensl }% + \def\bf{\fam\bffam \tenbf }% +% \def\bsl{\fam\bslfam \tenbsl }% +% \def\ipr{\fam\iprfam \tenipr }% +% \def\ips{\fam\ipsfam \tenips }% +% \def\ipb{\fam\ipbfam \tenipb }% +% \def\ipbs{\fam\ipbsfam \tenipbs }% + \let\mita=\tenia + \normalbaselineskip=12.2pt + \def\examplebaselines{\baselineskip=12.2pt plus 1pt + \lineskiplimit=1.5pt \lineskip=1.5pt plus 1pt}% + \bigskipamount=10pt plus3pt minus3pt + \setbox\strutbox=\hbox{\vrule height8.5pt depth3.7pt width0pt}% + \let\sc=\tensc + \let\big=\tenbig + \normalbaselines + \rm + \the\everysizechange +} + +\gdef\twelvebig#1{{\hbox{$\left#1\vbox to 9.5pt{}\right.\n@space$}}} +\gdef\tenbig#1{{\hbox{$\left#1\vbox to 8pt{}\right.\n@space$}}} + +\let\normalsize=\twelvepoint +\let\footnotesize=\tenpoint +\normalsize + +%% encoding is Cork throughout +\def\'#1{{\accent "01 #1}} +\def\`#1{{\accent "00 #1}} +\def\"#1{{\accent "04 #1}} +\def\^#1{{\accent "02 #1}} +\def\=#1{{\accent "09 #1}} +\def\~#1{{\accent "03 #1}} +\def\v#1{{\accent "07 #1}} +\def\u#1{{\accent "08 #1}} +\chardef\i='031 +\chardef\j='032 +\chardef\ae='346 +\chardef\AE="C6 +\chardef\oe="F7 +\chardef\OE="D7 +\chardef\o="F8 +\chardef\O="D8 +\chardef\aa="E5 +\chardef\AA="C5 +\def\.#1{\oalign{#1\crcr\hidewidth\the\textfont0.\hidewidth}} +\def\c#1{{\edef\temp{\the\font}\setbox0=\hbox{\temp #1}% + \ifdim\ht0=1ex \accent"0B #1\else + {\ooalign{\hidewidth\char"0B\hidewidth\crcr \unhbox0}}\fi}} +\def\h#1{{\edef\temp{\the\font}\setbox0=\hbox{\temp #1}% + \ifdim\ht0=1ex \accent"0C #1\else + {\ooalign{\hidewidth\char"0C\hidewidth\crcr \unhbox0}}\fi}} +\def\GreekCap#1{\ifmmode\mathchar"0C0#1\else{\mita\char"0#1}\fi} +\mathchardef\Gamma"0B00 +\mathchardef\Delta"0B01 +\mathchardef\Theta"0B02 +\mathchardef\Lambda"0B03 +\mathchardef\Xi"0B04 +\mathchardef\Pi"0B05 +\mathchardef\Sigma"0B06 +\mathchardef\Upsilon"0B07 +\mathchardef\Phi"0B08 +\mathchardef\Psi"0B09 +\mathchardef\Omega"0B0A + +\def\grave{\mathaccent"000} +\def\acute{\mathaccent"001} +\def\hat{\mathaccent"002} +\def\breve{\mathaccent"008} +\def\tilde{\mathaccent"003} +\def\bar{\mathaccent"009} +% + +\def\iffslant#1#2{\ifdim\the\fontdimen1\font > 0pt #1\else #2\fi} + +\def\nmathchardef#1[#2,#3#4,#5]{{% + \ifnum\the\catcode`#3=11 + \count0=\expandafter\the\csname #3#4fam\endcsname + \else + \count0=#3#4 + \fi + \multiply\count0 by 256 + \advance\count0 by #5 + \count1=#2 \multiply\count1 by 4096 + \advance\count1 by \count0 + \global\mathchardef#1\count1}\ignorespaces} + +%% ordinary characters +% rm +\nmathchardef\mhyphen[0,0,"2D] % mathmode hyphen +% symbol +\nmathchardef\ts[0,2,"02] % timing slot (\times) +% bf +\nmathchardef\colonb[0,bf,"3A] % bold colon +\nmathchardef\ldup[0,bf,"5B] % bold left bracket +\nmathchardef\rdup[0,bf,"5D] % bold right bracket +% bold symbol +\nmathchardef\oplusb[2,bcal,"08] +\nmathchardef\otimesb[2,bcal,"0A] +\nmathchardef\timesb[2,bcal,"02] +\nmathchardef\ltrunc[0,bcal,"68] +\nmathchardef\rtrunc[0,bcal,"69] +\nmathchardef\triangleb[2,bcal,"34] % bold triangle +% small symbol +\nmathchardef\nothing[0,smallcal,"3B] % smaller \emptyset +\nmathchardef\smallbullet[0,smallcal,"0F] % smaller \bullet +\nmathchardef\gm[0,smallcal,"02] % grid mark +% small rm +\nmathchardef\start[0,smallrm,"23] % smaller \# +\nmathchardef\stop[0,smallrm,"25] % smaller \% +\nmathchardef\smallplus[0,smallrm,"2B] % smaller + + +\def\-{\ifmmode \mhyphen \else -\fi} + + +%% the following put ipa supers and presupers on ipa symbols (or +%% on rm or sl symbols): ipsl is chosen if there is a non-zero +%% font slant dimension, else iprm is chosen +%%%%%%%%% + +%% \O b puts w superscript on b, \O[y]b puts y superscript on b +%\newcount\currfam +%\catcode`@=11 +%\def\O{\expandafter\currfam=\fam\the\font +% \futurelet\temp\O@} +%\def\O@{\ifx\temp[\let\next\O@@\else\let\next\O@@@\fi\next} +%\def\O@@[#1]#2{$\fam\currfam #2^{\scriptscriptstyle #1}$% +% \dimtempa=-5\fontdimen1\font \advance\dimtempa by -.06ex +% \kern\dimtempa} +%\def\O@@@{\O@@[w]} + +\resetatcatcode diff --git a/Master/texmf-dist/doc/generic/expex/source/example1.tex b/Master/texmf-dist/doc/generic/expex/source/example1.tex new file mode 100644 index 00000000000..dd3e8692300 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/example1.tex @@ -0,0 +1,57 @@ + +\introsec{ Examples and examples with parts} + +\codedisplay +Example (\nextx) is well-known from the literature on parasitic +gaps. Here we are concerned with example formatting, not with the +interesting syntax. + +\ex +I wonder which article John filed {\sl t\/} without reading {\sl e}. +\xe +It is beyond the scope of this investigation to determine exactly why +John did not read the article. + +Multipart examples are equally straightforward. + +\pex Two examples of parasitic gaps. +\a He is the man that John did not interview {\sl e\/} before +he gave the job to {\sl e}. +\a He is someone who John expected {\sl e\/} to be successful +though believing {\sl e\/} to be incompetent. +\xe +Here, we can speculate on why John did not do an interview before +recommending the person for a job. It is likely that the person +was a crony of John. In (\lastx b), perhaps John knew that +the ``someone'' went to prep school with the owner of the +business.|endcodedisplay + +\framedisplay +\vskip\lingaboveexskip +Example (\nextx) is well-known from the literature on parasitic +gaps. Here we are concerned with example formatting, not with the +interesting syntax. + +\ex +I wonder which article John filed {\sl t\/} without reading {\sl e}. +\xe +It is beyond the scope of this investigation to determine exactly why +John did not read the article. + +Multipart examples are equally straightforward. + +\pex Two examples of parasitic gaps. +\a He is the man that John did not interview {\sl e\/} before +he gave the job to {\sl e}. +\a He is someone who John expected {\sl e\/} to be successful +though believing {\sl e\/} to be incompetent. +\xe +Here, we can speculate on why John did not do an interview before +recommending the person for a job. It is likely that the person +was a crony of John. In (\lastx b), perhaps John knew that +the ``someone'' went to prep school with the owner of the +business. +\vskip\lingbelowexskip +\endframedisplay + + diff --git a/Master/texmf-dist/doc/generic/expex/source/example2.tex b/Master/texmf-dist/doc/generic/expex/source/example2.tex new file mode 100644 index 00000000000..584d2ba27d5 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/example2.tex @@ -0,0 +1,53 @@ + +\vfil\eject +\introsec{Named reference} + +\codedisplay +If examples and parts of examples are tagged, they can be +referred to by name. + +\pex<pg> +\a This is the man that John interviewed {\sl e\/} before +telling you that you should give the job to~{\sl e}. +\a<A> This is someone who John expected {\sl e\/} to be successful +though believing {\sl e\/} to be incompetent. +\xe + +Now, names can be used. The name/reference pairs can be written +to a file, making forward reference possible and backwards +reference at a distance reliable. You can refer to part +\getref{pg.A} of example (\getref{pg}), or (\getfullref{pg.A}). + +If you use a tag that has not been defined, {\sl ExPex\/} will +let you know. If you try to reference a name which has no +reference, \getref{pg.B} for example, a warning will be issued +and the (bracketed) tag printed as shown at the beginning of this +sentence. If you try to tag a part of an example which has no +tag, {\sl ExPex\/} will let you know about that as well. +|endcodedisplay + +\framedisplay~ +\bigskip +If examples and parts of examples are tagged, they can be +referred to by name. + +\pex<pg> +\a This is the man that John interviewed {\sl e\/} before +telling you that you should give the job to~{\sl e}. +\a<A> This is someone who John expected {\sl e\/} to be successful +though believing {\sl e\/} to be incompetent. +\xe + +Now, names can be used. The name/reference pairs can be written +to a file, making forward reference possible and backwards +reference at a distance reliable. You can refer to part +\getref{pg.A} of example (\getref{pg}), or (\getfullref{pg.A}). + +If you use a tag that has not been defined, {\sl ExPex\/} will +let you know. If you try to reference a name which has no +reference, \getref{pg.B} for example, a warning will be issued +and the (bracketed) tag printed as shown at the beginning of this +sentence. If you try to tag a part of an example which has no +tag, {\sl ExPex\/} will let you know about that as well. +\bigskip +\endframedisplay diff --git a/Master/texmf-dist/doc/generic/expex/source/example3.tex b/Master/texmf-dist/doc/generic/expex/source/example3.tex new file mode 100644 index 00000000000..365d472ca09 --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/example3.tex @@ -0,0 +1,48 @@ +\vfil\eject +\introsec{Glosses} +\medskip + +\codedisplay~ +\ex +\begingl +\gla Mary$_i$ ist sicher, dass es den Hans nicht st\"oren +w\"urde seiner Freundin ihr$_i$ Herz auszusch\"utten.// +\glb Mary is sure that it the-{\sc acc} Hans not annoy would +his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} heart-{\sc acc} {out to throw}// +\glft `Mary is sure that it would not annoy John to reveal her +heart to his girlfriend.'// +\endgl +\xe|endcodedisplay +\framedisplay~ +\ex +\begingl +\gla Mary$_i$ ist sicher, dass es den Hans nicht st\"oren +w\"urde seiner Freundin ihr$_i$ Herz auszusch\"utten.// +\glb Mary is sure that it the-{\sc acc} Hans not annoy would +his-{\sc dat} girlfriend-{\sc dat} her-{\sc acc} heart-{\sc acc} {out to throw}// +\glft `Mary is sure that it would not annoy John to reveal her +heart to his girlfriend.'// +\endgl +\xe +\endframedisplay + +\codedisplay +\ex +\begingl +\gla k- wapm -a -s'i -m -wapunin -uk // +\glb Cl V Agr Neg Agr Tns Agr // +\glc 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} // +\glft `you (pl) didn't see them'// +\endgl +\xe|endcodedisplay +\framedisplay~ +\ex +\begingl +\gla k- wapm -a -s'i -m -wapunin -uk // +\glb Cl V Agr Neg Agr Tns Agr // +\glc 2 see {\sc 3acc} {} {\sc 2pl} preterit {\sc 3pl} // +\glft `you (pl) didn't see them'// +\endgl +\xe +\endframedisplay + diff --git a/Master/texmf-dist/doc/generic/expex/source/example4.tex b/Master/texmf-dist/doc/generic/expex/source/example4.tex new file mode 100644 index 00000000000..185dcca35ca --- /dev/null +++ b/Master/texmf-dist/doc/generic/expex/source/example4.tex @@ -0,0 +1,61 @@ + +\vfil\eject +\introsec{Parameters} + + +\codedisplay +\pex[interpartskip=3ex] +\a +\begingl +\gla pwa- min -kwa -pun// +\glb Neg V Agr Tns // +\glc {} give 2pl{\sc nom}.3pl{\sc acc} preterit // +\glft `you (pl) didn't give them (something)'// +\endgl +\a +\begingl[everygl=\openup.5ex,everygla=,everyglb=, + everyglft=\it,aboveglftskip=1.5ex] +\gla pwa- min -kwa -pun// +\glb Neg V Agr Tns // +\glc {} give 2pl{\sc nom}.3pl{\sc acc} preterit // +\glft `you (pl) didn't give them (something)'// +\endgl +\a +\begingl[everygl=,everygla=\bf,everyglb=\it, + everyglft=,aboveglftskip=0pt] +\gla pwa- min -kwa -pun // +\glb Neg V Agr Tns // +\glc {} give 2pl{\sc nom}.3pl{\sc acc} preterit // +\glft `you (pl) didn't give them (something)'// +\endgl +\xe +|endcodedisplay +\framedisplay~ +\pex[interpartskip=3ex] +\a +\begingl +\gla pwa- min -kwa -pun// +\glb Neg V Agr Tns // +\glc {} give 2pl{\sc nom}.3pl{\sc acc} preterit // +\glft `you (pl) didn't give them (something)'// +\endgl +\a +\begingl[everygl=\openup.5ex,everygla=,everyglb=, + everyglft=\it,aboveglftskip=1.5ex] +\gla pwa- min -kwa -pun// +\glb Neg V Agr Tns // +\glc {} give 2pl{\sc nom}.3pl{\sc acc} preterit // +\glft `you (pl) didn't give them (something)'// +\endgl +\a +\begingl[everygl=,everygla=\bf,everyglb=\it, + everyglft=,aboveglftskip=0pt] +\gla pwa- min -kwa -pun // +\glb Neg V Agr Tns // +\glc {} give 2pl{\sc nom}.3pl{\sc acc} preterit // +\glft `you (pl) didn't give them (something)'// +\endgl +\xe +\endframedisplay + + diff --git a/Master/texmf-dist/tex/generic/expex/expex.tex b/Master/texmf-dist/tex/generic/expex/expex.tex index 93ce6bb40cd..8174cdff4b9 100644 --- a/Master/texmf-dist/tex/generic/expex/expex.tex +++ b/Master/texmf-dist/tex/generic/expex/expex.tex @@ -1,5 +1,5 @@ \def\ExPexMessage - {2013/07/27 v4.1c ExPex linguistics example formatter (JF)} + {2013/07/29 v4.1d ExPex linguistics example formatter (JF)} % ------------------------------------------------------- % jf 2011/12/09 (v4.0a) % 1) fixed bug in how exceptional gla items are detected @@ -19,13 +19,16 @@ % 1) added \let\pageno=\c@page to LaTex specializations % jf 2013/06/27 (v4.1b) % 1) fixed bug in skip over \glft entries -% jf 2013/07/27 -% 1) LaTex \include/\includeonly mechanism now works for \excnt +% jf 2013/07/27 (v4.1c) +% 1) LaTex \includeonly mechanism support +% jf 2013/07/29 (v4.1d) +% 1) made \includeonly mechanism compatible with hyperref, etc. % -------------------------------------------------------- \edef\resetatcatcode{\catcode`\noexpand\@\the\catcode`\@\relax} \catcode`\@=11\relax \ifx\XKeyValLoaded\endinput \else \input xkeyval \fi +\newcount\excnt \ifx\ProvidesFile\@undefined \message{\ExPexMessage} \else @@ -33,10 +36,9 @@ \@addtofilelist{expex.tex} \let\it=\itshape \let\pageno=\c@page -% 2013/07/27 - \g@addto@macro\cl@@ckpt - {\immediate\write\@partaux{\string\excnt=\the\excnt}} -% +% 2013/07/29 + \let\c@excnt=\excnt + \g@addto@macro\cl@@ckpt{\@elt{excnt}} \fi %! define eplain primitives, if necessary \ifx\eplain\@undefined % eplain stuff @@ -139,8 +141,7 @@ \newdimen\epd@a % \newdimen\epd@b not yet needed %------ \ex ----- -\newcount\excnt -\excnt=1 +\excnt=1 % \excnt created early, before LaTex specializations \newbox\numbox \newdimen\epd@numright \newif\if@specialexno |