osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: Re: Ling-TeX: Preventing page breaks in examples -
msg#00066

List: tex.linguistics

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index

Two suggestions for page breaking, beginning with a "magic" one that should work in many cases:

a) Download http://www-uilots.let.uu.nl/~alexis.dimitriadis/personal/latex/cgloss.sty and include it AFTER gb4e. This replaces the \\ separating the translation line with a \\*, which at least discourages page breaks.

b) But controlling page breaks, in general, does not work very well in latex . See http://www.tex.ac.uk/cgi-bin/texfaq2html?label=nopagebrk for the full story. So use needspace.sty and manually request 3 lines at the beginning of any problematic example (or 5 lines if your example does not fit on one line, etc). Scroll down the source of needspace.sty to find the description of how to use it.

Question 2: Automatic small font.

If you want EVERYTHING in an exe environment to be in \small size, put the following in your preamble:

\makeatletter
\g@addto@macro{\ex}{\small}

(If you only want the two gloss lines to be small, look at the gb4e documentation)

Alexis

----- Original Message ----- From: "James Crippen" <jcrippen-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx>
To: "Ling-TeX" <ling-tex-6miFZF/5cTBuMpJDpNschA@xxxxxxxxxxxxxxxx>
Sent: Saturday, December 16, 2006 2:53 AM
Subject: Ling-TeX: Preventing page breaks in examples


I use gb4e for examples with glosses in my papers. I've had some
trouble with the translation line being separated from the rest of the
example by a page break. Is there any magic incantation that I can use
to explicitly prevent a page break in the middle of an example? Or do
I have to rely on rewording the surrounding text to do so?

Also, I always set my examples with \small so they take up less space.
Is there a convenient way to wrap this around or embed it into the exe
environment on a per-document basis?

Thanks,
James






Thread at a glance:

Previous Message by Date:

Re: Ling-TeX: Preventing page breaks in examples

On Fri, Dec 15, 2006 at 03:53:38PM -1000, James Crippen wrote: > I use gb4e for examples with glosses in my papers. I've had some > trouble with the translation line being separated from the rest of the > example by a page break. Is there any magic incantation that I can use > to explicitly prevent a page break in the middle of an example? Or do > I have to rely on rewording the surrounding text to do so? you could put the examples in a minipage environment: if the example then doesn't fit on the current page, it will be moved in its entirety to the next. > Also, I always set my examples with \small so they take up less space. > Is there a convenient way to wrap this around or embed it into the exe > environment on a per-document basis? untested, but you may be able to define your own environment with \newenvironment: \newenvironment{myexe}{\begin{exe}\small}{\end{exe}} perhaps you can even do: \newenvironment{myexe}{\begin{minipage}{\textwidth}% \begin{exe}\small}% {\end{exe}% \end{minipage}} not sure if it works, but you might give it a try. HTH -- Joost Kremers Life has its moments

Next Message by Date:

Ling-TeX: Connecting nodes with dotted lines in a tree diagram

I'm currently trying to recreate in LaTeX the tree diagram that is in the attached Word file. It looks like the general strategy would be to define nodes and connect them with a dotted line, but I'm not sure how to place nodes in arbitrary positions, say, at the bottom of the tree. Does anyone have suggestions? Underneath is the code I already wrote for this tree. Thanks, Erica \usepackage{gb4e} \usepackage{parsetree} \newcommand{\pbe}{(} \newcommand{\pen}{)} \begin{parsetree} ( .S. ( .NP1.) ( .VP. ( .VP. ( .V1.) ( .\pbe NP2\pen.) ) ( .VP. ( .V2.) ) ) ) \end{parsetree} langtree.doc Description: WordPerfect 5.1 document

Previous Message by Thread:

Re: Ling-TeX: Preventing page breaks in examples

On Fri, Dec 15, 2006 at 03:53:38PM -1000, James Crippen wrote: > I use gb4e for examples with glosses in my papers. I've had some > trouble with the translation line being separated from the rest of the > example by a page break. Is there any magic incantation that I can use > to explicitly prevent a page break in the middle of an example? Or do > I have to rely on rewording the surrounding text to do so? you could put the examples in a minipage environment: if the example then doesn't fit on the current page, it will be moved in its entirety to the next. > Also, I always set my examples with \small so they take up less space. > Is there a convenient way to wrap this around or embed it into the exe > environment on a per-document basis? untested, but you may be able to define your own environment with \newenvironment: \newenvironment{myexe}{\begin{exe}\small}{\end{exe}} perhaps you can even do: \newenvironment{myexe}{\begin{minipage}{\textwidth}% \begin{exe}\small}% {\end{exe}% \end{minipage}} not sure if it works, but you might give it a try. HTH -- Joost Kremers Life has its moments

Next Message by Thread:

Re: Ling-TeX: Preventing page breaks in examples

pst-jtree has been modified to eliminate compatibility problems with babel (the spanish and german language options, at least) and gb4e. It remains incompatible with linguex, which reads the entire text of examples as a macro argument, thereby precluding the use of any category code changing macros in examples. If anyone is devoted to linguex and is thereby discouraged from using pst-jtree, I have an addon to linguex that provides a simple workaround. Write to me if you want it. The modified pst-jtree is still a "beta" version, although I have tested it and find no compatibility problems or any detectable difference to the user (except that it runs in environments which crashed the former version). The files (pst-jtree-beta.tex and pst-jtree-beta.sty) are available at http://www.math.neu.edu/ling/tex. LaTex users need both files. The beta will be removed when I have more confidence that all the compatibility problems have been overcome. Please let me know --- for better or worse. Good luck, John Frampton
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!