Re: [NTG-context] Text background that spans the width of the page
Hi Hans, On Tue, May 06, 2014 at 09:29:32PM +0200, Hans Hagen wrote: On 5/2/2014 5:59 PM, Darksair wrote: Hi all, I would like to have a colored horizontal stripe as background for one line of text. Sort of like what textbackground does, but I want it to span the whole \paperwidth, instead of just \textwidth. At the end of the day, I would use it to style for example my section heads, or to highlight one specific \item. What’s the best way to do it? you can use textbackgrounds and plug in some mp code that extends into the margins ... it depends a bit on what 'line' means here \startuniqueMPgraphic{whatever} fill OverlayBox leftenlarged BackSpace rightenlarged CutSpace withcolor OverlayColor ; setbounds currentpicture to OverlayBox enlarged max(BackSpace,CutSpace) ; \stopuniqueMPgraphic \defineoverlay[whatever][\uniqueMPgraphic{whatever}] \framed [background=whatever, backgroundcolor=green, frame=off, width=\textwidth] {test}% Thank you for this interesting solution! I didn’t know one could do that with Metapost. This does exactly what I want. -- Darksair http://darksair.org/ http://twitter.com/#!/MetroWind | http://about.me/darksair http://www.last.fm/user/Darksair ___ 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] Some problems with a new style for the sections
You need to use \section to type a section head. Also I think you are better off with \define[2]\MySectionCommand. Using \def issues some errors. On Sun, May 04, 2014 at 01:21:16PM +0200, Fabrice Couvreur wrote: Hi, I encounter two problems : - Section numbers are not red ; - Calling the second section does not cause the creation of a new paragraph. Regards, Fabrice \setupcolors[state=start] \def\MySectionCommand#1#2% {\framed [frame=off, width=\textwidth, align={right}, background=color, backgroundcolor=lightgray] {#1\quad#2}} \setuphead[section][command=\MySectionCommand,numbercolor=red] \setupbodyfont[palatino,12pt] \starttext \MySectionCommand{A.}{Définitions} \input knuth \MySectionCommand{1.}{Propriétés} \input knuth ___ 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 ___ -- Darksair http://darksair.org/ http://twitter.com/#!/MetroWind | http://about.me/darksair http://www.last.fm/user/Darksair ___ 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] Text background that spans the width of the page
Hi all, I would like to have a colored horizontal stripe as background for one line of text. Sort of like what textbackground does, but I want it to span the whole \paperwidth, instead of just \textwidth. At the end of the day, I would use it to style for example my section heads, or to highlight one specific \item. What’s the best way to do it? -- Fear is the path to the dark side. Fear leads to anger, Anger leads to hate, Hate leads to suffering ___ 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] Position of integral limits
Thanks, exactly what I need :) On Wed, Apr 30, 2014 at 02:39:20PM +0800, Zhichu Chen wrote: \setupmathematics[integral=nolimits] On Wed, Apr 30, 2014 at 12:54 PM, Darksair chris.cors...@gmail.com wrote: Hi, I notice today that in display math, \int_a^b places a and b completely below and above the integral symbol, rather than offsets them to the right at the bottom and top as LaTeX does by default. I also notice that I can use \int\nolimits to achieve the LaTeX result. Is this the supposed behavior of ConTeXt? Because I remember this was not the case 2 years ago. Also can I somehow let ConTeXt use that \nolimits by default? Thanks. -- Fear is the path to the dark side. Fear leads to anger, Anger leads to hate, Hate leads to suffering ___ 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 ___ -- Best Regards Chen ___ 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 ___ -- Fear is the path to the dark side. Fear leads to anger, Anger leads to hate, Hate leads to suffering ___ 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] How to do font fallback for math?
Hi all, Basically I’m trying to use the Neo Euler font for math. It’s missing some symbols, and I would like to fallback to some other fonts. But I’m having trouble setting up this fallback. For example, % Use lmr to type numbers? \definefontfallback[somefbk][name:lmroman12][0x30-0x39][force=yes] % Trying to use Neo Euler here \starttypescript [math] [myEuler] \definefontsynonym[MathRoman][name:neoeuler][features=math\mathsizesuffix, fallbacks=somefbk] \stoptypescript \starttypescript[Test] \definetypeface[Test][mm][math][myEuler][default][rscale=0.95] \stoptypescript \usetypescript[Test] \setupbodyfont[Test] \starttext \startformula \Omega = \int_0^x \sin 2x\, {\rm d}x \stopformula \stoptext But in the generated PDF, the “0” and “2” are both typed in Euler. What should I do to get them fallback to lmr? Thanks! -- Darksair | http://darksair.org/ HTML emails are *evil*!!! Use the most righteous format---plain text. ___ 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] Position of integral limits
Hi, I notice today that in display math, \int_a^b places a and b completely below and above the integral symbol, rather than offsets them to the right at the bottom and top as LaTeX does by default. I also notice that I can use \int\nolimits to achieve the LaTeX result. Is this the supposed behavior of ConTeXt? Because I remember this was not the case 2 years ago. Also can I somehow let ConTeXt use that \nolimits by default? Thanks. -- Fear is the path to the dark side. Fear leads to anger, Anger leads to hate, Hate leads to suffering ___ 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 ___