[NTG-context] bug with setuplist alternative?
Hi there, in the following sample: \setuplist[chapter][alternative=g] \setuplist[section][alternative=d] \starttext \completecontent \chapter{chapter} \section{section} \chapter{chapter} \subsection{subsection} I get the second chapter on the same line as the section. I'm afraid this might be a bug. BTW, how can I get a table of contents with heading that doesn't contain subsections? The wiki only offers the option \placecontent[chapter,section], but I need the heading. Thanks for your help, Pablo -- http://www.oudeis.tk ___ 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 : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Canonical way to escape the square brackets?
Wolfgang Schuster writes: > Am 28.01.2012 um 16:41 schrieb Marco Pessotto: > >> Dear list, >> >> I swear I searched the internet, but I guess the terms are too generic. >> The question is: is there a safe way to escape the square brackets, >> preventing them to be eaten by the previous command? For example: > No, there isn’t but you can stop ConTeXt to look for a optional with a \relax > after the command , e.g. \item\relax. > Ok, thanks a lot. Cheers -- Marco ___ 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 : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Scaling of math glyphs
On Sat, Jan 28, 2012 at 01:16:18PM -0500, Aditya Mahajan wrote: > Hi, > > In my opinion, the size of the \sum in Cambria in display style is > too large. I know that this is a design decision on part of Cambria > designers, but I am wondering if I can scale the glyph down. > > I made a local copy of cambria-math.lfg and changed > FixDisplayOperatorMinHeight to > > local function FixDisplayOperatorMinHeight(value,target,original) > table.print(target) > local o = original.mathparameters.DisplayOperatorMinHeight > if o < 2240 then > return 2240.0 * target.parameters.factor > else > return 0.8 * value -- already scaled > end > end > > This works, but as expected, it scales down both \sum and \int. Is > it possible to just change the height of \sum? AFAIK, no, this parameter affects all display big operators, however you can control it from TeX end using ‘\Umathoperatorsize’ primitive, so may be you can use some TeX grouping hackary to limit its effect. Regards, Khaled ___ 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 : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Scaling of math glyphs
Hi, In my opinion, the size of the \sum in Cambria in display style is too large. I know that this is a design decision on part of Cambria designers, but I am wondering if I can scale the glyph down. I made a local copy of cambria-math.lfg and changed FixDisplayOperatorMinHeight to local function FixDisplayOperatorMinHeight(value,target,original) table.print(target) local o = original.mathparameters.DisplayOperatorMinHeight if o < 2240 then return 2240.0 * target.parameters.factor else return 0.8 * value -- already scaled end end This works, but as expected, it scales down both \sum and \int. Is it possible to just change the height of \sum? Thanks, Aditya ___ 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 : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Canonical way to escape the square brackets?
Am 28.01.2012 um 16:41 schrieb Marco Pessotto: > > Dear list, > > I swear I searched the internet, but I guess the terms are too generic. > The question is: is there a safe way to escape the square brackets, > preventing them to be eaten by the previous command? For example: > > \item [this should be in brackets] > > My solution is: > > \define\leftsquarebracket{[} > \define\rightsquarebracket{]} > > \item \leftsquarebracket this should be in brackets\rightsquarebracket > > I'm pretty sure there is already a built-in command for them, so I'm > asking the list. No, there isn’t but you can stop ConTeXt to look for a optional with a \relax after the command , e.g. \item\relax. Wolfgang ___ 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 : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Canonical way to escape the square brackets?
Dear list, I swear I searched the internet, but I guess the terms are too generic. The question is: is there a safe way to escape the square brackets, preventing them to be eaten by the previous command? For example: \item [this should be in brackets] My solution is: \define\leftsquarebracket{[} \define\rightsquarebracket{]} \item \leftsquarebracket this should be in brackets\rightsquarebracket I'm pretty sure there is already a built-in command for them, so I'm asking the list. Thanks in advance. Best regards -- Marco ___ 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 : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Stretch option for fonts doesn’t work
Hi, the “stretch” option for \definefontfeature doesn’t work anymore for “slant” does work. \starttext \definefontfeature[slanted] [default][slant=.25] \definefontfeature[stretched][default][stretch=2] \start \definedfont[Serif*slanted at 20pt] \ruledhbox{Test!} \stop \start \definedfont[Serif*stretched at 20pt] \ruledhbox{Test!} \stop \stoptext Wolfgang ___ 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 : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Gnuplot and the dollar sign
Thank you for your reply! I was actually able to find a workaround for my problem at least in this case. Digging through the gnuplot documentation revealed that instead of using $n to refer to the column n in a data file one can also use column(n). The ConTeXt parser accepts this of course. Janne Junnila On Sat, Jan 28, 2012 at 12:23 PM, Mojca Miklavec wrote: > On Sat, Jan 28, 2012 at 09:16, Janne Junnila wrote: >> Hi! >> >> I'm having trouble while trying to make the following work: >> >> \usemodule[gnuplot] >> >> \startGNUPLOTscript[distr_simple_1] >> >> plot "2_simple_1.out" using >> (0.01*floor($1/0.01)):(0.870456/10/0.01) smooth frequency with >> boxes, (cos(2*x)*sin(0.5*x) + 1)*exp(-0.4*x) >> \stopGNUPLOTscript >> >> \useGNUPLOTgraphic[distr_simple_1] >> >> The problem seems to be that the single dollar sign gets interpreted >> as the start of a math environment. > > On one hand that is the intended default behaviour. It is very handy > to be able to use > > plot (cos(2*x)*sin(0.5*x) + 1)*exp(-0.4*x) title '$\left(\cos(2x) > \cdot \sin(0.5x)\right+1) e^{-0.4x}$' > > to get nice result. On the other hand I'm not exactly sure how to > reliably print whatever gets passed to ConTeXt. The only option that > comes to my mind is some modification of > \sometxt{\starttyping floor($1/0.01) \stoptyping} > where \starttyping would generate a single line. But one would need a > special option for that. (The command \type{...} would not be reliable > enough: in MKII it stops working at the second underscore and it is a > problem if one has curly braces in text.) > >> I tried to look through the source >> code to see how I could tell context to bypass checking for certain >> characters, but I couldn't figure it out. > > Currently the only option is to provide an explicit title. But if > there's a request to support literal output and if somebody can help > me figure out how exactly I should output the given text into > metapost, so that it will be reliably printed out literally. > > Mojca > ___ > 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 : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ 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 : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Gnuplot and the dollar sign
On Sat, Jan 28, 2012 at 09:16, Janne Junnila wrote: > Hi! > > I'm having trouble while trying to make the following work: > > \usemodule[gnuplot] > > \startGNUPLOTscript[distr_simple_1] > > plot "2_simple_1.out" using > (0.01*floor($1/0.01)):(0.870456/10/0.01) smooth frequency with > boxes, (cos(2*x)*sin(0.5*x) + 1)*exp(-0.4*x) > \stopGNUPLOTscript > > \useGNUPLOTgraphic[distr_simple_1] > > The problem seems to be that the single dollar sign gets interpreted > as the start of a math environment. On one hand that is the intended default behaviour. It is very handy to be able to use plot (cos(2*x)*sin(0.5*x) + 1)*exp(-0.4*x) title '$\left(\cos(2x) \cdot \sin(0.5x)\right+1) e^{-0.4x}$' to get nice result. On the other hand I'm not exactly sure how to reliably print whatever gets passed to ConTeXt. The only option that comes to my mind is some modification of \sometxt{\starttyping floor($1/0.01) \stoptyping} where \starttyping would generate a single line. But one would need a special option for that. (The command \type{...} would not be reliable enough: in MKII it stops working at the second underscore and it is a problem if one has curly braces in text.) > I tried to look through the source > code to see how I could tell context to bypass checking for certain > characters, but I couldn't figure it out. Currently the only option is to provide an explicit title. But if there's a request to support literal output and if somebody can help me figure out how exactly I should output the given text into metapost, so that it will be reliably printed out literally. Mojca ___ 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 : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Gnuplot and the dollar sign
Hi! I'm having trouble while trying to make the following work: \usemodule[gnuplot] \startGNUPLOTscript[distr_simple_1] plot "2_simple_1.out" using (0.01*floor($1/0.01)):(0.870456/10/0.01) smooth frequency with boxes, (cos(2*x)*sin(0.5*x) + 1)*exp(-0.4*x) \stopGNUPLOTscript \useGNUPLOTgraphic[distr_simple_1] The problem seems to be that the single dollar sign gets interpreted as the start of a math environment. I tried to look through the source code to see how I could tell context to bypass checking for certain characters, but I couldn't figure it out. Thanks for any hints! Janne Junnila ___ 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 : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___