Re: [NTG-context] ligature exceptions
On 10/07/2017 01:25 PM, Henning Hraban Ramm wrote: > I rejoiced too early: > While the ligature exception handling works with some of the default > fonts (lm, termes, pagella), it fails with the Alegreya fonts that I’m > using. The Brill fonts don’t work either (http://www.brill.com/about/brill-fonts). \definefontfamily[mainfont][rm][Alegreya] \definefontfamily[otherfont][rm][Brill] \setupbodyfont [mainfont,16pt] \starttext \startTEXpage[offset=1em] \startbuffer falsch: Auflage Kampffront richtig: Au\noligature{fl}age Kamp\noligature{ff}ront \setreplacements[eka] richtig: Auflage Kampffront f ft fl fk fb ff f f\/t f\/l f\/k f\/b f\/f \resetreplacements \stopbuffer \getbuffer \setupbodyfont[times]\getbuffer \setupbodyfont[otherfont]\getbuffer \stopTEXpage \stoptext Both Alegreya and Brill don’t replace the ligature with a single glyph, but replace the first glyph (only, as far as I know). I don’t know which is the way to solve it, but this might be the cause. Just in case it helps, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] issue with external image and PDF/A-3a
On Thu, Oct 5, 2017 at 8:18 PM, Pablo Rodriguez <oi...@gmx.es> wrote: > Dear list, > > I have this minimal sample: > > \setupbackend > [format=PDF/A-3a, >intent=sRGB IEC61966-2.1, >profile={sRGB.icc,default_gray.icc}, >level=0] > > \setuptagging[state=start] > > \setupcolors[cmyk=no] > > \startTEXpage[offset=1em] > \externalfigure[transparent] > \stopTEXpage > \stoptext > > The external figure is available from > http://pdf.ousia.tk/transparent.pdf (and output file at > http://pdf.ousia.tk/transparent-pdf-a-3a.pdf). > > Using veraPDF (http://verapdf.org/), the output document doesn’t comply > with the validation profile requirements. > > As Luigi wisely predicted, external images may be problematic. > > I get one error, because of the color of the external figure: > https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and-3-rules#rule-6243-2. > > The PDF object in question is the following: > > 12 0 obj > << > /Type /XObject > /Subtype /Form > /FormType 1 > /BBox [ 0 0 316.896 215.5669 ] > /Group << > /Type /Group > /S /Transparency > /I true > /CS /DeviceRGB > >> > /Resources 21 0 R > /Length 71 > >> > stream > q > 0.188235 0.392157 0 rg /a0 gs > 28.348 187.219 260.203 -158.871 re f > Q > endstream > endobj > > Well, this is a minimal sample, but my real document is much bigger. Is > there any way to convert the stream to something that ConTeXt can handle > directly? hm, the only reliable way that I know w is to convert it to a flattened png $> convert transparent.pdf -density 300 -colorspace RGB -flatten transparent.png -- luigi ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] issue with external image and PDF/A-3a
Dear list, I have this minimal sample: \setupbackend [format=PDF/A-3a, intent=sRGB IEC61966-2.1, profile={sRGB.icc,default_gray.icc}, level=0] \setuptagging[state=start] \setupcolors[cmyk=no] \startTEXpage[offset=1em] \externalfigure[transparent] \stopTEXpage \stoptext The external figure is available from http://pdf.ousia.tk/transparent.pdf (and output file at http://pdf.ousia.tk/transparent-pdf-a-3a.pdf). Using veraPDF (http://verapdf.org/), the output document doesn’t comply with the validation profile requirements. As Luigi wisely predicted, external images may be problematic. I get one error, because of the color of the external figure: https://github.com/veraPDF/veraPDF-validation-profiles/wiki/PDFA-Parts-2-and-3-rules#rule-6243-2. The PDF object in question is the following: 12 0 obj << /Type /XObject /Subtype /Form /FormType 1 /BBox [ 0 0 316.896 215.5669 ] /Group << /Type /Group /S /Transparency /I true /CS /DeviceRGB >> /Resources 21 0 R /Length 71 >> stream q 0.188235 0.392157 0 rg /a0 gs 28.348 187.219 260.203 -158.871 re f Q endstream endobj Well, this is a minimal sample, but my real document is much bigger. Is there any way to convert the stream to something that ConTeXt can handle directly? Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Stixtwo spacing between upright integrals and lower limits
On 10/3/2017 9:40 PM, Mikael P. Sundqvist wrote: Dear Hans (and others), In the tex stackexchange chat today we were discussing the stix two fonts, and in particular the spacing between the integral sign and the lower bound. It is known that this was way to big before (see https://tex.stackexchange.com/q/327710/52406), but it seems that it is still too big, at least if one uses the upright version. Judge yourself from the example file at the end of this email (result attached). well, normally i don't care too much about it as it's a font design property and a designers choice I made a bug report (see https://sourceforge.net/p/stixfonts/tracking/95/) but Ulrike Fischer said that it could take time to get it fixed, and that you Hans made a fix for another bug (https://sourceforge.net/p/stixfonts/tracking/86/) in the fontloader. Can you do that for this one as well? During the discussion Harald Hanche-Olsen came up with the following "quick fix" for LuaLaTeX: \usepackage{luatexbase,luacode} \begin{luacode} local patch_stixmath = function (fontdata) if fontdata.psname == "STIXTwoMath" then fontdata.characters[983352]["italic"]=3*fontdata.characters[983352]["italic"] end end luatexbase.add_to_callback ( "luaotfload.patch_font", patch_stixmath, "change_stixmath" ) \end{luacode} I don't know if this is the way to go, but I thought I should include it. no it's not the way to go (in context) but i cannot speak for latex Best regards, Mikael %%% TEST FILE %%% \setupbodyfont[stixtwo] \setupmathematics[ integral=nolimits, ] \startTEXpage[offset=3bp] With slanted integral: \startformula \int_0^\pi \sin x\,dx=2. \stopformula \setupmathematics[stylealternative={upright}] With upright integral: \startformula \int_0^\pi \sin x\,dx=2. \stopformula \stopTEXpage i'll add (hopefully robust) patch code to the goodie file also, i noticed that there's more wrong with stix2 (i bet that that would not have happened if the font was made by the gyre folks as they have a bit more consistent workflow), so i added % \enabletrackers[otf.preparing] % \definefontfeature[mathextra][mathextra][fixitalics=true] to the next beta, not enabled by default because one never knows what side effects occur Hans ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Stixtwo spacing between upright integrals and lower limits
Dear Hans (and others), In the tex stackexchange chat today we were discussing the stix two fonts, and in particular the spacing between the integral sign and the lower bound. It is known that this was way to big before (see https://tex.stackexchange.com/q/327710/52406), but it seems that it is still too big, at least if one uses the upright version. Judge yourself from the example file at the end of this email (result attached). I made a bug report (see https://sourceforge.net/p/stixfonts/tracking/95/) but Ulrike Fischer said that it could take time to get it fixed, and that you Hans made a fix for another bug ( https://sourceforge.net/p/stixfonts/tracking/86/) in the fontloader. Can you do that for this one as well? During the discussion Harald Hanche-Olsen came up with the following "quick fix" for LuaLaTeX: \usepackage{luatexbase,luacode} \begin{luacode} local patch_stixmath = function (fontdata) if fontdata.psname == "STIXTwoMath" then fontdata.characters[983352]["italic"]=3*fontdata.characters[983352]["italic"] end end luatexbase.add_to_callback ( "luaotfload.patch_font", patch_stixmath, "change_stixmath" ) \end{luacode} I don't know if this is the way to go, but I thought I should include it. Best regards, Mikael %%% TEST FILE %%% \setupbodyfont[stixtwo] \setupmathematics[ integral=nolimits, ] \startTEXpage[offset=3bp] With slanted integral: \startformula \int_0^\pi \sin x\,dx=2. \stopformula \setupmathematics[stylealternative={upright}] With upright integral: \startformula \int_0^\pi \sin x\,dx=2. \stopformula \stopTEXpage ctx-listexample39.pdf Description: Adobe PDF document ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] ligature exceptions
On 09/28/2017 03:54 PM, Hans Hagen wrote: > On 9/28/2017 1:51 PM, Pablo Rodriguez wrote: >> [...] >> I overlooked that \blockligatures[u:fl:age, u:fl:eg] only works if there >> is also a \blockligatures[fl]. >> >> Hans, is this a bug or is it intended? > do you indeed use the latest beta? anyway, the \replaceword mechanism is > a bit more flexible and efficient Hans, after updating to latest beta (from 2017.09.25 19:19 to 2017.09.28 10:07 [I didn’t realize that there was a newer beta yesterday]), it works. Just in case it may be relevant, \blockligatures[u:fl:age] blocks ligatures in auflegt and Aufl. Minimal sample: \starttext \blockligatures[u:fl:age] \definefontfeature[default:b][default][blockligatures=yes] \setupbodyfont[times]\showfontkerns \startTEXpage[offset=1em] fl Auflage auflegt Aufl. \definedfont[Serif*default:b] fl Auflage auflegt Aufl. \stopTEXpage \stoptext Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] ligature exceptions
Am 28.09.2017 um 08:40 schrieb Pablo Rodriguez: using latest beta (from 2017.09.25 19:19), the following sample works: \starttext \blockligatures[fi,ff] \blockligatures[fl] \blockligatures[u:fl:age, u:fl:eg] \definefontfeature[default:b][default][blockligatures=yes] \setupbodyfont[times]\showfontkerns \startTEXpage[offset=1em] fi ff fl Auflage auflegt \definedfont[Serif*default:b] fi ff fl Auflage auflegt How do you catch "Aufl." (the abbreviation of Auflage), which is written _with_ a ligature? Herbert \stopTEXpage \stoptext Just in case it helps, Pablo ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] ligature exceptions
On 09/27/2017 10:27 PM, Henning Hraban Ramm wrote: > Am 2017-09-27 um 18:13 schrieb Hans Hagen <pra...@wxs.nl>: >> [...] >> The \blockligatures[u:fl:age] is new and something of a joke >> experiment ... I can probably come up with a real advanced and robust >> mechanism if motivated enough > > Thank you, I tried it, and while blocking ligatures generally works > (\blockligatures[fl]), the selective blocking > (\blockligatures[u:fl:age]) doesn’t change anything. > Do you have this only in your local version? Hi Hraban, using latest beta (from 2017.09.25 19:19), the following sample works: \starttext \blockligatures[fi,ff] \blockligatures[fl] \blockligatures[u:fl:age, u:fl:eg] \definefontfeature[default:b][default][blockligatures=yes] \setupbodyfont[times]\showfontkerns \startTEXpage[offset=1em] fi ff fl Auflage auflegt \definedfont[Serif*default:b] fi ff fl Auflage auflegt \stopTEXpage \stoptext Just in case it helps, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] ligature exceptions
Am 2017-09-27 um 18:13 schrieb Hans Hagen <pra...@wxs.nl>: > Anyway, in addition to Thomas answer ... we already have this > > \blockligatures[fi,ff] \blockligatures[fl] > \blockligatures[u:fl:age] > > \definefontfeature[default:nolig][default][blockligatures=yes] > > \startTEXpage[offset=1em] >\definedfont[Serif*default:nolig] >fi ff fl auflage >\definedfont[Serif*default] >fi ff fl auflage > \stopTEXpage > > The \blockligatures[u:fl:age] is new and something of a joke experiment ... I > can probably come up with a real advanced and robust mechanism if motivated > enough Thank you, I tried it, and while blocking ligatures generally works (\blockligatures[fl]), the selective blocking (\blockligatures[u:fl:age]) doesn’t change anything. Do you have this only in your local version? Greetlings, Hraban --- http://www.fiee.net http://wiki.contextgarden.net GPG Key ID 1C9B22FD ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] ligature exceptions
On 9/27/2017 5:53 PM, Ulrike Fischer wrote: Am Wed, 27 Sep 2017 15:10:33 +0200 schrieb Tomas Hala: From this point of view, Auf{}lage seems better. This doesn't prevent the ligature: \starttext Auflage Auf{}lage Auf\/lage \stoptext This also documented: "The most important change is that adding a brace group in the middle of a word (like in of{}fice) does not prevent ligature creation." With pdftex it does avoid ligatures, but not reliably. There are cases where the brace group disappear when pdftex tries out hyphenation points. in traditional tex hyphenation is integrated in the par builder which comes after ligaturing and kerning and tex only hyphenated where it 'makes sense' and in the process (multi-pass, going into disc nodes) it will consult (deconstruct / reconstruct) ligatures and at that point it's not known that the input had a {}. Tricks like inserting something in between is also unreliable when done at the wrong time and it can also prevent for instance kerns of hyphenation. Anyway, in addition to Thomas answer ... we already have this \blockligatures[fi,ff] \blockligatures[fl] \blockligatures[u:fl:age] \definefontfeature[default:nolig][default][blockligatures=yes] \startTEXpage[offset=1em] \definedfont[Serif*default:nolig] fi ff fl auflage \definedfont[Serif*default] fi ff fl auflage \stopTEXpage The \blockligatures[u:fl:age] is new and something of a joke experiment ... I can probably come up with a real advanced and robust mechanism if motivated enough Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Fwd: Re: The binomial coefficients do not look optimal
On Sat, Sep 2, 2017 at 6:36 PM, Hans Hagen <pra...@wxs.nl> wrote: > > > > Forwarded Message > Subject: Re: [NTG-context] The binomial coefficients do not look optimal > Date: Sat, 2 Sep 2017 18:35:53 +0200 > From: Hans Hagen <pra...@wxs.nl> > To: Mikael P. Sundqvist <mic...@gmail.com> > > On 9/2/2017 4:58 PM, Mikael P. Sundqvist wrote: > >> On Fri, Sep 1, 2017 at 7:49 PM, Hans Hagen <pra...@wxs.nl > pra...@wxs.nl>> wrote: >> >> On 9/1/2017 1:56 PM, Mikael P. Sundqvist wrote: >> >> Hi, >> >> I stumbled upon this (see the attached file for the result): >> >> %%% Test file >> \setupbodyfont[10pt] >> \starttext >> \startTEXpage[offset=10pt] >> \type{\tbinom{n}{k}}: $\tbinom{n}{k}$, (does not look good, the >> vertical space between $n$ and $k$ is too big) \par >> \type{\binom{n}{k}}: $\binom{n}{k}$ (looks fine to me)\par >> \type{\dbinom{n}{k}}: $\dbinom{n}{k}$ (does not look good, too >> big parenthesis, even for displayed formulas).\par >> \stopTEXpage >> \stoptext >> %%% End of test file >> >> I think something should be changed to get the binomial >> coefficients to look better. In particular I am concerned about >> the rather big parenthesis in displaystyle (and not so much >> about the vertical space issue in \tbinom). >> >> /Mikael >> >> PS The result looked better if I used the lucida fonts, if that >> helps. >> >> This is indeed font dependent. These binoms use a low level tex >> primitive that uses a threshold for steps and that one is part of >> the math parameters of a font and these are not that good for lm. As >> I'm looking into some other low level side effect I was in the mood >> for a configuration option for \setupmathfractions. >> >> So, in the next beta you can get the effects iof the attached: >> >> - relate the threshold to the bodyfont size >> - use normal left/right fences instead >> >> fwiw, cambria and pagella look better too. Upto you to wikify it. >> >> Hans >> >> - >>Hans Hagen | PRAGMA ADE >>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >> tel: 038 477 53 69 | www.pragma-ade.nl >> <http://www.pragma-ade.nl> | www.pragma-pod.nl >> <http://www.pragma-pod.nl> >> - >> >> >> ___ >> If your question is of interest to others as well, please add an >> entry to the Wiki! >> >> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> <http://www.ntg.nl/mailman/listinfo/ntg-context> >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> <https://bitbucket.org/phg/context-mirror/commits/> >> wiki : http://contextgarden.net >> >> ___ >> >> >> Thank you very much, I'm looking forward to the next beta, and I will try >> to wikify it when I have tried it out. Also lucida looks better than latin >> modern does at the moment. >> >> I am a bit confused about the different versions. I would have guessed >> that there was \tbinom and \dbinom and that \binom used one of them >> depending on if one is in text mode or in display mode (just as I would >> expect \frac to behave like \tfrac in text mode and \dfrac in display >> mode). But \tbinom looks very different from \binom in text mode (with more >> vertical space). Is this on purpose? Have I missed something? >> > One can configure those things but the absense of rules and presence of > fences matters too (all kind of inter-this-or-that and > above-below-this-or-that playts a role). > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
[NTG-context] Fwd: Re: The binomial coefficients do not look optimal
Forwarded Message Subject: Re: [NTG-context] The binomial coefficients do not look optimal Date: Sat, 2 Sep 2017 18:35:53 +0200 From: Hans Hagen <pra...@wxs.nl> To: Mikael P. Sundqvist <mic...@gmail.com> On 9/2/2017 4:58 PM, Mikael P. Sundqvist wrote: On Fri, Sep 1, 2017 at 7:49 PM, Hans Hagen <pra...@wxs.nl <mailto:pra...@wxs.nl>> wrote: On 9/1/2017 1:56 PM, Mikael P. Sundqvist wrote: Hi, I stumbled upon this (see the attached file for the result): %%% Test file \setupbodyfont[10pt] \starttext \startTEXpage[offset=10pt] \type{\tbinom{n}{k}}: $\tbinom{n}{k}$, (does not look good, the vertical space between $n$ and $k$ is too big) \par \type{\binom{n}{k}}: $\binom{n}{k}$ (looks fine to me)\par \type{\dbinom{n}{k}}: $\dbinom{n}{k}$ (does not look good, too big parenthesis, even for displayed formulas).\par \stopTEXpage \stoptext %%% End of test file I think something should be changed to get the binomial coefficients to look better. In particular I am concerned about the rather big parenthesis in displaystyle (and not so much about the vertical space issue in \tbinom). /Mikael PS The result looked better if I used the lucida fonts, if that helps. This is indeed font dependent. These binoms use a low level tex primitive that uses a threshold for steps and that one is part of the math parameters of a font and these are not that good for lm. As I'm looking into some other low level side effect I was in the mood for a configuration option for \setupmathfractions. So, in the next beta you can get the effects iof the attached: - relate the threshold to the bodyfont size - use normal left/right fences instead fwiw, cambria and pagella look better too. Upto you to wikify it. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl> | www.pragma-pod.nl <http://www.pragma-pod.nl> - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / http://www.ntg.nl/mailman/listinfo/ntg-context <http://www.ntg.nl/mailman/listinfo/ntg-context> webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ <https://bitbucket.org/phg/context-mirror/commits/> wiki : http://contextgarden.net ___ Thank you very much, I'm looking forward to the next beta, and I will try to wikify it when I have tried it out. Also lucida looks better than latin modern does at the moment. I am a bit confused about the different versions. I would have guessed that there was \tbinom and \dbinom and that \binom used one of them depending on if one is in text mode or in display mode (just as I would expect \frac to behave like \tfrac in text mode and \dfrac in display mode). But \tbinom looks very different from \binom in text mode (with more vertical space). Is this on purpose? Have I missed something? One can configure those things but the absense of rules and presence of fences matters too (all kind of inter-this-or-that and above-below-this-or-that playts a role). Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] The binomial coefficients do not look optimal
On Fri, Sep 1, 2017 at 7:49 PM, Hans Hagen <pra...@wxs.nl> wrote: > On 9/1/2017 1:56 PM, Mikael P. Sundqvist wrote: > >> Hi, >> >> I stumbled upon this (see the attached file for the result): >> >> %%% Test file >> \setupbodyfont[10pt] >> \starttext >> \startTEXpage[offset=10pt] >> \type{\tbinom{n}{k}}: $\tbinom{n}{k}$, (does not look good, the vertical >> space between $n$ and $k$ is too big) \par >> \type{\binom{n}{k}}: $\binom{n}{k}$ (looks fine to me)\par >> \type{\dbinom{n}{k}}: $\dbinom{n}{k}$ (does not look good, too big >> parenthesis, even for displayed formulas).\par >> \stopTEXpage >> \stoptext >> %%% End of test file >> >> I think something should be changed to get the binomial coefficients to >> look better. In particular I am concerned about the rather big parenthesis >> in displaystyle (and not so much about the vertical space issue in \tbinom). >> >> /Mikael >> >> PS The result looked better if I used the lucida fonts, if that helps. >> > This is indeed font dependent. These binoms use a low level tex primitive > that uses a threshold for steps and that one is part of the math parameters > of a font and these are not that good for lm. As I'm looking into some > other low level side effect I was in the mood for a configuration option > for \setupmathfractions. > > So, in the next beta you can get the effects iof the attached: > > - relate the threshold to the bodyfont size > - use normal left/right fences instead > > fwiw, cambria and pagella look better too. Upto you to wikify it. > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > > > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > Thank you very much, I'm looking forward to the next beta, and I will try to wikify it when I have tried it out. Also lucida looks better than latin modern does at the moment. I am a bit confused about the different versions. I would have guessed that there was \tbinom and \dbinom and that \binom used one of them depending on if one is in text mode or in display mode (just as I would expect \frac to behave like \tfrac in text mode and \dfrac in display mode). But \tbinom looks very different from \binom in text mode (with more vertical space). Is this on purpose? Have I missed something? /Mikael ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] The binomial coefficients do not look optimal
On 9/1/2017 1:56 PM, Mikael P. Sundqvist wrote: Hi, I stumbled upon this (see the attached file for the result): %%% Test file \setupbodyfont[10pt] \starttext \startTEXpage[offset=10pt] \type{\tbinom{n}{k}}: $\tbinom{n}{k}$, (does not look good, the vertical space between $n$ and $k$ is too big) \par \type{\binom{n}{k}}: $\binom{n}{k}$ (looks fine to me)\par \type{\dbinom{n}{k}}: $\dbinom{n}{k}$ (does not look good, too big parenthesis, even for displayed formulas).\par \stopTEXpage \stoptext %%% End of test file I think something should be changed to get the binomial coefficients to look better. In particular I am concerned about the rather big parenthesis in displaystyle (and not so much about the vertical space issue in \tbinom). /Mikael PS The result looked better if I used the lucida fonts, if that helps. This is indeed font dependent. These binoms use a low level tex primitive that uses a threshold for steps and that one is part of the math parameters of a font and these are not that good for lm. As I'm looking into some other low level side effect I was in the mood for a configuration option for \setupmathfractions. So, in the next beta you can get the effects iof the attached: - relate the threshold to the bodyfont size - use normal left/right fences instead fwiw, cambria and pagella look better too. Upto you to wikify it. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - math-binom.pdf Description: Adobe PDF document ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] The binomial coefficients do not look optimal
Hi, I stumbled upon this (see the attached file for the result): %%% Test file \setupbodyfont[10pt] \starttext \startTEXpage[offset=10pt] \type{\tbinom{n}{k}}: $\tbinom{n}{k}$, (does not look good, the vertical space between $n$ and $k$ is too big) \par \type{\binom{n}{k}}: $\binom{n}{k}$ (looks fine to me)\par \type{\dbinom{n}{k}}: $\dbinom{n}{k}$ (does not look good, too big parenthesis, even for displayed formulas).\par \stopTEXpage \stoptext %%% End of test file I think something should be changed to get the binomial coefficients to look better. In particular I am concerned about the rather big parenthesis in displaystyle (and not so much about the vertical space issue in \tbinom). /Mikael PS The result looked better if I used the lucida fonts, if that helps. ctx-example28.pdf Description: Adobe PDF document ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Footnote in TABLE isn't rendered anywhere
Hi Pablo, It helped. (The numbers are eaten, but I think the example is important. Thanks for your help. -Brian On 22 August 2017 at 03:21, Pablo Rodriguez <oi...@gmx.es> wrote: > On 08/21/2017 03:15 AM, Brian Ballsun-Stanton wrote: > > Hey folks, trying to be a good citizen, I added (And quoted) this > > message onto the wiki: > > > > http://wiki.contextgarden.net/TABLE#Footnotes_in_TABLEs > > > > I tried for a bit to try to get the example to render, but no footnotes > > would show at all. Anyone have thoughts as to how to get wiki rendering > > to work here? And are there any other examples from this thread that > > should be added? > > Hi Brian, > > footnotes in the wiki are tricky: > > \starttext > \startbuffer > \bTABLE[split=repeat,align=normal] >\bTR\bTD Something\postponenotes\footnote[x]{bla bla}\eTD\eTR >\bTR\bTD Foo\note[x] \eTD\eTR > \eTABLE > \flushnotes > \stopbuffer > \getbuffer > \startTEXpage[offset=1em] > \getbuffer > \stopTEXpage > \stoptext > > The second page is similar to the problem with the wiki. > > This might be a workaround for the wiki (if I’m not wrong): > > \setupnotes[location=text] > \starttext > \bTABLE[split=repeat,align=normal] >\bTR\bTD Something\postponenotes\footnote[x]{bla bla}\eTD\eTR >\bTR\bTD Foo\note[x] \eTD\eTR > \eTABLE > \flushnotes > \placenotes[footnote] > \stoptext > > Just in cases it helps, > > Pablo > -- > http://www.ousia.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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Footnote in TABLE isn't rendered anywhere
On 08/21/2017 03:15 AM, Brian Ballsun-Stanton wrote: > Hey folks, trying to be a good citizen, I added (And quoted) this > message onto the wiki: > > http://wiki.contextgarden.net/TABLE#Footnotes_in_TABLEs > > I tried for a bit to try to get the example to render, but no footnotes > would show at all. Anyone have thoughts as to how to get wiki rendering > to work here? And are there any other examples from this thread that > should be added? Hi Brian, footnotes in the wiki are tricky: \starttext \startbuffer \bTABLE[split=repeat,align=normal] \bTR\bTD Something\postponenotes\footnote[x]{bla bla}\eTD\eTR \bTR\bTD Foo\note[x] \eTD\eTR \eTABLE \flushnotes \stopbuffer \getbuffer \startTEXpage[offset=1em] \getbuffer \stopTEXpage \stoptext The second page is similar to the problem with the wiki. This might be a workaround for the wiki (if I’m not wrong): \setupnotes[location=text] \starttext \bTABLE[split=repeat,align=normal] \bTR\bTD Something\postponenotes\footnote[x]{bla bla}\eTD\eTR \bTR\bTD Foo\note[x] \eTD\eTR \eTABLE \flushnotes \placenotes[footnote] \stoptext Just in cases it helps, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] (again) issues with typing
Dear list, sorry for insisting, but I need to solve this. I have to explain to newcomers (in my Spanish introduction to ConTeXt) what comments are and multiple lines don’t affect the final PDF document. I have the following sample: \setuptyping[lines=yes] \starttext \startTEXpage[offset=1em] \startTEX This is text. % and this is a comment \stopTEX \startXML This is text. \stopXML \startLUA if code=="code" then --this is a comment --[[ this is a multiline comment --]] ---[[ this isn’t a multiline comment --]] \stopLUA \stopTEXpage \stoptext I have three questions: 1. How do I enable that multiple blank lines are displayed as more than a single one? The Lua code contains one, two and three blank lines and they are displayed always as separation from single lines. I thought lines=yes should do that, but it doesn’t. 2. I accidentally discovered that the block comment opening (--[[) removes break with next line. I think it should be fixed. 3. The most important issue is that the whole comment (both markers and content) is displayed with \darkyellow. I wonder why comments aren’t display in typing as in any other editor. All comment characters should be displayed the same, since none of them would affect to the final output. How can I get the same color for the whole comment (again, both markers and content)? Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] comment colors in \typebuffers
Hans, I have the following sample: \starttext \startTEXpage[offset=1em] \startTEX This is text. % and this is a comment \stopTEX \startXML This is text. \stopXML \startLUA if code=="code" then --this is a comment --[[ and this is a multiline comment --]] \stopLUA \stopTEXpage \stoptext All comments are colored in darkyellow, but the issue is that in Lua and TeX only the comment markers are colored, while in XML only the comment content is colored. Because it is basic to display what it won’t affect to the interpretation or compilation of the code, would it be possible that the whole comments (both markers and content) could be colored? Sorry, but in all the code editors I have used in my life, comment coloring involved both markers (or delimiters) and content. Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] (again) \typebufferinline for XML inline code
On 7/31/2017 7:16 PM, Pablo Rodriguez wrote: Hans, sorry for asking for this again, but I really need it to write some documents about ConTeXt. I have the following sample: \startTEXpage[offset=1em] only \type{a b c} one line \stopTEXpage \stoptext \type Would it be possible to have a new \typebufferinline that behaves such as \type above (and has the same options in \setuptype)? The most important part isn’t the suppression of line breaks inside, but avoiding the addition of line breaks after and before the typed buffer. I have been reading buff-ver.mkiv, but I’m afraid I cannot contribute such a patch. This is essential to have \xmlprettyprintinline and \xmlprettyprintinlinetext in order to handle inline code in XML. \startbuffer[foo] foo \bar{crap} \stopbuffer \starttext \typebuffer[foo] \stoptext -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] (again) \typebufferinline for XML inline code
Hans, sorry for asking for this again, but I really need it to write some documents about ConTeXt. I have the following sample: \startTEXpage[offset=1em] only \type{a b c} one line \stopTEXpage \stoptext \type Would it be possible to have a new \typebufferinline that behaves such as \type above (and has the same options in \setuptype)? The most important part isn’t the suppression of line breaks inside, but avoiding the addition of line breaks after and before the typed buffer. I have been reading buff-ver.mkiv, but I’m afraid I cannot contribute such a patch. This is essential to have \xmlprettyprintinline and \xmlprettyprintinlinetext in order to handle inline code in XML. Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] (bug?) itlc removes liga
Hello Pablo, I am very sad to inform you, dear Pablo, that there is the same bug with ligatures on (OS Linux x64) CTX current version: 2016.11.22 aswell as on mtx-context | current version: 2017.07.28 22:51 ...;-) JP - Mail original - De: "Pablo Rodriguez" <oi...@gmx.es> À: "mailing list for ConTeXt users" <ntg-context@ntg.nl> Envoyé: Vendredi 28 Juillet 2017 19:25:03 Objet: [NTG-context] (bug?) itlc removes liga Dear list, using latest beta (2017.07.28 14:24), I have the following sample: \definefontfeature [default] [default] [script=latn, itlc=yes] \setupitaliccorrection [global, always] \definefontfamily [mainfont] [rm] [EB Garamond] \startbuffer[words] office final floor affliction \stopbuffer \startbuffer[ligatures] {\em \getbuffer[words]}\\ {\bi \getbuffer[words]}\\ {\getbuffer[words]}\\ {\bf \getbuffer[words]}\\ \stopbuffer \starttext \startTEXpage[offset=1em] \getbuffer[ligatures] \setupbodyfont[pagella] \getbuffer[ligatures] \setupbodyfont[mainfont] \getbuffer[ligatures] \stopTEXpage \stoptext In Latin Modern italics (and TeX Gyre typefaces), the “ffi” ligature isn’t added. With EB Garamond, italics don’t get the “ffl” ligature. The previous beta from 2017.07.27 16:17 doesn’t have the issue that I describe. Could anyone be so kind to confirm the bug with latest beta? Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] (bug?) itlc removes liga
Dear list, using latest beta (2017.07.28 14:24), I have the following sample: \definefontfeature [default] [default] [script=latn, itlc=yes] \setupitaliccorrection [global, always] \definefontfamily [mainfont] [rm] [EB Garamond] \startbuffer[words] office final floor affliction \stopbuffer \startbuffer[ligatures] {\em \getbuffer[words]}\\ {\bi \getbuffer[words]}\\ {\getbuffer[words]}\\ {\bf \getbuffer[words]}\\ \stopbuffer \starttext \startTEXpage[offset=1em] \getbuffer[ligatures] \setupbodyfont[pagella] \getbuffer[ligatures] \setupbodyfont[mainfont] \getbuffer[ligatures] \stopTEXpage \stoptext In Latin Modern italics (and TeX Gyre typefaces), the “ffi” ligature isn’t added. With EB Garamond, italics don’t get the “ffl” ligature. The previous beta from 2017.07.27 16:17 doesn’t have the issue that I describe. Could anyone be so kind to confirm the bug with latest beta? Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] inline code in XML
Hans, many thanks for having added \xmlprettyprinttext to ConTeXt. I have now another problem with inline code: \definetype[TeX][option=TEX, lines=hyphenated] \starttext \startTEXpage[offset=1em] This is inline code: \TeX{\command[option=value]{final text}} \startXML Inline code: \TeX[option=value]{final text} \stopXML \stopTEXpage \stoptext I need the \TeX command from the first text paragraph, but I have to make it work with an XML source such as the second one (the code element). Would it be possible to have something like \xmlprettyinlinetext (it is essential to have consistent marking in code blocks and in inline code? I have tried to find out a solution, but \typebuffer requires a separate paragraph (or I didn’t know how to disable it). Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Position of prime for derivatives
On Wed, Jun 7, 2017 at 9:57 PM, Mikael P. Sundqvist <mic...@gmail.com> wrote: > On Mon, Jun 5, 2017 at 11:00 PM, Hans Hagen <pra...@wxs.nl> wrote: >> On 6/4/2017 11:06 PM, Otared Kavian wrote: >>> >>> Hi Mikael, >>> >>> Indeed your observation is correct, but using \over instead of \frac >>> yields the correct behavior. Please try the following sample: >>> >>> %%% begin derivatives-prime-4.tex >>> \setupbodyfont[lucidaot] >>> >>> \starttext >>> >>> Compare the position of the prime sign in $f'/g$ in these two expressions: >>> the first one using \type{{... \over ...}} >>> \startformula >>> \left({f \over g}\right)' = {f' \over g} - {f \over g^2}g' >>> \stopformula >>> (which yields a correct position of the prime for $f'$ in $f'/g$), and the >>> second using \type{\frac{...}{...}} >>> \startformula >>> \left(\frac{f}{g} \right)' = \frac{f'}{g} - \frac{f}{g^2} g' >>> \stopformula >>> which yields a prime sign for $f'$ a little bit lower. >>> >>> \stoptext >>> %%% end derivatives-prime-4.tex >> >> The problem with primes is that it's a real mess, conceptually as well as in >> fonts. >> >> - we need to deal with not only one prime but also with double, tripple and >> quadruple ones and they need to become proper unicode symbols too >> >> - fonts have one, two or three sizes, often inconsistent and with funny >> dimensions, onlyt the text size can be trusted >> >> - we cannot use prime as nuclues as it can be combined with a subscript >> >> - but it isn't designed as a script symbol and is already raised (somewhat) >> >> - so we have to deal with a good old tex / fonts / plain inheritance, >> unicode but also want to avoid active character and parsing mess etc. >> >> I tried several approaches and it's hard to come up with a general solution >> that suits all fonts. >> >> Now, the bad is that when we use a superscript with a smashed virtual >> characters we end up in script choice mess with primes being one step too >> small. >> >> So, I decided to follow a different route and extend luatex with a sizeless >> super/subscript feature so that we can handle such weird cases (there might >> be more). >> >> This also means that the primes get larger. I only use the text size prime >> and scale that down for the other sizes i.e. no stty for primes as they are >> such a mess) but we can live with that. >> >> The good news is that it gets better but the bad news is that you have to >> wait till we release luatex 1.0.5 (planned for the ctx meeting but we might >> do an intermediate garden release anyway). >> >> btw, with \frac you get cramped styles and these have different positioning. >> Such is life. >> >> Hans >> >> - >> Hans Hagen | PRAGMA ADE >> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl >> - >> ___ >> 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> ___ > > Again, thanks. > > In 2017.06.06 13:22 something is still not correct. > > The input file > > \startTEXpage[offset=3pt] > $f'(x)\hat{f}'(x)$ > \stopTEXpage > > gives the attached output. The prime of f'(x) looks wrong, the one of > \hat{f}'(x) looks correct. > > /Mikael I was too quick. The example \setupbodyfont[lucidaot,10pt] \setupmathematics[stylealternative={calligraphic}]% to get the normal math lower case italic \startTEXpage[offset=3pt] $f'(x)\hat{f}'(x)$ \stopTEXpage gives bad result in both cases. The first one with wrong size and wrong vertical placement, the second one only with wrong vertical placement (that was not obvious to me for latin modern). /Mikael ctx-listexample31.pdf Description: Adobe PDF document ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Position of prime for derivatives
On Mon, Jun 5, 2017 at 11:00 PM, Hans Hagen <pra...@wxs.nl> wrote: > On 6/4/2017 11:06 PM, Otared Kavian wrote: >> >> Hi Mikael, >> >> Indeed your observation is correct, but using \over instead of \frac >> yields the correct behavior. Please try the following sample: >> >> %%% begin derivatives-prime-4.tex >> \setupbodyfont[lucidaot] >> >> \starttext >> >> Compare the position of the prime sign in $f'/g$ in these two expressions: >> the first one using \type{{... \over ...}} >> \startformula >> \left({f \over g}\right)' = {f' \over g} - {f \over g^2}g' >> \stopformula >> (which yields a correct position of the prime for $f'$ in $f'/g$), and the >> second using \type{\frac{...}{...}} >> \startformula >> \left(\frac{f}{g} \right)' = \frac{f'}{g} - \frac{f}{g^2} g' >> \stopformula >> which yields a prime sign for $f'$ a little bit lower. >> >> \stoptext >> %%% end derivatives-prime-4.tex > > The problem with primes is that it's a real mess, conceptually as well as in > fonts. > > - we need to deal with not only one prime but also with double, tripple and > quadruple ones and they need to become proper unicode symbols too > > - fonts have one, two or three sizes, often inconsistent and with funny > dimensions, onlyt the text size can be trusted > > - we cannot use prime as nuclues as it can be combined with a subscript > > - but it isn't designed as a script symbol and is already raised (somewhat) > > - so we have to deal with a good old tex / fonts / plain inheritance, > unicode but also want to avoid active character and parsing mess etc. > > I tried several approaches and it's hard to come up with a general solution > that suits all fonts. > > Now, the bad is that when we use a superscript with a smashed virtual > characters we end up in script choice mess with primes being one step too > small. > > So, I decided to follow a different route and extend luatex with a sizeless > super/subscript feature so that we can handle such weird cases (there might > be more). > > This also means that the primes get larger. I only use the text size prime > and scale that down for the other sizes i.e. no stty for primes as they are > such a mess) but we can live with that. > > The good news is that it gets better but the bad news is that you have to > wait till we release luatex 1.0.5 (planned for the ctx meeting but we might > do an intermediate garden release anyway). > > btw, with \frac you get cramped styles and these have different positioning. > Such is life. > > Hans > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ Again, thanks. In 2017.06.06 13:22 something is still not correct. The input file \startTEXpage[offset=3pt] $f'(x)\hat{f}'(x)$ \stopTEXpage gives the attached output. The prime of f'(x) looks wrong, the one of \hat{f}'(x) looks correct. /Mikael ctx-listexample31.pdf Description: Adobe PDF document ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?
On Mon, Jun 5, 2017 at 10:24 AM, Mikael P. Sundqvist <mic...@gmail.com> wrote: > Hi, > > this might be a matter of taste. > > look at the output of (attached). In my opinion the first square root > is to "high", while it looks better on the second line. From > setup-en.pdf it looks like the default of \setupmathradical is set to > normal (and not default). I don't understand what normal should mean, > but I think the alternative=default looks better. (The lucida fonts > are loaded in this example, since the effect is more clear for them). > > /Mikael > > \setupbodyfont[lucidaot] > > \starttext > > \startTEXpage[offset=2pt] > \startformula > \sqrt{1+x^2}\neq \frac{1}{\sqrt{1+x^2}} > \stopformula > > %the default setting for mathradical seems to be "normal". We change > it to "normal" > \setupmathradical[sqrt][alternative=default] > > \startformula > \displaystyle\sqrt{1+x^2}\neq \frac{1}{\sqrt{1+x^2}} > \stopformula > \stopTEXpage > > \stoptext Hans, maybe the \setupmathradical[sqrt][alternative=default] was not so successful after all. Or maybe this is a bug: %%% start of test file \setupmathradical[sqrt][alternative=default] \starttext \startformula \sqrt{1+\Bigl(\frac{f(x_k)-f(x_{k-1})}{x_k-x_{k-1}}\Bigr)^2} \stopformula \stoptext %%% stop of test file The numerator looks too small in my opinion. Compiled with 2017.06.06 13:22. /Mikael ctx-example22.pdf Description: Adobe PDF document ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] mathradical defaults to "normal", should it perhaps be "default"?
Hi, this might be a matter of taste. look at the output of (attached). In my opinion the first square root is to "high", while it looks better on the second line. From setup-en.pdf it looks like the default of \setupmathradical is set to normal (and not default). I don't understand what normal should mean, but I think the alternative=default looks better. (The lucida fonts are loaded in this example, since the effect is more clear for them). /Mikael \setupbodyfont[lucidaot] \starttext \startTEXpage[offset=2pt] \startformula \sqrt{1+x^2}\neq \frac{1}{\sqrt{1+x^2}} \stopformula %the default setting for mathradical seems to be "normal". We change it to "normal" \setupmathradical[sqrt][alternative=default] \startformula \displaystyle\sqrt{1+x^2}\neq \frac{1}{\sqrt{1+x^2}} \stopformula \stopTEXpage \stoptext ctx-listexample34.pdf Description: Adobe PDF document ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Position of prime for derivatives
is has an effect on its >>>> position for characters having a subscript as in >>>> $f_{1}''(x) \neq f''_{1}(x)$ >>>> $f'f''f'’'$ >>>> Best regards: OK >>>> >>>> On 22 May 2017, at 08:51, Mikael P. Sundqvist <mic...@gmail.com> wrote: >>>> >>>> On Sun, May 21, 2017 at 10:29 PM, Otared Kavian <ota...@gmail.com> wrote: >>>> >>>> Hi Mikael, >>>> >>>> I agree with what you are reporting: the current behavior of the \prime >>>> operator is not completely satisfying when using ConTeXt mkiv, while in >>>> mkii >>>> it is the most satisfying (in my opinion…). >>>> >>>> The turn around consisting in using $f^{‘’}$ or $f^{\prime\prime}$, or >>>> even >>>> $f^{{}^{\prime\prime}}$, is not really satisfying either. >>>> >>>> But I think (or I hope that) at some point Hans will fix it in mkiv. >>>> >>>> Best regards: OK >>>> >>>> On 21 May 2017, at 08:14, Mikael P. Sundqvist <mic...@gmail.com> wrote: >>>> […] >>>> >>>> And just for reference, the document below gives the attached pdf, >>>> compiled with lualatex. I think the location of the primes there look >>>> better. Sorry for spamming about this issue, but I think it is >>>> important for all people writing math with ConTeXt. >>>> >>>> /Mikael >>>> >>>> \RequirePackage{luatex85} >>>> \documentclass[border=2pt]{standalone} >>>> >>>> \usepackage{unicode-math} >>>> \setmainfont{LucidaBrightOT} >>>> \setmathfont{LucidaBrightMathOT} >>>> >>>> \begin{document} >>>> $f'f''$ >>>> \end{document} >>>> ___ >>>> 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://context.aanhet.net >>>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>>> 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://context.aanhet.net >>>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>>> wiki : http://contextgarden.net >>>> ___ >>>> >>>> >>>> Otared, thank you for confirmation. I also hope there will be a fix soon. >>>> >>>> In the meantime, I put yet another test file. The location of the >>>> primes depends on the next character (I use, at the moment current >>>> version: 2017.05.15 21:48) >>>> >>>> /Mikael >>>> >>>> \definefontfamily[myface][rm][Lucida Bright OT] >>>> \definefontfamily[myface][mm][Lucida Bright Math OT] >>>> \setupbodyfont[myface,10pt] >>>> \starttext >>>> \startTEXpage[offset=2pt] >>>> $f'(x)f''(x)f'f''$ >>>> \stopTEXpage >>>> \stoptext >>>> ___ >>>> 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://context.aanhet.net >>>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>>> wiki : http://contextgarden.net >>>> ___ >>>> >>>> >>>> ___ >>>> If your question is of interest to others as well, please add an
Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)
On Fri, Jun 2, 2017 at 4:24 PM, Hans Hagen <pra...@wxs.nl> wrote: > On 6/2/2017 10:59 AM, Mikael P. Sundqvist wrote: >> >> Hi! >> >> Now that the bug with primes is fixed in ConTeXt, I wonder if there is >> a way to change the kerning between certain characters in mathematics >> (in case one is not happy with the output from the font)? After >> reading in fonts-mkiv.pdf this is what I came up with: > > > you can also play withj: > > return { > name = "cambria-math", > mathematics = { >kerns = { > [0x1D453] = { > force = true, > topright = { > { > kern = 1000, > }, > }, > bottomright = { > { > kern = 1000, > }, > }, > }, > }, > }, > } > > currently you need to enable this: > > \enabledirectives[fontgoodies.mathkerning] > > keep in mind that some cambria (not all) have such staircase kerns which is > why force is needed in order to overload > >> \startluacode >> fonts.handlers.otf.addfeature { >> name = "kerntest", >> type = "kern", >> data = { >> [0x61] = { [0x62] = -150 }, -- a and b in text >> [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b >> [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis >> } >> } >> \stopluacode >> >> \definefontfeature[kerntest][kerntest=yes] >> >> \definefontfamily[lucidaopentype][rm][Lucida Bright OT] >> \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT] >> >> \setupbodyfont[lucidaopentype,10pt] >> >> >> \startTEXpage[offset=3pt] >> abba $abba f'(x)$ >> >> \addff{kerntest} >> >> abba $abba f'(x)$ >> >> I prefer $f'\mkern-3mu(x)$ >> \stopTEXpage >> >> The output is attached as a png file. As you see the kerning works as >> expected in text mode, but not at all in math mode, even not for the a >> and b (which I hope I entered correctly). >> >> Something like the third line is what I'm after, but not having to use >> \mkern in all places. Is it possible? >> >> /Mikael >> >> PS: This is a cross post of the question >> https://tex.stackexchange.com/q/372857/52406, where I got the >> suggestion to ask on the list. >> >> >> >> >> ___ >> 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> >> ___ >> > > > -- > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands >tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ Thank you Hans, that works. Is there also a similar way to use the "kernpairs" instead of "kerns"? I get no effect, even after adding force = true and \enabledirectives[fontgoodies.mathkerning]. /Mikael ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)
On 6/2/2017 10:59 AM, Mikael P. Sundqvist wrote: Hi! Now that the bug with primes is fixed in ConTeXt, I wonder if there is a way to change the kerning between certain characters in mathematics (in case one is not happy with the output from the font)? After reading in fonts-mkiv.pdf this is what I came up with: you can also play withj: return { name = "cambria-math", mathematics = { kerns = { [0x1D453] = { force = true, topright = { { kern = 1000, }, }, bottomright = { { kern = 1000, }, }, }, }, }, } currently you need to enable this: \enabledirectives[fontgoodies.mathkerning] keep in mind that some cambria (not all) have such staircase kerns which is why force is needed in order to overload \startluacode fonts.handlers.otf.addfeature { name = "kerntest", type = "kern", data = { [0x61] = { [0x62] = -150 }, -- a and b in text [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis } } \stopluacode \definefontfeature[kerntest][kerntest=yes] \definefontfamily[lucidaopentype][rm][Lucida Bright OT] \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT] \setupbodyfont[lucidaopentype,10pt] \startTEXpage[offset=3pt] abba $abba f'(x)$ \addff{kerntest} abba $abba f'(x)$ I prefer $f'\mkern-3mu(x)$ \stopTEXpage The output is attached as a png file. As you see the kerning works as expected in text mode, but not at all in math mode, even not for the a and b (which I hope I entered correctly). Something like the third line is what I'm after, but not having to use \mkern in all places. Is it possible? /Mikael PS: This is a cross post of the question https://tex.stackexchange.com/q/372857/52406, where I got the suggestion to ask on the list. ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)
On Fri, Jun 2, 2017 at 1:39 PM, Mikael P. Sundqvist <mic...@gmail.com> wrote: > On Fri, Jun 2, 2017 at 11:39 AM, Mathias Schickel > <m...@fa.uni-tuebingen.de> wrote: >> Hi Mikael, >> >> math fonts are a bit different from text fonts. This means that you need >> special methods to influence them. Because I once had a similar concern like >> you I asked Hans to implement a way to influence kerning in math fonts >> between certain glyphs. I have attached an lfg-file that shows how to use it. >> >> To enable a goodie file like the one attached you have to define your >> typescript like >> >> \starttypescript [\s!math][cambriaown][\s!all] >> \loadfontgoodies[cambriaown-math] >> \definefontsynonym[\s!MathRoman][Cambria-Math] >> >> [\s!features={\s!math\mathsizesuffix},\s!designsize=\s!auto,\s!goodies=cambriaown-math] >> \stoptypescript >> >> I hope this helps! >> >> Best >> Mathias >> >> >> >> >> >>> Am 02.06.2017 um 10:59 schrieb Mikael P. Sundqvist <mic...@gmail.com>: >>> >>> Hi! >>> >>> Now that the bug with primes is fixed in ConTeXt, I wonder if there is >>> a way to change the kerning between certain characters in mathematics >>> (in case one is not happy with the output from the font)? After >>> reading in fonts-mkiv.pdf this is what I came up with: >>> >>> \startluacode >>> fonts.handlers.otf.addfeature { >>> name = "kerntest", >>> type = "kern", >>> data = { >>> [0x61] = { [0x62] = -150 }, -- a and b in text >>> [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b >>> [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis >>> } >>> } >>> \stopluacode >>> >>> \definefontfeature[kerntest][kerntest=yes] >>> >>> \definefontfamily[lucidaopentype][rm][Lucida Bright OT] >>> \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT] >>> >>> \setupbodyfont[lucidaopentype,10pt] >>> >>> >>> \startTEXpage[offset=3pt] >>> abba $abba f'(x)$ >>> >>> \addff{kerntest} >>> >>> abba $abba f'(x)$ >>> >>> I prefer $f'\mkern-3mu(x)$ >>> \stopTEXpage >>> >>> The output is attached as a png file. As you see the kerning works as >>> expected in text mode, but not at all in math mode, even not for the a >>> and b (which I hope I entered correctly). >>> >>> Something like the third line is what I'm after, but not having to use >>> \mkern in all places. Is it possible? >>> >>> /Mikael >>> >>> PS: This is a cross post of the question >>> https://tex.stackexchange.com/q/372857/52406, where I got the >>> suggestion to ask on the list. >>> ___ >>> 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://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> ___ > > Thank you very much for your reply, Mathias! > > I'm not sure I get it, though. I find that there is already a file > lucida-opentype-math.lfg in the distribution. > > Just experimenting, I added to this file an entry with kernpairs (see > below), to see if I could make a change with a and b (if I cannot > manage that, I don't see how I could get the prime and parenthesis > case to work). > > %%% start of my new lucida-opentype-math.lfg > - kern_250 = { bottomright = { { kern = -250 } }, force = true } > > return { > nam
Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)
On Fri, Jun 2, 2017 at 11:39 AM, Mathias Schickel <m...@fa.uni-tuebingen.de> wrote: > Hi Mikael, > > math fonts are a bit different from text fonts. This means that you need > special methods to influence them. Because I once had a similar concern like > you I asked Hans to implement a way to influence kerning in math fonts > between certain glyphs. I have attached an lfg-file that shows how to use it. > > To enable a goodie file like the one attached you have to define your > typescript like > > \starttypescript [\s!math][cambriaown][\s!all] > \loadfontgoodies[cambriaown-math] > \definefontsynonym[\s!MathRoman][Cambria-Math] > > [\s!features={\s!math\mathsizesuffix},\s!designsize=\s!auto,\s!goodies=cambriaown-math] > \stoptypescript > > I hope this helps! > > Best > Mathias > > > > > >> Am 02.06.2017 um 10:59 schrieb Mikael P. Sundqvist <mic...@gmail.com>: >> >> Hi! >> >> Now that the bug with primes is fixed in ConTeXt, I wonder if there is >> a way to change the kerning between certain characters in mathematics >> (in case one is not happy with the output from the font)? After >> reading in fonts-mkiv.pdf this is what I came up with: >> >> \startluacode >> fonts.handlers.otf.addfeature { >> name = "kerntest", >> type = "kern", >> data = { >> [0x61] = { [0x62] = -150 }, -- a and b in text >> [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b >> [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis >> } >> } >> \stopluacode >> >> \definefontfeature[kerntest][kerntest=yes] >> >> \definefontfamily[lucidaopentype][rm][Lucida Bright OT] >> \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT] >> >> \setupbodyfont[lucidaopentype,10pt] >> >> >> \startTEXpage[offset=3pt] >> abba $abba f'(x)$ >> >> \addff{kerntest} >> >> abba $abba f'(x)$ >> >> I prefer $f'\mkern-3mu(x)$ >> \stopTEXpage >> >> The output is attached as a png file. As you see the kerning works as >> expected in text mode, but not at all in math mode, even not for the a >> and b (which I hope I entered correctly). >> >> Something like the third line is what I'm after, but not having to use >> \mkern in all places. Is it possible? >> >> /Mikael >> >> PS: This is a cross post of the question >> https://tex.stackexchange.com/q/372857/52406, where I got the >> suggestion to ask on the list. >> ___ >> 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ Thank you very much for your reply, Mathias! I'm not sure I get it, though. I find that there is already a file lucida-opentype-math.lfg in the distribution. Just experimenting, I added to this file an entry with kernpairs (see below), to see if I could make a change with a and b (if I cannot manage that, I don't see how I could get the prime and parenthesis case to work). %%% start of my new lucida-opentype-math.lfg - kern_250 = { bottomright = { { kern = -250 } }, force = true } return { name = "lucida-opentype-math", version = "1.00", comment = "Goodies that complement lucida opentype.", author = "Hans Hagen", copyright = "ConTeXt development team", mathematics = { alternates = { italic = { feature = 'ss01', value = 1, comment = "Mathematical Alternative Lowercase Italic" }, arrow= { feature = 'ss02', value = 1, comment = "Mathematical Alternative Smaller Arrows" }, operator = { feature = 'ss03',
Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)
Hi Mikael, math fonts are a bit different from text fonts. This means that you need special methods to influence them. Because I once had a similar concern like you I asked Hans to implement a way to influence kerning in math fonts between certain glyphs. I have attached an lfg-file that shows how to use it. To enable a goodie file like the one attached you have to define your typescript like \starttypescript [\s!math][cambriaown][\s!all] \loadfontgoodies[cambriaown-math] \definefontsynonym[\s!MathRoman][Cambria-Math] [\s!features={\s!math\mathsizesuffix},\s!designsize=\s!auto,\s!goodies=cambriaown-math] \stoptypescript I hope this helps! Best Mathias cambriaown-math.lfg Description: Binary data > Am 02.06.2017 um 10:59 schrieb Mikael P. Sundqvist <mic...@gmail.com>: > > Hi! > > Now that the bug with primes is fixed in ConTeXt, I wonder if there is > a way to change the kerning between certain characters in mathematics > (in case one is not happy with the output from the font)? After > reading in fonts-mkiv.pdf this is what I came up with: > > \startluacode > fonts.handlers.otf.addfeature { > name = "kerntest", > type = "kern", > data = { > [0x61] = { [0x62] = -150 }, -- a and b in text > [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b > [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis > } > } > \stopluacode > > \definefontfeature[kerntest][kerntest=yes] > > \definefontfamily[lucidaopentype][rm][Lucida Bright OT] > \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT] > > \setupbodyfont[lucidaopentype,10pt] > > > \startTEXpage[offset=3pt] > abba $abba f'(x)$ > > \addff{kerntest} > > abba $abba f'(x)$ > > I prefer $f'\mkern-3mu(x)$ > \stopTEXpage > > The output is attached as a png file. As you see the kerning works as > expected in text mode, but not at all in math mode, even not for the a > and b (which I hope I entered correctly). > > Something like the third line is what I'm after, but not having to use > \mkern in all places. Is it possible? > > /Mikael > > PS: This is a cross post of the question > https://tex.stackexchange.com/q/372857/52406, where I got the > suggestion to ask on the list. > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Change kerning between math characters (prime and left parenthesis)
Hi! Now that the bug with primes is fixed in ConTeXt, I wonder if there is a way to change the kerning between certain characters in mathematics (in case one is not happy with the output from the font)? After reading in fonts-mkiv.pdf this is what I came up with: \startluacode fonts.handlers.otf.addfeature { name = "kerntest", type = "kern", data = { [0x61] = { [0x62] = -150 }, -- a and b in text [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis } } \stopluacode \definefontfeature[kerntest][kerntest=yes] \definefontfamily[lucidaopentype][rm][Lucida Bright OT] \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT] \setupbodyfont[lucidaopentype,10pt] \startTEXpage[offset=3pt] abba $abba f'(x)$ \addff{kerntest} abba $abba f'(x)$ I prefer $f'\mkern-3mu(x)$ \stopTEXpage The output is attached as a png file. As you see the kerning works as expected in text mode, but not at all in math mode, even not for the a and b (which I hope I entered correctly). Something like the third line is what I'm after, but not having to use \mkern in all places. Is it possible? /Mikael PS: This is a cross post of the question https://tex.stackexchange.com/q/372857/52406, where I got the suggestion to ask on the list. ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Position of prime for derivatives
current behavior of the \prime >>> operator is not completely satisfying when using ConTeXt mkiv, while in mkii >>> it is the most satisfying (in my opinion…). >>> >>> The turn around consisting in using $f^{‘’}$ or $f^{\prime\prime}$, or even >>> $f^{{}^{\prime\prime}}$, is not really satisfying either. >>> >>> But I think (or I hope that) at some point Hans will fix it in mkiv. >>> >>> Best regards: OK >>> >>> On 21 May 2017, at 08:14, Mikael P. Sundqvist <mic...@gmail.com> wrote: >>> […] >>> >>> And just for reference, the document below gives the attached pdf, >>> compiled with lualatex. I think the location of the primes there look >>> better. Sorry for spamming about this issue, but I think it is >>> important for all people writing math with ConTeXt. >>> >>> /Mikael >>> >>> \RequirePackage{luatex85} >>> \documentclass[border=2pt]{standalone} >>> >>> \usepackage{unicode-math} >>> \setmainfont{LucidaBrightOT} >>> \setmathfont{LucidaBrightMathOT} >>> >>> \begin{document} >>> $f'f''$ >>> \end{document} >>> ___ >>> 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://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> 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://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> wiki : http://contextgarden.net >>> ___ >>> >>> >>> Otared, thank you for confirmation. I also hope there will be a fix soon. >>> >>> In the meantime, I put yet another test file. The location of the >>> primes depends on the next character (I use, at the moment current >>> version: 2017.05.15 21:48) >>> >>> /Mikael >>> >>> \definefontfamily[myface][rm][Lucida Bright OT] >>> \definefontfamily[myface][mm][Lucida Bright Math OT] >>> \setupbodyfont[myface,10pt] >>> \starttext >>> \startTEXpage[offset=2pt] >>> $f'(x)f''(x)f'f''$ >>> \stopTEXpage >>> \stoptext >>> ___ >>> 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://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> 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://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> 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://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> wiki : http://contextgarden.net >>> ___ >> >> Thanks Otared and Mathias! >> >> Hans, just to know, are you working on a fix? Is there anything more >> we can provide? >> >> Best regards, Mikael > > In > > current version: 2017.05.25 12:50 > > all problems I've noticed with primes seem to be gone! Now we can even > write $u''_p$ or $u_p''$. > > Hans, your work and quick fix of this problem is very much appreciated! > > Best regards, Mikael Hi Mikael and Hans, I can confirm that, too: Everything is working very well in the current ConTeXt version. Thank you very much, Hans, for quietly solving all reported issues regarding primes! Best regards Mathias > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Position of prime for derivatives
wrote: >> […] >> >> And just for reference, the document below gives the attached pdf, >> compiled with lualatex. I think the location of the primes there look >> better. Sorry for spamming about this issue, but I think it is >> important for all people writing math with ConTeXt. >> >> /Mikael >> >> \RequirePackage{luatex85} >> \documentclass[border=2pt]{standalone} >> >> \usepackage{unicode-math} >> \setmainfont{LucidaBrightOT} >> \setmathfont{LucidaBrightMathOT} >> >> \begin{document} >> $f'f''$ >> \end{document} >> ___ >> 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> ___ >> >> >> Otared, thank you for confirmation. I also hope there will be a fix soon. >> >> In the meantime, I put yet another test file. The location of the >> primes depends on the next character (I use, at the moment current >> version: 2017.05.15 21:48) >> >> /Mikael >> >> \definefontfamily[myface][rm][Lucida Bright OT] >> \definefontfamily[myface][mm][Lucida Bright Math OT] >> \setupbodyfont[myface,10pt] >> \starttext >> \startTEXpage[offset=2pt] >> $f'(x)f''(x)f'f''$ >> \stopTEXpage >> \stoptext >> ___ >> 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> ___ > > Thanks Otared and Mathias! > > Hans, just to know, are you working on a fix? Is there anything more > we can provide? > > Best regards, Mikael In current version: 2017.05.25 12:50 all problems I've noticed with primes seem to be gone! Now we can even write $u''_p$ or $u_p''$. Hans, your work and quick fix of this problem is very much appreciated! Best regards, Mikael ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] issue with annotation flags
Dear list, I have the following code: \setupinteraction[state=start, color=] \enabledirectives[references.border] \starttext \startTEXpage[offset=1em] \useURL[url1][http://some-url.com]\from[url1] \stopTEXpage \stoptext The annotation code in the PDF file reads: << /Subtype /Link /A 7 0 R /Rect [12.354 10.896 131.607 25.324] /C [0.6 0.6 0.6] /F 4 /Border [0 0 0.5]>> I need to report a bug in a PDF viewer with printing the annotation (in this case, it is only border). The code that generates the annotation is (with some removals): local plus = { -- /F Invisible = 2^0, -- 1 Hidden= 2^1, -- 2 Print = 2^2, -- 3 NoZoom= 2^3, -- 4 NoRotate = 2^4, -- 5 NoView= 2^5, -- 6 ReadOnly = 2^6, -- 7 Locked= 2^7, -- 8 ToggleNoView = 2^8, -- 9 LockedContents= 2^9, -- 10, } I assume that /F is set to NoZoom in the sample above (bit position 4). Acrobat displays the annotation flag set to NoZom. The developers assume that 4 is actually the decimal conversion for a binary number (100, actually bit position 3). So it prints the annotation border in the sample above. It took me a while to understand this (math is all Greek to me). Is there a way that I can set the annotation flag in the sample above to Print (/F 3)? (This would be unambiguous, since only a bit can be set [11 would be an invalid flag value].) Or am I missing something and Acrobat is misbehaving? Sorry for such a weird request, but bug reporting has become extremely complex these days ;-). Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Position of prime for derivatives
gt; \end{document} > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ > > > Otared, thank you for confirmation. I also hope there will be a fix soon. > > In the meantime, I put yet another test file. The location of the > primes depends on the next character (I use, at the moment current > version: 2017.05.15 21:48) > > /Mikael > > \definefontfamily[myface][rm][Lucida Bright OT] > \definefontfamily[myface][mm][Lucida Bright Math OT] > \setupbodyfont[myface,10pt] > \starttext > \startTEXpage[offset=2pt] > $f'(x)f''(x)f'f''$ > \stopTEXpage > \stoptext > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ Thanks Otared and Mathias! Hans, just to know, are you working on a fix? Is there anything more we can provide? Best regards, Mikael ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Position of prime for derivatives
gt; \usepackage{unicode-math} >>>> \setmainfont{LucidaBrightOT} >>>> \setmathfont{LucidaBrightMathOT} >>>> >>>> \begin{document} >>>> $f'f''$ >>>> \end{document} >>>> ___ >>>> 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://context.aanhet.net >>>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>>> 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://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> wiki : http://contextgarden.net >>> ___ >> >> Otared, thank you for confirmation. I also hope there will be a fix soon. >> >> In the meantime, I put yet another test file. The location of the >> primes depends on the next character (I use, at the moment current >> version: 2017.05.15 21:48) >> >> /Mikael >> >> \definefontfamily[myface][rm][Lucida Bright OT] >> \definefontfamily[myface][mm][Lucida Bright Math OT] >> \setupbodyfont[myface,10pt] >> \starttext >> \startTEXpage[offset=2pt] >> $f'(x)f''(x)f'f''$ >> \stopTEXpage >> \stoptext >> ___ >> 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Position of prime for derivatives
Hi Mikael, You are correct, the position of \prime depends on whether there is a next character or not after it, and it seems that this has an effect on its position for characters having a subscript as in $f_{1}''(x) \neq f''_{1}(x)$ $f'f''f'’'$ Best regards: OK > On 22 May 2017, at 08:51, Mikael P. Sundqvist <mic...@gmail.com> wrote: > > On Sun, May 21, 2017 at 10:29 PM, Otared Kavian <ota...@gmail.com> wrote: >> Hi Mikael, >> >> I agree with what you are reporting: the current behavior of the \prime >> operator is not completely satisfying when using ConTeXt mkiv, while in mkii >> it is the most satisfying (in my opinion…). >> >> The turn around consisting in using $f^{‘’}$ or $f^{\prime\prime}$, or even >> $f^{{}^{\prime\prime}}$, is not really satisfying either. >> >> But I think (or I hope that) at some point Hans will fix it in mkiv. >> >> Best regards: OK >> >>> On 21 May 2017, at 08:14, Mikael P. Sundqvist <mic...@gmail.com> wrote: >>> […] >>> >>> And just for reference, the document below gives the attached pdf, >>> compiled with lualatex. I think the location of the primes there look >>> better. Sorry for spamming about this issue, but I think it is >>> important for all people writing math with ConTeXt. >>> >>> /Mikael >>> >>> \RequirePackage{luatex85} >>> \documentclass[border=2pt]{standalone} >>> >>> \usepackage{unicode-math} >>> \setmainfont{LucidaBrightOT} >>> \setmathfont{LucidaBrightMathOT} >>> >>> \begin{document} >>> $f'f''$ >>> \end{document} >>> ___ >>> 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://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> ___ > > Otared, thank you for confirmation. I also hope there will be a fix soon. > > In the meantime, I put yet another test file. The location of the > primes depends on the next character (I use, at the moment current > version: 2017.05.15 21:48) > > /Mikael > > \definefontfamily[myface][rm][Lucida Bright OT] > \definefontfamily[myface][mm][Lucida Bright Math OT] > \setupbodyfont[myface,10pt] > \starttext > \startTEXpage[offset=2pt] > $f'(x)f''(x)f'f''$ > \stopTEXpage > \stoptext > ___ > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Position of prime for derivatives
On Sun, May 21, 2017 at 10:29 PM, Otared Kavian <ota...@gmail.com> wrote: > Hi Mikael, > > I agree with what you are reporting: the current behavior of the \prime > operator is not completely satisfying when using ConTeXt mkiv, while in mkii > it is the most satisfying (in my opinion…). > > The turn around consisting in using $f^{‘’}$ or $f^{\prime\prime}$, or even > $f^{{}^{\prime\prime}}$, is not really satisfying either. > > But I think (or I hope that) at some point Hans will fix it in mkiv. > > Best regards: OK > >> On 21 May 2017, at 08:14, Mikael P. Sundqvist <mic...@gmail.com> wrote: >> […] >> >> And just for reference, the document below gives the attached pdf, >> compiled with lualatex. I think the location of the primes there look >> better. Sorry for spamming about this issue, but I think it is >> important for all people writing math with ConTeXt. >> >> /Mikael >> >> \RequirePackage{luatex85} >> \documentclass[border=2pt]{standalone} >> >> \usepackage{unicode-math} >> \setmainfont{LucidaBrightOT} >> \setmathfont{LucidaBrightMathOT} >> >> \begin{document} >> $f'f''$ >> \end{document} >> ___ >> 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ Otared, thank you for confirmation. I also hope there will be a fix soon. In the meantime, I put yet another test file. The location of the primes depends on the next character (I use, at the moment current version: 2017.05.15 21:48) /Mikael \definefontfamily[myface][rm][Lucida Bright OT] \definefontfamily[myface][mm][Lucida Bright Math OT] \setupbodyfont[myface,10pt] \starttext \startTEXpage[offset=2pt] $f'(x)f''(x)f'f''$ \stopTEXpage \stoptext primfisk.pdf Description: Adobe PDF document ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Position of prime for derivatives
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl >>>> - >>>> >>>> ___ >>>> 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://context.aanhet.net >>>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>>> 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://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> wiki : http://contextgarden.net >>> ___ >>> >>> >>> OK, very good, it seems that we have a working solution and one specific way >>> to write it. I have absolutely nothing against that, but I would like us >>> (me?) to document it, since I think future users might have use of it. Is >>> the math page in the wiki the right place? >>> >>> (It will take some time before I will be able to act. I'm currently >>> travelling with close to no working connection.) >>> >>> /Mikael >> >> I'm sorry, but there seem to still be problems with primes. >> >> Look at the height of the primes in this document (ctx-listexample30.pdf). >> >> >> %\definefallbackfamily [lucidaopentype][mm][Xits >> Math][range={2660,2661,2662,2663,2664,2665,2666,2667}] >> \definefontfamily[lucidaopentype][rm][Lucida Bright OT] >> \definefontfamily[lucidaopentype][ss][Lucida Sans OT] >> \definefontfamily[lucidaopentype][tt][Lucida Sans Typewriter OT] >> \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT] >> >> \setupbodyfont[lucidaopentype,10pt] >> >> \starttext >> Look at $f'$ and $f''$ >> \stoptext >> >> >> If I uncomment the \definefallbackfamily, the result is the one given >> in ctx-listexample30-var.pdf, look at the prime. It is still not >> correct (and the double prime is wrong as in the first example). >> >> /Mikael > > Hi, > > I am now more confused. I tried in different fonts, and the result is > attached. The difference in height of the prime and the double prime > is confusing me. In some fonts the prime is above the double prime, in > some the other way around (the worst is lucida, which perhaps is why I > saw it in the first place). Does someone understand why this is so? Is > it the fonts that are constructed like this? > > /Mikael > > PS The test file I used was the following, with the natural changes in > fonts each time. > > \definefontfamily[myface][rm][TeX Gyre Pagella] > \definefontfamily[myface][mm][TeX Gyre Pagella Math] > \setupbodyfont[myface,10pt] > \starttext > \startTEXpage[offset=2pt] > $f'f''$ > \stopTEXpage > \stoptext And just for reference, the document below gives the attached pdf, compiled with lualatex. I think the location of the primes there look better. Sorry for spamming about this issue, but I think it is important for all people writing math with ConTeXt. /Mikael \RequirePackage{luatex85} \documentclass[border=2pt]{standalone} \usepackage{unicode-math} \setmainfont{LucidaBrightOT} \setmathfont{LucidaBrightMathOT} \begin{document} $f'f''$ \end{document} lltest.pdf Description: Adobe PDF document ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Position of prime for derivatives
>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> 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://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> ___ >> >> >> OK, very good, it seems that we have a working solution and one specific way >> to write it. I have absolutely nothing against that, but I would like us >> (me?) to document it, since I think future users might have use of it. Is >> the math page in the wiki the right place? >> >> (It will take some time before I will be able to act. I'm currently >> travelling with close to no working connection.) >> >> /Mikael > > I'm sorry, but there seem to still be problems with primes. > > Look at the height of the primes in this document (ctx-listexample30.pdf). > > > %\definefallbackfamily [lucidaopentype][mm][Xits > Math][range={2660,2661,2662,2663,2664,2665,2666,2667}] > \definefontfamily[lucidaopentype][rm][Lucida Bright OT] > \definefontfamily[lucidaopentype][ss][Lucida Sans OT] > \definefontfamily[lucidaopentype][tt][Lucida Sans Typewriter OT] > \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT] > > \setupbodyfont[lucidaopentype,10pt] > > \starttext > Look at $f'$ and $f''$ > \stoptext > > > If I uncomment the \definefallbackfamily, the result is the one given > in ctx-listexample30-var.pdf, look at the prime. It is still not > correct (and the double prime is wrong as in the first example). > > /Mikael Hi, I am now more confused. I tried in different fonts, and the result is attached. The difference in height of the prime and the double prime is confusing me. In some fonts the prime is above the double prime, in some the other way around (the worst is lucida, which perhaps is why I saw it in the first place). Does someone understand why this is so? Is it the fonts that are constructed like this? /Mikael PS The test file I used was the following, with the natural changes in fonts each time. \definefontfamily[myface][rm][TeX Gyre Pagella] \definefontfamily[myface][mm][TeX Gyre Pagella Math] \setupbodyfont[myface,10pt] \starttext \startTEXpage[offset=2pt] $f'f''$ \stopTEXpage \stoptext primtest-latinmodern.pdf Description: Adobe PDF document primtest-lucida.pdf Description: Adobe PDF document primtest-neoeuler.pdf Description: Adobe PDF document primtest-pagella.pdf Description: Adobe PDF document primtest-schola.pdf Description: Adobe PDF document primtest-termes.pdf Description: Adobe PDF document primtest-xits.pdf Description: Adobe PDF document ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug with en and em dashes
On 5/14/2017 8:21 PM, Pablo Rodriguez wrote: On 05/11/2017 09:25 PM, Mikael P. Sundqvist wrote: I'm not sure what you see but I attach the resulting file, and I see no problem. $ uname -a Linux hurf 4.8.0-41-generic #44-Ubuntu SMP Fri Mar 3 15:27:17 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux mtx-context | current version: 2017.05.09 10:14 Hi Mikael, sorry for not being accurate enough before (I have just realized it). It is about copying from the generated document (it also happens with your attached PDF file): \starttext \startTEXpage[offset=1em] -- --- – — \stopTEXpage \stoptext Select all, copy and paste it on a pure-text editor. You will get two and four hyphens for en and em dashes, respectively. Could you confirm this? Until very recently, I copied en and em dashes from PDF documents generated by ConTeXt. it has to do with more aggressive tounicode resolution and it happens that lm/gyre fonts have these chars as ligatures; i'll be a bit more restrictive in that case Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug with en and em dashes
On Sun, May 14, 2017 at 8:21 PM, Pablo Rodriguez <oi...@gmx.es> wrote: > On 05/11/2017 09:25 PM, Mikael P. Sundqvist wrote: >> I'm not sure what you see but I attach the resulting file, and I see no >> problem. >> >> $ uname -a >> Linux hurf 4.8.0-41-generic #44-Ubuntu SMP Fri Mar 3 15:27:17 UTC 2017 >> x86_64 x86_64 x86_64 GNU/Linux >> >> mtx-context | current version: 2017.05.09 10:14 > > Hi Mikael, > > sorry for not being accurate enough before (I have just realized it). > > It is about copying from the generated document (it also happens with > your attached PDF file): > > \starttext > \startTEXpage[offset=1em] > -- --- > > – — > \stopTEXpage > \stoptext > > Select all, copy and paste it on a pure-text editor. You will get two > and four hyphens for en and em dashes, respectively. > > Could you confirm this? Until very recently, I copied en and em dashes > from PDF documents generated by ConTeXt. > > Many thanks for your help, > > Pablo > -- > http://www.ousia.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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > ___ Sorry for the misunderstanding. Indeed, I get two and four dashes for en and em dashes respectively. /Mikael -- -- ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug with en and em dashes
On 05/11/2017 09:25 PM, Mikael P. Sundqvist wrote: > I'm not sure what you see but I attach the resulting file, and I see no > problem. > > $ uname -a > Linux hurf 4.8.0-41-generic #44-Ubuntu SMP Fri Mar 3 15:27:17 UTC 2017 > x86_64 x86_64 x86_64 GNU/Linux > > mtx-context | current version: 2017.05.09 10:14 Hi Mikael, sorry for not being accurate enough before (I have just realized it). It is about copying from the generated document (it also happens with your attached PDF file): \starttext \startTEXpage[offset=1em] -- --- – — \stopTEXpage \stoptext Select all, copy and paste it on a pure-text editor. You will get two and four hyphens for en and em dashes, respectively. Could you confirm this? Until very recently, I copied en and em dashes from PDF documents generated by ConTeXt. Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug with en and em dashes
> On 9. May 2017, at 21:10, Pablo Rodriguez <oi...@gmx.es> wrote: > > Dear list, > > using latest beta from 2017.05.09 10:14 with the following sample: > >\starttext >\startTEXpage[offset=1em] >-- --- > >– — >\stopTEXpage >\stoptext > > I get as result: > >-- >-- > > Ligatures aren’t converted and even real en and em dashes are converted > to hyphens. > > Could anyone confirm the issue? Works as expected here, with ConTeXt 2017.05.10 10:41 Best, Tom > > Many thanks for your help, > > Pablo > -- > http://www.ousia.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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] bug with en and em dashes
Dear list, using latest beta from 2017.05.09 10:14 with the following sample: \starttext \startTEXpage[offset=1em] -- --- – — \stopTEXpage \stoptext I get as result: -- -- Ligatures aren’t converted and even real en and em dashes are converted to hyphens. Could anyone confirm the issue? Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] (again) index sorting of accented characters
On 04/28/2017 06:27 PM, Florian Grammel wrote: >>> Have you played with the different "methods" defined in sort-ini.lua, >>> lines 96-103? >> >> Many thanks for your reply, Thomas. >> >> The right values seem to be {zm, zc}. This works fine with Spanish and >> French, […] > > Even with {zm, zc} or any of the predefined methods I don’t really think > it is working completely as expected, even though the problem might just > occur in very special cases: Hi Florian, a simpler sample would be: \mainlanguage[es] \setupregister[language=es, method={zm, zc}] \starttext \startTEXpage[offset=2em] \index{cómodo} \index{comodos} \index{cómoda} \placeindex \stopTEXpage \stoptext I know that "comodos" isn’t a word in Spanish. But it should be the last word in the sorting. > It there a way to get this result with „methods“ or would I need to > modify the sort-rules? I think that sort-lan.lua might be wrong here. I explain why. German ("de-DE") has the following code: replacements = { { "ä", 'ae' }, { "Ä", 'Ae' }, { "ö", 'oe' }, { "Ö", 'Oe' }, { "ü", 'ue' }, { "Ü", 'Ue' }, { "ß", 's' }, }, This is to get Umlaut-forms and eszet sorted as ae, Ae, oe, Oe, ue, Ue and s (which I wonder whether ß shouldn’t be replaced as ss). Austrian German ("de-AT") doesn’t contain these replacements. Umlaut-forms are given different entries. I guess if we need a similar behavior for Spanish, replacements of accented glyphs should be created, such as in: replacements = { { "á", 'a' }, { "Á", 'A' }, { "é", 'e' }, { "É", 'E' }, { "í", 'i' }, { "Í", 'I' }, { "ó", 'o' }, { "Ó", 'O' }, { "ú", 'u' }, { "Ú", 'u' }, { "ü", 'u' }, { "Ü", 'u' }, }, So you get the right word order: cómoda cómodo comodos But Hans has to confirm the issue before. Just in case it helps, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] (again) index sorting of accented characters
>> Have you played with the different "methods" defined in sort-ini.lua, >> lines 96-103? > > Many thanks for your reply, Thomas. > > The right values seem to be {zm, zc}. This works fine with Spanish and > French, […] Even with {zm, zc} or any of the predefined methods I don’t really think it is working completely as expected, even though the problem might just occur in very special cases: \setupregister[method={zm, zc}] \starttext \startTEXpage[offset=2em] \index{káv} \index{kav} \index{káva} \index{kava} \index{káf} \index{kaf} \index{káfa} \index{kafa} \index{kaka} \index{káka} \placeindex[language=es] \stopTEXpage \stoptext gives kaf kafa káf káfa kaka káka kav kava káv káva though I’d think it would be correct/logical to sort: kaf káf kafa káfa kaka káka kav káv kava káva It there a way to get this result with „methods“ or would I need to modify the sort-rules? (The example words are not Spanish, obviously, but Icelandic/Faroese, which I am trying to correct/set up. But I’d imagine that the same would be the desired behaviour for Spanish and languages with similar traditions, too, wouldn’t it?) Best Florian. Florian Grammel Copenhagen, Denmark ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] (again) index sorting of accented characters
Dear list, sorry for bothering again with this issue, but I need to have indices in my documents. I have the following sample: \mainlanguage[es] \setupregister[method=default] \starttext \startTEXpage[offset=1em] \index{ámame}\index{arisco}\index{ándrago} \index{antonia}\index{antón} \placeindex \stopTEXpage \stoptext Word sorting is the following: antonia antón arisco ámame ándrago Right word order is: ámame ándrago antón antonia arisco In Spanish, as in other languages, an accented letter has no different sorting that its unaccented counterpart. I got the right word order adding these replacements in sort-lan.lua: replacements = { { "á", "a" }, { "é", "i"}, { "í", "i" }, { "ó", "o"}, { "ú", "u" }, { "ü", "u" }, }, Could anyone explain me whether this is the right way of doing it? I mean, if this is the way, I have other two patches for other two languages in which I have indices. And if I’m wrong, I would like to know how to get right word sorting in registers. Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] MP & text transparency
Hello, that works fine, thank you! Best regards, Lukas On Mon, 24 Apr 2017 15:39:56 +0200, Thomas A. Schmitz <thomas.schm...@uni-bonn.de> wrote: On 24.04.2017 15:11, Procházka Lukáš Ing. wrote: The rectangle drawn is transparent, which is OK. But the text "Test" is not, is it fully red; why? How to specify text to be partially transparent, too? TIA. Best regards, Lukas Wouldn't it be better to define the transparency in ConTeXt and use it for both text and drawing? Like this: \definecolor [tred] [r=1,g=0,b=0,t=.2,a=1] \startuseMPgraphic{T} newpath rc; rc := fullsquare xyscaled (50mm, 50mm); color col; col := (1.,.1,.1); drawoptions(withcolor \MPcolor{tred}) ; draw rc withpen pencircle scaled (2.5mm) ; label(textext("\setupbodyfont[sans,35mm] \color[tred]{Test}"), (80mm, 50mm)) ; \stopuseMPgraphic \defineoverlay[T][\useMPgraphic{T}] \setupbackgrounds[page][background={foreground,T}] \startTEXpage[width=200mm,height=200mm] \stopTEXpage See ch. 8.2 of the metafun manual. HTH Thomas ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ -- Ing. Lukáš Procházka | mailto:l...@pontex.cz Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 (+420 720 951 172) Fax: +420 244 461 038 ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] MP & text transparency
On 24.04.2017 15:11, Procházka Lukáš Ing. wrote: The rectangle drawn is transparent, which is OK. But the text "Test" is not, is it fully red; why? How to specify text to be partially transparent, too? TIA. Best regards, Lukas Wouldn't it be better to define the transparency in ConTeXt and use it for both text and drawing? Like this: \definecolor [tred] [r=1,g=0,b=0,t=.2,a=1] \startuseMPgraphic{T} newpath rc; rc := fullsquare xyscaled (50mm, 50mm); color col; col := (1.,.1,.1); drawoptions(withcolor \MPcolor{tred}) ; draw rc withpen pencircle scaled (2.5mm) ; label(textext("\setupbodyfont[sans,35mm] \color[tred]{Test}"), (80mm, 50mm)) ; \stopuseMPgraphic \defineoverlay[T][\useMPgraphic{T}] \setupbackgrounds[page][background={foreground,T}] \startTEXpage[width=200mm,height=200mm] \stopTEXpage See ch. 8.2 of the metafun manual. HTH Thomas ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] MP & text transparency
Hello, suppose having the following code: \startuseMPgraphic{T} newpath rc; rc := fullsquare xyscaled (50mm, 50mm); color col; col := (1.,.1,.1); draw rc withpen pencircle scaled (2.5mm) withcolor %col; transparent(1, .4, col); draw thelabel(btex\setupbodyfont[sans,35mm] Test etex, (80mm, 50mm)) withcolor %col transparent(1, .4, col) ; \stopuseMPgraphic \defineoverlay[T][\useMPgraphic{T}] \setupbackgrounds[page][background={foreground,T}] \startTEXpage[width=200mm,height=200mm] \stopTEXpage The rectangle drawn is transparent, which is OK. But the text "Test" is not, is it fully red; why? How to specify text to be partially transparent, too? TIA. Best regards, Lukas -- Ing. Lukáš Procházka | mailto:l...@pontex.cz Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 (+420 720 951 172) Fax: +420 244 461 038 MP-Trans.mkiv Description: Binary data MP-Trans.pdf Description: Adobe PDF document ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Manually scaling math fences
On 3/24/2017 8:24 AM, Aditya Mahajan wrote: On Thu, 23 Mar 2017, Hans Hagen wrote: On 3/8/2017 2:45 AM, Aditya Mahajan wrote: On Tue, 7 Mar 2017, Hans Hagen wrote: \MEAN[delimiter=auto] expands to \left\langle .. \right\langle \MEAN[delimiter=] expands to \langle .. \rangle \MEAN[delimiter=big] expands to \big\langle ... \big\rangle \MEAN[delimiter=Big] expands to \Big\langle ... \Big\rangle \MEAN[delimiter=bigg] expands to \bigg\langle ... \bigg\rangle \MEAN[delimiter=Bigg] expands to \Bigg\langle ... \Bigg\rangle I am not sure whether `delimiter` is the best key. I think that `scale` may be better, but using `scale` for specifying the scaling of math delimiters will be inconsistent with how `scale` is used everywhere else. Another option is to use `alternative` key. it would be something factor=2 or so, not the funny XxXxxxXX kind of flags Sure. factor=(auto|none|1|2|3|4) is also ok (and would be directly mapped to choosemathbig). actually we will hook into a new feature of luatex for specifying the size of delimiters (so no vbox hack) .. factors are multipliers of bodyfontsize \definemathfence [MEAN] [angle] [command=yes, color=blue, factor=2.5] \starttext \startTEXpage \startformula \MEAN[factor=1]{\sum_{i = 1}^n A_i x_i } \hbox{ vs. } \MEAN{ \sum_{i = 1}^n A_i x_i } \hbox{ vs. } \bigg\langle \sum_{i=1}^n A_i x_i \bigg\rangle \stopformula \stopTEXpage \stoptext Thanks. If I understand the code correctly (sorry, haven't tested it yet), factor=, factor=none, and factor=auto all behave the same (all insert \normalleft ... \normalright) i prefer empty to be as before we even had factor i.e. same as auto \ifx\p_factor\empty #2% \else\ifx\p_factor\v!auto #2% \else\ifx\p_factor\v!none #3\s!height\zeropoint\s!depth\zeropoint\s!axis #2% \else \scratchdimen\dimexpr\p_factor\bodyfontsize/2\relax #3\s!height\scratchdimen\s!depth\scratchdimen\s!axis \fi\fi\fi I think that it may be more consistent if factor= and factor=none do not scale the delimited at all. To maintain backward compatibility, the default value of factor can be set to auto. Also what values of factor give scaling equal to \big, \Big, \bigg, and \Bigg? These values are actually somewhat weird and relate to the design size of a font .. derived from plain: 0.85 1.15 1.45 1.75 but ... as these are extensibles a font might have more values. The factor is n times the bodyfontsize (50% above and below the axis) what actually comes out depends on the chosen font Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Manually scaling math fences
On Thu, 23 Mar 2017, Hans Hagen wrote: On 3/8/2017 2:45 AM, Aditya Mahajan wrote: On Tue, 7 Mar 2017, Hans Hagen wrote: \MEAN[delimiter=auto] expands to \left\langle .. \right\langle \MEAN[delimiter=] expands to \langle .. \rangle \MEAN[delimiter=big] expands to \big\langle ... \big\rangle \MEAN[delimiter=Big] expands to \Big\langle ... \Big\rangle \MEAN[delimiter=bigg] expands to \bigg\langle ... \bigg\rangle \MEAN[delimiter=Bigg] expands to \Bigg\langle ... \Bigg\rangle I am not sure whether `delimiter` is the best key. I think that `scale` may be better, but using `scale` for specifying the scaling of math delimiters will be inconsistent with how `scale` is used everywhere else. Another option is to use `alternative` key. it would be something factor=2 or so, not the funny XxXxxxXX kind of flags Sure. factor=(auto|none|1|2|3|4) is also ok (and would be directly mapped to choosemathbig). actually we will hook into a new feature of luatex for specifying the size of delimiters (so no vbox hack) .. factors are multipliers of bodyfontsize \definemathfence [MEAN] [angle] [command=yes, color=blue, factor=2.5] \starttext \startTEXpage \startformula \MEAN[factor=1]{\sum_{i = 1}^n A_i x_i } \hbox{ vs. } \MEAN{ \sum_{i = 1}^n A_i x_i } \hbox{ vs. } \bigg\langle \sum_{i=1}^n A_i x_i \bigg\rangle \stopformula \stopTEXpage \stoptext Thanks. If I understand the code correctly (sorry, haven't tested it yet), factor=, factor=none, and factor=auto all behave the same (all insert \normalleft ... \normalright) I think that it may be more consistent if factor= and factor=none do not scale the delimited at all. To maintain backward compatibility, the default value of factor can be set to auto. Also what values of factor give scaling equal to \big, \Big, \bigg, and \Bigg? 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Manually scaling math fences
On 3/8/2017 2:45 AM, Aditya Mahajan wrote: On Tue, 7 Mar 2017, Hans Hagen wrote: \MEAN[delimiter=auto] expands to \left\langle .. \right\langle \MEAN[delimiter=] expands to \langle .. \rangle \MEAN[delimiter=big] expands to \big\langle ... \big\rangle \MEAN[delimiter=Big] expands to \Big\langle ... \Big\rangle \MEAN[delimiter=bigg] expands to \bigg\langle ... \bigg\rangle \MEAN[delimiter=Bigg] expands to \Bigg\langle ... \Bigg\rangle I am not sure whether `delimiter` is the best key. I think that `scale` may be better, but using `scale` for specifying the scaling of math delimiters will be inconsistent with how `scale` is used everywhere else. Another option is to use `alternative` key. it would be something factor=2 or so, not the funny XxXxxxXX kind of flags Sure. factor=(auto|none|1|2|3|4) is also ok (and would be directly mapped to choosemathbig). actually we will hook into a new feature of luatex for specifying the size of delimiters (so no vbox hack) .. factors are multipliers of bodyfontsize \definemathfence [MEAN] [angle] [command=yes, color=blue, factor=2.5] \starttext \startTEXpage \startformula \MEAN[factor=1]{\sum_{i = 1}^n A_i x_i } \hbox{ vs. } \MEAN{ \sum_{i = 1}^n A_i x_i } \hbox{ vs. } \bigg\langle \sum_{i=1}^n A_i x_i \bigg\rangle \stopformula \stopTEXpage \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in \definefontfamily?
On 3/19/2017 1:38 PM, Pablo Rodriguez wrote: On 03/19/2017 12:19 PM, josephcan...@gmail.com wrote: Hi Pablo, When I typeset your MWE below with latest beta version (on win 10) you use too, I see 2 lines of 1110 with different appearance. Hi Joseph, sorry, the second sample was different. The first line was TeX Gyre Pagella and the second line was Neo Euler. The default feature for the whole text was old numbers. TeX Gyre Pagella works fine with it, but Neo Euler (with \definefontfamily) doesn’t honour "onum". But \definefont works fine, so I guess something might be improved in \definefontfamily. See the sample: \definefontfeature[default][default][onum=yes] \definefontfamily[mainface][rm][TeX Gyre Pagella] \definefontfamily[mainface][hw][Neo Euler] \definefont[directFont][euler.otf:+onum] don't use that :+onum interface ... it's supported but more as side effect .. define featuresets and use those *featureset \setupbodyfont[mainface] \starttext \startTEXpage[offset=5ex] 1110 {\hw 1110} \directFont 1110 \stopTEXpage \stoptext BTW, Neo Euler has "Neo-Euler" as PostScript name (according to otfinfo). Maybe this is causing problems to the font loading mechanism. Wolfgang, what do you think of this issue? Many thanks for your help, Pablo -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug in \definefontfamily?
Pablo Rodriguez <mailto:oi...@gmx.es> 19. März 2017 um 13:38via Postbox <https://www.postbox-inc.com/?utm_source=email_medium=sumlink_campaign=reach> Hi Joseph, sorry, the second sample was different. The first line was TeX Gyre Pagella and the second line was Neo Euler. The default feature for the whole text was old numbers. TeX Gyre Pagella works fine with it, but Neo Euler (with \definefontfamily) doesn’t honour "onum". But \definefont works fine, so I guess something might be improved in \definefontfamily. See the sample: \definefontfeature[default][default][onum=yes] \definefontfamily[mainface][rm][TeX Gyre Pagella] \definefontfamily[mainface][hw][Neo Euler] \definefont[directFont][euler.otf:+onum] \setupbodyfont[mainface] \starttext \startTEXpage[offset=5ex] 1110 {\hw 1110} \directFont 1110 \stopTEXpage \stoptext BTW, Neo Euler has "Neo-Euler" as PostScript name (according to otfinfo). Maybe this is causing problems to the font loading mechanism. Wolfgang, what do you think of this issue? Many thanks for your help, Pablo Pablo Rodriguez <mailto:oi...@gmx.es> 19. März 2017 um 11:11via Postbox <https://www.postbox-inc.com/?utm_source=email_medium=sumlink_campaign=reach> The issue is with the font: \definefontfeature[default][default][onum=yes] \definefontfamily[mainface][rm][TeX Gyre Pagella] \definefontfamily[mainface][hw][Neo Euler] \setupbodyfont[mainface] \starttext \startTEXpage[offset=5ex] 1110 \hw 1110 \stopTEXpage \stoptext Just in case it helps, LuaTeX-0.95 from TeX Live 2016 works fine with both features in this font: \input ifluatex.sty \ifluatex\input luaotfload.sty\fi \font\1="euler.otf:+salt" \font\2="euler.otf:+onum" \1 1110\2 1110 \bye I don’t know why this happens. Could anyone confirm the issue? Many thanks for your help, Pablo Pablo Rodriguez <mailto:oi...@gmx.es> 18. März 2017 um 23:05via Postbox <https://www.postbox-inc.com/?utm_source=email_medium=sumlink_campaign=reach> Dear list, I have the following sample: \definefontfeature[default][default][salt=yes] \definefontfamily[mainface][rm][Neo Euler] \setupbodyfont[mainface] \starttext \startTEXpage[offset=1em] 1110 \type{1110} \stopTEXpage \stoptext I get the same results with or without the first line commented out. (I’m using latest beta from 2017.03.02 22:23.) Is this a bug or what am I missing? When you use a math font (which Neo Euler is) the argument of the features key is ignored and \definefontfamily uses internal default values instead. These default values can only be overwritten by feature values for each alternative, e.g. \definefontfamily[...][...][Neo Euler][tf={style:regular,features:default}] 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] bug in \definefontfamily? (was: Re: OT salt feature not working?)
On 03/19/2017 12:19 PM, josephcan...@gmail.com wrote: > Hi Pablo, > > When I typeset your MWE below with latest beta version (on win 10) you > use too, I see 2 lines of 1110 with different appearance. Hi Joseph, sorry, the second sample was different. The first line was TeX Gyre Pagella and the second line was Neo Euler. The default feature for the whole text was old numbers. TeX Gyre Pagella works fine with it, but Neo Euler (with \definefontfamily) doesn’t honour "onum". But \definefont works fine, so I guess something might be improved in \definefontfamily. See the sample: \definefontfeature[default][default][onum=yes] \definefontfamily[mainface][rm][TeX Gyre Pagella] \definefontfamily[mainface][hw][Neo Euler] \definefont[directFont][euler.otf:+onum] \setupbodyfont[mainface] \starttext \startTEXpage[offset=5ex] 1110 {\hw 1110} \directFont 1110 \stopTEXpage \stoptext BTW, Neo Euler has "Neo-Euler" as PostScript name (according to otfinfo). Maybe this is causing problems to the font loading mechanism. Wolfgang, what do you think of this issue? Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] OT salt feature not working?
On 03/18/2017 11:05 PM, Pablo Rodriguez wrote: > Dear list, > > I have the following sample: > [...] > I get the same results with or without the first line commented out. > (I’m using latest beta from 2017.03.02 22:23.) > > Is this a bug or what am I missing? The issue is with the font: \definefontfeature[default][default][onum=yes] \definefontfamily[mainface][rm][TeX Gyre Pagella] \definefontfamily[mainface][hw][Neo Euler] \setupbodyfont[mainface] \starttext \startTEXpage[offset=5ex] 1110 \hw 1110 \stopTEXpage \stoptext Just in case it helps, LuaTeX-0.95 from TeX Live 2016 works fine with both features in this font: \input ifluatex.sty \ifluatex\input luaotfload.sty\fi \font\1="euler.otf:+salt" \font\2="euler.otf:+onum" \1 1110\2 1110 \bye I don’t know why this happens. Could anyone confirm the issue? Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] OT salt feature not working?
Dear list, I have the following sample: \definefontfeature[default][default][salt=yes] \definefontfamily[mainface][rm][Neo Euler] \setupbodyfont[mainface] \starttext \startTEXpage[offset=1em] 1110 \type{1110} \stopTEXpage \stoptext I get the same results with or without the first line commented out. (I’m using latest beta from 2017.03.02 22:23.) Is this a bug or what am I missing? Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Manually scaling math fences
On 3/7/2017 7:35 AM, Otared Kavian wrote: Hi Aditya, I agree totally with you and support your suggestion… Maybe instead of the « delimiter » keyword, one could introduce a keyword such as « size »: \MEAN[size=auto] expands to \left\langle .. \right\langle \MEAN[size=] expands to \langle .. \rangle \MEAN[size=big] expands to \big\langle ... \big\rangle \MEAN[size=Big] expands to \Big\langle ... \Big\rangle \MEAN[size=bigg] expands to \bigg\langle ... \bigg\rangle \MEAN[size=Bigg] expands to \Bigg\langle ... \Bigg\rangle with integrals we have factor as key ... anyway, i'll look into it (not in the middle of something else) .. luatex actually has a bitmore control over these matters built in Best regards: OK On 6 Mar 2017, at 20:57, Aditya Mahajan <adit...@umich.edu> wrote: Hi Hans, There are instances where the automatic scaling provided by \left and \right is not ideal and one has to use manual scaling. For example: \starttext \startTEXpage \startformula \left\langle \sum_{i=1}^n A_i x_i \right\rangle \hbox{ vs. } \bigg\langle \sum_{i=1}^n A_i x_i \bigg\rangle \stopformula \stopTEXpage \stoptext Currently, math fences always default to using \left and \right, which can lead to undesirable results. For example: \definemathfence [MEAN] [angle] [command=yes, color=blue] \starttext \startTEXpage \startformula \MEAN{ \sum_{i = 1}^n A_i x_i } \hbox{ vs. } \bigg\langle \sum_{i=1}^n A_i x_i \bigg\rangle \stopformula \stopTEXpage \stoptext Could we add an option to \definefence that allows the user to select the delimiter scaling using a key (say, `delimiter`) so that \MEAN[delimiter=auto] expands to \left\langle .. \right\langle \MEAN[delimiter=] expands to \langle .. \rangle \MEAN[delimiter=big] expands to \big\langle ... \big\rangle \MEAN[delimiter=Big] expands to \Big\langle ... \Big\rangle \MEAN[delimiter=bigg] expands to \bigg\langle ... \bigg\rangle \MEAN[delimiter=Bigg] expands to \Bigg\langle ... \Bigg\rangle I am not sure whether `delimiter` is the best key. I think that `scale` may be better, but using `scale` for specifying the scaling of math delimiters will be inconsistent with how `scale` is used everywhere else. Another option is to use `alternative` key. it would be something factor=2 or so, not the funny XxXxxxXX kind of flags 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Manually scaling math fences
Hi Aditya, I agree totally with you and support your suggestion… Maybe instead of the « delimiter » keyword, one could introduce a keyword such as « size »: \MEAN[size=auto] expands to \left\langle .. \right\langle \MEAN[size=] expands to \langle .. \rangle \MEAN[size=big] expands to \big\langle ... \big\rangle \MEAN[size=Big] expands to \Big\langle ... \Big\rangle \MEAN[size=bigg] expands to \bigg\langle ... \bigg\rangle \MEAN[size=Bigg] expands to \Bigg\langle ... \Bigg\rangle Best regards: OK > On 6 Mar 2017, at 20:57, Aditya Mahajan <adit...@umich.edu> wrote: > > Hi Hans, > > There are instances where the automatic scaling provided by \left and \right > is not ideal and one has to use manual scaling. For example: > > \starttext > \startTEXpage \startformula > \left\langle \sum_{i=1}^n A_i x_i \right\rangle > \hbox{ vs. } > \bigg\langle \sum_{i=1}^n A_i x_i \bigg\rangle > \stopformula \stopTEXpage > \stoptext > > Currently, math fences always default to using \left and \right, which can > lead to undesirable results. For example: > > \definemathfence [MEAN] [angle] [command=yes, color=blue] > > \starttext > \startTEXpage \startformula > \MEAN{ \sum_{i = 1}^n A_i x_i } > \hbox{ vs. } > \bigg\langle \sum_{i=1}^n A_i x_i \bigg\rangle > \stopformula \stopTEXpage > \stoptext > > Could we add an option to \definefence that allows the user to select the > delimiter scaling using a key (say, `delimiter`) so that > > \MEAN[delimiter=auto] expands to \left\langle .. \right\langle > \MEAN[delimiter=] expands to \langle .. \rangle > \MEAN[delimiter=big] expands to \big\langle ... \big\rangle > \MEAN[delimiter=Big] expands to \Big\langle ... \Big\rangle > \MEAN[delimiter=bigg] expands to \bigg\langle ... \bigg\rangle > \MEAN[delimiter=Bigg] expands to \Bigg\langle ... \Bigg\rangle > > I am not sure whether `delimiter` is the best key. I think that `scale` may > be better, but using `scale` for specifying the scaling of math delimiters > will be inconsistent with how `scale` is used everywhere else. Another option > is to use `alternative` key. > > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] Manually scaling math fences
Hi Hans, There are instances where the automatic scaling provided by \left and \right is not ideal and one has to use manual scaling. For example: \starttext \startTEXpage \startformula \left\langle \sum_{i=1}^n A_i x_i \right\rangle \hbox{ vs. } \bigg\langle \sum_{i=1}^n A_i x_i \bigg\rangle \stopformula \stopTEXpage \stoptext Currently, math fences always default to using \left and \right, which can lead to undesirable results. For example: \definemathfence [MEAN] [angle] [command=yes, color=blue] \starttext \startTEXpage \startformula \MEAN{ \sum_{i = 1}^n A_i x_i } \hbox{ vs. } \bigg\langle \sum_{i=1}^n A_i x_i \bigg\rangle \stopformula \stopTEXpage \stoptext Could we add an option to \definefence that allows the user to select the delimiter scaling using a key (say, `delimiter`) so that \MEAN[delimiter=auto] expands to \left\langle .. \right\langle \MEAN[delimiter=] expands to \langle .. \rangle \MEAN[delimiter=big] expands to \big\langle ... \big\rangle \MEAN[delimiter=Big] expands to \Big\langle ... \Big\rangle \MEAN[delimiter=bigg] expands to \bigg\langle ... \bigg\rangle \MEAN[delimiter=Bigg] expands to \Bigg\langle ... \Bigg\rangle I am not sure whether `delimiter` is the best key. I think that `scale` may be better, but using `scale` for specifying the scaling of math delimiters will be inconsistent with how `scale` is used everywhere else. Another option is to use `alternative` key. 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] issue with OT feature lfbd
On 2/25/2017 5:14 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \showframe \definefontfeature[leftbounds][lfbd=yes] \definefontfamily[mainface][rm][Linux Libertine O] \setupbodyfont[mainface, 150pt] \starttext \startTEXpage[offset=1ex] Wer War? \addff{leftbounds} Wer War? Wer\subff{leftbounds} War? \stopTEXpage \stoptext I’m afraid that the OT feature lfbd is applied in all the line. Otherwise, the second and the third lines would have the same spacing between words. Could anyone confirm this or am I missing something? the fact that it won't work as you expect ... in fact there is some experimental code that was never adapted to the new font reader ... i'll fix that .. then you can do \definefontfeature[default][default][protrusion=yes,opbd=yes] \definefontfamily[mainface][rm][Linux Libertine O] \setupbodyfont[mainface] \setupalign[hanging] \showframe \starttext \definedfont[linlibertine_r.otf*default] \input tufte \stoptext as it needs it hook into protrusion (be dealt with in line breaking) But still it's useless as that font only has left W V - and right v - defined so rather minimalistic and incomplete. Probably a left over from some experiment. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] issue with OT feature lfbd
Dear list, I have the following sample: \showframe \definefontfeature[leftbounds][lfbd=yes] \definefontfamily[mainface][rm][Linux Libertine O] \setupbodyfont[mainface, 150pt] \starttext \startTEXpage[offset=1ex] Wer War? \addff{leftbounds} Wer War? Wer\subff{leftbounds} War? \stopTEXpage \stoptext I’m afraid that the OT feature lfbd is applied in all the line. Otherwise, the second and the third lines would have the same spacing between words. Could anyone confirm this or am I missing something? Many thanks for your help, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] specifying body fonts
On 02/11/2017 09:51 PM, John Culleton wrote: > Reently I saw an example of setting up the various formats of a single > body font such as \rm, \it \bf, \sc etc. with examples of using these in > Gyre font. It may have been in the wiki or here on the list > There were examples of slanted type vs.true italic as I recall. > I should have copied it but I didn't (at age 84 I forget to do things). Hi John, it was a sample from me. Sorry for not having answered before. An extended version with slanted would be: \definefontfamily [mainface] [rm] [TeX Gyre Pagella] [it={TeX Gyre Cursor-Italic}, sl={TeX Gyre Schola-Regular, features:{default,slanted}} bf={TeX Gyre Adventor-Bold}, bi={TeX Gyre Termes-BoldItalic}] \setupbodyfontenvironment [default] [em=italic] \setupbodyfont[mainface] \starttext \startTEXpage[offset=1em] Roman font {\em italic} {\sl slanted} \bf Bold font \em bold italic \stopTEXpage \stoptext Let me know if you miss something in the sample. Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Comical error..
Re question 2. You can have the list of loaded fonts files from the log file produced by context command, nearly the end : For example from my run : mkiv lua stats > loaded fonts: 4 files: dejavusansmono.ttf, ebgaramond12-regular.otf, keteryg-medium.ttf, sblgreek.ttf >From this you can deduce most probably the font file format. Please use : mtxrun --script fonts To get more information on fonts database context uses. Hope this helps a bit. Best Joseph De : John Culleton Envoyé le :dimanche 12 février 2017 03:41 À : ntg-context@ntg.nl Objet :Re: [NTG-context] Comical error.. On Sat, 11 Feb 2017 21:08:46 +0100 Here is another example from the Wiki - \definefontfamily [mainface] [rm] [TeX Gyre Pagella] [it={TeX Gyre Cursor-Italic}, bf={TeX Gyre Adventor-Bold}, bi={TeX Gyre Termes-BoldItalic}] \setupbodyfontenvironment [default] [em=italic] \setupbodyfont[mainface] \starttext \startTEXpage[offset=1em] Roman font {\em italic} \bf Bold font \em bold italic \stopTEXpage \stoptext --- and another -- setupbodyfont[dejavu] \setupbodyfontenvironment [default] [smallsized=1.25, mediumsized=1.5, largesized=2.0] \definefontsize[smallsized] \definefontsize[mediumsized] \definefontsize[largesized] \starttext \setuphead[chapter] [style=\bflargesized] \setuphead[section] [style=\bfmediumsized] \setuphead[subsection][style=\bfsmallsized] \chapter {Whatever $x-1$} \section {Whatever $x-1$} \subsection{Whatever $x-1$} \input ward \blank Whatever $x-1$ \blank {\itmediumsized This is italic medium sized. $\cos(x) = {\rm Re}(\exp({\rm i}x))$} \blank {\rmmediumsized This is roman medium sized. \crlf $\cos(x) = {\rm Re}(\exp({\rm i}x))$} \stoptext -- Some questions: 1. Where is the basic size of the font family defined in points? 2. In the second example which of the many Dejavu fonts is assumed to be the starting point? Is it a ttf or a otf version? 3. Can any font family on the system be used or is there a specific context list? All answers appreciated of course :<) John Culleton Wexfordpress Book design and indexing. ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Comical error..
On Sat, 11 Feb 2017 21:08:46 +0100 Here is another example from the Wiki - \definefontfamily [mainface] [rm] [TeX Gyre Pagella] [it={TeX Gyre Cursor-Italic}, bf={TeX Gyre Adventor-Bold}, bi={TeX Gyre Termes-BoldItalic}] \setupbodyfontenvironment [default] [em=italic] \setupbodyfont[mainface] \starttext \startTEXpage[offset=1em] Roman font {\em italic} \bf Bold font \em bold italic \stopTEXpage \stoptext --- and another -- setupbodyfont[dejavu] \setupbodyfontenvironment [default] [smallsized=1.25, mediumsized=1.5, largesized=2.0] \definefontsize[smallsized] \definefontsize[mediumsized] \definefontsize[largesized] \starttext \setuphead[chapter] [style=\bflargesized] \setuphead[section] [style=\bfmediumsized] \setuphead[subsection][style=\bfsmallsized] \chapter {Whatever $x-1$} \section {Whatever $x-1$} \subsection{Whatever $x-1$} \input ward \blank Whatever $x-1$ \blank {\itmediumsized This is italic medium sized. $\cos(x) = {\rm Re}(\exp({\rm i}x))$} \blank {\rmmediumsized This is roman medium sized. \crlf $\cos(x) = {\rm Re}(\exp({\rm i}x))$} \stoptext -- Some questions: 1. Where is the basic size of the font family defined in points? 2. In the second example which of the many Dejavu fonts is assumed to be the starting point? Is it a ttf or a otf version? 3. Can any font family on the system be used or is there a specific context list? All answers appreciated of course :<) John Culleton Wexfordpress Book design and indexing. ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Overriding a font face in a typescript
On 02/07/2017 07:52 PM, Rik Kabel wrote: > ConTeXters, > > How can I override one or two faces in a typescript? Hi Rik, this might be what you were looking for: \definefontfamily [mainface] [rm] [TeX Gyre Pagella] [it={TeX Gyre Cursor-Italic}, bf={TeX Gyre Adventor-Bold}, bi={TeX Gyre Termes-BoldItalic}] \setupbodyfontenvironment [default] [em=italic] \setupbodyfont[mainface] \starttext \startTEXpage[offset=1em] Roman font {\em italic} \bf Bold font \em bold italic \stopTEXpage \stoptext It isn’t a typescript, but it may work too. Please, always include a mininal working sample. Let us know if you had something different in mind. Just in case it helps, Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] keep interaction with \insertpages and \filterpages
On 1/10/2017 9:41 AM, Pablo Rodriguez wrote: On 01/09/2017 01:15 PM, Hans Hagen wrote: On 1/9/2017 12:39 PM, Pablo Rodriguez wrote: Dear list, is there a way to keep interaction in the resulting PDF document when adding the whole document with \insertpages, or only some pages with \filterpages? \setupexternalfigures[interaction=all] Many thanks for the reply, Hans. Is there a way to keep internal document links (such as in the table of contents)? They are all gone in the imposition (I use the commands above for imposition). 1.tex: \setupinteraction[state=start] \starttext \placelist[chapter] \chapter{one} \chapter{two} \stoptext 2.tex: \setupinteraction[state=start] \starttext % \startTEXpage \externalfigure[1.pdf][page=1,interaction=all]\stopTEXpage % \startTEXpage \externalfigure[1.pdf][page=2,interaction=all]\stopTEXpage % \startTEXpage \externalfigure[1.pdf][page=3,interaction=all]\stopTEXpage \setuplayout[page] \setupexternalfigure[interaction=all] \filterpages[1.pdf][1,2,3] \page \setuplayout[reset] \typefile{1.tex} \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] rotating some pages of a pdf
On 1/4/2017 9:31 PM, Cesar Romani wrote: I'm using the following code, rotate.tex, to rotate all the pages of file.pdf, using: context --input=file.pdf --rotation=45 rotate.pdf rotate.tex == \getfiguredimensions [\getdocumentargument{input}] \starttext \dorecurse{\noffigurepages} {\startTEXpage \externalfigure [\getdocumentargument{input}] [page=\recurselevel, orientation=\getdocumentargument{rotation}] \stopTEXpage} \stoptext How could I use this code to rotate, say, the page five, 7º clockwise, and the page twenty, 15º counterclockwise? \starttext \dorecurse{\noffigurepages} {\startTEXpage \doifelsesomething{\getdocumentargument{r\recurselevel}} {% \externalfigure [\getdocumentargument{input}] [page=\recurselevel, orientation=\getdocumentargument{r\recurselevel}] } {% \externalfigure [\getdocumentargument{input}] [page=\recurselevel, orientation=\getdocumentargument{rotation}] }% \stopTEXpage} \stoptext --r5=7 --r20=15 --rotation=45 - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] rotating some pages of a pdf
I'm using the following code, rotate.tex, to rotate all the pages of file.pdf, using: context --input=file.pdf --rotation=45 rotate.pdf rotate.tex == \getfiguredimensions [\getdocumentargument{input}] \starttext \dorecurse{\noffigurepages} {\startTEXpage \externalfigure [\getdocumentargument{input}] [page=\recurselevel, orientation=\getdocumentargument{rotation}] \stopTEXpage} \stoptext How could I use this code to rotate, say, the page five, 7º clockwise, and the page twenty, 15º counterclockwise? Many thanks in advance, -- Cesar ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] font size switching
On 10/17/2016 08:28 PM, Hans Hagen wrote: > On 10/17/2016 8:14 PM, Pablo Rodriguez wrote: >> [...] >> I must confess, I haven’t checked the manual. But why doesn’t it happen >> the same with other commands? >> >> \starttext >> \startTEXpage[offset=1em] >> Default {\tfb Larger} {\tfd Larger 1} \\ >> Default \tfb Larger \tfd Larger 2 >> \stopTEXpage >> \stoptext > > looks quite ok to me ... grouping works as expected Hans, I totally agree. The point I was trying to make is that ungrouped font size switches behave different if when fixed and when not fixed. Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] font size switching
On 10/17/2016 8:14 PM, Pablo Rodriguez wrote: On 10/17/2016 07:58 PM, Thomas A. Schmitz wrote: On 10/17/2016 07:31 PM, Csikos Bela wrote: [...] then I have Smaller1 in (x) size and Smaller2 in default size. Why? I would expect Smaller2 to be in (x) size too (as the manual implies). I'm not sure where you found the sentence you copied in your first mail. My copy of contextref.pdf says p. 107: "The various commands will adapt themselves to the actual setup of font and size." Which is exactly what you see. Hi Thomas, I must confess, I haven’t checked the manual. But why doesn’t it happen the same with other commands? \starttext \startTEXpage[offset=1em] Default {\tfb Larger} {\tfd Larger 1} \\ Default \tfb Larger \tfd Larger 2 \stopTEXpage \stoptext looks quite ok to me ... grouping works as expected \starttext \startTEXpage[offset=1em] Default {\tfb Larger} normal {\tfd Larger 1} \\ Default \tfb Larger normal \tfd Larger 2 \stopTEXpage \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] font size switching
On 10/17/2016 07:58 PM, Thomas A. Schmitz wrote: > On 10/17/2016 07:31 PM, Csikos Bela wrote: >> [...] >> then I have Smaller1 in (x) size and Smaller2 in default size. Why? >> I would expect Smaller2 to be in (x) size too (as the manual implies). >> > I'm not sure where you found the sentence you copied in your first mail. > My copy of contextref.pdf says p. 107: "The various commands will adapt > themselves to the actual setup of font and size." Which is exactly what > you see. Hi Thomas, I must confess, I haven’t checked the manual. But why doesn’t it happen the same with other commands? \starttext \startTEXpage[offset=1em] Default {\tfb Larger} {\tfd Larger 1} \\ Default \tfb Larger \tfd Larger 2 \stopTEXpage \stoptext Pablo -- http://www.ousia.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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] buffers inside startMPpage
Thank you Wolfgang. This suits my needs just fine. Kind regards, Jan Willem Flamma > On 14 okt. 2016, at 10:34, Wolfgang Schuster <schuster.wolfg...@gmail.com> > wrote: > >> Jan Willem Flamma <mailto:jwfregis...@icloud.com> 14. Oktober 2016 um 10:12 >> Dear list members, >> >> I create all my MetaFun drawings in a separate environment file where each >> individual drawing sits inside a start/stopbuffer. This allows me to easily >> use those drawings in all my documents using \processMPbuffer[name]. Works >> just fine. >> >> However, I also wish to have all the drawing available in a pdf file (each >> drawing on a separate page). This allows me to split the pdf and use the >> drawing elsewhere (e.g. in a Powerpoint) or include page(s) from the pdf in >> another document. >> >> The below MWE represent my MetaFun drawings file. >> The idea is that by uncommenting the \enablemode[makepdf] I can create the >> pdf file with drawings. It seems however that startMPpage does not accept >> buffers (I also tried processbuffer and processMPbuffer). >> >> Is it possible to somehow make this work? > You can use > > \startTEXpage > \processMPbuffer[…] > \stopTEXpage > > but loading a buffer in MPpage doesn’t work because the content of the > environment > is just passed to MetaPost and buffers can’t be loaded inside MetaPost code > unless > Hans adds a function for this, e.g. > > \startMPcode > buffer("mybuffer") > \stopMPcode > > 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://context.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://context.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] buffers inside startMPpage
Jan Willem Flamma <mailto:jwfregis...@icloud.com> 14. Oktober 2016 um 10:12 Dear list members, I create all my MetaFun drawings in a separate environment file where each individual drawing sits inside a start/stopbuffer. This allows me to easily use those drawings in all my documents using \processMPbuffer[name]. Works just fine. However, I also wish to have all the drawing available in a pdf file (each drawing on a separate page). This allows me to split the pdf and use the drawing elsewhere (e.g. in a Powerpoint) or include page(s) from the pdf in another document. The below MWE represent my MetaFun drawings file. The idea is that by uncommenting the \enablemode[makepdf] I can create the pdf file with drawings. It seems however that startMPpage does not accept buffers (I also tried processbuffer and processMPbuffer). Is it possible to somehow make this work? You can use \startTEXpage \processMPbuffer[…] \stopTEXpage but loading a buffer in MPpage doesn’t work because the content of the environment is just passed to MetaPost and buffers can’t be loaded inside MetaPost code unless Hans adds a function for this, e.g. \startMPcode buffer("mybuffer") \stopMPcode 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://context.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Size of the last shipped page by Lua?
On 9/23/2016 1:50 PM, Procházka Lukáš Ing. wrote: Hello, still a problem - consider the following code: \ifx\startpapersize\undefined \unprotect \def\startpapersize{\page\pushmacro\page_paper_restore\setuppapersize} \protect \fi \ifx\stoppapersize\undefined \unprotect \def\stoppapersize{\page\popmacro\page_paper_restore\setuppapersize} \protect \fi % \startluacode local tomm = function(v) return v * (210 / 39158276) end pgsz = function() context("w=%.1f, h=%.1f", tomm(tex.dimen.paperwidth), tomm(tex.dimen.paperheight)) end \stopluacode % \starttext A \ctxlua{pgsz()} \startpapersize[A3,landscape] B \ctxlua{pgsz()} \stoppapersize \startTEXpage[width=200mm,height=100mm] C % 3rd page \ctxlua{pgsz()} \stopTEXpage the papersize of a TEXpage is known when that page is flushed and when you ask for it the way you do now tex is still constructing the box it's all a matter of timing \starttext \appendtoks \ctxlua{ print( number.topoints(tex.dimen.paperwidth ), number.topoints(tex.dimen.paperheight) ) }% \to \everyshipout \setuppapersize[A4] test \startTEXpage test \stopTEXpage \setuppapersize[A3] test \stoptext \stoptext In the case of 3rd page (with text "C"), page size "w=210.0, h=297.0" is printed instead of "w=200.0, h=100.0". So how to access values 200 and 100 mm for the page produced by \startTEXpage[width=...,height=...]? Best regards, Lukas On Thu, 08 Sep 2016 22:12:49 +0200, Hans Hagen <pra...@wxs.nl> wrote: On 9/8/2016 9:47 PM, josephcan...@gmail.com wrote: If by messing it’s meant modifying their values, I agree that’s a bad idea , the requirement is likely to read the value only (at least this is my usage of these in shipouts « after » callback). If these are not reliable, what’s the reliable way to get the page width and height ? \starttext \ctxlua{context(number.topoints(tex.dimen.paperwidth))} \ctxlua{context(number.topoints(tex.dimen.paperheight))} \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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 ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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] Size of the last shipped page by Lua?
Hello, still a problem - consider the following code: \ifx\startpapersize\undefined \unprotect \def\startpapersize{\page\pushmacro\page_paper_restore\setuppapersize} \protect \fi \ifx\stoppapersize\undefined \unprotect \def\stoppapersize{\page\popmacro\page_paper_restore\setuppapersize} \protect \fi % \startluacode local tomm = function(v) return v * (210 / 39158276) end pgsz = function() context("w=%.1f, h=%.1f", tomm(tex.dimen.paperwidth), tomm(tex.dimen.paperheight)) end \stopluacode % \starttext A \ctxlua{pgsz()} \startpapersize[A3,landscape] B \ctxlua{pgsz()} \stoppapersize \startTEXpage[width=200mm,height=100mm] C % 3rd page \ctxlua{pgsz()} \stopTEXpage \stoptext In the case of 3rd page (with text "C"), page size "w=210.0, h=297.0" is printed instead of "w=200.0, h=100.0". So how to access values 200 and 100 mm for the page produced by \startTEXpage[width=...,height=...]? Best regards, Lukas On Thu, 08 Sep 2016 22:12:49 +0200, Hans Hagen <pra...@wxs.nl> wrote: On 9/8/2016 9:47 PM, josephcan...@gmail.com wrote: If by messing it’s meant modifying their values, I agree that’s a bad idea , the requirement is likely to read the value only (at least this is my usage of these in shipouts « after » callback). If these are not reliable, what’s the reliable way to get the page width and height ? \starttext \ctxlua{context(number.topoints(tex.dimen.paperwidth))} \ctxlua{context(number.topoints(tex.dimen.paperheight))} \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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 ___ -- Ing. Lukáš Procházka | mailto:l...@pontex.cz Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 (+420 720 951 172) Fax: +420 244 461 038 PgSz.mkiv Description: Binary data PgSz.pdf Description: Adobe PDF document ___ 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] Vertical padding in tables
Jose Luis Arellano <mailto:jose.4rell...@gmail.com> 11. September 2016 um 11:58 Dear list. How can I control vertical padding in natural tables? You can use offset the control the padding on all four sides and loffset etc. for the individual sides. \startTEXpage[offset=1cm] \bTABLE[offset=1mm,strut=no,style={\switchtobodyfont[tt,40pt]}] \bTR \bTD[loffset=1cm,toffset=1cm] A \eTD \bTD[roffset=1cm,toffset=1cm] B \eTD \eTR \bTR \bTD[loffset=1cm,boffset=1cm] C \eTD \bTD[roffset=1cm,boffset=1cm] D \eTD \eTR \eTABLE \stopTEXpage 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] Size of the last shipped page by Lua?
Hello, is there a way to detect by Lua what is the size (width and height) of the last shipped page? Especially I'm interested in the situation when page via \start/\stopTEXpage has been shipped, like: \startluacode LastPageSize = function() -- What to come here? return w, h end \stopluacode \starttext \startluacode local w, h = LastPageSize() context("w="..w .. ", h=" ..h) -- Should give "w=210mm, h=297mm" (or other units) \stopluacode \startTEXpage[with=10cm,height=15cm] \stopTEXpage \startluacode local w, h = LastPageSize() context("w="..w .. ", h=" ..h) -- Should give "w=100mm, h=150mm" (or other units) \stopluacode \stoptext This would be very useful when I need to insert a page of size of the last page to move to odd page when A4 and A3 pages are mixed, to allow simple duplex printing on the printer. So - how about 'LastPageSize()' function? Best regards, Lukas -- Ing. Lukáš Procházka | mailto:l...@pontex.cz Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 (+420 720 951 172) Fax: +420 244 461 038 ___ 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] Header background off with \page?
Hello, the following code: \setupheadertexts[Le][Ri] \setupbackgrounds[header][text][bottomframe=on] \starttext \startTEXpage \externalfigure[dummy] \stopTEXpage \page[yes,header,footer,odd] % Empty page to come here Blabla \stoptext should generate an empty page. The \page[yes,header,footer,odd] suppress header and footer, which is good, and inserts one page; the problem is that header and footer background is kept and still appears. Is it a "wanted" feature? My guess is that when one uses "\page[...,header,footer...]" than suppressing header/footer background is intended, too. If the background is not suppressed automatically with "header,footer", would it be possible to implement something like "\page[...,background,...] which would suppress header and footer background (or suppress their backgrounds automatically with \page[...header...footer...])? Best regards, Lukas -- Ing. Lukáš Procházka | mailto:l...@pontex.cz Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn Bezová 1658 147 14 Praha 4 Tel: +420 241 096 751 (+420 720 951 172) Fax: +420 244 461 038 t.mkiv Description: Binary data t.pdf Description: Adobe PDF document ___ 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] Different colors in LaTeX and ConTeXt
On 07/12/2016 10:03 PM, Hans Hagen wrote: > On 7/12/2016 9:39 PM, Henri Menke wrote: >> Dear Aditya and Hans, >> >> I'm not so sure about it being a bug in pgfplots. I played a little and >> encountered the following. > > As Aditya pointed out, these (probably used for tracing) colors are > defined in such a way that they don't go via the context resolver. As > these (few) colors are basically x windows colors, you can start your > document with: > > \usecolors[xwi] > > which will set the context colors differently. Adding \usecolors[xwi] to the example does not change anything. Looking at base/colo-imp-xwi.mkiv revealed, that it does not alter the way colors are defined, but just defines a huge bunch of additional ones. > >>> \usemodule[tikz] >>> \starttext >>> >>> % Original gray >>> \blackrule[color=gray,width=1cm,height=1pt] >>> >>> \starttikzpicture >>> \draw[gray,line width=1pt] (0,0) -- (1,0); >>> \stoptikzpicture >>> >>> % New colors >>> \definecolor[gray][s=0.5] >>> \unprotect >>> \pgfutil@definecolor{tikzgray}{gray}{0.5} >>> \protect >>> >>> % Now ConTeXt's gray = tikzgray >>> \blackrule[color=gray,width=1cm,height=1pt] > > How is that supposed to work? Context will not inherit colors from tikz, > the most you can expect is the reverse: tikz using context color > definitions. I'm very sorry for the confusion. What I did was to adjust ConTeXt's gray to have the same grayscale value as the tikzgray. As is shown below, the redefinition of gray does not propagate to TikZ. > >>> \starttikzpicture >>> \draw[tikzgray,line width=1pt] (0,0) -- (1,0); >>> \stoptikzpicture >>> >>> % Inside TikZ gray is still off >>> \starttikzpicture >>> \draw[gray,line width=1pt] (0,0) -- (1,0); >>> \stoptikzpicture >>> >>> \stoptext In pgfutil-context.def there is though \let\pgfutil@registergray \pgf@context@registergray So it seems as if gray *should* be propagated from ConTeXt to TikZ, which apparently takes place when loading TikZ. Moving \definecolor[gray][s=0.5] before \usemodule[tikz] shows this behavior. The question is how to keep colors from ConTeXt and TikZ in sync. Cheers, Henri > >> Cheers, >> Henri >> >> On 07/12/2016 08:23 PM, Aditya Mahajan wrote: >>> On Tue, 12 Jul 2016, Hans Hagen wrote: >>> >>>> On 7/12/2016 5:07 PM, Aditya Mahajan wrote: >>>>> On Tue, 12 Jul 2016, Hans Hagen wrote: >>>>> >>>>>> On 7/12/2016 3:44 PM, Henri Menke wrote: >>>>>>> Dear Hans, >>>>>>> >>>>>>> thanks for your reply. Indeed there are color definitions in >>>>>>> `pgfutil-context.def`. However, they are commented out with the >>>> message >>>>>>> >>>>>>>> % no need for x colors (users can load it if needed) >>>>>>>> ... >>>>>>>> %\pgfutil@definecolor{gray}{gray}{0.5} >>>>>>> >>>>>>> If I add >>>>>>> >>>>>>>> \csname pgfutil@definecolor\endcsname{gray}{gray}{0.5} >>>>>>> >>>>>>> to my document the gray shows up fine. So that's for sure a >>>>>>> feasible >>>>>>> workaround. >>>>>>> >>>>>>> Can you comment on the phrase »no need for x colors (users can >>>>>>> load it >>>>>>> if needed)«? I'm not quite sure what it means and it suggests that >>>>>>> there exists a proper solution to my color problem. >>>>>> >>>>>> normally you want the same colors in tikz images as in context so >>>>>> then >>>>>> defining them in tikz is creating incompatibilities (your case is the >>>>>> reverse and a-typical) >>>>> >>>>> However, without such redefinitions, tikz does not understand ConTeXt >>>>> colors. I use a similar workaround in my documents as well. >>>> >>>> I have no clue what you mean. >>>> >>>> \definecolor[red][g=1] >>>> >>>> \startTEXpage >>>> \starttikzpicture >>>>\fill[red] (0,0) circle (1cm); >>>> \stoptikzpicture >>>> \stopTEXpage >>>> >>>> works ok here and gives green. So, one can collect a
Re: [NTG-context] Different colors in LaTeX and ConTeXt
On 7/12/2016 9:39 PM, Henri Menke wrote: Dear Aditya and Hans, I'm not so sure about it being a bug in pgfplots. I played a little and encountered the following. As Aditya pointed out, these (probably used for tracing) colors are defined in such a way that they don't go via the context resolver. As these (few) colors are basically x windows colors, you can start your document with: \usecolors[xwi] which will set the context colors differently. \usemodule[tikz] \starttext % Original gray \blackrule[color=gray,width=1cm,height=1pt] \starttikzpicture \draw[gray,line width=1pt] (0,0) -- (1,0); \stoptikzpicture % New colors \definecolor[gray][s=0.5] \unprotect \pgfutil@definecolor{tikzgray}{gray}{0.5} \protect % Now ConTeXt's gray = tikzgray \blackrule[color=gray,width=1cm,height=1pt] How is that supposed to work? Context will not inherit colors from tikz, the most you can expect is the reverse: tikz using context color definitions. \starttikzpicture \draw[tikzgray,line width=1pt] (0,0) -- (1,0); \stoptikzpicture % Inside TikZ gray is still off \starttikzpicture \draw[gray,line width=1pt] (0,0) -- (1,0); \stoptikzpicture \stoptext Cheers, Henri On 07/12/2016 08:23 PM, Aditya Mahajan wrote: On Tue, 12 Jul 2016, Hans Hagen wrote: On 7/12/2016 5:07 PM, Aditya Mahajan wrote: On Tue, 12 Jul 2016, Hans Hagen wrote: On 7/12/2016 3:44 PM, Henri Menke wrote: Dear Hans, thanks for your reply. Indeed there are color definitions in `pgfutil-context.def`. However, they are commented out with the message % no need for x colors (users can load it if needed) ... %\pgfutil@definecolor{gray}{gray}{0.5} If I add \csname pgfutil@definecolor\endcsname{gray}{gray}{0.5} to my document the gray shows up fine. So that's for sure a feasible workaround. Can you comment on the phrase »no need for x colors (users can load it if needed)«? I'm not quite sure what it means and it suggests that there exists a proper solution to my color problem. normally you want the same colors in tikz images as in context so then defining them in tikz is creating incompatibilities (your case is the reverse and a-typical) However, without such redefinitions, tikz does not understand ConTeXt colors. I use a similar workaround in my documents as well. I have no clue what you mean. \definecolor[red][g=1] \startTEXpage \starttikzpicture \fill[red] (0,0) circle (1cm); \stoptikzpicture \stopTEXpage works ok here and gives green. So, one can collect a list of colors defined in tikz in a colo-imp-tikz.mkiv and load that one if needed. I guess it is a bug with pgfplots rather than tikz (which also means that it may be easier to pursuade pgfplot maintainers to use low level tikz interface, since tikz is already playing nice with context). \usemodule[tikz,pgfplots] \definecolor[red][g=1] \startmode[bug] \unprotect \pgfutil@definecolor{red} {rgb} {0,1,0} \protect \stopmode \starttext \startTEXpage \starttikzpicture \startaxis \addplot[color=red] coordinates { (0,0) (1,1) }; \stopaxis \stoptikzpicture \stopTEXpage \stoptext 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 ___ ___ 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 ___ -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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] Different colors in LaTeX and ConTeXt
Dear Aditya and Hans, I'm not so sure about it being a bug in pgfplots. I played a little and encountered the following. > \usemodule[tikz] > \starttext > > % Original gray > \blackrule[color=gray,width=1cm,height=1pt] > > \starttikzpicture > \draw[gray,line width=1pt] (0,0) -- (1,0); > \stoptikzpicture > > % New colors > \definecolor[gray][s=0.5] > \unprotect > \pgfutil@definecolor{tikzgray}{gray}{0.5} > \protect > > % Now ConTeXt's gray = tikzgray > \blackrule[color=gray,width=1cm,height=1pt] > > \starttikzpicture > \draw[tikzgray,line width=1pt] (0,0) -- (1,0); > \stoptikzpicture > > % Inside TikZ gray is still off > \starttikzpicture > \draw[gray,line width=1pt] (0,0) -- (1,0); > \stoptikzpicture > > \stoptext Cheers, Henri On 07/12/2016 08:23 PM, Aditya Mahajan wrote: > On Tue, 12 Jul 2016, Hans Hagen wrote: > >> On 7/12/2016 5:07 PM, Aditya Mahajan wrote: >>> On Tue, 12 Jul 2016, Hans Hagen wrote: >>> >>>> On 7/12/2016 3:44 PM, Henri Menke wrote: >>>>> Dear Hans, >>>>> >>>>> thanks for your reply. Indeed there are color definitions in >>>>> `pgfutil-context.def`. However, they are commented out with the >> message >>>>> >>>>>> % no need for x colors (users can load it if needed) >>>>>> ... >>>>>> %\pgfutil@definecolor{gray}{gray}{0.5} >>>>> >>>>> If I add >>>>> >>>>>> \csname pgfutil@definecolor\endcsname{gray}{gray}{0.5} >>>>> >>>>> to my document the gray shows up fine. So that's for sure a feasible >>>>> workaround. >>>>> >>>>> Can you comment on the phrase »no need for x colors (users can load it >>>>> if needed)«? I'm not quite sure what it means and it suggests that >>>>> there exists a proper solution to my color problem. >>>> >>>> normally you want the same colors in tikz images as in context so then >>>> defining them in tikz is creating incompatibilities (your case is the >>>> reverse and a-typical) >>> >>> However, without such redefinitions, tikz does not understand ConTeXt >>> colors. I use a similar workaround in my documents as well. >> >> I have no clue what you mean. >> >> \definecolor[red][g=1] >> >> \startTEXpage >> \starttikzpicture >>\fill[red] (0,0) circle (1cm); >> \stoptikzpicture >> \stopTEXpage >> >> works ok here and gives green. So, one can collect a list of colors >> defined in tikz in a colo-imp-tikz.mkiv and load that one if needed. > > I guess it is a bug with pgfplots rather than tikz (which also means > that it may be easier to pursuade pgfplot maintainers to use low level > tikz interface, since tikz is already playing nice with context). > > \usemodule[tikz,pgfplots] > \definecolor[red][g=1] > > \startmode[bug] > \unprotect > \pgfutil@definecolor{red} {rgb} {0,1,0} > \protect > \stopmode > > \starttext > \startTEXpage > \starttikzpicture >\startaxis > \addplot[color=red] coordinates { (0,0) (1,1) }; >\stopaxis > \stoptikzpicture > \stopTEXpage > \stoptext > > 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 > ___ > ___ 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] Different colors in LaTeX and ConTeXt
On Tue, 12 Jul 2016, Hans Hagen wrote: On 7/12/2016 5:07 PM, Aditya Mahajan wrote: On Tue, 12 Jul 2016, Hans Hagen wrote: On 7/12/2016 3:44 PM, Henri Menke wrote: Dear Hans, thanks for your reply. Indeed there are color definitions in `pgfutil-context.def`. However, they are commented out with the message % no need for x colors (users can load it if needed) ... %\pgfutil@definecolor{gray}{gray}{0.5} If I add \csname pgfutil@definecolor\endcsname{gray}{gray}{0.5} to my document the gray shows up fine. So that's for sure a feasible workaround. Can you comment on the phrase »no need for x colors (users can load it if needed)«? I'm not quite sure what it means and it suggests that there exists a proper solution to my color problem. normally you want the same colors in tikz images as in context so then defining them in tikz is creating incompatibilities (your case is the reverse and a-typical) However, without such redefinitions, tikz does not understand ConTeXt colors. I use a similar workaround in my documents as well. I have no clue what you mean. \definecolor[red][g=1] \startTEXpage \starttikzpicture \fill[red] (0,0) circle (1cm); \stoptikzpicture \stopTEXpage works ok here and gives green. So, one can collect a list of colors defined in tikz in a colo-imp-tikz.mkiv and load that one if needed. I guess it is a bug with pgfplots rather than tikz (which also means that it may be easier to pursuade pgfplot maintainers to use low level tikz interface, since tikz is already playing nice with context). \usemodule[tikz,pgfplots] \definecolor[red][g=1] \startmode[bug] \unprotect \pgfutil@definecolor{red} {rgb} {0,1,0} \protect \stopmode \starttext \startTEXpage \starttikzpicture \startaxis \addplot[color=red] coordinates { (0,0) (1,1) }; \stopaxis \stoptikzpicture \stopTEXpage \stoptext 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] Different colors in LaTeX and ConTeXt
On 7/12/2016 5:07 PM, Aditya Mahajan wrote: On Tue, 12 Jul 2016, Hans Hagen wrote: On 7/12/2016 3:44 PM, Henri Menke wrote: Dear Hans, thanks for your reply. Indeed there are color definitions in `pgfutil-context.def`. However, they are commented out with the message % no need for x colors (users can load it if needed) ... %\pgfutil@definecolor{gray}{gray}{0.5} If I add \csname pgfutil@definecolor\endcsname{gray}{gray}{0.5} to my document the gray shows up fine. So that's for sure a feasible workaround. Can you comment on the phrase »no need for x colors (users can load it if needed)«? I'm not quite sure what it means and it suggests that there exists a proper solution to my color problem. normally you want the same colors in tikz images as in context so then defining them in tikz is creating incompatibilities (your case is the reverse and a-typical) However, without such redefinitions, tikz does not understand ConTeXt colors. I use a similar workaround in my documents as well. I have no clue what you mean. \definecolor[red][g=1] \startTEXpage \starttikzpicture \fill[red] (0,0) circle (1cm); \stoptikzpicture \stopTEXpage works ok here and gives green. So, one can collect a list of colors defined in tikz in a colo-imp-tikz.mkiv and load that one if needed. Perhaps, one could define a macro `\enabletikzcolors[...list..]` that will do the appropriate translations. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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] beta
Hi, I uploaded a new beta. This version has (experimental) support for color fonts. (not to be confused with 'coloring text in a font'). \definefontfeature[svg][default][svg=yes] \definefontfeature[colored][default][colr=yes] % \definefont[Emoj][file:emojionecolor-svginot.ttf*default,svg] % \definefont[Emoj][file:seguiemj.ttf*default,colored] \definesymbol[bug1][\getglyphdirect{file:emojionecolor-svginot.ttf*svg}{\char"1F41B}] \definesymbol[bug2][\getglyphdirect{file:seguiemj.ttf*colored} {\char"1F41B}] \startTEXpage [width=10em,align=middle,offset=1em] There are several kind of bugs, like \symbol [bug1] and \symbol [bug2], also in \CONTEXT ! \stopTEXpage The colr features uses (if present) the overlay method (microsoft fonts have that) which is quite clean and efficient, while the svg one uses (when present) svg information from the font. Caching the later one will take some initial time (due to conversion, i might figure out something better) and needs inkscape installed. Attached an example. I didn't look too extensively for a font, but on the agenda is turning the cowfont in a color one (maybe for the ctx meeting). At some point I might add overloading of colors (for the overlay variant). Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl - colors-002.pdf Description: Adobe PDF document ___ 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] Incorrect math kerning
Hi Aditya, This is based on a question about latex on tex.stackexchange: http://tex.stackexchange.com/q/312098/323 but context shows the same behaviour. The subscript "i" in the following example is kerned incorrectly (it is too far away from W). Is this a bug in the font, or with the fontloader? \setupbodyfont[cambria] \starttext \startTEXpage[offset=2mm] $W_i^i$ \stopTEXpage \stoptext The next beta fixes the scaler but of course that leaves fonts untouched. However, as a test I added some more lfg files that implement the V and W cutins for some fonts. Beware: the lm / gyre fonts are in the process of being updated which means that kerning will change (and therefore also the rendering) later this year. After that we can still decide to ship variants. For now it's directive driven. \enabledirectives[fontgoodies.mathkerning] \startTEXpage[offset=2mm] \startcombination[4*2] {\hbox to 50pt{\hss\showboxes\switchtobodyfont [modern]$V_i^i = W_i^i$\hss}} {\infofont modern} {\hbox to 50pt{\hss\showboxes\switchtobodyfont [cambria]$V_i^i = W_i^i$\hss}} {\infofont cambria} {\hbox to 50pt{\hss\showboxes\switchtobodyfont[lucidaot]$V_i^i = W_i^i$\hss}} {\infofont lucida} {\hbox to 50pt{\hss\showboxes\switchtobodyfont [dejavu]$V_i^i = W_i^i$\hss}} {\infofont dejavu} {\hbox to 50pt{\hss\showboxes\switchtobodyfont [pagella]$V_i^i = W_i^i$\hss}} {\infofont pagella} {\hbox to 50pt{\hss\showboxes\switchtobodyfont [termes]$V_i^i = W_i^i$\hss}} {\infofont termes} {\hbox to 50pt{\hss\showboxes\switchtobodyfont [bonum]$V_i^i = W_i^i$\hss}} {\infofont bonum} {\hbox to 50pt{\hss\showboxes\switchtobodyfont [schola]$V_i^i = W_i^i$\hss}} {\infofont schola} \stopcombination \stopTEXpage A bit of a playground for deciding om where to draw the limit. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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] Incorrect math kerning
On 5/30/2016 5:50 AM, Aditya Mahajan wrote: Hi, This is based on a question about latex on tex.stackexchange: http://tex.stackexchange.com/q/312098/323 but context shows the same behaviour. The subscript "i" in the following example is kerned incorrectly (it is too far away from W). Is this a bug in the font, or with the fontloader? \setupbodyfont[cambria] \starttext \startTEXpage[offset=2mm] $W_i^i$ \stopTEXpage \stoptext In traditional TeX fonts italic correction is used as a kind of kerning. This happens in combination with cheating with the width of glyphs. This is somewhat reflected in the lm fonts (with some inconsistencies between for instance V and W ... we're currently discussing this). So, a way to force a subscript towards the shape is to use less width, and then use italic correction to move the superscript the other way. Of course this kind of kerning is a bit of a cheat and not related to italic shape (some upright characters also have italic corrections). In cambria staircase kerns are used for this but they are not defined for all (base) characters. The gyre fonts don't cheat on the width. \starttext \startTEXpage[offset=2mm] \startcombination[2*2] {\hbox to 40pt{\hss\showboxes\switchtobodyfont [modern]$W_i^i$\hss}} {\infofont modern} {\hbox to 40pt{\hss\showboxes\switchtobodyfont [cambria]$W_i^i$\hss}} {\infofont cambria} {\hbox to 40pt{\hss\showboxes\switchtobodyfont[lucidaot]$W_i^i$\hss}} {\infofont lucida} {\hbox to 40pt{\hss\showboxes\switchtobodyfont [pagella]$W_i^i$\hss}} {\infofont pagella} \stopcombination \stopTEXpage \stoptext Once the math fonts are stable and frozen I'll come up with a solution (in ConTeXt) for this. Luatex < 0.85 had a mixed code path for dealing with italics (adding them always and removing them selectively) but as the standard is not more explicit about where to apply italic correction these code paths have been separated. In ConTeXt we had some italic correction juggling (basically i disabled passing them to the engine and applied them selectively) but because lm / rest of ot is not consistent it never was satisfying. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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] Incorrect math kerning
Hi, This is based on a question about latex on tex.stackexchange: http://tex.stackexchange.com/q/312098/323 but context shows the same behaviour. The subscript "i" in the following example is kerned incorrectly (it is too far away from W). Is this a bug in the font, or with the fontloader? \setupbodyfont[cambria] \starttext \startTEXpage[offset=2mm] $W_i^i$ \stopTEXpage \stoptext 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] what does rscale=auto achieve?
Pablo Rodriguez <mailto:oi...@gmx.es> 15. Mai 2016 um 16:58 Dear list, I have the following sample: \definefallbackfamily [mainface] [rm] [DejaVu Serif] [preset=range:cyrillic, rscale=auto] \definefallbackfamily [mainface] [rm] [GFS Didot] [preset=range:greek, rscale=auto] \definefontfamily [mainface] [rm] [TeX Gyre Termes] \setupbodyfont[mainface] \starttext \startTEXpage[offset=1em] аaα \stopTEXpage \stoptext I thought that "rscale=auto" would scale the typeface so that its x-height would match the x-height from the main typeface. Since I don’t see any scaling, could anyone explain me what I’m missing? 1. Only \definetypeface supports rscale=auto, the \definefontfallback accepts only number values for the rscale key. 2. You have to use scale instead of rscale for the \definefontfamily and \definefallbackfamily commands for the moment but I will change it to rscale. 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] what does rscale=auto achieve?
Dear list, I have the following sample: \definefallbackfamily [mainface] [rm] [DejaVu Serif] [preset=range:cyrillic, rscale=auto] \definefallbackfamily [mainface] [rm] [GFS Didot] [preset=range:greek, rscale=auto] \definefontfamily [mainface] [rm] [TeX Gyre Termes] \setupbodyfont[mainface] \starttext \startTEXpage[offset=1em] аaα \stopTEXpage \stoptext I thought that "rscale=auto" would scale the typeface so that its x-height would match the x-height from the main typeface. Since I don’t see any scaling, could anyone explain me what I’m missing? Many thanks for your help, Pablo -- http://www.ousia.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 ___
[NTG-context] uppercase, small caps, numerals and German capital sharp s
Hello, I'm new to ConTeXt and this list. After a long time of using LaTeX and xeLaTeX I was finally lured into trying ConTexT by its ability of grid typesetting. Today's problem is a bit complex. In a book project I have several points where stuff is capitalized or turned into caps+smallcaps or pure smallcaps. My guess is that that should work either with \WORD{Stuff}, \Cap{Stuff} and \cap{Stuff} or with \uppercase, \sc, and {\sc\lowercase{Stuff}}. (Not quite, it seems) I'll use a commercial font called Calluna, but have added Linux Biolinum O to the example for those who don't want to download Calluna (the "Regular" can be "bought" for free, e.g. at https://www.fontspring.com/fonts/exljbris/calluna). Both Calluna and Biolinum contain the glyph "LATIN CAPITAL LETTER SHARP S" at "1E9E. I'm not sure if they contain a small or medium caps version. I'd like to use that glyph in the capitalizations mentioned, but it only works erratically (cf. example). Also, Calluna comes with oldstyle numerals switched on, which is nice for normal text, but should change to lining numbers in all-caps and to small-cap lining numbers in all-small-cap text. I'm not sure what I'll want in a caps+smallcaps context, but certainly not oldstyle numbers with their descenders. Any ideas? Thanks for reading! -- Thomas PS: I asked the same question on stackexchange, there's also an image of the result of my example: http://tex.stackexchange.com/questions/302823/context-uppercase-%C3%9F-customizing-glyph-substitution %% \mainlanguage[de] \language[de] \uccode`ß="1E9E% This gives the capital ß to \uppercase \definefontfeature[fcalluna][default][] % I tried all the font features built % into Calluna, to no avail. \definefontfamily [myfamily] [serif][Calluna][features=fcalluna] \definefontfamily [myfamily] [sans] [Linux Biolinum O][features=fcalluna] \definefontfamily [myfamily] [mono] [TeX Gyre Cursor] \setupbodyfont [myfamily] \startTEXpage[offset=10pt] \starttabulate[|l|l|l|] \NC \it Command \NC \it Calluna \NC \it Linux Biolinum \NC\NR \NC\type{\WORD{Gruß134}}: \NC\WORD{Gruß134} \NC {\ss\WORD{Gruß134}} \NC\NR \NC\type{\uppercase{Gruß134}}: \NC\uppercase{Gruß134} \NC{\ss\uppercase{Gruß134}} \NC\NR \NC\type{\sc{Gruß134}}: \NC{\sc Gruß134} \NC{\ss{\sc Gruß134}} \NC\NR \NC\type{\Cap{Gruß134}:} \NC\Cap{Gruß134} \NC{\ss \Cap{Gruß134}} \NC\NR \NC\type{\cap{Gruß134}:} \NC\cap{Gruß134} \NC{\ss \cap{Gruß134}} \NC\NR \NC\type{{\sc\lowercase{Gruß134}}:} \NC{\sc\lowercase{Gruß134}} \NC{\ss\sc\lowercase{Gruß134}} \NC\NR \stoptabulate \stopTEXpage %% ___ 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] Test Suite Fonts "extensions-001"
Below is a minimal not-working example extracted from "extensions-001.tex" in the fonts section of the test suite. From what I understand of the code, the second line should read "XPrXcXdXPrX" instead of "abracadabra". But it doesn't, it is still "abracadabra". Compiling the original extensions-001 gives me seven lines of "abracadabra". What am I doing wrong? I'm running ConTeXt version 2015.05.18 12:26 MKIV current fmt: 2016.4.28 from the debian/ubuntu texlive packets. \startluacode fonts.handlers.otf.addfeature { name = "stest", type = "substitution", data = { a = "X", b = "P", } } \stopluacode \definefontfeature[stest][stest=yes] \starttext \startTEXpage \definedfont[file:DejaVuSerif.ttf*default]% abracadabra\par {\addff{stest}abracadabra\par} \stopTEXpage \stoptext ___ 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] uppercase, small caps, numerals and German capital sharp s
Hello, I'm new to ConTeXt and this list. After a long time of using LaTeX and xeLaTeX I was finally lured into trying ConTexT by its ability of grid typesetting. Today's problem is a bit complex. In a book project I have several points where stuff is capitalized or turned into caps+smallcaps or pure smallcaps. My guess is that that should work either with \WORD{Stuff}, \Cap{Stuff} and \cap{Stuff} or with \uppercase, \sc, and {\sc\lowercase{Stuff}}. (Not quite, it seems) I'll use a commercial font called Calluna, but have added Linux Biolinum O to the example for those who don't want to download Calluna (the "Regular" can be "bought" for free, e.g. at https://www.fontspring.com/fonts/exljbris/calluna). Both Calluna and Biolinum contain the glyph "LATIN CAPITAL LETTER SHARP S" at "1E9E. Calluna also has a small caps version at "F727", while Biolinum has it at "E092. I'd like to use these glyphs in the capitalizations mentioned, but that only works erratically (cf. example). Secondly, Calluna comes with oldstyle numerals switched on, which is nice for normal text, but should change to proportional lining numbers in uppercase and to small-cap proportional lining numbers in an all-small-cap text. I'm not sure what I'd want in a caps+smallcaps context, but certainly not oldstyle numerals with their descenders. Any hints and ideas? Thanks for reading! -- Thomas PS: I asked the same question on stackexchange, there's also an image of the result of my example: http://tex.stackexchange.com/questions/302823/context-uppercase-%C3%9F-customizing-glyph-substitution %% \mainlanguage[de] \language[de] \uccode`ß="1E9E% This gives the capital ß to \uppercase \definefontfeature[fcalluna][default][] % I tried all the font features built into Calluna, to no avail. \definefontfamily [myfamily] [serif][Calluna][features=fcalluna] \definefontfamily [myfamily] [sans] [Linux Biolinum O][features=fcalluna] \definefontfamily [myfamily] [mono] [TeX Gyre Cursor] \setupbodyfont [myfamily] \startTEXpage[offset=10pt] \starttabulate[|l|l|l|] \NC \it Command \NC \it Calluna \NC \it Linux Biolinum \NC\NR \NC\type{\WORD{Gruß134}}: \NC\WORD{Gruß134} \NC {\ss\WORD{Gruß134}} \NC\NR \NC\type{\uppercase{Gruß134}}: \NC\uppercase{Gruß134} \NC{\ss\uppercase{Gruß134}} \NC\NR \NC\type{\sc{Gruß134}}: \NC{\sc Gruß134} \NC{\ss{\sc Gruß134}} \NC\NR \NC\type{\Cap{Gruß134}:} \NC\Cap{Gruß134} \NC{\ss \Cap{Gruß134}} \NC\NR \NC\type{\cap{Gruß134}:} \NC\cap{Gruß134} \NC{\ss \cap{Gruß134}} \NC\NR \NC\type{{\sc\lowercase{Gruß134}}:} \NC{\sc\lowercase{Gruß134}} \NC{\ss\sc\lowercase{Gruß134}} \NC\NR \stoptabulate \stopTEXpage %% ___ 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] \startuseMPgraphic
Thank you Wolfgang, this is a very good explanation. One can simplify one's code, perhaps, by defining MP colors from ConTeXt colors, as in: color orange ; orange := \MPcolor{orange} ; Then, one can use orange. There is not much point in redefining the other colors (red, green, blue, cyan, magenta, yellow, black, white) as they are defined using the same rgb values. In fact, \MPcolor{} simply injects "(r,g,b)" or "(c,m,y,k)" with explicit values into the MP code. Defining new MP colors is less general than explicitly using \MPcolor{...}, for it is limiting, and it would be somewhat silly to add definitions for all of the wonderful colors found in colo-imp-x11, for example. By the way, we added colo-imp-crayola having some funky, hallucinogenic names (according to Hans) as well as colo-imp-ral. (The first might be of interest to Americans and the second to Europeans ;-) Other collections, such as colo-imp-pantone and colo-imp-rosco are not distributed due to copyright restrictions (but I have made private copies, shhh!) Alan On Mon, 11 Apr 2016 22:27:06 +0200 Wolfgang Schuster <schuster.wolfg...@gmail.com> wrote: > There are two way to define colors for a metapost graphics, the first > is to define it with metapost itself. > > %% begin example > \startMPpage > color myred ; myred := (1,0,0) ; > fill fullcircle scaled 3cm withcolor myred ; > \stopMPpage > %% end example > > The disadvantage is that you can use this color only in your graphics > but not in your tex code. > > Now comes the second method where I define the color in tex with the > \definecolor command and access it in metapost with the color > \MPcolor command. > > %% begin example > \definecolor[myred][r=1] > > \startMPpage > fill fullcircle scaled 3cm withcolor \MPcolor{myred} ; > \stopMPpage > %% end example > > > The second part of the questions concerns metapost variables. > > %% begin example > \startuseMPgraphic{mycircle}{diameter,color} > fill fullcircle scaled \MPvariable{diameter} withcolor > \MPvariable{color} ; \stopuseMPgraphic > > \startTEXpage > \useMPgraphic{mycircle}{diameter=3cm,color=red} > \stopTEXpage > %% end example > > The second argument of the \startuseMPgraphic command initializes > the variables of your command and the \MPvariable accesses the value > of the variable. In this case "color" is only the name of the variable > and doesn’t tell if we want a tex defined color or a metapost defined > color. > > In my example the color has to be defined in metapost because after > expansion we end with "withcolor red" in the example. We you want > a color which has been defined in tex you have put \MPcolor around > the \MPvariable command, i.e. "\MPcolor{\MPvariable{color}}". ___ 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 ___