* [ConTeXt] Boxes which commands to use
@ 2000-01-15 19:44 Tobias Burnus
2000-01-15 20:51 ` Tobias Burnus
2000-01-17 8:29 ` Hans Hagen
0 siblings, 2 replies; 11+ messages in thread
From: Tobias Burnus @ 2000-01-15 19:44 UTC (permalink / raw)
Hi,
I'm presently trying to type something which consists of one short question and
a (now metapost-drawn) result of this question. The old LaTeX output can be
seen at http://uuhome.de/tobias.burnus/test.dvi)
It looks like this
1. This is a rather small question 10 20 30
which spans four small lines at +---------------------------+-----|
maximum. | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | |
| | | | | | | | | | |
+---------------------------+-----|
I tried:
a) define paragraph (with in a itemize), but the question is aligned on the
bottom, which looks really odd.
b) startfiguretext[right], this is almost ok, but I get a line break between
\item and \startfiguretext (moreover the MP is aligned on the ,,10...20...30''
and not to the ___________ below them, but this was expected.)
Tobias
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ConTeXt] Boxes which commands to use
2000-01-15 19:44 [ConTeXt] Boxes which commands to use Tobias Burnus
@ 2000-01-15 20:51 ` Tobias Burnus
2000-01-17 8:29 ` Hans Hagen
1 sibling, 0 replies; 11+ messages in thread
From: Tobias Burnus @ 2000-01-15 20:51 UTC (permalink / raw)
Hi again,
> It looks like this
>
> 1. This is a rather small question 10 20 30
> which spans four small lines at +---------------------------+-----|
> maximum. | | | | | | | | | | | > | | | | | | | | | | |
> | | | | | | | | | | |
> | | | | | | | | | | |
> +---------------------------+-----|
and some questions like this
2. Foo bar? yes (or no)
3. Which kinds of bars?
-- barbar yes
-- triple-bar no
I presently work with such a hack:
----------------------------------------
\definiereabsaetze[FragB][n=2]
\stelleabsaetzeein[FragB][1][breite=3mm]
\def\FragA#1#2#3{%
\startabbildungtext
[rechts]{kein}
{#3}
\startFragB #1.\FragB
#2\stopFragB
\stopabbildungtext}
----------------------------------------
This will give me right flushed yes/no's (i.e. \hbox{yes}), but I don't care.
but how can I best type something like 3 without too many potentially ugly
hacks?
Tobias
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ConTeXt] Boxes which commands to use
2000-01-15 19:44 [ConTeXt] Boxes which commands to use Tobias Burnus
2000-01-15 20:51 ` Tobias Burnus
@ 2000-01-17 8:29 ` Hans Hagen
2000-01-17 9:28 ` Tobias Burnus
1 sibling, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2000-01-17 8:29 UTC (permalink / raw)
Cc: NTG-ConTeXt
At 08:44 PM 1/15/2000 +0100, Tobias Burnus wrote:
>a) define paragraph (with in a itemize), but the question is aligned on the
> bottom, which looks really odd.
>b) startfiguretext[right], this is almost ok, but I get a line break between
> \item and \startfiguretext (moreover the MP is aligned on the
,,10...20...30''
>and not to the ___________ below them, but this was expected.)
I think you can best use \starttabulate ... for several reasons:
(1) it handles multiple paragraphs, and automatically calculated the width
(2) it handles itemizes etc well
(3) it breaks across pages (in a next release even better, with tracing too)
(4) you can hook things into columns (which is what I so when I want some
value to be passed onto a graphic drawing routine), I even think it's
described somewhere in a maps
Actually, \defineparagraph, is sort of replaced by \definetabulation, and
the former is only still usefull for special cases, for instance when one
describes his/her own commands using it. There is an example of how to deal
with itemize in the beta chapter on descriptions. (you need to turn off the
pre/post white space and so).
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ConTeXt] Boxes which commands to use
2000-01-17 8:29 ` Hans Hagen
@ 2000-01-17 9:28 ` Tobias Burnus
2000-01-17 11:49 ` Hans Hagen
0 siblings, 1 reply; 11+ messages in thread
From: Tobias Burnus @ 2000-01-17 9:28 UTC (permalink / raw)
Cc: NTG-ConTeXt
Hi,
> I think you can best use \starttabulate ... for several reasons:
I now use:
\starttabulate[|l|p|r|]
\NC 1. \NC This is a question \NC \useMPgraphic{foo} \NR
\stoptabulate
This results in:
+----------------------+
| |
| MP GRAPHIC |
| |
| |
| |
1. This is a ques- +----------------------+
tion. Which runs
over several
lines.
That is the MP is too high!
Tobias
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ConTeXt] Boxes which commands to use
2000-01-17 9:28 ` Tobias Burnus
@ 2000-01-17 11:49 ` Hans Hagen
2000-01-17 18:46 ` Tobias Burnus
0 siblings, 1 reply; 11+ messages in thread
From: Hans Hagen @ 2000-01-17 11:49 UTC (permalink / raw)
Cc: Hans Hagen, NTG-ConTeXt
At 10:28 AM 1/17/2000 +0100, Tobias Burnus wrote:
>Hi,
>This results in:
> +----------------------+
> | |
> | MP GRAPHIC |
> | |
> | |
> | |
>1. This is a ques- +----------------------+
> tion. Which runs
> over several
> lines.
Put it in a \vtop{} or \vbox{}. Also, in supp-box.tex, you can find some
things like \sbox and so.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ConTeXt] Boxes which commands to use
2000-01-17 11:49 ` Hans Hagen
@ 2000-01-17 18:46 ` Tobias Burnus
2000-01-18 10:08 ` Hans Hagen
0 siblings, 1 reply; 11+ messages in thread
From: Tobias Burnus @ 2000-01-17 18:46 UTC (permalink / raw)
Cc: NTG-ConTeXt
Hi all, hallo Hans,
> >This results in:
> > +----------------------+
> > | |
> > | MP GRAPHIC |
> > | |
> > | |
> > | |
> >1. This is a ques- +----------------------+
> > tion. Which runs
> > over several
> > lines.
>
> Put it in a \vtop{} or \vbox{}. Also, in supp-box.tex, you can find some
> things like \sbox and so.
I tried:
\def\FragA#1#2#3{%
\NC #1 \NC #2 \NC \vbox{#3} \NC\NR} % or \vtop{#3}
and now:
\NC \vtop{#1} \NC \vtop{#2} \NC \vbox{#3} \NC\NR} % or \vbox{#3}
without any success (ConTeXt, version 2000-01-08)
using
-----
\starttabulator[|l|p|r|]
\FragA1{Eine "Ubersicht "uber den gesamten Stoff der Vorlesung wurde am Anfang
gegeben.}{\SixBox{'.$in[$I++].'}{'.$in[$I++].'}{'.$in[$I++].'}{'.$in[$I++].'}{'.$in[$I++].'}{'.$in[$I++].'}{'.$in[$I++].'}}
-----
(the $in are fill-ins parts in PERL and \SixBox is a MP box, defined as:
\def\SixBox#1#2#3#4#5#6#7{%
\startuseMPgraphic{foo}
% ...
\stopuseMPgraphic
\useMPgraphic{foo}}
Tobias
PS: The number of subscribers must have risen quite a lot, it takes secounds,
until I get a email at home, but approx. 30 min until I got it at university (I
was faster in the university as the email via ntg-context!).
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ConTeXt] Boxes which commands to use
2000-01-17 18:46 ` Tobias Burnus
@ 2000-01-18 10:08 ` Hans Hagen
2000-01-18 13:29 ` Tobias Burnus
[not found] ` <Pine.BSF.4.10.10001181422480.43130-100000@john.physik.fu-b erlin.de>
0 siblings, 2 replies; 11+ messages in thread
From: Hans Hagen @ 2000-01-18 10:08 UTC (permalink / raw)
Cc: Hans Hagen, NTG-ConTeXt
At 07:46 PM 1/17/2000 +0100, Tobias Burnus wrote:
>Hi all, hallo Hans,
Ah, you must be very unhappy now, struggling with those funy boxes, compare:
% interface=nl
\starttabulatie[|l|l|]
\NC some text \NC \externfiguur[koe] \NC \NR
\NC some text \NC \externfiguur[koe] \NC \NR
\stoptabulatie
\starttabulatie[|l|l|]
\NC some text \NC \tbox{\externfiguur[koe]} \NC \NR
\NC some text \NC \tbox{\externfiguur[koe]} \NC \NR
\stoptabulatie
\starttabulatie[|l|l|]
\NC some text \NC \bbox{\externfiguur[koe]} \NC \NR
\NC some text \NC \bbox{\externfiguur[koe]} \NC \NR
\stoptabulatie
Watch out: a p entry does a split and forces a lineheight. I will add a P
key later. (BTW, I've got some experimental macros that provide pretty
robust arbitrary backgrounds to table cells, even overlapping ones. Think
of a shaded cell background and alike.)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ConTeXt] Boxes which commands to use
2000-01-18 10:08 ` Hans Hagen
@ 2000-01-18 13:29 ` Tobias Burnus
[not found] ` <Pine.BSF.4.10.10001181422480.43130-100000@john.physik.fu-b erlin.de>
1 sibling, 0 replies; 11+ messages in thread
From: Tobias Burnus @ 2000-01-18 13:29 UTC (permalink / raw)
Cc: Tobias Burnus, NTG-ConTeXt
Hi all, hi Hans,
> Ah, you must be very unhappy now, struggling with those funy boxes, compare:
> \starttabulatie[|l|l|]
> \NC some text \NC \bbox{\externfiguur[koe]} \NC \NR
> \NC some text \NC \bbox{\externfiguur[koe]} \NC \NR
> \stoptabulatie
I now use: \NC #1. \NC #2 \NC \bbox{#3} \NC\NR
But the result isn't optimal, I get:
1. This is a longer ques- +--------------------+
| |
| |
+--------------------+
tion.
Using \NC #1. \NC \bbox{#2} \NC \bbox{#3} \NC\NR
doesn't help either.
\vtop{#2} has the same problem.
The problem is: I've a lot to do and this should be working today.
(I just reallized I can use `setenv shell_escape t` w/o needing
access to the texmf.cnf file. (w/o I couldn't create a MP file,
If I run mpost mpgraph afterwards I only optained one single MP
(mpgraph.51).)
Tobias
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <Pine.BSF.4.10.10001181422480.43130-100000@john.physik.fu-b erlin.de>]
* Re: [ConTeXt] Boxes which commands to use
[not found] ` <Pine.BSF.4.10.10001181422480.43130-100000@john.physik.fu-b erlin.de>
@ 2000-01-18 15:41 ` Hans Hagen
2000-01-18 17:15 ` Tobias Burnus
[not found] ` <Pine.BSF.4.10.10001181811150.45500-100000@john.physik.fu-b erlin.de>
0 siblings, 2 replies; 11+ messages in thread
From: Hans Hagen @ 2000-01-18 15:41 UTC (permalink / raw)
Cc: ntg-context
At 02:29 PM 1/18/2000 +0100, you wrote:
>I now use: \NC #1. \NC #2 \NC \bbox{#3} \NC\NR
>But the result isn't optimal, I get:
>
>1. This is a longer ques- +--------------------+
> | |
> | |
> +--------------------+
> tion.
Can you try this with \starttable instead of \starttabulate?
You can also generate the thing yourself and say:
\startlinecorrection
\hbox
{\vtop{\width.3\hsize#1\vfill}%
\vtop{#2}%
\vtop{#3}}
\stoplinecorrection
etc. The top will align them. If needed, put the graphics in a box and play
with the dimensions:
\def\something#1#2#3% untested
{\setbox\scratchbox=\hbox{graphic}
\scratchdimen=\hsize
\advance\scratchdimen by -wd\scratchbox
\advance\scratchdimen by -2em
\divide\scratchdimen by 2
\hbox to \hsize
{\vtop{\hsize\scratchdimen\begstrut#1\endstrut\vfill}\hss
\vtop{\box\scratchbox}\hss
\vtop{\hsize\scratchdimen\begstrut#3\endstrut\vfill}}}
I could cook up some context stuff, but have a deadline to catch now.
Alternatively use \starttable.
If you can provide me the *minimal* set of data needed I can take a more
detailed look.
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [ConTeXt] Boxes which commands to use
2000-01-18 15:41 ` Hans Hagen
@ 2000-01-18 17:15 ` Tobias Burnus
[not found] ` <Pine.BSF.4.10.10001181811150.45500-100000@john.physik.fu-b erlin.de>
1 sibling, 0 replies; 11+ messages in thread
From: Tobias Burnus @ 2000-01-18 17:15 UTC (permalink / raw)
Cc: ntg-context
> I could cook up some context stuff, but have a deadline to catch now.
> Alternatively use \starttable.
I'll try some alternatives.
> If you can provide me the *minimal* set of data needed I can take a more
> detailed look.
The files are:
http://userpage.fu-berlin.de/~burnus/fsi/evaluation.tex
http://userpage.fu-berlin.de/~burnus/fsi/EVAL-AUS.tex
Tobias
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <Pine.BSF.4.10.10001181811150.45500-100000@john.physik.fu-b erlin.de>]
* Re: [ConTeXt] Boxes which commands to use
[not found] ` <Pine.BSF.4.10.10001181811150.45500-100000@john.physik.fu-b erlin.de>
@ 2000-01-19 11:09 ` Hans Hagen
0 siblings, 0 replies; 11+ messages in thread
From: Hans Hagen @ 2000-01-19 11:09 UTC (permalink / raw)
Cc: ntg-context
[-- Attachment #1: Type: text/plain, Size: 1089 bytes --]
Hi,
First a few fixes:
in supp-pdf change:
\font\temp=\gMPa\nofMParguments\space at \size
so, a \space is added.
in texexec.pl add:
$ENV{"MPXCOMMAND"} = "0" ;
otherwise texexec will loop, due to running mp again and again.
(or add --nomp to mpxcommand)
A tip:
\def\abc#1#2#3%
{...}
no %'s are needed after the } here:
\abc{a}
{b}
{c}
in case of {} args, tex ignores spaces (unless doing a \write), which is
not the case here.
Now, here is the solution:
\def\GraphBox#1%
{\hbox{\raise1.25ex\hbox{\tbox{#1}}}}
\def\FragA#1#2#3%
{\NC #1. \NC \vtop{#2} \NC \GraphBox{#3} \NC\NR}
with (a bit minimalized):
\starttabulator[|r|p|r|]
\FragA
{1}
{Eine "Ubersicht "uber den gesamten Stoff der Vorlesung wurde
am Anfang gegeben.}
{\SixBox{6}{1}{2}{3}{4}{5}{3{,}7}}
\noalign{\blanko}
\FragA
{2}
{Die Dozentin hat sich ausreichend "uber die Vorkenntnisse der
Teilnehmerinnen orientiert}
{\SixBox{0}{0}{0}{0}{0}{0}{0{,}0}}
\stoptabulator
this gives an acceptable result, see attachment, which can be illustrative
for others too,
Hans
[-- Attachment #2: tobias.zip --]
[-- Type: application/zip, Size: 13230 bytes --]
[-- Attachment #3: Type: text/plain, Size: 330 bytes --]
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2000-01-19 11:09 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-15 19:44 [ConTeXt] Boxes which commands to use Tobias Burnus
2000-01-15 20:51 ` Tobias Burnus
2000-01-17 8:29 ` Hans Hagen
2000-01-17 9:28 ` Tobias Burnus
2000-01-17 11:49 ` Hans Hagen
2000-01-17 18:46 ` Tobias Burnus
2000-01-18 10:08 ` Hans Hagen
2000-01-18 13:29 ` Tobias Burnus
[not found] ` <Pine.BSF.4.10.10001181422480.43130-100000@john.physik.fu-b erlin.de>
2000-01-18 15:41 ` Hans Hagen
2000-01-18 17:15 ` Tobias Burnus
[not found] ` <Pine.BSF.4.10.10001181811150.45500-100000@john.physik.fu-b erlin.de>
2000-01-19 11:09 ` 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).