From: Cecil Westerhof <cldwesterhof@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Filling boxes
Date: Mon, 30 Aug 2010 17:02:21 +0200 [thread overview]
Message-ID: <87occknnya.fsf@linux-lqcw.site> (raw)
In-Reply-To: <4C791B37.60606@googlemail.com> (Wolfgang Schuster's message of "Sat, 28 Aug 2010 16:20:39 +0200")
Op zaterdag 28 aug 2010 16:20 CEST schreef Wolfgang Schuster:
> \setuplayout[header=0cm,footer=0.25cm]
>
> \defineframed
> [action]
> [width=5cm,height=3cm,offset=none,frameoffset=.5\linewidth]
>
> \defineframed
> [base]
> [width=3cm,height=2cm,offset=none,frameoffset=.5\linewidth]
>
> \setupfooter[style={\switchtobodyfont[6pt]}]
>
> \newcounter\treecounter
>
> \setvariables
> [tree]
> [1=One,
> 2=Two,
> 3=Three,
> 4=Four,
> 4={\switchtobodyfont[9pt]\input ward },
> 5=Five,
> 6=Six,
> 7=Seven]
Changed this to:
\setvariables
[tree]
[1='Some very long text to try to get to much text for the box to fit in. There is a lot of room. Just some other text to finish it of. With this line added, there is to much text.',
2=Two,
3=Three,
4=Four,
5=Five,
6=Six,
7=Seven,
8=Eight,
9=Nine,
10=Ten,
11=Eleven,
12=Twelf,
13=Thirtheen
]
That comes quit a bit to what I want. When I use this and then I
execute:
texexec --batchmode --purge --silent testTree.tex
an error is signalled. When I remove the last sentence from the first
parameter, it signals success.
My only remaining problem is that I want to use parameters to input
the values for the boxes. How would I do that?
>
> \def\CheckBoxContent
> {\begingroup
> \setbox\scratchbox\vbox{\getvariable{tree}{\treecounter}}%
> \ifdim\ht\scratchbox>\vsize
> \forcequitjob{tree}%
> \else
> \box\scratchbox
> \fi
> \endgroup}
>
> \starttext
>
> \setupfootertexts[\copyright Decebal Computing, http://www.decebal.nl]
>
> \setupalign[middle]\offinterlineskip
>
> {\definedfont[Bold at 32pt]De taken kerstboom}
>
> \blank
>
> \dorecurse{3}
> {\noindent\dorecurse\recurselevel
> {\increment\treecounter
> \action{\CheckBoxContent}}\par}
>
> \dorecurse{7}
> {\increment\treecounter\noindent\base{\CheckBoxContent}\par}
>
> \stoptext
--
Cecil Westerhof
M CLDWesterhof@gmail.com
O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
Please do not send me Microsoft Office/Apple iWork documents.
Send OpenDocument instead! http://fsf.org/campaigns/opendocument/
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2010-08-30 15:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-28 10:39 Cecil Westerhof
2010-08-28 14:20 ` Wolfgang Schuster
2010-08-30 15:02 ` Cecil Westerhof [this message]
2010-08-31 7:34 ` Cecil Westerhof
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87occknnya.fsf@linux-lqcw.site \
--to=cldwesterhof@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).