[NTG-context] alignment questions

Willi Egger willi at boede.nl
Sun Mar 13 11:25:59 CET 2005


Hoi Patrick,

Humble, I used just the \bTABLE ...\eTABLE environment. Please refer to 
the attached file.

Kind regards
Willi

Patrick Gundlach wrote:
> Hello *,
> 
> 
> inspired by Gerben's question, I did some experimenting with \framed.
> 
> I'd like to get A[text]B, where text is some long thing in a framed
> box like \framed[width=5cm] {\input tufte \par}.
> 
> There are three different ways of aligning the three objects:
> 
> 
> (A and B on the same baseline as the first row)
> 
> A We  thrive  in  information- B
> -------------------------------
>   thick worlds because of  our
>   marvelous and  everyday  ca-
> 
> 
> (A and B in the middle of the box, not necessarily on the same
> baseline as a line in the box)
> 
>   criminate, distinguish, screen, 
> A pigeonhole,  pick  over,  sort, B
>   integrate,    blend,   inspect,
> 
> 
> (A and B on the same baseline as the last row)
> 
>   from the chaff and seperate
> A the sheeps from the  goats. B
> --------------------------------
> 
> 
> 
> I was unable to get any of these alignments.
> 
> Patrick
-------------- next part --------------
% ALigning three blocks of text
% PAtrick Gundlach
% Context file
% filename: textblockalignment-Gundlach.tex
% Willi Egger
% 13-03-2005


\setupoutput[pdftex]
\setupbodyfont[rm,12pt]

\starttext
% Alignment of the three blocks with the first line

\setupTABLE[column][1][frame=off,width=2cm]
\setupTABLE[column][3][frame=off,width=2cm]
\setupTABLE[column][2][frame=off,width=5cm]
\bTABLE
	\bTR
		\bTD A \eTD
		\bTD	We  thrive  in  information-
				thick worlds because of  our
				marvelous and  everyday  ca- \eTD
		\bTD B \eTD\eTR
\eTABLE

\blank[3*big]

% Alignment of first and third block vertically centered, not necessarily aligned with
% a line of the second block

\bTABLE
	\bTR
		\bTD[align=lohi] A \eTD
		\bTD	criminate, distinguish, screen,
				pigeonhole,  pick  over,  sort,
				integrate,    blend,   inspect, \eTD
		\bTD[align=lohi] B \eTD\eTR
\eTABLE

\blank[3*big]

% Alignmnet of the three blocks in such a way, that the first and last block align
% with the laast row of the second block

\bTABLE
	\bTR
		\bTD[align=low] A \eTD
		\bTD	from the chaff and seperate
				A the sheeps from the  goats. \eTD
		\bTD[align=low] B \eTD\eTR
\eTABLE

\stoptext


More information about the ntg-context mailing list