the\textwidth}%
\get@split@box{\the\textwidth}}\allowbreak%
\else%
\raise\warichuparameter{voffset}%
\vbox{\offinterlineskip%
\get@split@box{\dimexpr\wd\scratchbox/2+1pt\relax}%
\get@split@box{\dimexpr\wd\scratchbox+1pt\relax}
ise\warichuparameter{voffset}%
\vbox{\offinterlineskip%
\get@split@box{\dimexpr\wd\scratchbox/2+1pt\relax}%
\get@split@box{\dimexpr\wd\scratchbox+1pt\relax}}\allowbreak%
\exitloop%
\fi}%
\warichuparameter{right}%
\warichuparameter{distance}\endgroup}
\protect
artoutputstream[two]
\startcolor[green]
\dorecurse{5}{\chapter{Stream Two}
\dorecurse{10}{\input zapf\par}
}
\stopcolor
\stopoutputstream
\synchronizestreams[one,two]
\setbox\scratchboxone\outputstreambox[one]
\setbox\scratchboxtwo\outputstreambox[two]
\doloop
{\ifvoid\scratchboxone
\exitloop
\else
\se
rse{10}{\input zapf\par}
}
\stopcolor
\stopoutputstream
\synchronizestreams[one,two]
\setbox\scratchboxone\outputstreambox[one]
\setbox\scratchboxtwo\outputstreambox[two]
\doloop
{\ifvoid\scratchboxone
\exitloop
\else
\setbox\scratchboxfour\vsplit\scratchboxone to \textheight
\vbox to \vsize{\box\s
urse{5}{\chapter{Stream Two}
\dorecurse{10}{\input zapf\par}
}
\stopcolor
\stopoutputstream
\synchronizestreams[one,two]
\setbox\scratchboxone\outputstreambox[one]
\setbox\scratchboxtwo\outputstreambox[two]
\doloop
{\ifvoid\scratchboxone
\exitloop
\else
\setbox\scratchboxf
chboxtwo\outputstreambox[two]
\doloop
{\ifvoid\scratchboxone
\exitloop
\else
\setbox\scratchboxfour\vsplit\scratchboxone to \textheight
\vbox to \vsize{\box\scratchboxfour\vss}%
\setbox\scratchboxfive\vsplit\scratchboxtwo to \textheight
\vbox to \vsize{\box\scratchboxfive\vs
\stopoutputstream
\synchronizestreams[one,two]
\setbox\scratchboxone\outputstreambox[one]
\setbox\scratchboxtwo\outputstreambox[two]
\doloop
{\ifvoid\scratchboxone
\exitloop
\else
\setbox\scratchboxfour\vsplit\scratchboxone to\textheight
\vbox to\vsize{\box\scratchboxfour\vss}%
\setbox
rtcolor[blue]
\input vn\par
\stopcolor
\stopoutputstream
\synchronizestreams[one,two]
\setbox\scratchboxone\outputstreambox[one]
\setbox\scratchboxtwo\outputstreambox[two]
\doloop
{\ifvoid\scratchboxone
\exitloop
\else
\setbox\scratchboxfour\vsplit\scratchboxone to \textheight
\vbox to \
after=]
\getbuffer[address]
\stoplines}
\egroup
\ifdim\wd\scratchbox>3cm
\advance\glyphscale by -50
\else
\box\scratchbox
\exitloop
\fi
}
\endgroup
to get more consistent stepwise scaling or even this:
\begingroup
\doloop {
\setbox\scratchbox\hbo
}\input zapf\footnote{note}\par\pushoutputstream}
\stopcolor
\stopoutputstream
\synchronizestreams[one,two]
\setbox\scratchboxone\outputstreambox[one]
\setbox\scratchboxtwo\outputstreambox[two]
\input zapf\page
\doloop
{\ifvoid\scratchboxone
\exitloop
\else
x
\else
\unhbox\scratchboxone
\exitloop
\fi
}%
\endgroup}
This variant is more neat as it returns the to b eused width. It doesn't
flush the content.
\protected\def\guessbestwidth#1#2#3% no \protected when no \dimexpr
{\beginlocalcontrol
\begingroup
\hsize#
state
\exitloop
\else
\page
\fi}}
\protect
cont-new will be overwritten so when you put a patch in there you need
to check a next upload if that patch is permanent
you can also put patched in a cont-loc file (make sure that you run
mtxrun --generate after making one
sname\??xtableflushsplit\v!repeat\endcsname
{\doloop
{\clf_x_table_flush
method {\v!split}%
height
\ifdim\pagegoal=\maxdimen\textheight\else\dimexpr\pagegoal-\pagetotal\relax\fi
\relax
\ifcase\c_tabl_x_state
\exitloop
\else
\page
state
\exitloop
\else
\page
\fi}}
\protect
Please test a lot! I also needs Wolfgangs opinion on this. Maybe
preceding whitespace can interfere so maybe we need some 'slack'
parameter.
Hans
builder ...)
You can put this on cont-new.mkxl as test:
\unprotect
\defcsname\??xtableflushsplit\v!repeat\endcsname
{\doloop
{\clf_x_table_flush
method {\v!split}%
height
\ifdim\pagegoal=\maxdimen\textheight\else\dimexpr\pagegoal-\pagetotal\relax\fi
\relax
\recurselevel=7
\exitloop
\fi
\NC \recurselevel \NC \NC\NR \HL
}
\stoptabulate
\stopbuffer
\starttext
\getbuffer[AdjacencyList1]
\getbuffer[AdjacencyList2]
\stoptext
> 2020. 9. 21. 오후 10:50, ntg-context-requ...@ntg.nl 작성:
>
> Send ntg-context mailing list submissions to
>
> Dalyoung
>
> *
> \startbuffer[AdjacencyList1]
> \starttabulate[|c|cw(2cm)|]
> \HL
> \dorecurse{8}
>{\NC \recurselevel \NC \NC\NR \HL}
> \stoptabulate
> \stopbuffer
>
> \startbuffer[AdjacencyList2]
> \starttabulate[|c|cw(2cm)|]
> \HL
> \do
; \dorecurse{8}
> {\NC \recurselevel \NC \NC\NR \HL}
> \stoptabulate
> \stopbuffer
>
> \startbuffer[AdjacencyList2]
> \starttabulate[|c|cw(2cm)|]
> \HL
> \doloop{
> \ifnum \recurselevel=7
> \exitloop
> \fi
> \NC \recurselevel \NC \NC\NR \HL
> }
> \stoptabulate
> \stop
\setbox\MyNoteOverflow\box\scratchbox
\setbox\scratchbox\vsplit \MyNoteOverflow to \scratchdimen
\fi
\vbox
\bgroup
\topskipcorrection
\unvbox\scratchbox
\vfilll
\egroup
\stopsetups
\startsetup
Overflow to \scratchdimen
\fi
\vbox\bgroup
\topskipcorrection
\unvbox\scratchbox
\vfilll
\egroup
\stopsetups
\startsetups notaflush
\doloop {
\page
\ifvoid\MyNoteOverflow
\exitloop
\else
\null \page
topoutputstream
\synchronizestreams[one,two]
\setbox\scratchboxone\outputstreambox[one]
\setbox\scratchboxtwo\outputstreambox[two]
\doloop
{\ifvoid\scratchboxone
\exitloop
\else
\setbox\scratchboxfour\vsplit\scratchboxone to \textheight
\vbox to \vsize{\box\scratchboxfo
[green]
\dorecurse{10}{\input zapf\par}
\stopcolor
\stopoutputstream
\synchronizestreams[one,two]
\setbox\scratchboxone\outputstreambox[one]
\setbox\scratchboxtwo\outputstreambox[two]
\doloop
{\ifvoid\scratchboxone
\exitloop
\else
\setbox\scratchboxfour\vsplit\scratchbox
therLayer]{Other pages}
>> \setupbackgrounds[page][background={FirstLayer,OtherLayer}]
>> %~ \mbox{}\blank[75mm]
>> \dorecurse{17}{\input zapf\par}
>> \cA\hfill
>> \cB
>> \page
>> \stopbuffer
>>
>> \opencsvfile{mail.csv}
>> \doloop{\ifn
e][background={FirstLayer,OtherLayer}]
> %~ \mbox{}\blank[75mm]
> \dorecurse{17}{\input zapf\par}
> \cA\hfill
> \cB
> \page
> \stopbuffer
>
> \opencsvfile{mail.csv}
> \doloop{\ifnotEOF\getbuffer[text-content]\nextrow\else\exitloop\fi} %OK
> \stoptext
>
> Conten
{mail.csv}
\doloop{\ifnotEOF\getbuffer[text-content]\nextrow\else\exitloop\fi} %OK
\stoptext
Contents of mail.csv:
"ME";11/10/14
"You";05/02/14
"She";03/03/12
"It";03/03/14
t-scancsv.lua can be found at
http://public.hajtmar.com/files/TeX/contex
s
radius 1)
\edef\N{10} % Number of frames in animation per hypocycloid "branch"
\edef\K{1}\doloop{\ctxlua{commands.doifelse(math.abs(\K*\r -
math.floor(\K*\r+0.5))<0.01)}{\exitloop}{\edef\K{\luaexpr{\K+1
\startMPinclusions[+]
r:=\r; % Radius of smaller circle (larger cir
On 12/19/2012 9:13 PM, Troy Henderson wrote:
I got this to work. There's probably a better method though ;)
\edef\r{\luaexpr{1/3.8}}
\edef\q{1}\doloop{\ctxlua{commands.doifelse(math.abs(\q*\r -
math.floor(\q*\r+0.5))<0.000001)}{\exitloop}{\edef\q{\luaexpr{\q+1
Yes, you need to th
seek, the TOC is 4.2ex,
but when a long title is on multiple lines it should stick together (2.8ex).
You want something like this?
\starttext
\setbox0\vbox{\input ward\par}
\doloop {\setupinterlinespace[line=2.8ex] \ifdim\ht0<\lineheight
\setupinterlinespace[line=4.2ex] \box0
2.8ex).
You want something like this?
\starttext
\setbox0\vbox{\input ward\par}
\doloop
{\setupinterlinespace[line=2.8ex]
\ifdim\ht0<\lineheight
\setupinterlinespace[line=4.2ex]
\box0
\exitloop
\else
\setbox2\vsplit0 to \baselineskip
e
}
\page
% Or loop cycle
\opencsvfile{file2.csv}
\doloop{\ifnotEOF\getbuffer[myletter]\nextrow\else\exitloop\fi} %OK
\stoptext
Dne 29.8.2010 2:34, Jaroslav Hajtmar napsal(a):
Hello,
Can be deployed print letters due t-letter module in the cycle?
When I use recursion, then an error occurs.
I n
\fastrecursecounter rather than 0. I don't think that this will have
any side effects.
no, it's just the last value; of course i can set it to zero
recurselevel is also known inside \doloop so there it makes sense to have it
afterrwards (or when using \exitloop in any case)
Both \dorecurse a
that this will
have any side effects.
no, it's just the last value; of course i can set it to zero
recurselevel is also known inside \doloop so there it makes sense to
have it afterrwards (or when using \exitloop in any ca
a\doifreglevelelse\@EA[\currentlocationreference]
{...@ea\doglobal\@ea\addtocommali...@ea
{\currenttextreference}\glocalpublist}{}}
{}}%
{
lso doloop. Documentations from syst-ext.tex
%D \macros
%D {doloop,exitloop}
%D
%D Sometimes loops are not determined by counters, but by
%D (a combinations of) conditions. We therefore implement a
%D straightforward loop, which can only be left when we
%D explictly exit it. Nesting is suppor
\else.
\@@plniterate ...\expandafter \@@plniterate \else
\fi
\myloop ...by 1 \ifnum \tempcnta >#1\else \repeat
I think the loop structure should be:
\loop ... \if... ... \repeat
just use:
\doloop {
\ifwhateveryoulike
\exitloop
\fi
Hans,
Thanks, that works. But shouldn't the oth
following error,
> >> why?
> >>
> >> enter loop
> >>
> >> ! Extra \else.
> >>
> >> \@@plniterate ...\expandafter \@@plniterate \else
> >>
> >> \fi
> >>
> >> \myloop ...by 1 \ifnum \tempcnta >#1\else \repea
mpcnta >#1\else \repeat
I think the loop structure should be:
\loop ... \if... ... \repeat
just use:
\doloop {
\ifwhateveryoulike
\exitloop
\fi
}
-
Hans Hagen | P
t
\fi }
{}}
{\exitloop}}%
% \pagelist is now the list of backreferences for #1
\message{\pagelist}%
}
\protect
Best wishes,
Taco
___
If your question is of interest to others as well
idth \coverwidth = 7cm
\newdimen\coverfont \coverfont =12pt
\newdimen\fontstep\fontstep = 1pt
\def\startcover
{\dostartbuffer[cover][startcover][stopcover]}
\def\stopcover
{\setups[cover:place]}
\def\boxsize
{\setbox\cover\vbox
{\hsize\coverwidth
\definedfont[Serif at \the\c
oks
# \enablemode
# \endstrut
\enumeration
# \environment
# \EQ
# \eTABLE
# \eTABLEbody
# \eTABLEfoot
# \eTABLEhead
# \eTABLEnext
# \eTD
# \eTH
# \eTR
# \exitloop
# \expanded
\externalfigure[file][settings]
\field[name]
\fieldstack[name][names][settings]
\fillinfield[text]{text}
\fillinline[settin
vbox
{\unvbox\tsplitresult
\tsplitinbetween
\unvbox\scratchbox}%
\ifvoid\tsplitcontent \exitloop \fi
\else\if!!doned
% we only have a tablehead so far
\setbox\tsplitresult\vbox{\unvbox\tsplitresult\unvbox\scratchbox}%
e
\doloop{%30
\ifdim\ht100<\TestDim%
\setbox100=\vbox to \TestDim{\hsize=\CellWidth \recurselevel #1}\exitloop\fi
\TestDim=\dimexpr(\CellHeightOne+\TestDim)\relax}
\dp100=0pt%
\ruledvbox{\box100}%ruled for test
}
\setupcolors[state=start]
\setuplayout[grid=yes]
\setupTABLE[width=\CellWidth,offset=0p
=\@@ipframe]% \fi\fi \@@ipright} \@@ipbottom}% \doglobal\increment\combinedpagescounter
\hfil}% \hfilneg} \vfil}% \vfilneg}% \page \ifnum\combinedpagesco
\fi \@@ipright} \@@ipbottom}% \doglobal\increment\combinedpagescounter \hfil}%
\hfilneg} \vfil}% \vfilneg}% \page \ifnum\combinedpagescounter>\@@ipn \exitloop\fi}} % loop for
r#1#2%
> {\doifdefinedelse{\??cv#1#2}}
>
> \protect
>
> \defineconversion[abc][$\star$,$\bullet$,$\ast$]
> \defineconversion[def][m,o,j,c,a]
>
> \doloop
> {\doifelseconversionnumber{abc}{\recurselevel}
> {[abc \recurselevel\space defined]}
> {\exitloop}}
>
;
> gp_point(3cm,1cm,3);
> gp_point(4cm,1cm,4);
> gp_point(5cm,1cm,8);
> \stopMPcode
>
> \stoptext
>
\unprotect
\def\doifelseconversionnumber#1#2%
{\doifdefinedelse{\??cv#1#2}}
\protect
\defineconversion[abc][$\star$,$\bullet$,$\ast$]
\defineconversion[def]
recurselevel}}
>>> and \usemygraphic[name][n={1,3},width=8cm] (syntax might be different
>>> if necessary) to
>>> \reuseMPgraphic{gpg:name:1}
>>> \reuseMPgraphic{gpg:name:3}
>>> (with proper scaling if possible).
>>>
>>>
ame:3}
> > (with proper scaling if possible).
> >
> you want all graphics?
>
> \def\usemygraphic#1%
> {\doloop
> {\doifMPgraphicelse{gpg:#1:\recurselevel}
> {\reuseMPgraphic{gpg:name:\recurselevel}}
> {\exitloop}}}
>
> or so ...
Wow! No, I don
n={1,3},width=8cm] (syntax might be different
> if necessary) to
> \reuseMPgraphic{gpg:name:1}
> \reuseMPgraphic{gpg:name:3}
> (with proper scaling if possible).
>
you want all
\fi
\ifdim\nextboxht>\zeropoint\else
\expandafter\exitloop
\fi}%
\egroup}
\vbox
\fi}
\protect
% beware: you need to set the splitmethod to b (boxed split)
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
\fi
\fi
\ifdim\nextboxht>\zeropoint\else
\expandafter\exitloop
\fi}%
\egroup}
\vbox
\fi}
\protect
% beware: you need to set the splitmethod to b (boxed split)
___
ntg-context mailing list
uffix\empty
\fi \fi
\bgroup
#2{\unvbox2}
\egroup
\ifdim\nextboxht>\zeropoint
\page
\decrementnumber[\floatcaptionnumber]%
\fi
\fi
\ifdim\nextboxht>\zeropoint\else
>\zeropoint\else
\expandafter\exitloop
\fi}%
\egroup}
\vbox
\fi}
\protect
% beware: you need to set the splitmethod to b (boxed split)
\defineXMLnested
[splittable]
{
\defineXMLsave[caption]
\defineXMLsave[header]
\defineXMLsave[body]
\d
\floatcaptionsuffix\empty
> \fi \fi
> \bgroup
> #2{\unvbox2}
> \egroup
> \ifdim\nextboxht>\zeropoint
>\page
>\decrementnumber[\floatcaptionnumber]%
> \fi
>
\page
\decrementnumber[\floatcaptionnumber]%
\fi
\fi
\ifdim\nextboxht>\zeropoint\else
\expandafter\exitloop
\fi}%
\egroup}
\vbox
\fi}
% beware: you need to set the splitmethod to b (boxed split)
omplain % new, get rid of overfull message (to be sorted out)
>\doloop
> {\OTRSETnaturalflush
> %\OTRSETstartnextpage % no
> \OTRSETdoflushfloats % actually belongs in \flushsavedfloats (but goes
> wrong)
> \OTRSETcheckfreelines
> \ifsomefreecolumnc
TRSETdoflushfloats % actually belongs in \flushsavedfloats (but goes
wrong)
\OTRSETcheckfreelines
\ifsomefreecolumncells \exitloop \fi}%
\OTRSETchecksidefloat}
tricky patch so please test extensively! (for the moment put this in your local
copy of cont-loc.tex or maybe i
n TeX...
>
Welcome to the club ;)
You can use \newcounter for such stuff or the context recurse functions
(with \recurselevel).
\starttext
\dostepwiserecurse{1}{9}{1}{% count from 1 to 9, step 1
\setvalue{PREFIX\recurselevel}{\recurselevel}
}
% or all by hand (not useful for simple loops)
\newcounter\R
\unvbox\scratchbox
\exitloop
\fi
}
Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing list
ntg-context@ntg.nl
http://ww
>10cm
\switchtobodyfont[small] \else
\unvbox\scratchbox
\exitloop
\fi
}
Hans
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
___
ntg-context mailing
runs as fast as normal
how does your current code look? (the solution depends a bit it);
think of something
\doloop{
\setbox\scratchbox=\vbox
{the content of the label}
\ifx\ht\scratchbox>10cm
\switchtobodyfont[small] \else
\unvbox\scratchbox
\exitloop
\fi
depends a bit it); think
of something
\doloop{
\setbox\scratchbox=\vbox
{the content of the label}
\ifx\ht\scratchbox>10cm
\switchtobodyfont[small]
\else
\unvbox\scratchbox
\exitloop
\fi
}
Hans
___
ntg-context mail
\hbox{\switchtobodyfont[ss,\the\FontSize]\tfb #1}%
\ifdim\wd800 <\Limit\exitloop%
\else%
\ifdim\FontSize <1bp\exitloop%
\else %
\advance\FontSize by -0.5bp%
\fi%
\fi}%
\box800\relax%
}
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg
t, but it's
%WRONG!!
\def\AutoSize#1#2#3{%
% #1=string #2=horiz.limit #3=initial font size
\newdimen\Limit \Limit=#2
\newdimen\FontSize \FontSize=#3
\doloop{%
\setbox800=\hbox{#1}%
\ifdim\wd800 <\Limit\exitloop
\else
% WARNING: eat memory , 1bp is bad step,
% force ss it's
at
\ifdim\wd\floatbox>\zeropoint
\!!doneatrue
\dp\floatbox\zeropoint
\OTRSETstoreincolumnslot{TBLR}\floatbox
\if!!donea
%\message{[flu]}%
\else
\OTRSETresavebox\floatbox
\exitloop
\fi
\
uld insert from \@@ipstart\space to \@@ipstop}%
\let\currentip\@@ipstart%
\decrement\currentip
\doloop
{\increment\currentip\relax
% \write16{Inserting page \currentip}%
\dofilterpage{#1}\currentip
\doifinset\currentip{#2}{\null\page}%
\ifnum\currentip=\@@ipstop\ex
}[fig:exceptionhierarchy] shows the
hierarchy for ...
The following error trace occurs (TeXShop):
floatblocks: 1 placed
! Undefined control sequence.
\doloop ...ndcsname \recurselevel \let \endofloop
\dodoloop \dodoloop 1
\removeunwantedspaces ...kip \else \exitloop \fi }
\fi
...\ignorespaces
ectly, but once
I try to compile the file(s) with a TOC, this is what I get:
myContents : - Table of contents
(./pr-03.tuo
! Undefined control sequence.
\exitloop ->\let \endofloop
\nodoloop
...>\zeropoint \u
from below.
in page-imp, patch:
\hfil}%
\hfilneg}
\vfil}%
\vfilneg}%
\pagina %%% add this
line
\ifnum\combinedpagescounter>\@@ipn \exitloop\fi}
\else
\dol
owbreak
\fi
\egroup
% so far for the repeated head after forced break
\ifvoid#1 \exitloop \else \donetrue \fi}%
\fi}
works ok for :
% \bTABLE[split=repeat]
% \bTABLEhead
% \bTR \bTH lxxxeft \eTH\bTD right \eTD\eTR
% \eTABLEhead
% \bTABLEbody
% \dorec
70 matches
Mail list logo