Difference between revisions of "Flush bottom"

From Wiki
Jump to navigation Jump to search
m (Changed to standard section headings for Latex -> Context pages.)
m (Yup, that's good enough to remove the explanation tag. Thanks!)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
< [[From LaTeX to ConTeXt]]
+
< [[From LaTeX to ConTeXt]] >
 +
 
 +
A subtle, page layout enhancement is to have all the text blocks be the same length on each page. If you're not typesetting on a grid, this is accomplished in LaTeX with the <tt>\flushbottom</tt> command, and in ConTeXt with the <tt>\setupalign[line]</tt> directive. The rest of the commands in the examples below are merely to produce fake text to illustrate the effect over several pages.
  
 
== LaTeX ==
 
== LaTeX ==

Latest revision as of 22:26, 28 September 2005

< From LaTeX to ConTeXt >

A subtle, page layout enhancement is to have all the text blocks be the same length on each page. If you're not typesetting on a grid, this is accomplished in LaTeX with the \flushbottom command, and in ConTeXt with the \setupalign[line] directive. The rest of the commands in the examples below are merely to produce fake text to illustrate the effect over several pages.

LaTeX

\documentclass{article}

\flushbottom

\def\Par{bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
  bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla}
\def\Fig{\begin{figure}\fbox{\vbox to 5cm{bla}}\end{figure}}
\def\Tab{\begin{table}\fbox{\vbox to 5cm{bla}}\end{table}}
\begin{document}
\section{Section}\Par\Par\Par\Fig\Par\Par\par\Par\par\Tab
\Par\Par\Par\par\Par\Par\par\Par\Par\par\Par\Par\par\Par\Par\Par\Par\Par
\section{Section}\Par\Par\Par\Fig\Par\Par\par\Par\par\Tab
\Par\Par\Par\par\Par\Par\par\Par\Par\par\Par\Par\par\Par\Par\Par\Par\Par
\section{Section}\Par\Par\Par\Fig\Par\Par\par\Par\par\Tab
\Par\Par\Par\par\Par\Par\par\Par\Par\par\Par\Par\par\Par\Par\Par\Par\Par
\end{document}

ConTeXt

\setupalign[line]

\def\Par{bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla
  bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla}
\def\Fig{\placefigure{A figure.}{\framed{\vbox to 5cm{bla}}}}
\def\Tab{\placetable{A table.}{\framed{\vbox to 5cm{bla}}}}
\starttext
\section{Section}\Par\Par\Par\Fig\Par\Par\par\Par\par\Tab
\Par\Par\Par\par\Par\Par\par\Par\Par\par\Par\Par\par\Par\Par\Par\Par\Par
\section{Section}\Par\Par\Par\Fig\Par\Par\par\Par\par\Tab
\Par\Par\Par\par\Par\Par\par\Par\Par\par\Par\Par\par\Par\Par\Par\Par\Par
\section{Section}\Par\Par\Par\Fig\Par\Par\par\Par\par\Tab
\Par\Par\Par\par\Par\Par\par\Par\Par\par\Par\Par\par\Par\Par\Par\Par\Par
\stoptext