[NTG-context] Re: more register questions!

2024-05-07 Thread Rik Kabel
}\expanded{\setregisterentry[index][entries=\recurselevel]}% \samplefile{lorem}\footnote{xxx\expanded{\setregisterentry[index][entries=\recurselevel][footnote={\rawcountervalue[footnote]}]}}%    \samplefile{lorem}} \page \placeindex \stoptext

[NTG-context] Re: more register questions!

2024-05-03 Thread Thomas A. Schmitz
::footnote} {\setregisterentry [index][keys:1=\xmlatt{#1}{key},entries:1=\xmlatt{#1}{key}][footnote={\rawcountervalue[footnote]}]} {\setregisterentry[index][keys:1=\xmlatt{#1}{key},entries:1=\xmlatt{#1}{key}]} \stopxmlsetups \startxmlsetups xml:index \page \placeregister [index

[NTG-context] Re: more register questions!

2024-05-03 Thread Wolfgang Schuster
isterentry[index][entries=\recurselevel]}% \samplefile{lorem}\footnote{xxx\expanded{\setregisterentry[index][entries=\recurselevel][footnote={\rawcountervalue[footnote]}]}}%    \samplefile{lorem}} \page \placeindex \stoptext

[NTG-context] Define a new command that inherits from multiple other command options

2024-04-25 Thread ai2472206007
=\outermarginwidth] \setupmargindata [SidenoteContent][stack=yes,style=\it] \def\sidenotemark{\rawcountervalue[SidenoteMarkNumber]} \def\convertsidenotemark#1{\high{\convertnumber{#1}{\sidenotemark}}} \def\sidenote{\dosingleempty\dosidenote} \def\dosidenote[#1]#2{% \getparameters[SMsidenote

[NTG-context] Re: Why don't footnotes appear in floats or figures?

2024-04-24 Thread Pablo Rodriguez via ntg-context
On 4/24/24 02:15, Joel via ntg-context wrote: > [...] Any idea how I can get current footnote value? Hi Joel, current footnote value can be accessed with \rawcountervalue[footnote], such as in: \starttext \dorecurse{25} {\ \footnote{Footnote \recurselevel}: \rawcounterva

[NTG-context] Re: Pass string into text background graphic

2023-08-13 Thread Thangalin
number\numexpr1+\rawcountervalue[ConcurrentTextGetCounter]/2\relax}} > I don't know why the counter is incremented twice for each concurrent environment; the document is typeset once, in three passes. Dividing by two solves the issue, if there's a deeper issue, I'm at a loss to e

[NTG-context] Re: Pass string into text background graphic

2023-08-12 Thread Hans Hagen via ntg-context
urrentTextSetCounter]% \setxvariable {concurrent} {text:\rawcountervalue[ConcurrentTextSetCounter]} {#1}} % Account for the counter incrementing twice and the index being 1-based. \def\ConcurrentTextGet{% \incrementnumber[ConcurrentTextGetCounter]% \getvariable {con

[NTG-context] Re: Pass string into text background graphic

2023-08-12 Thread Thangalin
xtGetCounter][prefix=no] \setnumber[ConcurrentTextSetCounter][0] \setnumber[ConcurrentTextGetCounter][0] % Map each label as global key/value pairs. \def\ConcurrentTextSet#1{% \incrementnumber[ConcurrentTextSetCounter]% \setxvariable {concurrent} {text:\rawcountervalue[ConcurrentText

Re: [NTG-context] Can I just put a footnote without marking in the main text?

2022-05-18 Thread Ross via ntg-context
2022 at 4:41 PM mf wrote: >> >>> I hope I got the point now: >>> >>> ... >>> \startcolumns >>> >>> \the\titlefootnotes >>> >>> \kern-\rawcountervalue[address]\lineheight % dirty trick >>> >>> test\footnote{test} >&g

Re: [NTG-context] Can I just put a footnote without marking in the main text?

2022-05-18 Thread Ross via ntg-context
t;> >> ... >> \startcolumns >> >> \the\titlefootnotes >> >> \kern-\rawcountervalue[address]\lineheight % dirty trick >> >> test\footnote{test} >> >> \input knuth >> >> \stopcolumns >> ... >> >> Massi >

Re: [NTG-context] Can I just put a footnote without marking in the main text?

2022-05-18 Thread Ross via ntg-context
Hi Massi, You are a champion! On Wed, May 18, 2022 at 4:41 PM mf wrote: > I hope I got the point now: > > ... > \startcolumns > > \the\titlefootnotes > > \kern-\rawcountervalue[address]\lineheight % dirty trick > > test\footnote{test} > > \input knuth > &

Re: [NTG-context] Heading for endnotes / grouped by chapter endnotes

2021-07-02 Thread denis.maier
    { \getmarking[notePage][top]} >     {s \getmarking[notePage][top]–\getmarking[notePage][bottom]}} > \stopsetups > > \starttexdefinition unexpanded startEndnote >   \dosingleempty\doStartEndnote > \stoptexdefinition > > \starttexdefinition doStartEndnote [#1] >

Re: [NTG-context] Heading for endnotes / grouped by chapter endnotes

2021-06-30 Thread Rik Kabel
]}     { \getmarking[notePage][top]}     {s \getmarking[notePage][top]–\getmarking[notePage][bottom]}} \stopsetups \starttexdefinition unexpanded startEndnote   \dosingleempty\doStartEndnote \stoptexdefinition \starttexdefinition doStartEndnote [#1]   \expanded{\dodoStartEndnote[#1][{\rawcountervalue

Re: [NTG-context] Display reference number as Roman number

2021-01-06 Thread Rik Kabel
, but it is functional. \definelabel[Qa] \definecounter[SAVE][numberconversion=R] \starttext This is labeled.\Qa\par This is labeled.\Qa[REF]\par \setcounter[SAVE][{\rawcountervalue[Qa]}] See \in[REF].\par See \ref[number][REF].\par See \in[REF].\par This is labeled.\Qa\par

Re: [NTG-context] Footnote font size equal to main text font size

2020-09-16 Thread Wolfgang Schuster
Jairo A. del Rio schrieb am 15.09.2020 um 04:38: Hi, list. I've adapted the following example from the mailing list. My aim is to use endnotes for each chapter: \mainlanguage[es] \definehead[footnotetitle][title] \startsetups[chapter:after] \ifcase\rawcountervalue[footnote]\relax      \else

Re: [NTG-context] Footnote font size equal to main text font size

2020-09-16 Thread Henning Hraban Ramm
> Am 15.09.2020 um 04:38 schrieb Jairo A. del Rio : > > Hi, list. I've adapted the following example from the mailing list. My aim is > to use endnotes for each chapter: > > \mainlanguage[es] > \definehead[footnotetitle][title] > \startsetups[chapter:after] > \ifca

[NTG-context] Footnote font size equal to main text font size

2020-09-14 Thread Jairo A. del Rio
Hi, list. I've adapted the following example from the mailing list. My aim is to use endnotes for each chapter: \mainlanguage[es] \definehead[footnotetitle][title] \startsetups[chapter:after] \ifcase\rawcountervalue[footnote]\relax \else \startfootnotetitle[title={Notas

Re: [NTG-context] two additional pagenumber series

2020-04-29 Thread Hans Hagen
] \definecounter[ncounter] [way=bychapter] \starttext \rawcountervalue[ncounter]\page \incrementcounter[ncounter][1] \page \lastcountervalue[ncounter] \chapter{} \lastcountervalue[ncounter] \stoptext I don’t know how to link any page increment to the defined

Re: [NTG-context] two additional pagenumber series

2020-04-29 Thread Wolfgang Schuster
] \definecounter[ncounter] [way=bychapter] \starttext \rawcountervalue[ncounter]\page \incrementcounter[ncounter][1] \page \lastcountervalue[ncounter] \chapter{} \lastcountervalue[ncounter] \stoptext I don’t know how to link any page increment to the defined

[NTG-context] two additional pagenumber series

2020-04-29 Thread Pablo Rodriguez
] \starttext \rawcountervalue[ncounter]\page \incrementcounter[ncounter][1] \page \lastcountervalue[ncounter] \chapter{} \lastcountervalue[ncounter] \stoptext I don’t know how to link any page increment to the defined counter. Although method is page, this seems to be related

Re: [NTG-context] Use a counter in a reference?

2020-04-19 Thread Kevin Kenan
ber, but I’m not sure how to use \reference so that it uses my tag >> number. For instance: >> \definecounter[myTagCounter] >> . >> . >> . >> \reference[tagref]{\rawcountervalue[myTagCounter]} >> Doesn’t work. But perhaps I’m going

Re: [NTG-context] Use a counter in a reference?

2020-04-13 Thread Thomas A. Schmitz
[tagref] on page \at[tagref]. What is the best way to do this in ConTeXt? I’ve got a counter for tag number, but I’m not sure how to use \reference so that it uses my tag number. For instance: \definecounter[myTagCounter] . . . \reference[tagref]{\rawcountervalue

[NTG-context] Use a counter in a reference?

2020-04-13 Thread Kevin Kenan
way to do this in ConTeXt? I’ve got a counter for tag number, but I’m not sure how to use \reference so that it uses my tag number. For instance: \definecounter[myTagCounter] . . . \reference[tagref]{\rawcountervalue[myTagCounter]} Doesn’t work. But perhaps I’m going about

Re: [NTG-context] \placenamedfloat and \setuphead[aftersection=...] broken?

2020-04-03 Thread Benjamin Buchmuller
----- >> Also an example from the Wiki: >> \startsetups >> chapter:after >> \ifcase\rawcountervalue[footnote]\relax >> \or >> \startsubject[title=Footnote] >> \placefootnotes >> \sto

Re: [NTG-context] \placenamedfloat and \setuphead[aftersection=...] broken?

2020-04-02 Thread Wolfgang Schuster
Also an example from the Wiki: \startsetups chapter:after \ifcase\rawcountervalue[footnote]\relax \or \startsubject[title=Footnote] \placefootnotes \stopsubject \else \startsubject[title=Footnotes

[NTG-context] \placenamedfloat and \setuphead[aftersection=...] broken?

2020-04-02 Thread Benjamin Buchmuller
of each chapter Also an example from the Wiki: \startsetups chapter:after \ifcase\rawcountervalue[footnote]\relax \or \startsubject[title=Footnote] \placefootnotes \stopsubject \else

Re: [NTG-context] packed list only if items > 5

2019-11-14 Thread Tomas Hala
] {\def\startitem##1\stopitem{\incrementcounter[mycounter]}#1} \ifnum \rawcountervalue[mycounter]>\rawcountervalue[minforpacked] \setupitemize[packed]\fi \startitemize#1\stopitemize} \starttext \mystartitemize %normal \dorecurse{2}{\startitem text\stopitem} \stopitem

Re: [NTG-context] notes in the margin

2019-10-04 Thread Henning Hraban Ramm
distance=24pt > ] > \definecounter[marginales][way=bytext,prefix=no] > \def\romanMarginales{\convertnumber{r}{\rawcountervalue[marginales]}} > \def\marginal{\dosingleempty\doMarginal} > \def\doMarginal[#1]#2{% > \incrementnumber[marginales] > \iffirstargument > \high

Re: [NTG-context] notes in the margin

2019-10-03 Thread Andres Conrado Montoya
] \definecounter[marginales][way=bytext,prefix=no] \def\romanMarginales{\convertnumber{r}{\rawcountervalue[marginales]}} \def\marginal{\dosingleempty\doMarginal} \def\doMarginal[#1]#2{% \incrementnumber[marginales] \iffirstargument \high{\romanMarginales}\inouter[#1]{\romanMarginales.\ #2} \else

Re: [NTG-context] Cross-reference expansion with ConTeXt and processing with LuaTeX

2019-09-06 Thread Oliver von Criegern
1)}} \def\TestLuaB#1{\ctxlua{TestVarB(#1)}} \startbuffer[testtext]     \dorecurse{100}{Words, words, words. } \stopbuffer \starttext \startlinenumbering Counter: \TestLuaA{\rawcountervalue[test]}\par Lineref: \TestLuaB{1} \par \getbuffer[testtext] \someline[1]LABEL 1

Re: [NTG-context] Cross-reference expansion with ConTeXt and processing with LuaTeX

2019-09-05 Thread Hans Hagen
. https://www.contextgarden.net/Programming_in_LuaTeX\startbuffer[testtext]\dorecurse{100}{Words, words, words. }\stopbuffer\starttext\startlinenumberingCounter: \TestLua{\rawcountervalue[test]}\par% The counter is expanded before being passed to Lua.Lineref: \TestLua{\inlinerange[1]}\par

[NTG-context] Cross-reference expansion with ConTeXt and processing with LuaTeX

2019-09-04 Thread Oliver von Criegern
/Programming_in_LuaTeX\startbuffer[testtext]\dorecurse{100}{Words, words, words. }\stopbuffer\starttext\startlinenumberingCounter: \TestLua{\rawcountervalue[test]}\par% The counter is expanded before being passed to Lua.Lineref: \TestLua{\inlinerange[1]}\par% The line reference is not expanded before being

[NTG-context] registers: setting pageleft parameter by index term

2019-04-29 Thread mf
Hello list, please consider this MWE: \definenumber[p] \setnumber[p][1] \def\PageLeft{ p.~} \def\TextCommand#1{\getnumber[p] #1\doif{\rawcountervalue[p]}{2}{\def\PageLeft{ P.~}}\incrementnumber[p]} \setupindex[n=1,pageleft=\PageLeft,pageright=,textcommand=\TextCommand] \starttext Foo\index{foo

Re: [NTG-context] Why do I have to enclose \rawcounter in braces in this MWE ?

2018-09-25 Thread Pablo Rodriguez
On 9/25/18 9:22 PM, Damien Thiriet wrote: > Hello list, > > Why do I have to enclose \rawcountervalue in braces to get this MWE > compiled ? Hi Damien, just as you wrote it is the way to enclose brackets inside brackets (you need a pair of braces between them. >\definecou

[NTG-context] Why do I have to enclose \rawcounter in braces in this MWE ?

2018-09-25 Thread Damien Thiriet
Hello list, Why do I have to enclose \rawcountervalue in braces to get this MWE compiled ? \definecounter[fiche][way=bytext] \setupheadertexts[Fiche méthodologique N.{\rawcountervalue[fiche]} ][][][] \starttext \setcounter[fiche][2] \starttitle[title={Un essai

Re: [NTG-context] Clickable question/answer numbers

2016-11-06 Thread Otared Kavian
\PrintCounterValues{Here \type{\QuestionCounter = }\QuestionCounter.\par Here \type{\AnswerCounter = }\AnswerCounter.\par Here \type{\rawcountervalue[question] = }\rawcountervalue[question].\par Here \type{\rawcountervalue[answer] = }\rawcountervalue[answer]. } \starttext \startchapter[title=Questions

Re: [NTG-context] Clickable question/answer numbers

2016-11-05 Thread Wolfgang Schuster
upling=… », but somehow I am unable to create automatic references by extracting the number of each question or that of each answer, for example by using \rawcountervalue, or \currentconstructionnumber. Strangely the latter gives the name of the construction and not a number: is it on p

Re: [NTG-context] Clickable question/answer numbers

2016-11-05 Thread Otared Kavian
the number of each question or that of each answer, for example by using \rawcountervalue, or \currentconstructionnumber. Strangely the latter gives the name of the construction and not a number: is it on purpose? The solution Wolfgang proposes today, using the new keyword referenceprefix, is almost

Re: [NTG-context] Simpleslides presentation: list of topics

2016-09-15 Thread Aditya Mahajan
? Not really. The visual counter code is simply using \rawcountervalue and \lastcountervalue to draw a metapost graphic. I don't know of an easy way to add a link to "page where this counter has value n". Nor do I know how to add interaction to a metapost image. Hans had written s

Re: [NTG-context] reading the value of a counter (footnote counter, i.e.) from lua

2016-06-15 Thread Hans Hagen
On 6/15/2016 4:47 PM, mass...@fastwebnet.it wrote: Hello list, how can I read the numeric value of a counter in Lua? local c_value = ... Something like \rawcountervalue in ConTeXt, but in Lua. \starttext x \footnote{x} x \footnote{x} x \footnote{x} x \cldcontext

[NTG-context] reading the value of a counter (footnote counter, i.e.) from lua

2016-06-15 Thread massifr
Hello list, how can I read the numeric value of a counter in Lua? local c_value = ... Something like \rawcountervalue in ConTeXt, but in Lua. Thanks in advance, Massi ___ If your question is of interest to others

Re: [NTG-context] Controlling \at output

2016-02-28 Thread Aidan Nichol
Thanks for the reply. \thispage is producing no output in all the places it is being invoked Aidan > On 24 Feb 2016, at 15:35, ntg-context-requ...@ntg.nl wrote: > > startsetups[referenceformat:thispage] >\doifelse{\filterreference{page}}{\rawcountervalue[userpage]} >

Re: [NTG-context] ntg-context Digest, Vol 140, Issue 59

2016-02-24 Thread Aidan Nichol
Thanks for the reply. \thispage is producing no output in all the places it is being invoked Aidan > On 24 Feb 2016, at 15:35, ntg-context-requ...@ntg.nl wrote: > > startsetups[referenceformat:thispage] > \doifelse{\filterreference{page}}{\rawcountervalue[userpage]} >

Re: [NTG-context] Controlling \at output

2016-02-24 Thread Wolfgang Schuster
Aidan Nichol <mailto:ai...@nicholware.co.uk> 24. Februar 2016 um 12:47 I’m trying to create something (like varioref in latex) that suppresses \at output if the referenced item is on the current page. The main decision point is with \doifelse{\at[ref2]}{\rawcountervalue[page]}{ sam

[NTG-context] Controlling \at output

2016-02-24 Thread Aidan Nichol
I’m trying to create something (like varioref in latex) that suppresses \at output if the referenced item is on the current page. The main decision point is with \doifelse{\at[ref2]}{\rawcountervalue[page]}{ same page }{ different page } no matter what I try (expdoifelse and other ways to get

Re: [NTG-context] late reset of counter with way=bypage

2016-02-22 Thread massifr
note]% \incrementcounter[authornote]\decrementcounter[authornote]% <-- authornote is incremented and decremented to force the reset by page >\setcounter[footnote][{\rawcountervalue[authornote]}]% >\setupnotation[footnote][numberconversion=set 1]% >\foot

[NTG-context] late reset of counter with way=bypage

2016-02-18 Thread massifr
every page (way=bypage). - \setupnotation[footnote][way=bypage] \definecounter[authornote][way=bypage] % taken and adapted from https://www.mail-archive.com/ntg-context@ntg.nl/msg56637.html \define[1]\authorNote{\bgroup% \savecounter[footnote]% \setcounter[footnote][{\rawcountervalue

Re: [NTG-context] not able to change paper sizes

2016-02-04 Thread Pablo Rodriguez
e". >> \startsetups[testlayer] >> \setlayer[test2]{page2} >> \stopsetups > You have to include a check for the first page, possible are > > \startsetups[testlayer] > \doifnot{\rawcountervalue[userpage]}{1}{\setlayer[test2]{page2}} > \stopsetups

Re: [NTG-context] not able to change paper sizes

2016-02-04 Thread Wolfgang Schuster
ospace font as fallback. \definelayer[test2][x=.5\paperwidth, y=.5\paperheight, state=continue] Remove "state=continue". \startsetups[testlayer] \setlayer[test2]{page2} \stopsetups You have to include a check for the first page, possible are \startsetups[testlayer] \ifnum\rawcount

[NTG-context] \footnote and \note with \setupnotation[way=bypage], but it does not work with XML processing

2015-07-02 Thread mf
, it prints the value of the counter that the footnote had in the previous page, when it should produce a new \footnote instead for the new page. Running this example should show the problem more clearly: \setupnotation[way=bypage] \def\showcountersinmargin#1{% \inmargin{\rawcountervalue[contapag#1

Re: [NTG-context] Counter[way=bypage] bug in latest beta?

2015-06-30 Thread mf
BTW: The names for the counter commands are \...counter, e.g. \definecounter[testcounter][way=bypage] \define\TestCounter {\incrementcounter[testcounter] %\convertedcounter[testcounter] \rawcountervalue [testcounter]} \starttext \dorecurse{3}{\TestCounter\page} \stoptext

[NTG-context] Counter[way=bypage] bug in latest beta?

2015-06-29 Thread mf
Hello list, consider this example, involving a number (counter) to be reset at each page: \starttext \definenumber[MyNumber][way=bypage] % MyNumber=0 \incrementnumber[MyNumber] % MyNumber=1 \incrementnumber[MyNumber] % MyNumber=2 mynumber is \rawcountervalue[MyNumber]. % prints 2 \page % MyNumber

Re: [NTG-context] Testing the value of a number defined with \definenumber

2015-06-27 Thread Otared Kavian
Hi MF, You should use \rawcountervalue instead of \getnumber, as in the following: \starttext \definenumber[numero][] \setnumber[numero][42] The value of {\tt numero} is \getnumber[numero]. The value of {\tt numero} is \rawnumber[numero]. The value of {\tt numero} is \rawcountervalue[numero

Re: [NTG-context] Testing the value of a number defined with \definenumber

2015-06-27 Thread mf
Thanks Otared, I've added this example to http://wiki.contextgarden.net/Counters Best regards, MF Hi MF, You should use \rawcountervalue instead of \getnumber, as in the following: \starttext \definenumber[numero][] \setnumber[numero][42] The value of {\tt numero} is \getnumber

Re: [NTG-context] Letterhead Usage

2015-05-01 Thread Wolfgang Schuster
put the layer settings in a setups environment and flush the content when the page backgrounds are applied with the setups key for \setupbackground. \definelayer[letterhead][width=\paperwidth,height=\paperheight] \startsetups[letterhead] \ifnum\rawcountervalue[userpage]=1

Re: [NTG-context] \placefootnotes at the end of each chapter, conditionally

2015-03-13 Thread Alan BRASLAU
On Thu, 12 Mar 2015 22:59:33 +0100 Hans Hagen pra...@wxs.nl wrote: Supplementary question, just for fun: how to specify title=Footnote if there is only one? \startsetups chapter:after \ifcase\rawcountervalue[footnote]\relax \or \startsubject[title=Footnote

Re: [NTG-context] \placefootnotes at the end of each chapter, conditionally

2015-03-12 Thread Hans Hagen
to have empty Footnotes subjects appearing in my document. Supplementary question, just for fun: how to specify title=Footnote if there is only one? \startsetups chapter:after \ifcase\rawcountervalue[footnote]\relax \or \startsubject[title=Footnote] \placefootnotes

Re: [NTG-context] [doifinset] how it works ?

2014-08-21 Thread Wolfgang Schuster
to access the counter with \rawcountervalue[countername] but in your case you can use a different counter mechanism. \setvariables[slide][list={1,2,3,6,7,8}] % \setupbackgrounds[page][background={fond,Auteur,backgraphics,foreground,foregraphics}] \def\startSlide {\increment\SlideCounter

Re: [NTG-context] setuphead for in-paragraph head ?

2014-01-13 Thread Wolfgang Schuster
to an enumeration or an item? You can use \rawcountervalue[name of the enumeration environment] or \convertedcounter[name of the environment]. Also, if I understand correctly, the command \increment\QuestionCounter creates first a counter named QuestionCounter, if it does not exist yet

[NTG-context] incrementing counters in tables

2013-12-10 Thread Jannik Voges
[test] \starttext \bTABLE \dorecurse{8}{ \bTR \dorecurse{5}{\bTD \rawcountervalue[test]\incrementnumber[test] \eTD} \eTR } \eTABLE \stoptext Thanks Jannik Voges signature.asc Description: Message signed with OpenPGP using GPGMail

Re: [NTG-context] incrementing counters in tables

2013-12-10 Thread Aditya Mahajan
I get the desired numbers? \definenumber[test] \starttext \bTABLE \dorecurse{8}{ \bTR \dorecurse{5}{\bTD \rawcountervalue[test]\incrementnumber[test] \eTD} \eTR } \eTABLE \stoptext Change that to: \rawcountervalue[test]\iftrialtypesetting\else\incrementnumber[test]\fi

Re: [NTG-context] incrementing counters in tables

2013-12-10 Thread Jannik Voges
example, I get numbers between 80 and 119, I would expect numbers between 0 and 39. How can I get the desired numbers? \definenumber[test] \starttext \bTABLE \dorecurse{8}{ \bTR \dorecurse{5}{\bTD \rawcountervalue[test]\incrementnumber[test] \eTD} \eTR } \eTABLE

Re: [NTG-context] Set background color for a single page

2013-04-23 Thread Aditya Mahajan
(red) end end \stopluacode \def\PageColor% {\ctxlua{thirddata.getpagecolor(\rawcountervalue[userpage])}} \setupbackgrounds[page][background=color, backgroundcolor=\PageColor] \setuppapersize[S3] \starttext \dorecurse{10}{\input knuth \par} \stoptext You can also use a lua table to assign

Re: [NTG-context] Set background color for a single page

2013-04-23 Thread Tim Li
then context(red) end end \stopluacode \def\PageColor% {\ctxlua{thirddata.getpagecolor(\rawcountervalue[userpage])}} \setupbackgrounds[page][background=color, backgroundcolor=\PageColor] \setuppapersize[S3] \starttext \dorecurse{10}{\input knuth \par} \stoptext You

Re: [NTG-context] References to annotations broken, mkiv

2012-09-11 Thread Wolfgang Schuster
: \rawcountervalue[definition]/\convertedcounter[definition][prefix=yes,prefixsegments=chapter] In \in{Definition}[definition:1] blabla ... \stoptext Wolfgang ___ If your question is of interest to others as well, please add

Re: [NTG-context] Page Backgrounds

2012-07-09 Thread Wolfgang Schuster
[backgroundimage] [{\ifnum\rawcountervalue[userpage]=1\relax \overlayfigure{Cover}% \else \overlayfigure{Background}% \fi}] \setupbackgrounds[page][background=backgroundimage] \starttext \dorecurse{4}{\input knuth\page} \stoptext Wolfgang

Re: [NTG-context] Page Backgrounds

2012-07-09 Thread Kip Warner
On Mon, 2012-07-09 at 10:06 +0200, Wolfgang Schuster wrote: \setupexternalfigures[directory=Makeup/Images] \defineoverlay [backgroundimage] [{\ifnum\rawcountervalue[userpage]=1\relax \overlayfigure{Cover}% \else \overlayfigure{Background}% \fi

Re: [NTG-context] Did usage of \expanded changed?

2012-05-11 Thread Hans Hagen
]{\convertedcounter[ParagraphCounter]}}} \protect \starttext \markParagraph[mark=aaa] \input tufte \markParagraph[mark=bbb] \input tufte \markParagraph[mark=ccc] Should be 1: \in[aaa] Should be 2: \in[bbb] Should be 3: \in[ccc] \stoptext you need to use expandable macros like \rawcountervalue