English 中文(简体)
Making Latex typeset given text on two facing pages
原标题:

How do I encourage/make Latex typeset some portion of text so that it will all appear on a consecutive even-page, odd-page pair of pages?

With trial and error, opagebreak can be coaxed into doing this, but is there a strategy that Just Works? Something like a samepage environment would be ideal, but one that:

  1. Will force a pagebreak on odd pages if that is needed to get all the text on facing pages;
  2. Allows up to one page break anywhere in the environment body, and fails noisily if that can t be ensured.
最佳回答

You could put together an environment such as


ewenvironment{twopage}{%
  egingroupsetbox0vboxgroup
}{%
  egroup
  ifdimht0>	extheight
    setbox1vsplit0 to 	extheight
    cleardoublepageunvbox1clearpage
    ifdimht0>	extheight
      PackageWarning{twopage}{Overflow in twopage environment}%
    fi
    unvbox0clearpage
  else
    clearpageunvbox0clearpage
  fiendgroup
}

If you want a noisier failure, change PackageWarning into PackageError, The unvboxes should allow for notes/floats to work properly - if you don t need that, you might consider changing them all to oxes instead (although I m a bit rusty on the behavior of vsplit with respect to box depths and skips, so that might produce funny behavior, but it would guarantee that you only took two pages by flowing anything extra off the bottom of the second page).

问题回答

There is a distinction between clearpage and cleardoublepage. By using cleardoublepage just before the stuff you want on the left hand side and clearpage before the stuff you want on the right hand side you can force the layout you re looking for.

Of course, the twoside option is must.





相关问题
Effective Version Control for Slides

I have to maintain a huge set of training material in forms of slides. At a first glance, I ve noticed there s no support for version control in OpenOffice OOImpress (but I might be wrong on this). ...

Maths in LaTex table of contents

I am trying to add a table of contents for my LaTex document. The issue I am having is that this line: subsubsection{The expectation of (X^2)} Causes an error in the file that contains the ...

Using vim s `gqap sometimes indents unusually

For the life of me, I cannot figure out the cause of this: when writing in LaTeX documents, I like to keep my line width to maximum of 80 characters. As such, I will execute the vim command gqap and ...

aligning math equations in Latex

I am trying to align the following equations around the equal sign. What can I do? Thanks! I am using the AMSMath package $$mddot{x}_{1}-K(x_{2}+x_{12})+C(dot{x}_{12}+dot{x}_{2})+2Cdot{x}_{1} ...

LaTeX output does not update

I have just begun using LaTeX. I am working in Windows and am using TeXnicCenter as my editor. When I build and output, having the following code: documentclass{article} egin{document} This is a ...

How to put line break in a math

I d like to express the following sentence (source_location is also italic, it s not correctly rendered): Each entry has a list of tuple: < source_location, R/W, trip_counter, occurrence, killed ...

热门标签