Changes

Jump to navigation Jump to search
74 bytes added ,  10:49, 18 January 2020
fix links to manuals and a few typos
< [[Visuals]] | [[Layout]] >
(This page is a mess. The variety of column modes is just confusing. Have a look at the [[manual:columnscolumnsets.pdf|Columns Columnsets manual]] and the [[manual:pagecolumns.pdf|Page Columns manual]].)
= Overview =
</context>
See "Paragraphs in Columns" section in the [http://pmrb.free.fr/contextref.pdf ConTeXt reference manual][[manual:contextref.pdf]] for further details.
=(Simple)Columns in a narrow frame=
This method offers more possibilities than simple columns,
in particular in placing floats such as figures and in creating columnspans.
See [[manual:columnscolumnsets.pdf|Columns Columnsets manual]] or [[source:page-set.mkiv|column sets source]] for many examples.
If you don't need much more than the "normal" columns, but e.g. "lines" mode, try this:
</context>
For more details (layout grid features, spreads, different column widths etc.) please refer to the [[manual:columnscolumnsets.pdf|manual]]!
==Vertical lines between columnsets (rules)==
Hans later re-implemented that mechanism in the core. For details see [[source:page-str.mkiv|the source]].
The module provides a rather low-lever level interface. Hans suggested some handy shortcuts:
<texcode>
\usemodule[streams]
\def\Translation{\SwitchToRight}
\StartCouple
\Original\en
Are you sleeping, brother John?
\Translation\de
Bruder Jakob, schläfst du noch?
\StopCouple
</texcode>
So you put the part of your document where synchronization should take place between <cmd>StartCouple</cmd> and <cmd>StopCouple</cmd>. After that , <cmd>Original</cmd> and <cmd>Translation</cmd> switches between even and odd pages.
Beware, streams don't don’t work in columns and not very good in columnsets.
==Examples of MkIV streams==
=Floats and other limitations of columns=
Columns and one-column floats don't don’t work well together in TeX. It seems that you can't have a float that spans one column automatically put at the top or the bottom and have the columns balanced automatically at the end. Neither ConTeXt nor LaTeX can do it in a automatized way (like with floats that span more than a column). Here you have some tricks to make it work more or less:
==Columnsets==
With columnsets you can put floats that span one, two or any number of columns and in any position (top, bottom, middle of the text). The price for this is that you have to balance the columns manually at the end (see [[manual:columnscolumnsets.pdf|Columnset manual]]).
Columnsets have a limitation, however: they are very strongly grid-based, and you can't change the interlinespace within the columnset (e.g., if some paragraphs are typed in a smaller font). You can change the interlinespace if the entire text with a smaller interlinespace fits in one column, like a float or a section title (putting it between <code>\startlinecorrection\stoplinecorrection</code>), but if the text with a smaller interlinespace starts in one column and has to continue in the following one, nothing will work, and the layout will be completely messed.
Changing the font weight or shape inbetween <cmd>startcolumnset</cmd> and <cmd>stopcolumnset</cmd> may cause some columns to be shifted vertically. Then you must use <cmd>restoreinterlinespace</cmd> after the font switch (<cmd>bf</cmd>, <cmd>ss</cmd>) to correct the interline spacing. See [http://thread.gmane.org/gmane.comp.tex.context/20932].
So, if you want columns and one-column floats and don't don’t have to change the interlinespacing, use Columnsets. If not, you can use Columns with some tricks.
==Columns and Floats ==

Navigation menu