* multiple columns inside \framed
@ 2006-04-13 10:42 Mojca Miklavec
2006-04-13 11:18 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Mojca Miklavec @ 2006-04-13 10:42 UTC (permalink / raw)
Hello,
I would like to typeset two columns of names inside one frame
(centered horizontally). \startcolumns inside \framed doesn't work; is
there any simple alternative? (Otherwise I'll manually split the
content into two subframes.)
I would appreciate any hints,
Mojca
\def\student#1#2{{#1 \sc#2}\par}
% room number, number of students, students
\def\room#1#2#3{#1:
\framed[width=4.4cm,height=2cm]{%
\ifnum#2<4 #3\else
\startcolumns[n=2,distance=0pt]#3\stopcolumns
\fi
}\par
}
\starttext
\room{1}{2}{%
\student{Abc}{Def}
\student{Abc}{Def}
}
\room{2}{5}{%
\student{Abc}{Def}
\student{Abc}{Def}
\student{Abc}{Def}
\student{Abc}{Def}
\student{Abc}{Def}
}
\stoptext
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: multiple columns inside \framed
2006-04-13 10:42 multiple columns inside \framed Mojca Miklavec
@ 2006-04-13 11:18 ` Hans Hagen
2006-04-14 1:22 ` Mojca Miklavec
0 siblings, 1 reply; 4+ messages in thread
From: Hans Hagen @ 2006-04-13 11:18 UTC (permalink / raw)
Mojca Miklavec wrote:
> Hello,
>
> I would like to typeset two columns of names inside one frame
> (centered horizontally). \startcolumns inside \framed doesn't work; is
> there any simple alternative? (Otherwise I'll manually split the
> content into two subframes.)
>
> I would appreciate any hints,
> Mojca
>
>
> \def\student#1#2{{#1 \sc#2}\par}
>
> % room number, number of students, students
> \def\room#1#2#3{#1:
> \framed[width=4.4cm,height=2cm]{%
> \ifnum#2<4 #3\else
> \startcolumns[n=2,distance=0pt]#3\stopcolumns
>
\startsimplecolumns[n=2,distance=0pt]#3\stopsimplecolumns
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: multiple columns inside \framed
2006-04-13 11:18 ` Hans Hagen
@ 2006-04-14 1:22 ` Mojca Miklavec
2006-04-14 8:14 ` Hans Hagen
0 siblings, 1 reply; 4+ messages in thread
From: Mojca Miklavec @ 2006-04-14 1:22 UTC (permalink / raw)
On 4/13/06, Hans Hagen wrote:
> Mojca Miklavec wrote:
> > Hello,
> >
> > I would like to typeset two columns of names inside one frame
> > (centered horizontally). \startcolumns inside \framed doesn't work; is
> > there any simple alternative?
>
> \startsimplecolumns[n=2,distance=0pt]#3\stopsimplecolumns
Don't you think that you have taken the word "simple" to literally? ;)
(This returned me back the hope that some hidden and undocumented
features like \startsimplethesis & \writesimplethesis exist in the
ConTeXt core ;)
Hans, thanks a lot! It does exactly what I wanted.
Mojca
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: multiple columns inside \framed
2006-04-14 1:22 ` Mojca Miklavec
@ 2006-04-14 8:14 ` Hans Hagen
0 siblings, 0 replies; 4+ messages in thread
From: Hans Hagen @ 2006-04-14 8:14 UTC (permalink / raw)
Mojca Miklavec wrote:
> On 4/13/06, Hans Hagen wrote:
>
>> Mojca Miklavec wrote:
>>
>>> Hello,
>>>
>>> I would like to typeset two columns of names inside one frame
>>> (centered horizontally). \startcolumns inside \framed doesn't work; is
>>> there any simple alternative?
>>>
>> \startsimplecolumns[n=2,distance=0pt]#3\stopsimplecolumns
>>
>
> Don't you think that you have taken the word "simple" to literally? ;)
> (This returned me back the hope that some hidden and undocumented
> features like \startsimplethesis & \writesimplethesis exist in the
> ConTeXt core ;)
>
\def\simplethesis
{\setupsystem[random=1234]
\title{\fakewords{3}{4}}
\placelist[chapter,section]
\dorecurse{6}
{\chapter{\fakewords{5}{10}}
\dorecurse{5}
{\section{\fakewords{2}{5}}
\dorecurse{2}
{\dorecurse{3}{\fakewords{100}{200}\endgraf}
\placefigure
{\fakewords{8}{15}}
{\fakefigure{5cm}{3cm}{10cm}{5cm}}
\dorecurse{2}{\fakewords{100}{200}\endgraf}}}}}
\starttext
\simplethesis
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-04-14 8:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-13 10:42 multiple columns inside \framed Mojca Miklavec
2006-04-13 11:18 ` Hans Hagen
2006-04-14 1:22 ` Mojca Miklavec
2006-04-14 8:14 ` Hans Hagen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).