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

2024-04-27 Thread Wolfgang Schuster
ai2472206...@yeah.net schrieb am 25.04.2024 um 10:24: hi! I'm new to ConTeXt. I want to define a command with sidenote function. This [setupsidenote] command inherits the options of [setupmargindata], [setupcounter] and [setupframed]. just like [setupenumeration] inherits the option

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

2024-04-26 Thread Bruce Horrocks
re is no way to "inherit" functionality. You still need to write \setupsidenote to call \setupcounter, \setupframed at the right points to achieve the right effects. What you can do is have \setupsidenote accept all options in one big long list and then pass the ones that apply to se

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

2024-04-25 Thread ai2472206007
hi! I'm new to ConTeXt. I want to define a command with sidenote function. This [setupsidenote] command inherits the options of [setupmargindata], [setupcounter] and [setupframed]. just like [setupenumeration] inherits the option of [setupcounter]. I've defined the following sidenote command

Re: [NTG-context] new upload, new trickery

2021-11-16 Thread Marcus Vinicius Mesquita via ntg-context
contentbox\hss)}} > % \protected\def\RightNumber{\hbox to > \localboxesparameter{width}{\strut(\hss\box\localboxcontentbox)}} > > % using the provided line number: > > % \def\LineNumberL{\the\localboxlinenumber} > % \def\LineNumberR{\the\localboxlinenumber} > > % using a

[NTG-context] new upload, new trickery

2021-10-28 Thread Hans Hagen via ntg-context
] \definecounter[MyLineNumberR] \setupcounter[MyLineNumberL][numberconversion=characters] \setupcounter[MyLineNumberR][numberconversion=romannumerals] \def\LineNumberL{\incrementcounter[MyLineNumberL]\convertedcounter[MyLineNumberL]} \def\LineNumberR{\incrementcounter[MyLineNumberR]\convertedcounter

[NTG-context] prefixstarter in captions

2021-08-28 Thread Adam Reviczky via ntg-context
ended command to use, but the wiki of setupcation (https://wiki.contextgarden.net/Command/setupcaption) says it inherits from setupcounter which has both numberstarter and prefixstarter defined in the same way. Adam

Re: [NTG-context] Formula numbering including all prefix segments

2021-03-21 Thread Adam Reviczky
s number 1.1.1 and is in the list as 1.1.1, the formula has > > number 1.1 but is listed as 1.1.1. > > I would like to have the formula numbered 1.1.1 as well (as referenced > > in the placelist), so with section and subsection numbering. > you need to add: prefixset=a

Re: [NTG-context] Formula numbering including all prefix segments

2021-03-21 Thread Hans Hagen
with section and subsection numbering. you need to add: prefixset=all (default is limited to 3, see strc-def) \starttext \setupcounter[formula][way=bytext] \setupcaption[figure][way=bytext,prefixsegments=1:*] \setupformulas[way=bytext,prefixsegments=1:*,prefixset=all] \startchapter

Re: [NTG-context] Continued chapter numbers

2021-01-06 Thread jbf
...@ub.unibe.ch wrote: Not tested, but what about this? \setupcounter[chapter][way=bytext] Best, Denis -Ursprüngliche Nachricht- Von: ntg-context Im Auftrag von jbf Gesendet: Mittwoch, 6. Januar 2021 10:24 An: mailing list for ConTeXt users Betreff: [NTG-context] Continued chapter numbers I

Re: [NTG-context] Continued chapter numbers

2021-01-06 Thread denis.maier
Not tested, but what about this? \setupcounter[chapter][way=bytext] Best, Denis > -Ursprüngliche Nachricht- > Von: ntg-context Im Auftrag von jbf > Gesendet: Mittwoch, 6. Januar 2021 10:24 > An: mailing list for ConTeXt users > Betreff: [NTG-context] Continued chapter

Re: [NTG-context] Overriding the number on a float

2020-08-25 Thread Duncan Hothersall
t; > % setup definitions > \definecounter[subfigure][way=bytext,prefix=no] > \setupcounter[subfigure][state=start,numberconversion=a] > \setcounter[subfigure][1] > > \def\setsubfigures > {\setcounter[subfigure][1] >\incrementcounter[figure] > > > \setupca

Re: [NTG-context] Overriding the number on a float

2020-08-24 Thread Taco Hoekwater
> On 24 Aug 2020, at 19:59, Wolfgang Schuster > wrote: > >> >> >> \setcounter[figure][5] % next figure is no.6 For this subfigure stuff, perhaps this is useful? % setup definitions \definecounter[subfigure][way=bytext,prefix=no] \setupcounter[subfigure][s

Re: [NTG-context] Overriding the number on a float

2020-08-24 Thread Wolfgang Schuster
) – does section use a different counter name or is it no counter at all? \setnumber[figure][10] works (but only with integers, not some alphanumerical stuff, sorry Duncan). \setupnumber is a synonym of \setupcounter and exists for backwards compatibility. Hraban \useMPlibrary[d

Re: [NTG-context] Pagenumbering with \setupcounter[userpagenumber]

2020-07-29 Thread Wolfgang Schuster
Willi Egger schrieb am 29.07.2020 um 21:43: Good evening! I am trying to make use of the userpagenumber counter. I have a book at hand, where I need to adjust the start of the pagenumbering. It appears to me, that the \setupcounter[userpagenumber[state=stop] and later the \setupcounter

[NTG-context] Pagenumbering with \setupcounter[userpagenumber]

2020-07-29 Thread Willi Egger
Good evening! I am trying to make use of the userpagenumber counter. I have a book at hand, where I need to adjust the start of the pagenumbering. It appears to me, that the \setupcounter[userpagenumber[state=stop] and later the \setupcounter[userpagenumber][state=start,start=7] is not giving

Re: [NTG-context] two additional pagenumber series

2020-04-29 Thread Hans Hagen
counter. Although method is page, this seems to be related to a different issue. My question is: how could I get new pagenumber series using \definecounter? \setuppapersize[A8] \setupheadertexts[] \setupcounter[subpage][way=bychapter] \starttext \chapter{what} \rawsubcountervalue[subpage][1

Re: [NTG-context] \placelist[chapter][counter=realpage] not working

2020-04-11 Thread Wolfgang Schuster
[chapter] use the realpage counter? According to i-context.pdf, \placelist inherits from \setuplist (which also inherits from \setupcounter). While \setuplist inherits values from \setupcounter doesn't mean it supports all of them and keys like "counter" work only when you create a ne

[NTG-context] \placelist[chapter][counter=realpage] not working

2020-04-11 Thread Pablo Rodriguez
-context.pdf, \placelist inherits from \setuplist (which also inherits from \setupcounter). I really need that, since the document I’m composing needs chapter and part page numbering independent from the whole document page numbering. Am I missing something or have I hit a bug? Many thanks for your

Re: [NTG-context] resetting footnote counter

2018-08-09 Thread Robert Zydenbos
:37, Aditya Mahajan wrote: > > On Thu, 9 Aug 2018, Robert Zydenbos wrote: > >> I have tried ‘\resetcounter [footnote]’ (a suggested solution on that web >> page), but it does not work (at least not in MkII+XeTeX). ‘\setupcounter >> [footnote] [0]’ (also suggested

Re: [NTG-context] resetting footnote counter

2018-08-09 Thread Wolfgang Schuster
]’ (a suggested solution on that web page), but it does not work (at least not in MkII+XeTeX). ‘\setupcounter [footnote] [0]’ (also suggested on that web page) is rejected as an error. Can you post a minimal example. Because the following works in MKII (counter reset at each chapter

Re: [NTG-context] resetting footnote counter

2018-08-09 Thread Wolfgang Schuster
is called. As bypage and bysection both don't do that, I need to be able to manually adjust the numbering.” I have tried ‘\resetcounter [footnote]’ (a suggested solution on that web page), but it does not work (at least not in MkII+XeTeX). ‘\setupcounter [footnote] [0]’ (also suggested on that web

[NTG-context] resetting footnote counter

2018-08-09 Thread Robert Zydenbos
:37, Aditya Mahajan wrote: > > On Thu, 9 Aug 2018, Robert Zydenbos wrote: > >> I have tried ‘\resetcounter [footnote]’ (a suggested solution on that web >> page), but it does not work (at least not in MkII+XeTeX). ‘\setupcounter >> [footnote] [0]’ (also suggested

Re: [NTG-context] resetting footnote counter

2018-08-09 Thread Aditya Mahajan
On Thu, 9 Aug 2018, Robert Zydenbos wrote: I have tried ‘\resetcounter [footnote]’ (a suggested solution on that web page), but it does not work (at least not in MkII+XeTeX). ‘\setupcounter [footnote] [0]’ (also suggested on that web page) is rejected as an error. Can you post a minimal

Re: [NTG-context] resetting footnote counter

2018-08-09 Thread Robert Zydenbos
.” I have tried ‘\resetcounter [footnote]’ (a suggested solution on that web page), but it does not work (at least not in MkII+XeTeX). ‘\setupcounter [footnote] [0]’ (also suggested on that web page) is rejected as an error. Robert

Re: [NTG-context] Numbering properties in a chapter

2018-07-25 Thread Wolfgang Schuster
The correct key to set the period after the number is "numberstopper" which is inherited from \setupcounter. Wolfgang Pablo Rodriguez schrieb am 24.07.18 um 17:09: On 07/24/2018 11:04 AM, Fabrice Couvreur wrote: Hi Pablo, Thank you Pablo for your answer that corresponds to what I

Re: [NTG-context] Conversion of \newcounts

2018-05-19 Thread Idris Samawi Hamid ادريس سماوي حامد
can automatically use the conversion mechanism? \definecounter[idris]%[numberconversion=R] \starttext \incrementcounter[idris] \convertedcounter[idris] \incrementcounter[idris] \convertedcounter[idris][numberconversion=a] \incrementcounter[idris] \convertedcounter[idris] \setupcounter[idr

Re: [NTG-context] Conversion of \newcounts

2018-05-19 Thread Wolfgang Schuster
n=R] \starttext \incrementcounter[idris] \convertedcounter[idris] \incrementcounter[idris] \convertedcounter[idris][numberconversion=a] \incrementcounter[idris] \convertedcounter[idris] \setupcounter[idris][numberconversion=r] \incrementcounter[idris] \convertedcounter[idris] \st

Re: [NTG-context] Latest beta: reference to items broken in mkiv

2018-02-07 Thread Otared Kavian
Hi Robert, Sorry I didn’t pay attention to the way you wanted the formatting of sub-items. If you want to remove the separator between numbers, then you may add the following two line after the setups of your itemgroups: \defineseparatorset[nothing][][] \setupcounter[itemgroup:itemize

Re: [NTG-context] Enumeration: chapter in counter, problem next to placefigure, and documentation issues

2016-09-05 Thread Florian Leupold
two sides. >> \stoptheorem >> \stoptext >> >> QUESTIONS: >> 1) I would like to prefix the theorem counter with the chapter number, such >> that the number of the second theorem becomes 2.1. Can this be done? >> 2) Is it possible to circumvent the misplacement of

Re: [NTG-context] Enumeration: chapter in counter, problem next to placefigure, and documentation issues

2016-09-04 Thread Wolfgang Schuster
Florian Leupold <mailto:fleup...@posteo.net> 4. September 2016 um 19:37 Issues with the documentation: - In “ConTeXt Commands”, it says on page 224 that \setupenumeration inherits from \setupcounter; but in “ConTEXt reference manual", it says on page 246 that \setupenumerations in

Re: [NTG-context] Enumeration: chapter in counter, problem next to placefigure, and documentation issues

2016-09-04 Thread Otared Kavian
e theorem counter with the chapter number, such > that the number of the second theorem becomes 2.1. Can this be done? > 2) Is it possible to circumvent the misplacement of the second theorem due to > the placed figure? Ideally, the theorem would just use the space to the left > it. &

[NTG-context] Enumeration: chapter in counter, problem next to placefigure, and documentation issues

2016-09-04 Thread Florian Leupold
the space to the left it. Issues with the documentation: - In “ConTeXt Commands”, it says on page 224 that \setupenumeration inherits from \setupcounter; but in “ConTEXt reference manual", it says on page 246 that \setupenumerations inherits from \setupdescriptions. - In “ConTEXt reference m

Re: [NTG-context] Changing coversion of formulas

2015-04-27 Thread Hans Hagen
On 4/27/2015 11:24 AM, Aditya Mahajan wrote: Hi, How does one change the numberconversion for math formulas? The old method: \setupformulas[numberconversion=set 1] \starttext \placeformula \startformula E = mc^2 \stopformula \stoptext does not appear to work. \setupcounter[formula

Re: [NTG-context] Changing coversion of formulas

2015-04-27 Thread Aditya Mahajan
not appear to work. \setupcounter[formula][numberconversion=set 1] Using `characters` as numberconversion works, but `set 1` does not. Aditya ___ If your question is of interest to others as well, please add an entry

Re: [NTG-context] Changing coversion of formulas

2015-04-27 Thread Wolfgang Schuster
\placeformula \startformula E = mc^2 \stopformula \stoptext does not appear to work. \setupcounter[formula][numberconversion=set 1] Using `characters` as numberconversion works, but `set 1` does not. Your original example with \setupformulas[numberconversion=set 1] works for me

Re: [NTG-context] Changing coversion of formulas

2015-04-27 Thread Aditya Mahajan
[numberconversion=set 1] \starttext \placeformula \startformula E = mc^2 \stopformula \stoptext does not appear to work. \setupcounter[formula][numberconversion=set 1] Using `characters` as numberconversion works, but `set 1` does not. Your original example with \setupformulas

Re: [NTG-context] Changing coversion of formulas

2015-04-27 Thread Aditya Mahajan
for math formulas? The old method: \setupformulas[numberconversion=set 1] \starttext \placeformula \startformula E = mc^2 \stopformula \stoptext does not appear to work. \setupcounter[formula][numberconversion=set 1] Using `characters` as numberconversion works, but `set 1` does not. Your

Re: [NTG-context] Numbers in appendix roman, but want arabic

2015-02-14 Thread Wolfgang Schuster
] http://www.ntg.nl/pipermail/ntg-context/2015/080866.html PS: You have to change \setupcounters to \setupcounter to fix the error message from Hans solution because there is only a singular version of the counter command. Wolfgang

Re: [NTG-context] Numbers in appendix roman, but want arabic

2015-02-14 Thread Mikael P. Sundqvist
There was a similar problem a few days ago with a solution by Hans [1]. [1] http://www.ntg.nl/pipermail/ntg-context/2015/080866.html PS: You have to change \setupcounters to \setupcounter to fix the error message from Hans solution because there is only a singular version of the counter command

Re: [NTG-context] Continuous Item Numbering throughout an Entire Document

2014-05-07 Thread Wolfgang Schuster
. You have to use the \setupcounter command to set a continues numbering. \setupcounter[itemgroup:itemize][way=bytext] \setupitemgroup[itemize][each][n,continue] \starttext \dorecurse{2} {\chapter{First chapter} \dorecurse{2} {\startitemize \dorecurse{3}{\item Item \recurselevel

[NTG-context] Pagenumbering

2013-06-05 Thread Tim Steenvoorden
I doing something wrong is this a bug? \starttext \setupcounter[userpage][10] \dorecurse{3}{ \input tufte \page } \stoptext current version: 2013.05.28 00:36 = Doesn't start at page 10 but at page 1 Cheers, Tim

Re: [NTG-context] Pagenumbering

2013-06-05 Thread Marco Patzer
On 2013–06–05 Tim Steenvoorden wrote: I doing something wrong is this a bug? \starttext \setupcounter[userpage][10] \setcounter [userpage] [10] Marco signature.asc Description: Digital signature ___ If your

Re: [NTG-context] Pagenumbering

2013-06-05 Thread Tim Steenvoorden
Oh god, stupid me. Thanks, Marco! Cheers, Tim Op woensdag 5 juni 2013, om 12:54 heeft Marco Patzer het volgende geschreven: On 2013–06–05 Tim Steenvoorden wrote: I doing something wrong is this a bug? \starttext \setupcounter[userpage][10] \setcounter [userpage

Re: [NTG-context] setuppagenumber--start at page xy

2013-04-22 Thread Wolfgang Schuster
, the number option for \setuppagenumber is gone and you have to use \setupcounter. Even though this breaks backward compatibility it’s now constant with \setupheadnumber which is used to change the start value for sections. Wolfgang

Re: [NTG-context] setuppagenumber--start at page xy

2013-04-22 Thread Jörg Hagmann
Wolfgang Schuster writes: Yes, the number option for \setuppagenumber is gone and you have to use \setupcounter. Even though this breaks backward compatibility it’s now constant with \setupheadnumber which is used to change the start value for sections. Thank you, Wolfgang. I added

Re: [NTG-context] userpagenumber

2013-03-27 Thread Thomas A. Schmitz
On 03/26/2013 06:07 PM, Wolfgang Schuster wrote: 1. \setuppagenumber is a synonym for \setupuserpagenumber 2. The “number=XX” setting doesn’t work in MkIV and you have to use \setupcounter. Thank you for your words of wisdom, Wolfgang. Wouldn't it make sense to have backwards compatibility

Re: [NTG-context] userpagenumber

2013-03-27 Thread Hans Hagen
On 3/27/2013 9:21 AM, Thomas A. Schmitz wrote: On 03/26/2013 06:07 PM, Wolfgang Schuster wrote: 1. \setuppagenumber is a synonym for \setupuserpagenumber 2. The “number=XX” setting doesn’t work in MkIV and you have to use \setupcounter. Thank you for your words of wisdom, Wolfgang. Wouldn't

Re: [NTG-context] userpagenumber

2013-03-26 Thread Wolfgang Schuster
that \setupuserpagenumber was the proper way to do those things. 1. \setuppagenumber is a synonym for \setupuserpagenumber 2. The “number=XX” setting doesn’t work in MkIV and you have to use \setupcounter. Wolfgang ___ If your

Re: [NTG-context] Cumulating Numbered Lists

2012-12-07 Thread Wolfgang Schuster
('punctuation'?) which affects what comes between numbers, so that you can produce e.g. '1.', '1:a.', and '1:a:1.'. Or indeed '1a1'. Is there such an option? Add these two lines to your itemize setups: \defineseparatorset[none][][] \setupcounter[itemgroup:itemize][numberseparatorset=none

Re: [NTG-context] Cumulating Numbered Lists

2012-12-07 Thread Sietse Brouwer
Add these two lines to your itemize setups: \defineseparatorset[none][][] \setupcounter[itemgroup:itemize][numberseparatorset=none] Thanks; I've added that (and the repeat key) to http://wiki.contextgarden.net/Enumerations#Customization_details_and_examples --Sietse

Re: [NTG-context] Beginner question. Chapter heading in words

2012-11-11 Thread Andrew Dowell
~] \defineconversion [words] [One, Two, Three, Four, Five] \definecounter [mycount] \setupcounter [mycount] [numberconversion=words] \setuphead [chapter] [header=high, command=\MyChapterTitle, style=\bfc, conversion=words, numberstyle=\bfb] \stopenvironment \startproduct prds2

Re: [NTG-context] Beginner question. Chapter heading in words

2012-11-11 Thread Andrew Dowell
] \setupcounter [mycount] [numberconversion=words] \setuphead [chapter] [header=high, command=\MyChapterTitle, style=\bfc, conversion=words, numberstyle=\bfb] \stopenvironment And my test component file: \startcomponent pt1 \product prds2 % but you can use it in other

Re: [NTG-context] Beginner question. Chapter heading in words

2012-11-10 Thread Marco Patzer
, Three, Four, Five] \definecounter [mycount] \setupcounter [mycount] [numberconversion=words] \starttext \dorecurse{5}{%% \incrementcounter [mycount] \convertedcounter [mycount]} \stoptext Maybe there is a conversion built-in that does this automatically without having

Re: [NTG-context] Strange bug with reversed itemize

2012-09-16 Thread Hans Hagen
On 15-9-2012 20:06, Aditya Mahajan wrote: On Sat, 15 Sep 2012, Wolfgang Schuster wrote: Am 15.09.2012 um 00:06 schrieb Aditya Mahajan adit...@umich.edu: Thanks for the diagnosis. What will be a good way to fix this? I think that \expanded{\setupcounter[#1][\c!start=\ifx\p_start\empty0\else

Re: [NTG-context] Strange bug with reversed itemize

2012-09-15 Thread Wolfgang Schuster
Am 15.09.2012 um 00:06 schrieb Aditya Mahajan adit...@umich.edu: Thanks for the diagnosis. What will be a good way to fix this? I think that \expanded{\setupcounter[#1][\c!start=\ifx\p_start\empty0\else\number\p_start\fi.,...]} should work (but I haven't tested it yet). I would do

Re: [NTG-context] Strange bug with reversed itemize

2012-09-15 Thread Aditya Mahajan
On Sat, 15 Sep 2012, Wolfgang Schuster wrote: Am 15.09.2012 um 00:06 schrieb Aditya Mahajan adit...@umich.edu: Thanks for the diagnosis. What will be a good way to fix this? I think that \expanded{\setupcounter[#1][\c!start=\ifx\p_start\empty0\else\number\p_start\fi.,...]} should work

Re: [NTG-context] Strange bug with reversed itemize

2012-09-14 Thread Aditya Mahajan
\strc_counter_setup_using_parameter#1#2% name \someparameter {\edef\p_start{#2\c!start}% \setupcounter [#1] [ \c!start=\ifx\p_start\empty0\else\number\p_start\fi, ... \c!numbersegments=#2\c!numbersegments]} As you can see here the start parameter expands

Re: [NTG-context] Strange bug with reversed itemize

2012-09-13 Thread Wolfgang Schuster
\someparameter {\edef\p_start{#2\c!start}% \setupcounter [#1] [ \c!start=\ifx\p_start\empty0\else\number\p_start\fi, ... \c!numbersegments=#2\c!numbersegments]} As you can see here the start parameter expands to \p_start when it isn’t

Re: [NTG-context] Italic page number.

2012-08-07 Thread john Culleton
of the pagenumber outside of the sectionblock environment, % the first argument takes the name of the conversion which is applied to the % userpage counter with \setupcounter[userpage][numberconversionset=pagenumber]. % % You can set a conversion for a certain sectionblock when you write the name

Re: [NTG-context] Italic page number.

2012-08-07 Thread Wolfgang Schuster
[numberconversion=romannumerals] % to set the conversion of the pagenumber outside of the sectionblock environment, % the first argument takes the name of the conversion which is applied to the % userpage counter with \setupcounter[userpage][numberconversionset=pagenumber]. % % You can set

Re: [NTG-context] Italic page number.

2012-08-05 Thread Wolfgang Schuster
which is applied to the % userpage counter with \setupcounter[userpage][numberconversionset=pagenumber]. % % You can set a conversion for a certain sectionblock when you write the name % of the block before the name of the conversion set separated by a “:”. % %\defineconversionset

Re: [NTG-context] Italic page number.

2012-08-05 Thread Wolfgang Schuster
, % the first argument takes the name of the conversion which is applied to the % userpage counter with \setupcounter[userpage][numberconversionset=pagenumber]. % % You can set a conversion for a certain sectionblock when you write the name % of the block before the name of the conversion set

Re: [NTG-context] Should command `\setnumber' print number in text?

2012-05-01 Thread Wolfgang Schuster
that `\setnumber' is ok to use with `[]{}'. In MkIV the real names for the counter mechanism are - \definecounter - \setupcounter - \incrementcounter - \convertedcounter - … but for backward compatibility (the names are mentioned in manuals) the old names from MkII are synonyms with the same syntax

Re: [NTG-context] footnotes

2012-04-24 Thread Wolfgang Schuster
{dawkins}\footnote{Another note.} \stoptext Counter settings are applied with the \setupnotation command. (I do not find numberconversion in strc-not.mkvi; nevertheless, numbered footnotes do not get reset on each page.) Footnotes use a internal version of \setupcounter for the counter setups