Hi Patrick,
Patrick Gundlach schrieb:
Hi,
what is wrong with
--
\setuppagenumbering[location=]
\starttext
\setupheadertexts[text][section][chapter]
\dorecurse{8}{\chapter{chapter - \recurselevel}
\expanded{\chapter }
look
in the column
after balancing are greater than ntop, do column balancing (if enabled)
otherwise not. For example,
\showgrid
\starttext
\dostepwiserecurse{5}{15}{1}{
\section{\recurselevel}
\startcolumns[n=2,ntop=\recurselevel,balance=yes]
\dorecurse{20}{This is a test line to check for balancing
how do I change
\startTeXtexts
\dorecurse{10}{\TeXtext{\recurselevel}{$x_{\recurselevel}$}}
\stopTeXtexts
so that I can print labels from x_0 up to x_9? Do I need to use
\defineconversion and \convertnumber?
No, use \dostepwiserecuse. The general syntax
\stopitemize
\stopitemize
\startitemize[n,packed,broad][itemalign=left]
\dorecurse{10}{\item Item \recurselevel.}
\stopitemize
\startitemize[n,packed,broad]
\dorecurse{10}{\item Item \recurselevel.}
\stopitemize
\stoptext
Wolfgang
is on an Ubuntu system. He asked his
question on the Scribus list.
If I understand well,
why not something like
%%
%% set here papersize, pagenumbers, margins and so on
%%
\starttext
\dorecurse{200}{%
\hbox{%
\externalfigure[book.pdf][page=\recurselevel]%
\externalfigure[book.pdf][page=\recurselevel
{\recurselevel}{$x_{\recurselevel}$}}
\stopTeXtexts
so that I can print labels from x_0 up to x_9? Do I need to use
\defineconversion and \convertnumber?
Nicola
___
If your question is of interest to others as well, please
question, though: how do I change
\startTeXtexts
\dorecurse{10}{\TeXtext{\recurselevel}{$x_{\recurselevel}$}}
\stopTeXtexts
so that I can print labels from x_0 up to x_9? Do I need to use
\defineconversion and \convertnumber?
No, use \dostepwiserecuse. The general syntax
do not have xetex, so I
can not test this.
Ok, even if I put those definitions in an MPenvironment the text fonts
do not change (I guess the mechanism for font selection is slightly
different in XeTeX).
how do I change
\startTeXtexts
\dorecurse{10}{\TeXtext{\recurselevel}{$x_
}
. . . % Some random graphics
\stopuseMPgraphic
%
\startuseMPgraphic{aa}
\dorecurse{\the\steps}
{\includeMPgraphic{step\recurselevel}}
\stopuseMPgraphic
but, it's not working.
On 6/9/07, Aditya Mahajan [EMAIL PROTECTED] wrote:
Quoting
}
\placecontent
\chapter{New Chapter}
\input knuth
\dorecurse{5}{\expanded{\section{Section \recurselevel}} \input knuth}
\stoptext
On Jun 5, 2007, at 5:57 AM, Steffen Wolfrum wrote:
Hi,
maybe just a detail, but it never was really clear to me:
To change the actual text of TOC's heading I use
\rowTBL+1\relax
\dorecurse\Tempc{
\advance\Temp by \dimexpr\gettblht{\recurselevel}{1}\relax}%
\advance \spaceleft by -\Temp%
\advance \spaceleft by -1pt%
% funny
%\llap{\vbox to 0pt{\hsize=11pt\vss\vrule width11pt height\Temp}}
\vrule width0pt height\spaceleft%
}
\bTR[after={\RuleToEnd}]
--
luigi
\advance\vsize -2\scratchdimen
\advance\hsize -2\scratchdimen
\externalfigure[#1][\c!page=\recurselevel,#2,\c!scale=,
\c!factor=\v!max,\c!offset=\v!overlay]% \else
\externalfigure[#1][\c!page=\recurselevel,#2,\c!offset=
\v!overlay]% \fi
\hsize -2\scratchdimen
\externalfigure[#1][\c!page=\recurselevel,#2,\c!scale=,
\c!factor=\v!max,\c!offset=\v!overlay]% \else
\externalfigure[#1][\c!page=\recurselevel,#2,\c!offset=
\v!overlay]% \fi}}}
\page}
\egroup}
\protect
\setuppapersize[A4][A4
} \defineconversion [oddpagenumber][\oddpagenumbers]
%\setuppagenumbering[conversion=oddpagenumber]
\starttext
\dorecurse
{10}
{\dorecurse
{12}
{\section{Knuth}\input knuth\par}
\placefigure{}{\framed{}}
%\page[right]
\midaligned{Figure \recurselevel}
\dorecurse
{4
\newdimen\CellHeightOne \CellHeightOne=\lineheight %% synch with grid
\newdimen\TestDim
\long\def\CellContent#1{%
\setbox100=\vbox{\hsize=\CellWidth%
#1}
\dp100=0pt%
\TestDim=\CellHeightOne
\doloop{%30
\ifdim\ht100\TestDim%
\setbox100=\vbox to \TestDim{\hsize=\CellWidth \recurselevel #1}\exitloop\fi
]
[\c!page=\recurselevel,\c!width=\paperwidth,\c!height=\paperheight,\c!factor=\v!max,#2]
\stopTEXpage
\incrementnumber[page]}
\egroup}
\protect
For page numbers, I had a separate layer, which printed on top of the
included pdfs (some pdfs were scanned images). I can send you my
=\!!thousand,
\c!offset=\!!zeropoint,
#2]%
\dorecurse\@@ipn
{\startTEXpage[\c!width=\paperwidth,\c!height=\paperheight,\c!offset=\@@ipoffset]
\externalfigure
[#1]
[\c!page=\recurselevel,\c!width=\paperwidth,\c!height=\paperheight,\c!factor=\v!max,#2
with a known solution?
No. This works fine here
\starttext
\dorecurse{500}
{\input knuth\footnote[note:\recurselevel]{this is a
footnote}\endgraf}
\stoptext
Hi Aditya,
Thanks for checking. I've been unable as yet to create a simple
test case. It must be a combination of things. I'll
\starttext
\dorecurse{500}
{\input knuth\footnote[note:\recurselevel]{this is a
footnote}\endgraf}
\stoptext
Using ConTeXt ver: 2007.01.18 12:57 MKII fmt: 2007.1.18
Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg
: 2007.01.12 15:56 MKII fmt: 2007.1.13 int:
english/english
% This is MetaPost, Version 0.992 (Web2C 7.5.5)
\setupbodyfont[ss,12pt]
\setupcolors[state=start]
\starttext
\dostepwiserecurse{8}{24}{2}{%
\switchtobodyfont[ss,\recurselevel pt]
\framed[corner=14,
frame=on,
framecolor
-rul.tex:
\starttext
\dontleavehmode\dostepwiserecurse{13}{16}{1}{\framed
[corner=\recurselevel,frame=on,framecolor=green]{\tttf TEST
\twodigits\recurselevel}\quad}
\stoptext
and see also Aditya's wikified results:
http://wiki.contextgarden.net/Framed#Rounded_Coreners
-Sanjoy
`Not all those who
, on/off frame lines to use. Try this magic snippet from
core-rul.tex:
\starttext
\dontleavehmode\dostepwiserecurse{13}{16}{1}{\framed
[corner=\recurselevel,frame=on,framecolor=green]{\tttf TEST
\twodigits\recurselevel}\quad}
\stoptext
and see also Aditya's wikified results:
http
not know why this used to work earlier. The correct
syntax is \adaptlayout[lines=+2]
For example
\showframe
\setuppapersize[A6][A6]
\starttext
\dorecurse{30}
{\recurselevel \endgraf}
\page
\adaptlayout[lines=+2]
\dorecurse{30}
{\recurselevel \endgraf}
\stoptext
Aditya
used to work.
But I get the same error right now.
Hmm I do not know why this used to work earlier. The correct
syntax is \adaptlayout[lines=+2]
For example
\showframe
\setuppapersize[A6][A6]
\starttext
\dorecurse{30}
{\recurselevel \endgraf}
\page
\adaptlayout[lines=+2
(it doesn't appears in core-modu.pdf)
% \startTEXpage
% \dontleavehmode\framed
% [corner=0,frame=on,framecolor=green,
% background=color,backgroundcolor=yellow]{\tttf TEST
\twodigits\recurselevel}%
% \vskip1em
% \dontleavehmode\dostepwiserecurse {1} {4}{1
Inside last core-rule.tex
(it doesn't appears in core-modu.pdf)
% \startTEXpage
% \dontleavehmode\framed
% [corner=0,frame=on,framecolor=green,
% background=color,backgroundcolor=yellow]{\tttf TEST
\twodigits\recurselevel}%
% \vskip1em
% \dontleavehmode
is of \nofPoints\ Points}
% Lets set 10 problems with different points
\dorecurse{10}
{\pkt[\recurselevel] \input tufte \endgraf}
\stoptext
The whole things is much shorter :)
Hans, I just noticed that \everystarttext is executed at the start of
components and products, while
][background=kopf]
\starttext
% Lets set 10 problems with different points
\dorecurse{10}
{\pkt[\recurselevel] \input tufte \endgraf}
\stoptext
What's going wrong?
Thomas
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman
\setupbackgrounds[page][background=kopf]
\starttext
% Lets set 10 problems with different points
\dorecurse{10}
{\pkt[\recurselevel] \input tufte \endgraf}
\stoptext
What's going wrong?
The layer kopf is being set before the tui file is read. So, the value
of \nofPoints is still 0. You need
\iftwopassdatafound
\xdef \nofPoints {\twopassdata}
\fi
\global\let\checkproblems\relax}
% An example usage
\starttext
\checkPoints
\title{This exam is of \nofPoints\ Points}
% Lets set 10 problems with different points
\dorecurse{10}
{\pkt[\recurselevel] \input tufte
}}}
% It is a bit boring to type \savenofPoints everytime
\appendtoks \savenofPoints \to \everystoptext
% An example usage
\starttext
\title{This exam is of \nofPoints\ Points}
% Lets set 10 problems with different points
\dorecurse{10}
{\pkt[\recurselevel] \input tufte \endgraf}
\stoptext
-tecnic-rt2000-gobck.pdf]
\dorecurse{\noffigurepages}{\externalfigure[doc-guidecstb-sol-tecnic-rt2000-gobck.pdf]
[width=\textwidth,height=\textheight][page=\recurselevel]}
Try
\copypages[filename][width=\textwidth,height=\textheight]
Aditya
Thanks for your answer Aditya,
This partialy solve
-sol-tecnic-rt2000-gobck.pdf]
[width=\textwidth,height=\textheight][page=\recurselevel]}
If you are interested, you can test source and see differences at this
url : http://tebcado.free.fr/context-quest/01/
TIA for the answers.
--
olivier Turlier
]
\dorecurse{\noffigurepages}{\externalfigure[doc-guidecstb-sol-tecnic-rt2000-gobck.pdf]
[width=\textwidth,height=\textheight][page=\recurselevel]}
Try
\copypages[filename][width=\textwidth,height=\textheight]
Aditya
___
ntg-context mailing list
ntg-context
{\defineunicodecommand
{\recurselevel}} {\lookaheaduchar}}
%%% CJK Compatibility Ideographs
\dostepwiserecurse{249}{250}{1}{\expanded{\defineunicodecommand
{\recurselevel}} {\lookaheaduchar}}
Additionally, I here report some possible bugs of context-beta
related to CJK (especially Korean language) support
{172}{215}{1}{\expanded{\defineunicodecommand
{\recurselevel}} {\lookaheaduchar}}
%%% CJK Compatibility Ideographs
\dostepwiserecurse{249}{250}{1}{\expanded{\defineunicodecommand
{\recurselevel}} {\lookaheaduchar}}
ok, done
Additionally, I here report some possible bugs of context-beta
}{215}{1}{\expanded{\defineunicodecommand {\recurselevel}}
{\lookaheaduchar}}
% CJK Compatibility Ideographs
\dostepwiserecurse{249}{250}{1}{\expanded{\defineunicodecommand {\recurselevel}}
{\lookaheaduchar}}
%%%
% modify \enableunicodefont in font-uni.tex
\def
\noflines
{\strut
\hskip-.5\lineheight
\ifcase\gridboxlinenomode\or
\rlap
{\hskip.2\bodyfontsize\hskip\scratchdimen
\infofont\hbox to 1em{\hss\recurselevel}}%
\or
\llap
In another thread, Hans mentioned the 2006.09.25 beta. I tested it
against this test file and it works great:
\starttext
\dorecurse{20}{\startreusableMPgraphic{\recurselevel}
draw fullcircle scaled 3mm;
\stopreusableMPgraphic
\placefigure[here,none]{}{\reuseMPgraphic{\recurselevel}}}
\stoptext
The following minimal file overruns the available output streams
(version 2006.08.08 and context live):
\starttext
\dorecurse{16}{\startstaticMPfigure{\recurselevel}
fill fullcircle scaled 1cm withcolor red;
\stopstaticMPfigure}
\stoptext
At the end are the last few lines of the log. Here
=6,ny=4]
\setuparranging
[XY]
\starttext
\dorecurse{1}{\recurselevel\space}
\stoptext
-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
=start]
\dostepwiserecurse{1}{20}{1}{%
\startalignment[middle]
\chapter{Chapter title}
\vfil
This is {\bfd \recurselevel}
\input zapf
\stopalignment
\vfil
\page}
\stoptext
Willi
Sanjoy Mahajan wrote:
I've mostly understood arranging but I
[fig-1]
\externalfigure[fig-2]
\setups{chapter:2}
\externalfigure[fig-1]
\stoptext
Just out of curiosity I tried the following:
\startsetups chapter:1
\dorecurse{10}{\useexternalfigure[fig-\recurselevel][1/fig-\recurselevel.pdf]}
\stopsetups
\startsetups chapter:2
\dorecurse{10
% TODO: 6 is only a guess: I need a better guess (3 in this case)
\dostepwiserecurse{1}{6}{1}{\TeXtext{\recurselevel}{{\convertnumber{abc}{\recurselevel
\stopTeXtexts
\startMPcode
variant := 1;
gp_point(1cm,0cm,1);
gp_point(2cm,0cm,2);
variant := 2;
gp_point(1cm,1cm,1);
gp_point(2cm,1cm
\defineconversion[abc][$\star$,$\bullet$,$\ast$]
\startTeXtexts
% TODO: 6 is only a guess: I need a better guess (3 in this case)
\dostepwiserecurse{1}{6}{1}{\TeXtext{\recurselevel}{{\convertnumber{abc}{\recurselevel
\stopTeXtexts
\startMPcode
variant := 1;
gp_point(1cm,0cm,1);
gp_point(2cm,0cm
{\doifelseconversionnumber{abc}{\recurselevel}
{[abc \recurselevel\space defined]}
{\exitloop}}
\doloop
{\doifelseconversionnumber{def}{\recurselevel}
{[def \recurselevel\space defined]}
{\exitloop}}
Perfect. That's exactly what I needed. I only have to keep my fingers
the format); no key/val control
yet
\starttext
\chardef\collapseregisterpages\zerocount \placeregister[index]
\blank[2*big]
\chardef\collapseregisterpages\plusone \placeregister[index]
\page
\dorecurse{10}{test 1:!\index{test} test \page}
\dorecurse{5} {test 2:\recurselevel \page}
\dorecurse
to both you and Taco!
why do you need a counter
3. I would like to change \usemygraphic, so that
\usemygraphic[othername] or \usemygraphic[othername][height=5cm] would
resolve to
\dorecurse{2}{\useMPgraphic{gpg:othername:\recurselevel}}
and \usemygraphic[name][n={1,3},width=8cm] (syntax
as externalfigure
Thanks to both you and Taco!
why do you need a counter
3. I would like to change \usemygraphic, so that
\usemygraphic[othername] or \usemygraphic[othername][height=5cm] would
resolve to
\dorecurse{2}{\useMPgraphic{gpg:othername:\recurselevel
}{\useMPgraphic{gpg:othername:\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).
you want all graphics?
\def\usemygraphic#1%
{\doloop
in order to be unique)?
Better use \definenumber instead of the low-level command.
3. I would like to change \usemygraphic, so that
\usemygraphic[othername] or \usemygraphic[othername][height=5cm] would
resolve to
\dorecurse{2}{\useMPgraphic{gpg:othername:\recurselevel}}
Where does this '2
a better name than \abc to the counter (the name should
depend on #2 in order to be unique)?
3. I would like to change \usemygraphic, so that
\usemygraphic[othername] or \usemygraphic[othername][height=5cm] would
resolve to
\dorecurse{2}{\useMPgraphic{gpg:othername:\recurselevel}}
and \usemygraphic
]
\setuppaper[nx=3,ny=10,dx=0mm,dy=0mm,topspace=5mm,backspace=5mm]
\setuplayout [location=middle]
\setuparranging [XY]
\showframe
\starttext \dorecurse{15}{test \recurselevel \page} \stoptext
However, when I change A4 to letter the output seems to introduce some
dy. I experimented with some other
\catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\chemlow}%
\catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\chemhigh}%
\dostepwiserecurse {65}{90}{1}
{\catcode \recurselevel = \active
\uccode`\~=\recurselevel
\uppercase{\edef~{\noexpand\finishchem
\chemlowbox}\fi}
\newif\iffluor
\unexpanded\def\molecule%
{\bgroup
\catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\chemlow}%
\catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\chemhigh}%
\dostepwiserecurse {65}{90}{1}
{\catcode \recurselevel = \active
\uccode
\uccode`\~=`\^ \uppercase{\let~\chemhigh}%
\dostepwiserecurse {65}{90}{1}
{\catcode \recurselevel = \active
\uccode`\~=\recurselevel
\uppercase{\edef~{\noexpand\finishchem
\rawcharacter{\recurselevel%
\catcode`\-=\active \uccode`\~=`\- \uppercase{\def
{\box\chemlowbox}\fi}
\unexpanded\def\molecule%
{\bgroup
\catcode`\_=\active \uccode`\~=`\_ \uppercase{\let~\chemlow}%
\catcode`\^=\active \uccode`\~=`\^ \uppercase{\let~\chemhigh}%
\dostepwiserecurse {65}{90}{1}
{\catcode \recurselevel = \active
\uccode`\~=\recurselevel
\recurselevel = \active
\uccode`\~=\recurselevel
\uppercase{\edef~{\noexpand\finishchem
\rawcharacter{\recurselevel%
\catcode`\-=\active \uccode`\~=`\- \uppercase{\def~{--}}%
\domolecule }%
\def\domolecule#1{#1\finishchem\egroup}
\starttext
{\bf A test \variant[Caps] in small
}{90}{1}
{\catcode \recurselevel = \active
\uccode`\~=\recurselevel
\uppercase{\edef~{\noexpand\finishchem
\rawcharacter{\recurselevel%
\catcode`\-=\active \uccode`\~=`\- \uppercase{\def~{--}}%
\domolecule }%
\def\domolecule#1{#1\finishchem\egroup
sticking out in the margin
is always bad ;-)
% test: \advance\!!dimena-\gettbldis\recurselevel\relax
you can enable that line in core-ntb and see what happens
Hans
-
Hans Hagen | PRAGMA ADE
Hans Hagen wrote:
Could this be done automatically?
I expect it can (and should) be. Stuff sticking out in the margin
is always bad ;-)
% test: \advance\!!dimena-\gettbldis\recurselevel\relax
you can enable that line in core-ntb and see what happens
works for me ... Peter?
Taco
On Thu, 29 Jun 2006, Taco Hoekwater wrote:
% test: \advance\!!dimena-\gettbldis\recurselevel\relax
you can enable that line in core-ntb and see what happens
works for me ... Peter?
Yes, thanks! But the next issues follow immediately:
just consider leftmargindistance
� wrote:
On Thu, 29 Jun 2006, Taco Hoekwater wrote:
% test: \advance\!!dimena-\gettbldis\recurselevel\relax
you can enable that line in core-ntb and see what happens
works for me ... Peter?
Yes, thanks! But the next issues follow immediately:
just consider
\usemodule[pstrick]
\startPSTRICKS
\pspicture(0,0)(10,10)
\dorecurse{10}{\psline(0,0)(\recurselevel,10)}
\dorecurse{10}{\psline(0,0)(10,\recurselevel)}
\endpspicture
\stopPSTRICKS
an option is to put the graphics in separate files and/or use checksum trickery
as used in m-r (not yet done
a easy way to make the
migration?
there is a module, m-pstric.tex
\usemodule[pstrick]
\startPSTRICKS
\pspicture(0,0)(10,10)
\dorecurse{10}{\psline(0,0)(\recurselevel,10)}
\dorecurse{10}{\psline(0,0)(10,\recurselevel)}
\endpspicture
\stopPSTRICKS
an option is to put
\splitfloat[lines=11]
{\placetable{\dorecurse{10}{test\recurselevel\endgraf}}}
{\bTABLE\dorecurse{100}{\bTR \bTD test \eTD \eTR}\eTABLE}
\input tufte \page
\input tufte \endgraf
\splitfloat[lines=0]
{}
{\bTABLE\dorecurse{100}{\bTR \bTD test \eTD \eTR}\eTABLE}
\input tufte \endgraf
=repeat]
\input tufte \endgraf
\splitfloat[lines=11]
{\placetable{\dorecurse{10}{test\recurselevel\endgraf}}}
{\bTABLE\dorecurse{100}{\bTR \bTD test \eTD \eTR}\eTABLE}
\input tufte \page
\input tufte \endgraf
\splitfloat[lines=0]
{}
{\bTABLE\dorecurse{100}{\bTR \bTD test \eTD \eTR}\eTABLE
of it in a table, but I got errors when trying to put a
\section in the table. Any suggestion on how to do this will be
highly appreciated.
rough approach
\setvariables
[chapter]
[title=,
text=]
\startsetups chapter:reset
\dorecurse {10} {
\setvariables[chapter][key-\recurselevel
}
\@@plaatspaginanummer
{\ConvertConstantAfter\doifelse\v!date{#1}
{\currentdate}
{#1{}{}{}}
\protect
\setupextendedheadertexts[date][chapter][pagenumber][pagenumber][section][Whatever]
\starttext
\dorecurse{4}{
\chapter{Chapter \recurselevel}
\input tufte
][pagenumber][pagenumber][section][W
hatever]
\starttext
\dorecurse{4}{
\chapter{Chapter \recurselevel}
\input tufte \endgraf
\input tufte \endgraf
\input tufte \endgraf
\section{Section}
\input knuth
\input knuth
\input knuth
}
\stoptext
Aditya
\setupextendedheadertexts[date][chapter][pagenumber][pagenumber][section][W
hatever]
\starttext
\dorecurse{4}{
\chapter{Chapter \recurselevel}
\input tufte \endgraf
\input tufte \endgraf
\input tufte \endgraf
\section{Section}
\input knuth
\input knuth
\input knuth
}
\stoptext
\dorecurse{4}{
\chapter{Chapter \recurselevel}
\input tufte \endgraf
\input tufte \endgraf
\input tufte \endgraf
\section{Section}
\input knuth
\input knuth
\input knuth
}
\stoptext
Aditya
___
ntg-context mailing list
ntg
wrong headers
\setupheadertexts[section]
\starttext
\dorecurse{20}{\section{Test \recurselevel}\input knuth\endgraf}
\stoptext
Aditya
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
ID\EQ \NC \NR
\NC Version \EQ \recurselevel \NC \NR
\stoptabulate
\blank[2*big]
\getbuffer[examn]
\stopsetups
\startsetups examn:ok
\doifmode {answers} {
\inleft{\symbol[star]}
}
\ignorespaces
\stopsetups
\starttext
\startbuffer[examn
On 5/21/06, Hans Hagen wrote:
Mojca Miklavec wrote:
i think that using \enableregime[utf] should work ok xetex (but in loading
patterns)
You can play with
\startregime[none]
\dostepwiserecurse{128}{255}{1}
{\expanded{\defineactivecharacter
{\recurselevel
with
\startregime[none]
\dostepwiserecurse{128}{255}{1}
{\expanded{\defineactivecharacter
{\recurselevel}
{\rawcharacter{\recurselevel
\stopregime
\enableregime[none]
\appendtoks
\enableregime[utf]%
% \everyhbox\expandafter{\the\everyhbox\enableregime[none]}% fails
it, but Hans or others probably
know better how to handle with this than I do.
\starttext
\usetypescript [serif,sans,mono,math] [computer-modern] [default,name,size,t2c]
\usetypescript [map] [computer-modern] [t2c]
\usemathcollection[default]
\setupbodyfont[modern]
\dorecurse{200}{\char\recurselevel
\subject{Short Contents}
\placecombinedlist[shortcontent]
\completecontent
\stopfrontmatter
\startbodymatter
\shortpart{First part}
\dorecurse{5}
{\expanded{\startchapter[Chapter \recurselevel]}
\dorecurse{5}{\section{My section}
\input knuth }
\stopchapter
][criterium=text]
test
\typefile{test.tuo}
\stoptext
this can be sped up (a bit) with
% \dostepwiserecurse{0}{255}{1}
% {\setevalue{rchr:\recurselevel}{\rawcharacter\recurselevel}}
% \def\rawcharacter#1{\getvalue{rchr:#1}}
this means that all chars are round tripped to themselves in output files
) with
% \dostepwiserecurse{0}{255}{1}
% {\setevalue{rchr:\recurselevel}{\rawcharacter\recurselevel}}
% \def\rawcharacter#1{\getvalue{rchr:#1}}
this means that all chars are round tripped to themselves in output files!
raw characters are not active and they are therefore equivalent to \char
it's enough
[chapter]{2}{Dobré odpoledne}}
\placelist[chapter][criterium=text]
test
\typefile{test.tuo}
\stoptext
this can be sped up (a bit) with
% \dostepwiserecurse{0}{255}{1}
% {\setevalue{rchr:\recurselevel}{\rawcharacter\recurselevel}}
% \def\rawcharacter#1{\getvalue{rchr:#1
don't put
\ss I haven't this. So, if I put the following in the test I have no more
the problem.
\setbox\scratchbox\hbox{\ss 99} % workaround to fix the strange size
initialization...
\starttext
\dontleavehmode \dorecurse{99}{\conum{\recurselevel}, }
\stoptext
Regards,
BG
{\textreference[line#1]{\noexpand\conum{#1
\def\refline#1{\in{line }[line#1]}
\dorecurse{99}{\markline{\recurselevel}, }
\dorecurse{99}{\refline{\recurselevel}, }
Cheers, taco
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl
circled number
\def\conum#1%
{\evalwidth%
\framed[background=cocircle,strut=no,frame=off,
width=\the\cowidth,height=\the\cowidth,offset=overlay]
{\color[white]{\small\bf{\ss #1
\starttext
\dorecurse{99}{\conum{\recurselevel}, }
\stoptext
\setupcolors
{\in{line }[line#1]}
\dorecurse{99}{\markline{\recurselevel}, }
\dorecurse{99}{\refline{\recurselevel}, }
Yes, it works fine! Thanks much!
Regards,
BG
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
%
{\evalwidth%
\framed[background=cocircle,strut=no,frame=off,
width=\the\cowidth,height=\the\cowidth,offset=overlay]
{\color[white]{\small\bf{\ss #1
\starttext
\dorecurse{99}{\conum{\recurselevel}, }
\stoptext
Regards,
BG
}{line 4:\recurselevel\par}
\StopPoem
\stoptext
I leave it up to you (or others) to wikify this example. It looks more
complex than it is. By using a mp graphic you have more options
watch what happens if you add
\page
\startuseMPgraphic{mpos:par:poem}
for i = 1 upto nofmultipars :
multipars
!distance
\tabskip
\zeropoint \to \s...
\ydorecurse ...el \let \recurselevel \!!plusone #2
[EMAIL PROTECTED] \let
[EMAIL PROTECTED]
\recurselev...
\buildeqalign ...e \scratchtoks \the \!!toksb
\dorecurse{\mathalignparameter\c!m}
{\ifnum\recurselevel\plusone
\appendtoks
\tabskip\mathalignparameter\c!distance\tabskip\zeropoint
\to\scratchtoks
\fi
\expanded{\scratchtoks{\the\scratchtoks\the\!!toksa}}%
\dorecurse{\numexpr\mathalignparameter\c!n-\plusone
{\mathalignparameter\c!m}
{\ifnum\recurselevel\plusone
\appendtoks
\tabskip\mathalignparameter\c!distance\tabskip\zeropoint
\to\scratchtoks
\fi
\expanded{\scratchtoks{\the\scratchtoks\the\!!toksa}}%
\dorecurse{\numexpr\mathalignparameter\c!n-\plusone\relax
no macro)
\def\buildeqalign
{\scratchtoks\emptytoks
\dorecurse{\mathalignparameter\c!m}
{\ifnum\recurselevel\plusone
\appendtoks
\tabskip\mathalignparameter\c!distance\tabskip\zeropoint
\to\scratchtoks
\fi
\expanded{\scratchtoks{\the\scratchtoks\the\!!toksa
}]
\setupTABLE[x][2][width=\getvalue{SenderValueWidth}, align=right,
style={\valstyle\strut}]
\bTABLE
\dostepwiserecurse{1}{9}{1}{% count from 1 to 9, step 1
\expanded{\GetSenderLine{\recurselevel}}
}
\eTABLE
}
\def\EnableSender{\setupbackgrounds[rightpage
\recurselevel\plusone\appendtoks\tabskip\@@eqdistance\tabskip\zeropoint\to\scratchtoks\fi
\expanded{\scratchtoks{\the\scratchtoks\the\!!toksa}}%
\dorecurse{\numexpr\@@eqn-\plusone\relax}
{\expanded{\scratchtoks{\the\scratchtoks\the\!!toksb%
\expanded{\scratchtoks{\the\scratchtoks
) . . . . . . . . .
Overfull \hbox (98.21335pt too wide) in paragraph at lines 72--72
[][][] [][] [][] [][] [][] [][]\*10pf* {[][]\ifnum\recurselevel[]
[][][]\pl
usone\appendtoks\tabskip\@@eqdistance[][][][]\tabskip\zeropoint\to
\scratchtoks
\fi[]
. . . [3.1] .
Overfull \hbox (87.71338pt too wide
in
recurse ane no macro)
\def\buildeqalign
{\scratchtoks\emptytoks
\dorecurse\@@eqm
{\ifnum\recurselevel\plusone\appendtoks\tabskip\@@eqdistance
\tabskip\zeropoint\to\scratchtoks\fi
\expanded{\scratchtoks{\the\scratchtoks\the\!!toksa}}%
\dorecurse{\numexpr\@@eqn-\plusone\relax
of the Key and Val macros (\setvalue{}{}
autoexpands its first argument, but not its second argument).
When not inside a recursion, \recurselevel expands to the number
0 (zero) in the manual bit, and you are actually re-evaluating
the macro using the then current \recurselevel definition
when inside
argument).
When not inside a recursion, \recurselevel expands to the number
0 (zero) in the manual bit, and you are actually re-evaluating
the macro using the then current \recurselevel definition
when inside the looping bit.
The magic expansion hit me again, I should've known it.
So you need
{\scratchcounter\itemlevel
\advance\scratchcounter\minusone
\dorecurse\scratchcounter{\foundbox{item}{\recurselevel}}}%
\ifnum\itemlevel\plusone
\ifdim\wd\scratchbox\zeropoint
%\hskip-\dimen2
\global\advance\fullwidth\wd\scratchbox
Henning Hraban Ramm wrote:
...
After some hacking I learned how \setvalue works:
TEX
\def\Set#1#2#3{\setvalue{Key#1}{#2}\setvalue{Val#1}{#3}}
\def\Get#1{\getvalue{Key#1}/\getvalue{Val#1}}
\dostepwiserecurse{1}{9}{1}{
\Set{\recurselevel}{K\recurselevel}{V\recurselevel}
}
\Set{1
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 its first argument
701 - 800 of 859 matches
Mail list logo