[NTG-context] Using \startframedtext with \startcombination

Wolfgang Schuster schuster.wolfgang at gmail.com
Wed Oct 1 14:44:00 CEST 2014


Am 30.09.2014 um 21:52 schrieb Couvreur Fabrice <couvreur.fabrice at wanadoo.fr>:

> Hello Wolfgang,
> Thank you for the answer, but I did not understand everything.

I try ti explain it with a few examples. When you text in a framedtext environment context creates a box with the given width (which is shown with the red frame), this box is then put into another box (which is shown which a black frame) which has the width of the text area. The large outer box is necessary when you want to align the inner box to the left, middle or right of the text block.


\setupframedtext[width=8cm,framecolor=red,frameoffset=-1ex]

\starttext

\ruledhbox\bgroup
	\startframedtext[left]
	\input ward
	\stopframedtext
\egroup

\blank

\ruledhbox\bgroup
	\startframedtext[middle]
	\input ward
	\stopframedtext
\egroup

\blank

\ruledhbox\bgroup
	\startframedtext[right]
	\input ward
	\stopframedtext
\egroup

\blank

\ruledhbox\bgroup
	\startframedtext[none]
	\input ward
	\stopframedtext
\egroup

\stoptext


When you use now a combination with a framedtext environment each cell of the combination is too wide to show more than one cell on the page. You can see in the following example that the second cell is positioned outside of the visible page area.


\setuppapersize[A4][A3,landscape]

\showframe

\setupframedtext[width=8cm,framecolor=red,frameoffset=-1ex]

\starttext

\startcombination
	\startcontent
		\ruledhbox\bgroup
			\startframedtext[left]
			\input ward
			\stopframedtext
		\egroup
	\stopcontent
	\startcaption
		Left aligned!
	\stopcaption
	\startcontent
		\ruledhbox\bgroup
			\startframedtext[right]
			\input ward
			\stopframedtext
		\egroup
	\stopcontent
	\startcaption
		Right aligned!
	\stopcaption
\stopcombination

\stoptext


Wolfgang


More information about the ntg-context mailing list