Difference between revisions of "Flush bottom"

From ConTeXt wiki
Jump to navigationJump to search
(Some introductory text to give an idea what the page is all about. Remove the Explanation tag?)
m (Yup, that's good enough to remove the explanation tag. Thanks!)
 
Line 40: Line 40:
 
\stoptext
 
\stoptext
 
</texcode>
 
</texcode>
 
{{Explanation}}
 
  
 
[[Category:From LaTeX]]
 
[[Category:From 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