[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] define math function with \, inside

2023-05-01 Thread Stefan Haller via ntg-context
Hi Mikael, On Mon, May 01, 2023 at 05:48:40PM +0200, Mikael Sundqvist via ntg-context wrote: > [...] > This works here (but maybe there should be a simpler way): > > \definemathfunction > [argmax] > [mathlimits=auto] > > \setupmathlabeltext > [en] > [argmax=arg\sixperemspace max] >

Re: [NTG-context] define math function with \, inside

2023-05-01 Thread Mikael Sundqvist via ntg-context
Hi, On Mon, May 1, 2023 at 5:27 PM Stefan Haller via ntg-context wrote: > > Hi all, > > I wanted to define a custom math function (similar to log etc.) for > argmax. However, I wanted to have a small space between "arg" and "max" > and limits should work properly. I am using a up-to-date LMTX

[NTG-context] define math function with \, inside

2023-05-01 Thread Stefan Haller via ntg-context
Hi all, I wanted to define a custom math function (similar to log etc.) for argmax. However, I wanted to have a small space between "arg" and "max" and limits should work properly. I am using a up-to-date LMTX installation. Without the first constraint it's easy: > % old way: >

Re: [NTG-context] Define new symbol by stitching two symbols together

2021-05-24 Thread Nicola
On 2021-05-24, Aditya Mahajan wrote: > On Sun, 23 May 2021, Hans Hagen wrote: > >> On 5/22/2021 8:23 PM, Nicola wrote: >> > I would like to define new symbols by stitching together existing >> > glyphs. This is what I have come up so far: >> > >> >

Re: [NTG-context] Define new symbol by stitching two symbols together

2021-05-24 Thread Aditya Mahajan
On Sun, 23 May 2021, Hans Hagen wrote: > On 5/22/2021 8:23 PM, Nicola wrote: > > I would like to define new symbols by stitching together existing > > glyphs. This is what I have come up so far: > > > > \define[1]\Transition{-\!\![#1]\!\!\rightarrow} > > \starttext > >

Re: [NTG-context] Define new symbol by stitching two symbols together

2021-05-23 Thread Hans Hagen
On 5/22/2021 8:23 PM, Nicola wrote: I would like to define new symbols by stitching together existing glyphs. This is what I have come up so far: \define[1]\Transition{-\!\![#1]\!\!\rightarrow} \starttext \m{L\Transition{A}R} \stoptext This should render as -[ ]->, ideally

[NTG-context] Define new symbol by stitching two symbols together

2021-05-22 Thread Nicola
I would like to define new symbols by stitching together existing glyphs. This is what I have come up so far: \define[1]\Transition{-\!\![#1]\!\!\rightarrow} \starttext \m{L\Transition{A}R} \stoptext This should render as -[ ]->, ideally with no space between the dash or the

Re: [NTG-context] \define in conflict with \startxtable[]

2020-11-08 Thread Wolfgang Schuster
Sylvain Hubert schrieb am 08.11.2020 um 04:54: Dear List, Could anyone manage to typeset the following example? Here [] causes an error "Extra }, or forgotten \endgroup".     \starttext     \define\sample{     \startxtable[]     \startxtablehead     \startxrow     \startxcell

[NTG-context] \define in conflict with \startxtable[]

2020-11-07 Thread Sylvain Hubert
Dear List, Could anyone manage to typeset the following example? Here [] causes an error "Extra }, or forgotten \endgroup". \starttext \define\sample{ \startxtable[] \startxtablehead \startxrow \startxcell 123\stopxcell \stopxrow \stopxtablehead \stopxtable

Re: [NTG-context] Define color with calculations

2019-02-18 Thread Henri Menke
On 19/02/19 10:33 AM, Wolfgang Schuster wrote: > Mohammad Hossein Bateni schrieb am 18.02.19 um 04:37: >> Hi, >> >> When I use definecolor, (how) can I use computations in setting the >> value of a component?  Something like the following... >> >> \definecolor[mycolor][r=0.5*0.7] > > \starttext >

Re: [NTG-context] Define color with calculations

2019-02-18 Thread Wolfgang Schuster
Mohammad Hossein Bateni schrieb am 18.02.19 um 04:37: Hi, When I use definecolor, (how) can I use computations in setting the value of a component?  Something like the following... \definecolor[mycolor][r=0.5*0.7] \starttext \colored[r=\cldcontext{0.5*0.7}]{\cldcontext{0.5*0.7}}

Re: [NTG-context] Define color with calculations

2019-02-18 Thread Mohammad Hossein Bateni
Thanks, Henri! Works like a charm. On Sun, Feb 17, 2019 at 11:03 PM Henri Menke wrote: > Use Lua. > > > \def\eval#1{\ctxlua{% > local context = context > local _ENV = math > context(#1) > }} > > \definecolor[mycolor][r=\eval{0.5*0.7}] > > \starttext > > \color[mycolor]{Hello!} > >

Re: [NTG-context] Define color with calculations

2019-02-17 Thread Henri Menke
Use Lua. \def\eval#1{\ctxlua{% local context = context local _ENV = math context(#1) }} \definecolor[mycolor][r=\eval{0.5*0.7}] \starttext \color[mycolor]{Hello!} \stoptext On 18/02/19 4:37 PM, Mohammad Hossein Bateni wrote: > Hi, > > When I use definecolor, (how) can I use

[NTG-context] Define color with calculations

2019-02-17 Thread Mohammad Hossein Bateni
Hi, When I use definecolor, (how) can I use computations in setting the value of a component? Something like the following... \definecolor[mycolor][r=0.5*0.7] Thanks, ~MHB ___ If your question is of interest to

Re: [NTG-context] Define the dimensions of a layout

2018-08-09 Thread Lizardo M. Reyna Bowen
Hi, May be this setup works. \setuppapersize[A4] \setuplayout[   header=20mm,   footer=20mm,   height=fit,   topspace=0cm,   width=fit,   backspace=2cm,   rightmargin=0cm,   leftmargin=0cm,   leftmargindistance=0pt,   rightmargindistance=0pt] \showframe \starttext  \showsetups \stoptext

Re: [NTG-context] Define the dimensions of a layout

2018-08-08 Thread Wolfgang Schuster
\setuplayout [topspace=10mm, header=10mm, footer=10mm, height=middle, backspace=20mm, width=middle] \showframe \starttext \showsetups \stoptext Wolfgang Lizardo M. Reyna Bowen schrieb am 09.08.18 um 04:50: Hi, May be this setup works. \setuppapersize[A4] \setuplayout[

Re: [NTG-context] Define the dimensions of a layout

2018-08-08 Thread Lizardo M. Reyna Bowen
Hi, May be this setup works. \setuppapersize[A4] \setuplayout[   header=20mm,   footer=20mm,   height=fit,   topspace=0cm,   width=fit,   backspace=2cm,   rightmargin=0cm,   leftmargin=0cm,   leftmargindistance=0pt,   rightmargindistance=0pt] \showframe \starttext  \showsetups \stoptext --

[NTG-context] Define the dimensions of a layout

2018-08-08 Thread Fabrice Couvreur
Hello, I want the text area to be surrounded by a margin of 20 mm (top, right, left and bottom). I have already done this to have a left and right margin of 20 mm. \setuplayout [height=middle, backspace=20mm, width=middle] I think that I must now have : topdistance + header +

Re: [NTG-context] define xml entity

2018-04-03 Thread Hans Hagen
On 4/3/2018 9:00 AM, dr. Hans van der Meer wrote: How do I define an xml entity like ? Is there an \xml-operation for defining an entity? Such that I can say \xml{ABC}{an alphabet} for using so that it produces “an alphabet”, for example. You can find some in the test suite but it boils down

[NTG-context] define xml entity

2018-04-03 Thread dr. Hans van der Meer
How do I define an xml entity like ? Is there an \xml-operation for defining an entity? Such that I can say \xml{ABC}{an alphabet} for using so that it produces “an alphabet”, for example. dr. Hans van der Meer

Re: [NTG-context] Define font based on language

2016-05-08 Thread Wolfgang Schuster
Michal Ondrejáš 4. April 2016 um 15:17 Hello I need some help regarding font definitions. The situation is like this: \definefont [issuefont] [SansRegular at 14pt] {\issuefont \labeltext{issue} \crlf \documentvariable{issue}} I need to get chinese text

Re: [NTG-context] Define font based on language

2016-05-05 Thread luigi scarso
On Mon, Apr 4, 2016 at 3:17 PM, Michal Ondrejáš wrote: > Hello > > I need some help regarding font definitions. > > Sorry for delay, we were busy with the texlive deadline. -- luigi ___

[NTG-context] Define font based on language

2016-05-05 Thread Michal Ondrejáš
Hello I need some help regarding font definitions. The situation is like this: \definefont [issuefont] [SansRegular at 14pt] {\issuefont \labeltext{issue} \crlf \documentvariable{issue}} I need to get chinese text into the issue variable, but for that I need to change the font. I need

[NTG-context] define macros only visible in a definestartstop-block that have arguments?

2015-03-20 Thread Norbert Melzer
Hi! I have trouble to define macros which are only visible inside a block defined using `\definestartstop`: ```tex \setuppapersize[A6] \definestartstop[Foo][before={Foo}] \definestartstop[Bar][before={\bgroup\define\Foo{Foo}},after={\egroup}]

Re: [NTG-context] define macros only visible in a definestartstop-block that have arguments?

2015-03-20 Thread Norbert Melzer
OK, took me a while to figure out that this was not an empty response but an attachement was available ;) I did a quick test run and realized that it seems to do what I want, I'll take a further look into it tommorrow, thank you! 2015-03-20 17:23 GMT+01:00 Hans Hagen pra...@wxs.nl: On

Re: [NTG-context] define macros only visible in a definestartstop-block that have arguments?

2015-03-20 Thread Hans Hagen
On 3/20/2015 12:05 PM, Norbert Melzer wrote: Hi! I have trouble to define macros which are only visible inside a block defined using `\definestartstop`: ```tex \setuppapersize[A6] \definestartstop[Foo][before={Foo}] \definestartstop[Bar][before={\bgroup\define\Foo{Foo}},after={\egroup}]

Re: [NTG-context] Define a new command from the command \periods[n]

2015-01-19 Thread Fabrice
Hi Hans, It works perfectly, thank you. Fabrice ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context

Re: [NTG-context] Define a new command from the command \periods[n]

2015-01-19 Thread Hans Hagen
On 1/18/2015 10:01 PM, Fabrice wrote: Hi Hans, The size of the float does not center the frame unless I replace by \dorecurse{5}{\filler[dots]} by \dorecurse{10}{\filler[dots]}. Is there a better way ? Thanks, Fabrice % macros=mkvi

Re: [NTG-context] Define a new command from the command \periods[n]

2015-01-18 Thread Fabrice
Hi Hans, The size of the float does not center the frame unless I replace by \dorecurse{5}{\filler[dots]} by \dorecurse{10}{\filler[dots]}. Is there a better way ? Thanks, Fabrice % macros=mkvi \definefiller[dots][left=\dontleavehmode,right=\hskip\zeropoint\par] \definefloat [recipe]

Re: [NTG-context] Define a new command from the command \periods[n]

2015-01-06 Thread Alan BRASLAU
On the subject of recipes, Fabrice clearly should have come to the 8th ConTeXt Meeting that took place on September 8-13, 2014 at Bassange, Belgium... ;-) Alan On Mon, 5 Jan 2015 22:49:39 +0100 Hans Hagen pra...@wxs.nl wrote: On 1/5/2015 6:58 PM, Fabrice wrote: Hi, How to make the dotted

Re: [NTG-context] Define a new command from the command \periods[n]

2015-01-06 Thread Couvreur Fabrice
I am impressed ! Best regards, Fabriçe Envoyé de mon iPad ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl /

Re: [NTG-context] Define a new command from the command \periods[n]

2015-01-06 Thread Couvreur Fabrice
Hi Alan, What should I include ? Fabrice Envoyé de mon iPad ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl /

Re: [NTG-context] Define a new command from the command \periods[n]

2015-01-05 Thread Hans Hagen
On 1/5/2015 6:58 PM, Fabrice wrote: Hi, How to make the dotted lines stop at the edge of the frame? \definefiller[dots][left=\dontleavehmode,right=\hskip\zeropoint] \definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00] \definecolor[H4][c=0.07, m=0.00, y=0.15, k=0.00] \starttext

Re: [NTG-context] Define a new command from the command \periods[n]

2015-01-05 Thread Fabrice
Hi, How to make the dotted lines stop at the edge of the frame? \definefiller[dots][left=\dontleavehmode,right=\hskip\zeropoint] \definecolor[H1prime][c=0.50, m=0.00, y=1.00, k=0.00] \definecolor[H4][c=0.07, m=0.00, y=0.15, k=0.00] \starttext \startitemize[n][stopper={.},style=bold]

Re: [NTG-context] Define a new type section with metafun

2014-12-29 Thread Fabrice
Hi Hans, Thank you for your answer, text placement is correct as long as the policy is not too great. For cons, I'll remove the red line separation because its placement is random. Best regards, Fabrice ___ If your

Re: [NTG-context] Define a new type section with metafun

2014-12-28 Thread Fabrice
Thank you to Akira and Hans for these solutions. How do now to the numbering and the title text are equidistant from the red line separation ? Fabrice ___ If your question is of interest to others as well, please

Re: [NTG-context] Define a new type section with metafun

2014-12-28 Thread Fabrice
Another worry: when the title is too long, there is a line break, which is normal, but what follows is under the dial. Thanks, Fabrice % macros=mkvi \setuppapersize[A4][A4] \setuphead [section] [sectionstopper={}, conversion=Characters, sectionsegments=section:section]

Re: [NTG-context] Define a new type section with metafun

2014-12-28 Thread Hans Hagen
On 12/28/2014 1:00 PM, Fabrice wrote: align={right}, align={flushright,lohi} - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands

[NTG-context] Define a new type section with metafun

2014-12-27 Thread Akira Kakuto
Dear Fabrice, A try and error method which you may not want: % macros=mkvi \setuppapersize[A4][A4] \setupcolors[state=start,cmyk=yes,mpcmyk=yes] \definecolor[mycolor][c=0.45,m=0.00,y=0.1,k=0.00] \definecolor[colortext][c=1,m=0.00,y=0.3,k=0.3] \starttext \startuniqueMPgraphic{funny} path p ;

[NTG-context] Define a new type section with metafun

2014-12-26 Thread Fabrice Couvreur
Hi, I wish red separation is exactly in the middle of the dial and the title of the section. Then, the line is too long, it should not exceed the boundary of the ellipse. Best regards, Fabrice % macros=mkvi \setuppapersize[A4][A4] \setupcolors[state=start,cmyk=yes,mpcmyk=yes]

[NTG-context] Define a new command from the command \periods[n]

2014-05-20 Thread Fabrice Couvreur
Hi, Is it possible to redefine the command \periods[n] to have a line that goes from the end of the word to the edge of the page without having to play on the number n ? Regards, Fabrice \starttext \startitemize[a][stopper=),style=bold] \item $x\mapsto -x^2+x+1$ : \periods[66] \item $x\mapsto

Re: [NTG-context] Define a new command from the command \periods[n]

2014-05-20 Thread luigi scarso
On Tue, May 20, 2014 at 10:30 AM, Fabrice Couvreur fabrice1.couvr...@gmail.com wrote: Hi, Is it possible to redefine the command \periods[n] to have a line that goes from the end of the word to the edge of the page without having to play on the number n ? Regards, Fabrice \starttext

Re: [NTG-context] Define a new command from the command \periods[n]

2014-05-20 Thread Wolfgang Schuster
Am 20.05.2014 um 10:47 schrieb luigi scarso luigi.sca...@gmail.com: On Tue, May 20, 2014 at 10:30 AM, Fabrice Couvreur fabrice1.couvr...@gmail.com wrote: Hi, Is it possible to redefine the command \periods[n] to have a line that goes from the end of the word to the edge of the page

Re: [NTG-context] Define a new command from the command \periods[n]

2014-05-20 Thread Fabrice
Hello, @ Luigi @Wolfgang Thanks for your suggestions. Since I want to continue my learning ConTeXt, I will use the command \filler[dots]. Can we do the same thing if there is no text in the beginning ? Fabrice ___

Re: [NTG-context] Define a new command from the command \periods[n]

2014-05-20 Thread Wolfgang Schuster
Am 20.05.2014 um 19:50 schrieb Fabrice couvreur.fabr...@wanadoo.fr: Hello, @ Luigi @Wolfgang Thanks for your suggestions. Since I want to continue my learning ConTeXt, I will use the command \filler[dots]. Can we do the same thing if there is no text in the beginning ? You can add

Re: [NTG-context] Define a new command from the command \periods[n]

2014-05-20 Thread Fabrice
Perfect ! thank you, Fabrice ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage :

[NTG-context] \define with more than 9 parameters??

2013-06-06 Thread Jaroslav Hajtmar
Hello ConTeXist. Is there in ConTeXt any dirty trick, which can put more than 9 parameters into macro? I mean for example \define[25]\macrowithtwentyfiveparams{ } I use rarely any trick from Peter Olsak (see below) and I'd like something like that used in ConTeXt. Thanx Jaroslav

Re: [NTG-context] \define with more than 9 parameters??

2013-06-06 Thread Wolfgang Schuster
Am 06.06.2013 um 09:56 schrieb Jaroslav Hajtmar hajt...@gyza.cz: Hello ConTeXist. Is there in ConTeXt any dirty trick, which can put more than 9 parameters into macro? I mean for example \define[25]\macrowithtwentyfiveparams{ } There are a few tricks when you need more then nine

Re: [NTG-context] \define a command with square-bracket arguments

2012-09-28 Thread Sietse Brouwer
Question for the others: What's the difference of \dodoubleargument and \dodoubleempty? I expected \dodoubleargument to throw an error since the arguments are supposed to be mandatory. In MkIV Hans didn’t add this check and in MkII he disabled is for command with three or less argument but

Re: [NTG-context] \define a command with square-bracket arguments

2012-09-28 Thread Hans Hagen
On 28-9-2012 14:41, Sietse Brouwer wrote: Question for the others: What's the difference of \dodoubleargument and \dodoubleempty? I expected \dodoubleargument to throw an error since the arguments are supposed to be mandatory. In MkIV Hans didn’t add this check and in MkII he disabled is for

[NTG-context] \define a command with square-bracket arguments

2012-09-27 Thread Sietse Brouwer
Hi all, As I understand it, \define[2] is preferred over \def#1#2 because it refuses to overwrite existing commands. \define[2]\mycommand{code code code} defines a command to be invoked with \mycommand{...}{...} Can I use \define, or a related command, to define a command that takes

Re: [NTG-context] \define a command with square-bracket arguments

2012-09-27 Thread Thomas A. Schmitz
On 09/27/2012 05:45 PM, Sietse Brouwer wrote: Hi all, As I understand it, \define[2] is preferred over \def#1#2 because it refuses to overwrite existing commands. \define[2]\mycommand{code code code} defines a command to be invoked with \mycommand{...}{...} Can I use \define, or a related

Re: [NTG-context] \define a command with square-bracket arguments

2012-09-27 Thread Marco Patzer
2012-09-27 Sietse Brouwer sbbrou...@gmail.com: Hi Sietse, As I understand it, \define[2] is preferred over \def#1#2 because it refuses to overwrite existing commands. \define overwrites existing commands with pleasure. In contrast to \def it prints a message to the log file: “\mycommand is

Re: [NTG-context] define vs setup

2012-07-26 Thread Hans Hagen
On 26-7-2012 05:21, S Barmeier wrote: You can \setup what you \define|d yourself and \setup what is pre\define|d, but not \setup something that is not \define|d. Maybe ;) it depends .. often it's: \definexx[whatever] \definexx[whatever][settings] \definexx[another][parent]

Re: [NTG-context] define vs setup

2012-07-26 Thread Bill Meahan
On 07/26/2012 04:13 AM, Hans Hagen wrote: On 26-7-2012 05:21, S Barmeier wrote: You can \setup what you \define|d yourself and \setup what is pre\define|d, but not \setup something that is not \define|d. Maybe ;) it depends .. often it's: \definexx[whatever] \definexx[whatever][settings]

Re: [NTG-context] define vs setup

2012-07-26 Thread Marco Patzer
On 2012-07-26 Bill Meahan wmeaha...@gmail.com wrote: Hi Bill, it's a typo: \stopmakup \stopmakeup Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist :

Re: [NTG-context] define vs setup

2012-07-26 Thread Bill Meahan
On 07/26/2012 11:34 AM, Marco Patzer wrote: On 2012-07-26 Bill Meahan wmeaha...@gmail.com wrote: Hi Bill, it's a typo: \stopmakup \stopmakeup Sorry 'bout that. :) I've never been a good typist even though I can dump a lot of text into a file in a short time. It *is* correct in my

Re: [NTG-context] define vs setup

2012-07-26 Thread Mojca Miklavec
On Thu, Jul 26, 2012 at 5:04 PM, Bill Meahan wrote: I really want to use ConTeXt for this one because the layout is (required to be) absolutely identical from one issue to the next. There is one thing that I warmly suggest you to do, and that is making backups of ConTeXt versions that you use

Re: [NTG-context] define vs setup

2012-07-26 Thread Khaled Hosny
On Thu, Jul 26, 2012 at 06:15:31PM +0200, Mojca Miklavec wrote: LaTeX is in a sense way more stable Which is mostly an illusion, packages do change all the time, hyphenation patterns change, fonts change and engines change (even pdfTeX), and unlike ConTeXt backups are much harder to take (short

[NTG-context] define vs setup

2012-07-25 Thread Bill Meahan
I'm confused again. :\ When do you use a \defineSOMETHING instead of \setupSOMETHING ? Must something be \define'ed before it is \setup or is it the other way around or is one required or one not or Reading the manual and wiki just leaves me more confused since examples are given which

Re: [NTG-context] define vs setup

2012-07-25 Thread S Barmeier
You can \setup what you \define|d yourself and \setup what is pre\define|d, but not \setup something that is not \define|d. Maybe ;) Severin On 07/26/2012 12:18 PM, Bill Meahan wrote: I'm confused again. :\ When do you use a \defineSOMETHING instead of \setupSOMETHING ? Must something be

[NTG-context] define macro from xml-attribute

2012-03-16 Thread Meer, H. van der
I would like to accomplish the following in xml processing. node macro=various macro calls and then define the attribute value as a TeX macro. For example, to use this in font switching: node macro=\switchtobodyfont[helvetica] Doing this in the following manner does not work: \startxmlsetups

Re: [NTG-context] define macro from xml-attribute

2012-03-16 Thread Hans Hagen
On 16-3-2012 10:25, Meer, H. van der wrote: I would like to accomplish the following in xml processing. node macro=various macro calls and then define the attribute value as a TeX macro. For example, to use this in font switching:node macro=\switchtobodyfont[helvetica] Doing this in the

[NTG-context] Define `\luatexversion` similar to `\contextversion`

2011-12-03 Thread Paul Menzel
Dear ConTeXt folks, thanks to Robin’s example documents I found out about the following last two commands \Context\ \contextmark\ \contextversion allowing to put the used components and versions into the document. Then I found `\luaversion` to display the version of Lua. But I could

Re: [NTG-context] Define `\luatexversion` similar to `\contextversion`

2011-12-03 Thread Wolfgang Schuster
Am 03.12.2011 um 19:23 schrieb Paul Menzel: Dear ConTeXt folks, thanks to Robin’s example documents I found out about the following last two commands \Context\ \contextmark\ \contextversion allowing to put the used components and versions into the document. Then I found

[NTG-context] \define[1]\command or \define\command[1]? (was: math: command for absolute value: `\define\abs[1]{\lvert #1 \rvert}` throws `\lvert -\Udelimiter`.)

2011-06-05 Thread Paul Menzel
Dear Otared, Am Samstag, den 04.06.2011, 23:59 +0200 schrieb Otared Kavian: I think the error comes from your way of using \define: you use \define\abs[1]{\lvert #1 \rvert} instead of \define[1]\abs{\lvert#1\rvert} the following works fine for me: \starttext

Re: [NTG-context] \define[1]\command or \define\command[1]? (was: math: command for absolute value: `\define\abs[1]{\lvert #1 \rvert}` throws `\lvert -\Udelimiter`.)

2011-06-05 Thread Wolfgang Schuster
Am 05.06.2011 um 12:11 schrieb Paul Menzel: thank you very much for the solution. I took my definition from the Wiki [1]. Could the developers please clarify the correct syntax so that it can be updated in the source or the Wiki. The wiki entry is correct, the syntax is \define[number

Re: [NTG-context] \define...

2010-04-20 Thread Vyatcheslav Yatskovsky
Curiouser and curiouser! cried Alice. :) context has two different versions of \define, there is one in syst-ext.mkii/syst-aux.mkiv which has no parameters but prevents you from overwriting a existing command (there \redefine with allows this) and another one in core-sys.mkii/mkiv which

[NTG-context] \define... (was: Re: Structuring topics)

2010-04-19 Thread Peter Münster
On Mon, Apr 19 2010, Wolfgang Schuster wrote: \starttext \define\hans{hans} \define\hans{taco} \stoptext the output now is 'hans' because \define checks whether a command with the name \hans is already defined Hello Wolfgang, Did you test it? The output is taco here on my system: MTXrun

Re: [NTG-context] \define...

2010-04-19 Thread Wolfgang Schuster
Am 19.04.10 21:15, schrieb Peter Münster: On Mon, Apr 19 2010, Wolfgang Schuster wrote: \starttext \define\hans{hans} \define\hans{taco} \stoptext the output now is 'hans' because \define checks whether a command with the name \hans is already defined Hello Wolfgang, Did you test

Re: [NTG-context] Define tex macro on the context command line

2009-11-12 Thread Hans Hagen
Aditya Mahajan wrote: On Wed, 11 Nov 2009, John Devereux wrote: Hi, Is it possible to define a tex macro on the context command line (MkII)? For example: texexec manual.tex --define Title X99 Operators Manual so that \Title would expand to the appropriate text? You can do that with

[NTG-context] Define tex macro on the context command line

2009-11-11 Thread John Devereux
Hi, Is it possible to define a tex macro on the context command line (MkII)? For example: texexec manual.tex --define Title X99 Operators Manual so that \Title would expand to the appropriate text? (I know about modes I think) -- John Devereux

Re: [NTG-context] Define exercise captions

2009-11-04 Thread Vyatcheslav Yatskovsky
Thank you, Aditya, for help! My further questions: Why after={}or after= does not remove the space between enumeration caption and next paragraph? For example: \defineenumeration[exercise][title=yes, text=Вправа, prefix=yes, prefixset=section, titleleft=, titleright=, after=]

Re: [NTG-context] Define exercise captions

2009-11-04 Thread Aditya Mahajan
On Thu, 5 Nov 2009, Vyatcheslav Yatskovsky wrote: Thank you, Aditya, for help! My further questions: Why after={}or after= does not remove the space between enumeration caption and next paragraph? For example: \defineenumeration[exercise][title=yes, text=Вправа, prefix=yes,

Re: [NTG-context] Define exercise captions

2009-11-04 Thread Vyatcheslav Yatskovsky
Please, disregard my last question about enumeration setup. Now I know more and created definition that works fine for me: \defineenumeration[exercise][title=yes, text=Вправа, prefix=yes, prefixset=section, titleleft=, titleright=, after=, inbetween={\blank[medium]}] The trick is that

Re: [NTG-context] Define exercise captions

2009-11-02 Thread Vyatcheslav Yatskovsky
Hello Aditya, Thanks for help again. However, the result is far from OK. [title=yes, text=Вправа, way=bysection, prefix=yes, width=broad] I use enumeration within subsubsection, namely 1.3.1. If I put prefix=yes, the first exercise is 1.3.1.1. That is, it is numbered within subsubsection,

Re: [NTG-context] Define exercise captions

2009-11-02 Thread Longmin Wang
On Mon, Nov 02, 2009 at 01:31:02PM +0200, Vyatcheslav Yatskovsky wrote: Hello Aditya, Thanks for help again. However, the result is far from OK. [title=yes, text=Вправа, way=bysection, prefix=yes, width=broad] I use enumeration within subsubsection, namely 1.3.1. If I put prefix=yes, the first

Re: [NTG-context] Define exercise captions

2009-11-02 Thread Vyatcheslav Yatskovsky
Hello, I want to be only ExerciseSectionNumber.ExerciseNumber, like 1.1, 1.2, etc. You may try prefixset=section. Thank you, Longmin, for your suggestion, it works! But other problems persist. Hans (or someone else who can fix it), please, look into my minimal example:

Re: [NTG-context] Define exercise captions

2009-11-02 Thread Aditya Mahajan
On Tue, 3 Nov 2009, Vyatcheslav Yatskovsky wrote: Hello, I want to be only ExerciseSectionNumber.ExerciseNumber, like 1.1, 1.2, etc. You may try prefixset=section. Thank you, Longmin, for your suggestion, it works! But other problems persist. Hans (or someone else who can fix it),

Re: [NTG-context] Define exercise captions

2009-11-01 Thread Vyatcheslav Yatskovsky
Hello, I need to define a Exercise command that will enumerate exercises and provide captions. For example, \exercise{Conversion from hex to dec} should produce Exercise 1.1. Conversion from hex to dec. What is the best way to achieve that? Use \definehead or another command?

Re: [NTG-context] Define exercise captions

2009-11-01 Thread Aditya Mahajan
On Sun, 1 Nov 2009, Vyatcheslav Yatskovsky wrote: Hello, I need to define a Exercise command that will enumerate exercises and provide captions. For example, \exercise{Conversion from hex to dec} should produce Exercise 1.1. Conversion from hex to dec. What is the best way

[NTG-context] Define exercise captions

2009-10-31 Thread Vyatcheslav Yatskovsky
Hello, I need to define a Exercise command that will enumerate exercises and provide captions. For example, \exercise{Conversion from hex to dec} should produce Exercise 1.1. Conversion from hex to dec. What is the best way to achieve that? Use \definehead or another command? Best

[NTG-context] define font | font with name Delicious-Roman is not found

2009-05-28 Thread Nicolas Girard
Hi all, I'm using the latest beta of context minimals, rsynced over a TeXlive 2008 on ubuntu. LuaTeX is Version beta-0.40.1-2009050920 (Web2C 7.5.7) MTXrun is TDS Runner Tool 1.22 ConTeXt is 2009.05.28 14:36 $ mtxrun --script fonts --list|grep Delicious gives: deliciousbold

Re: [NTG-context] define font | font with name Delicious-Roman is not found

2009-05-28 Thread Wolfgang Schuster
Am 28.05.2009 um 17:59 schrieb Nicolas Girard: Hi all, I'm using the latest beta of context minimals, rsynced over a TeXlive 2008 on ubuntu. [...] Running the following file is okay: \starttext \font\Myfont=/usr/local/share/fonts/d/delicious_roman.otf at 24pt \Myfont Hello, world

Re: [NTG-context] define an incremental personal bullet of item

2009-05-27 Thread dalyoung
Dear Hans, Thank you for your code. I tested it using ConTeXt and LuaTeX, but I got following error. (/Users/graph/ConTeXtBeta/tex/texmf-context/tex/context/base/pdfr- def.tex) (./test-lua.tuo) systems : begin file test-lua at line 2 ! Argument of \MyCircledNumber has an

Re: [NTG-context] define an incremental personal bullet of item

2009-05-27 Thread Willi Egger
Hi, It works here with: This is LuaTeX, Version beta-0.40.1-2009050813 (Web2C 7.5.7) ConTeXt ver: 2009.05.26 17:57 MKIV fmt: 2009.5.26 int: english/ english KR Willi On May 27, 2009, at 3:22 PM, dalyoung wrote: Dear Hans, Thank you for your code. I tested it using ConTeXt and LuaTeX,

Re: [NTG-context] define an incremental personal bullet of item

2009-05-27 Thread Peter Rolf
dalyoung schrieb: Dear Hans, Thank you for your code. I tested it using ConTeXt and LuaTeX, but I got following error. (/Users/graph/ConTeXtBeta/tex/texmf-context/tex/context/base/pdfr-def.tex) (./test-lua.tuo) systems : begin file test-lua at line 2 ! Argument of

Re: [NTG-context] define an incremental personal bullet of item

2009-05-27 Thread Dalyoung
Thank you for the checking. I typed the text and run it. At this time, it worked. There may be a garbage attached during the process of copy and paste. By the way, is it possible to modify this code to use circled character a, b, c, ...? By using the command \sym{symbol}, I may use them,

[NTG-context] define an incremental personal bullet of item

2009-05-26 Thread polytope
Dear all, I'd like to use circled number 1, circled number 2, ... as bullets of itemized block. There is an explanation how to define a personal bullet in the manual. For each \item the same bullet is used. But I want bullets automatically changed to the next character in unicode table.

Re: [NTG-context] define an incremental personal bullet of item

2009-05-26 Thread Hans Hagen
polytope wrote: Dear all, I'd like to use circled number 1, circled number 2, ... as bullets of itemized block. There is an explanation how to define a personal bullet in the manual. For each \item the same bullet is used. But I want bullets automatically changed to the next character in

[NTG-context] \define was: Section format using /def

2009-02-05 Thread Wolfgang Schuster
Am 05.02.2009 um 19:45 schrieb Michael Bynum: Ah, I think I see. So \define[1]\mysectionhead{\bfa \WORD{\underbar{#1}}} would also be valid. Is \define a context equivalent to the \def command for tex? I couldn't find much documentation on it. \define is ConTeXt's equivalent to \newcommand

[NTG-context] define command

2008-11-14 Thread Alan STONE
Hi, For example \define\somemacro[3]{...} gets invoked with \somemacro{#1}{#2}{#3} How do you get rid of those repeating pesky curly brackets and invoke a user defined macro with \somemacro{#1,#2,#3} instead ? :O) -- Best, Alan * TeX engine = LuaTeX * ConTeXt minimals ver: 2008.56.06

Re: [NTG-context] define command

2008-11-14 Thread Wolfgang Schuster
Am 14.11.2008 um 12:58 schrieb Alan STONE: Hi, For example \define\somemacro[3]{...} gets invoked with \somemacro{#1}{#2}{#3} How do you get rid of those repeating pesky curly brackets and invoke a user defined macro with \somemacro{#1,#2,#3} \starttext \def\somemacro#1%

Re: [NTG-context] define command

2008-11-14 Thread luigi scarso
On Fri, Nov 14, 2008 at 12:58 PM, Alan STONE [EMAIL PROTECTED]wrote: Hi, For example \define\somemacro[3]{...} gets invoked with \somemacro{#1}{#2}{#3} How do you get rid of those repeating pesky curly brackets and invoke a user defined macro with \somemacro{#1,#2,#3} Not what

Re: [NTG-context] define command

2008-11-14 Thread Aditya Mahajan
On Fri, 14 Nov 2008, Alan STONE wrote: Hi, For example \define\somemacro[3]{...} gets invoked with \somemacro{#1}{#2}{#3} How do you get rid of those repeating pesky curly brackets and invoke a user defined macro with \somemacro{#1,#2,#3} instead ? :O) Others have replied how to

Re: [NTG-context] Define doifoneelse

2006-09-11 Thread Peter Münster
On Mon, 11 Sep 2006, Aditya Mahajan wrote: \doifoneelse{1}{a}{b} gives a \doifoneelse{1.5}{a}{b} gives b \doifonelese{string}{a}{b} gives b Can someone suggest how to define this? \def\doifoneelse#1#2#3{\doifelse{1}{#1}{#2}{#3}} \starttext \doifoneelse{1}{a}{b} gives a

Re: [NTG-context] Define doifoneelse

2006-09-11 Thread Aditya Mahajan
On Mon, 11 Sep 2006, Peter M?nster wrote: On Mon, 11 Sep 2006, Aditya Mahajan wrote: \doifoneelse{1}{a}{b} gives a \doifoneelse{1.5}{a}{b} gives b \doifonelese{string}{a}{b} gives b Can someone suggest how to define this? \def\doifoneelse#1#2#3{\doifelse{1}{#1}{#2}{#3}} Thanks Peter,

Re: [NTG-context] Define doifoneelse

2006-09-11 Thread Hans Hagen
Aditya Mahajan wrote: On Mon, 11 Sep 2006, Peter M�nster wrote: On Mon, 11 Sep 2006, Aditya Mahajan wrote: \doifoneelse{1}{a}{b} gives a \doifoneelse{1.5}{a}{b} gives b \doifonelese{string}{a}{b} gives b Can someone suggest how to define this?

[NTG-context] Define doifoneelse

2006-09-10 Thread Aditya Mahajan
Hi, I want to define a macro, \doifoneelse, that checks if the first argument is 1 or not. It should work for decimals and strings also. So, \doifoneelse{1}{a}{b} gives a \doifoneelse{1.5}{a}{b} gives b \doifonelese{string}{a}{b} gives b Can someone suggest how to define this? Thanks,

  1   2   >