Taco Hoekwater wrote:
Peter Rolf wrote:
Why do I get K0/V0 for \Get{3}? - it works with \recurselevel!
You need to expand the \Set commands in that first loop,
otherwise you store the literal token \recursevelel inside
the definitions of the Key and Val macros (\setvalue{}{}
autoexpands
Is there a more programmatical way for such? (Does TeX know something
like arrays or dicts?)
Sorry, I still can't program in 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
\defineconversion
[ownnote]
[\ownnotesymbol]
\setupnote
[glossary]
[conversion=ownnote,
textcommand=,
textstyle=,
numbercommand=]
\showframe
\starttext
\dorecurse{10}
{\dorecurse{5}
{I'm \ownnote[glossary]{whowing}{whow}{whatever needs to be
glossed:~\recurselevel} a bit
\dorecurse\scratchcounter{\foundbox{item}{\recurselevel}}}%
\ifnum\itemlevel\plusone
\ifdim\wd\scratchbox\zeropoint
\hskip-\dimen2
\box\scratchbox
\fi
\fi
\box8 }%
\fi}
\showframe
\starttext
\startbuffer
\item
\startitemize[n
Hello,
can anybody give me a minimal example how to use the module m-pstric.tex?
I tried following minimal example:
\usemodule[pstric]
\starttext
\startPSTRICKS
\pspicture(0,0)(10,10)
\dorecurse{10}{\psline(0,0)(\recurselevel,10)}
\dorecurse{10}{\psline(0,0)(10,\recurselevel
}
% {\startlinecorrection[blank]
%\hbox
% {\expanded{\setuprotate[rotation=\recurselevel]}%
% \traceboxplacementtrue
% \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=depth]
{\ruledhbox{\bfb (depth)%
% \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=fit
= y12 = \overlayheight;
P:= log(z11,z12); linear_shade(P,8,(1,1,1),(0,0,0)); draw P;
\stopuseMPgraphic
\defineoverlay[F][\uniqueMPgraphic{F}]
\defineframed[F][offset=2mm,strut=yes,background=F,frame=off]
\starttext
\noindent\dorecurse{1000}{\F{\recurselevel} }
\stoptext
This is question number \recurselevel.}
\stopitemize
\stoptext
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
) item one
(2) item two
that is numbers are enclosed between parentheses?
Thanks a lot in advance: OK
%% item-sample.tex
\defineconversion[exercise][\numbers]
\starttext
\startitemize[exercise][style=bold,stopper=)]
\dorecurse{12}{\item This is question number \recurselevel.}
\stopitemize
in advance: OK
%% item-sample.tex
\defineconversion[exercise][\numbers]
\starttext
\startitemize[exercise][style=bold,stopper=)]
\dorecurse{12}{\item This is question number \recurselevel.}
\stopitemize
\stoptext
___
ntg-context mailing list
Hi Thomas,
Many many thanks! Danke schön! Yes that was the point: inmargin...
Finally the simplest way of achieving my desired result seems to be:
\showframe
\starttext
\setupitemize[stopper=),margin=2.5em]
\startitemize[n,inmargin]
\dorecurse{12}{\item This is question number \recurselevel
\scratchbox\hbox
{\localframed
[\@@tbl\@@tbl]
[\c!frame=\v!off,\c!background=,\c!align=\v!no]
{\strut}}%
\edef\minimalcellheight{\the\ht\scratchbox}%
\dorecurse\maximumcol
{\settblaut\recurselevel\!!zeropoint % \zeropoint etc
% new
\let\xcol
{\recurselevel}{ filled} first part
\secondpart
This is the second part.
\stoptwopart }
\stoptext
Cheers, Taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
\dostepwiserecurse{128}{255}{1}{\catcode\recurselevel=11\relax}
Hans
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74
)
- buildtextaccent doesn't like the box produced by rotation
there are many ways to rotate ...
% \dostepwiserecurse{0}{360}{10}
% {\startlinecorrection[blank]
%\hbox
% {\expanded{\setuprotate[rotation=\recurselevel]}%
% \traceboxplacementtrue
% \hbox to .2\hsize{\hss\ruledhbox{\rotate
}
{\expanded{\defineactivetoken\recurselevel\space}{\dstroke}}
\stopregime
\enableregime[mojka]
¡¢£ ¤¥¦§¨© ª«¬®¯°± ²³´µ¶·¸ ¹º»¼½¾ ¿ÀÁÂà ÄÅ ÆÇÈÉ ÊË ÌÍÎÏÐ
ÑÒÓÔ ÕÖ×ØÙÚ Û ÜÝÞßàáâ ãäåæçè éêëì íîï ðñòóôõ ö÷øùúûüýþÿ
¡¢£ ¤¥¦§¨© ª«¬®¯°± ²³´µ¶·¸ ¹º»¼½¾ ¿ÀÁÂà ÄÅ ÆÇÈ ÉÊË ÌÍÎÏÐ
ÑÒÓÔ ÕÖ×ØÙÚ Û ÜÝÞ ßàáâ ãäåæçè éêë
.
How's this?Cheers, Taco%% BREAK is a special pretty handler that auto-wraps lines% to fit the current hsize.\gdef\BREAKsetspecials% {\dorecurse{256}{\setpretty\numexpr \recurselevel-1\relax=10 }}
\gdef\BREAKsethandlers% {\installprettyhandler 10 \BREAKtypeone}\newcount\BREAKcharcounter\newcount
=30mm,height=20mm]
\setuppapersize[label][A4]
\setuppaper[dx=1mm,dy=1mm,nx=2,ny=6]
\setuparranging[XY]
\showframe[edge]
\starttext \dorecurse{6}{test \recurselevel \page} \stoptext
--
- Gus
___
ntg-context mailing list
ntg-context@ntg.nl
http
}{\setpretty\numexpr \recurselevel-1\relax=10 }}
\gdef\BREAKsethandlers%
{\installprettyhandler 10 \BREAKtypeone }
\newcount\BREAKcharcounter
\newcount\BREAKmaxcharcount
\def\BREAKtypeone#1%
{\advance\BREAKcharcounter 1
\ifnum\BREAKcharcounter \BREAKmaxcharcount
\hfil\break
\fromrange\torange1{#2{\recurselevel}}}
but we can indeed make a nicer looking one
Hans
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel
\stopuniqueMPgraphic
\starttext
\dorecurse{3}{%
\startTEXpage
\useMPgraphic{\recurselevel}
\stopTEXpage}
\stoptext
Willi
Wolfgang Zillig wrote:
Hello,
I have problems with changeing the font in Metapost. I defined my own
typescripts somewhere and I also have a mapfile for that fonts
\uncompressedlist9-1+\recurselevel}
%
% (the 1+ and -1 are needed to solve a counter offset.)
\def\itemwithdash#1-#2-%
[EMAIL PROTECTED]@EA
{\the\numexpr 1+#2-#1\relax}%
[EMAIL PROTECTED]@[EMAIL PROTECTED]
{\the\numexpr #1-1+\recurselevel\relax}}}%
% top level. The result
: pdfeTeX, 3.141592-1.21a-2.2 (Web2C 7.5.4)
context : ver: 2005.01.31
cont-en : ver: 2005.01.31 fmt: 2005.4.30 mes: english
Here is a sample:
\starttext
\startcolumns[n=2]
\starttable[|l|l|]
\HL
\NC \bf a \NC \bf b \NC\SR
\HL
\NC a \NC b \NC\FR
\dorecurse{100}{\NC \recurselevel \NC b \NC\MR}
\NC a \NC b
:
\getfiguredimensions[25pages.pdf]
\dorecurse{\noffigurepages}{\externalfigure[25pages.pdf][width=\textwidth,height=\textheight,offset=-1cm][page=\recurselevel]}
inserting one (the 16th) page of a 25 pages pdf :
\getfiguredimensions[25pages.pdf]
{\externalfigure[25pages.pdf
\starttext
\dorecurse{9}{Line \recurselevel\hfill\break}%
\par
\penalty50
\vskip 3\baselineskip
\nobreak\vskip-3\baselineskip
Hallo
\stoptext
-
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg
to \textheight{\topskipcorrection \hsize\makeupwidth left
\hfill right\vfill}]
\setuphead[chapter][text=empty]
\starttext
\startcolumnset[first,next]
\placefigure[btrl]{}{}
\placefigure[tblr]{}{}
\chapter{thuan} \dorecurse{25}{\recurselevel: \input thuan \endgraf}
\stopcolumnset
\startcolumnset
\dostepwiserecurse{1}{20}{1}{%
\startalignment[middle]
\vfil
This is \par
\blank[big]
{\bfd \recurselevel}
\stopalignment
\vfil
\page}
\stoptext
]
\setuppagenumbering[location={footer,marginedge},state=start]
\setupcolors[state=start]
\showframe[edge]
\starttext
\dostepwiserecurse{1}{20}{1}{%
\startalignment[middle]
\vfil
This is \par
\blank[big]
{\bfd \recurselevel
,backgroundcolo
r=green]{p.\tfd\recurselevel}\hss} \vss}
\stopTEXpage}
\stoptext
%%
%% save as my-imp.tex
%%
%% \setuplayout here
\starttext
\centerline{%
\externalfigure[test][page=1]
\externalfigure[test][page=3]
\externalfigure[test][page=5]
\externalfigure[test][page=7]
\externalfigure
and sort; as soon as
possible
i will post some code.
shorter
\centerline
{\dostepwiserecurse{1}{11}{2}
{\expanded{\externalfigure[test][page=\recurselevel]}}}
Yes, syst-ext. and others syst-.
I try to made a pdf-collection of useful module like syst-*, page-*
core-box, supp-box, some module
%%
\setupcolors[state=start]
\starttext
\dorecurse{660}%
{\startTEXpage[width=3cm,height=2cm]
\vbox to \vsize{\vss
\hbox to
\hsize{\hss\framed[width=2cm,align={middle,lohi},background=color,backgroundcolor=green]{p.\tfd\recurselevel}\hss}
\vss}
\stopTEXpage}
\stoptext
%%
%% save as my-imp.tex
\hbox to
\hsize{\hss\framed[width=2cm,align={middle,lohi},background=color,backgroundcolor=green]{p.\tfd\recurselevel}\hss}
\vss}
\stopTEXpage}
\stoptext
%%
%% save as my-imp.tex
%%
%% \setuplayout here
\starttext
\centerline{%
\externalfigure[test][page=1]
\externalfigure[test][page=3
={middle,lohi},background=color,backgroundcolor=green]{p.\tfd\recurselevel}\hss}
\vss}
\stopTEXpage}
\stoptext
%%
%% save as my-imp.tex
%%
%% \setuplayout here
\starttext
\centerline{%
\externalfigure[test][page=1]
\externalfigure[test][page=3]
\externalfigure[test][page
}%
{\framed[width=\textwidth,height=3em,align={middle,lohi}]{\hfil
\CONTEXT --\recurselevel \hfil}}%
\stoptext
I would like to put \copy\ContinueNextPage after the last \framed in
every page
(in this example, after CONTEXT--18 at page 1 and CONTEXT--36 at page 2).
I don't want use tables/tabular
}}
\starttext
\dorecurse{20}%
{\framed[width=\textwidth,height=3em,align={middle,lohi}]{\hfil
\CONTEXT --\recurselevel \hfil}}%
\stoptext
I would like to put \copy\ContinueNextPage after the last \framed in
every page
(in this example, after
--\recurselevel \hfil}}%
\stoptext
I would like to put \copy\ContinueNextPage
after the last \framed in every
page
(in this example, after CONTEXT--18 at page 1 and CONTEXT--36 at page
2).
I don't want use tables/tabular, i try to use \vsplit.
I try to read page-ini, i find useful things like
[ctx-var-textwidth] {\textwidth}
\newcount\FigNo
\defineXMLenvironment[float][]
{\defineXMLpush[caption]%
\global\FigNo=0
}
{\placefigure{\XMLflush{caption}}%
{\dorecurse{\FigNo}%
{\edef\filewithpath{\XMLpop{dir-fig}\getvalue{file:\recurselevel}}%
\edef\param{\getvalue
\dostepwiserecurse{`a}{`z}{1}{\char\recurselevel} \endgraf
\russian \dostepwiserecurse{`a}{`z}{1}{\char\recurselevel} \endgraf
\stoptext
In order to get it working i suggest those using russian to do the following:
- determine what encodings are *really* in use
- collect the tfm/vf/pfb files that are needed
\completeMycontent[criterium=all]
\expanded{\writetolist[Mypart]{Test Part 1}{}}
\dorecurse{3}{%
\chapter[Ch-Test]{Test}
\expanded{\writetolist[Mychapter]{Test \recurselevel}{\hfill
Version:~ \Version}}
\input ward
}
\section{Problems seen:}
\startitemize[2,packed
Henning Hraban Ramm wrote:
Am 06.01.2005 um 15:41 schrieb Hans Hagen:
\dorecurse{20}
{\bTR \expanded{\bTD \recurselevel bottles of beer \eTD} \bTD \strut
\eTD \eTR}
But what if I need it in a call to some function like:
\dorecurse{10}{\SkillField{Skill\expanded\recurselevel}}
\dorecurse{10
Henning Hraban Ramm wrote:
In a form I need a lot of empty, but numbered fields.
Can I access the counter of \dorecurse somehow, or is there another
\recurselevel
Vit Zyka
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman
Henning Hraban Ramm wrote:
\dorecurse{20}{\bTR \bTD \LoopCounter bottles of beer \eTD \bTD{\strut}
\eTD \eTR}
\dorecurse{20}
{\bTR \expanded{\bTD \recurselevel bottles of beer \eTD} \bTD \strut \eTD
\eTR}
Hans
]
\usetypescript[palatino][\defaultencoding] \setupbodyfont[palatino,12pt]
\noheaderandfooterlines
\startbuffer
\dostepwiserecurse{200}{150}{-5}
{\expanded{\setuplayout[width=\recurselevel pt]}
\subject{palatino: no hz, ragged right}
\setupalign[right,hanging,nohz] \input tufte \endgraf
\subject
}[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
argument> ...\ignorespa
{3}{\section{Section \recurselevel}Page \recurselevel\page}
\stoptext
___
ntg-context mailing list
[EMAIL PROTECTED]
http://www.ntg.nl/mailman/listinfo/ntg-context
in scrguien.pdf (KOMA-Script documentation)
\startenvironment e-test
\def\BCOR{3mm}% eventual binding correction
\setbox\scratchbox\hbox{\dorecurse{26}{\character\recurselevel}}
\newdimen\PageWidth
\PageWidth=\paperwidth
\doifmode{BCOR}{\PageWidth=\dimexpr(\PageWidth-\BCOR)}
\unprotect
\begingroup
\catcode`P
]
{\switchtobodyfont[10pt]\getbuffer[Adr\recurselevel]}
\setlayer
[Etiket]
[preset=lefttop,location={right,bottom}]
{\switchtobodyfont[5pt]\Logo}
\placelayer[Etiket]}
\stoptext
\dorecurse{\Addresses}{%
\setlayer
[Etiket]
[preset=leftbottom,location={right,top},y=-3mm,x=-3mm]
{\switchtobodyfont[10pt]\getbuffer[Adr\recurselevel]}
\setlayer
[Etiket]
[preset=lefttop,location={right,bottom}]
{\switchtobodyfont[5pt]\Logo
\setbox\scratchbox\hbox{\dorecurse{26}{\character\recurselevel}}
\newdimen\PageWidth
\PageWidth=\paperwidth
\doifmode{BCOR}{\PageWidth=\dimexpr(\PageWidth-\BCOR)}
%% Here is the problem: dividing one length by another. %%
% the following is not working for 2 reasons:
% * there is still the pt
ConTeXt or in the macro?
ConTeXt ver: 2003.9.25 fmt: 2003.10.21 int: english mes: english
fyi: in context:
\starttext
\dorecurse{8}{Page \recurselevel\page}
\stoptext
Hmm, a bit less typing.
And one more question related arranging. I suppose, that arranging has no
effect to the page
\cbox{Page \the\N}
\vfill\eject
\ifnum\N8\repeat
\stoptext
fyi: in context:
\starttext
\dorecurse {8} {\startstandardmakeup \cbox{Page \recurselevel}
\stopstandardmakeup}
\stoptext
actually 4SIDE is not the right name (compared to 2SIDE), maybe 4SEQUENCE
is better
\def
.
got you:
\starttext
\startcolumnset
\dorecurse{100}
{\framed
[width=\hsize,height=fit,align=normal]
{\getrandomnumber\whatever{1}{9}%
\dorecurse\whatever{\strut test \recurselevel\endgraf}}
\vfilll}
\stopcolumnset
\stoptext
Oh, I can't wait to see what
\whatever{\strut test \recurselevel\endgraf}}
\vfilll}
\stopcolumnset
\stoptext
Oh, I can't wait to see what that example does! Does it show that I
am not recalling correctly? I hope so.
The example, though, doesn't result in a pdf file for me when I put it
into a file
...
\stopframedtext
\page
\stopbuffer
\startbuffer[Addresse2]
\startframedtext
...
\stopframedtext
\page
\stopbuffer
\starttext
\dorecurse{6}{\getbuffer[Addresse\recurselevel]}%between first braces
number of addresses you have in buffers
\stoptext
You will have to play
[appleblossom][page=4]\stoppagefigure
...
or is there also a nice keyword for insert all pages?
What is wrong with \copypages?
Patrick
--
evil code: \dorecurse{4}{\startpagefigure[..][page=\recurselevel]\stopp...}
___
ntg-context mailing list
[EMAIL
Patrick Gundlach [EMAIL PROTECTED] writes:
--
evil code: \dorecurse{4}{\startpagefigure[..][page=\recurselevel]\stopp...}
Perhaps not that evil, it seems to work :)
\starttext
\getfiguredimensions[ward]
\dorecurse{\noffigurepages}{\startpagefigure[ward][page=\recurselevel]
\stoppagefigure
} \startformula test \stopformula test
\endgraf test
\dorecurse{30}{\bpar \dorecurse\recurselevel{test } \epar
\startformula formula \stopformula}
Thank you for the patch \moveformula now works fine.
I have not tested the \bpar-\epar thing since it looks like there is a
small bug: when I typeset
test
\dorecurse{30}{\bpar \dorecurse\recurselevel{test } \epar \startformula
formula \stopformula}
no guarantees -)
Hans
new.zip
Description: Zip archive
-
Hans Hagen | PRAGMA ADE | [EMAIL
]
% \setuplayout[page] [topspace=5mm,backspace=5mm]
% \setuplayout[page]
% \setuplayout[location=middle]
% \setuparranging [XY]
% \showframe
%
% \starttext \dorecurse{30}{test \recurselevel \page} \stoptext
so, you can have any arrangement
Hans
801 - 859 of 859 matches
Mail list logo