Re: [NTG-context] A better \definesymbol sought
On Fri, 20 Jan 2017 22:33:40 -0500 Rik Kabelwrote: > Can anyone suggest a better way to compose such symbols than using > the raw TeX commands used here? Is there a more ConTeXt-ish way to do > this? Is it possible to get options to center the glyphs from which > the symbol is assembled (separate horizontal and vertical, with the > ability to offset them)? > > Is there a ConTeXt way other than \definesymbol to create such > combined symbols? MetaPost (with textext())? ___ 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] A better \definesymbol sought
ConTeXters, I have been using \definesymbol for a while, and for most purposes it suffices. However, there is one thing that it does not do that perhaps it should. What it does not do is offer the option to center one glyph over another (horizontally and/or vertically) when it should be centered. Rather, it leaves the work to a process of tuning the horizontal and vertical levers (kern and raise here) to get something that is close, but rarely perfect. I also see some problems with the horizontal spacing around the new symbol, but that may be a function of the underlying glyphs here. The following example shows what I mean \definefont [Inits] [dejavusans] \usesymbols[mvs] \define\SqSteel{% \tfc \symbol[martinvogel 2][SquareSteel] } \define\RedSansA{% \tfx \Inits{\red A} } \definesymbol [MyMark] [\SqSteel\kern-.87em{\raise.38ex\hbox{\RedSansA}}] \define\Test{Some text \symbol[MyMark] some more text.\par} \starttext \Test \setupbodyfont[8pt] \Test \setupbodyfont[18pt] \Test \scale[factor=40]{\Test} \stoptext Can anyone suggest a better way to compose such symbols than using the raw TeX commands used here? Is there a more ConTeXt-ish way to do this? Is it possible to get options to center the glyphs from which the symbol is assembled (separate horizontal and vertical, with the ability to offset them)? Is there a ConTeXt way other than \definesymbol to create such combined symbols? -- Rik ___ 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] nested colors problem
Am 20.01.2017 um 23:12 schrieb Henning Hraban Ramm: > Am 2017-01-20 um 22:26 schrieb Peter Rolf: > >> Am 20.01.2017 um 21:54 schrieb Alan Braslau: >>> On Fri, 20 Jan 2017 21:42:16 +0100 >>> Peter Rolf wrote: >>> Maybe intended behaviour, maybe a bug. Donno. >>> >>> Not a bug: color and transparency are not the same thing. >>> >> >> True, but you define and use them at once. How to separate them then? > > Did you look at http://wiki.contextgarden.net/Color/Transparency ? > Thanks for the pointer. The simple solution is just to also define the parameters 't=1,a=1' for the opaque color. Should be mentioned in the docs somewhere and sorry for the noise ;) > > 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 > ___ > ___ 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] nested colors problem
Am 2017-01-20 um 22:26 schrieb Peter Rolf: > Am 20.01.2017 um 21:54 schrieb Alan Braslau: >> On Fri, 20 Jan 2017 21:42:16 +0100 >> Peter Rolf wrote: >> >>> Maybe intended behaviour, maybe a bug. Donno. >> >> Not a bug: color and transparency are not the same thing. >> > > True, but you define and use them at once. How to separate them then? Did you look at http://wiki.contextgarden.net/Color/Transparency ? 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] nested colors problem
Am 20.01.2017 um 21:54 schrieb Alan Braslau: > On Fri, 20 Jan 2017 21:42:16 +0100 > Peter Rolfwrote: > >> Maybe intended behaviour, maybe a bug. Donno. > > Not a bug: color and transparency are not the same thing. > True, but you define and use them at once. How to separate them then? ___ 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] nested colors problem
On Fri, 20 Jan 2017 21:42:16 +0100 Peter Rolfwrote: > Maybe intended behaviour, maybe a bug. Donno. Not a bug: color and transparency are not the same thing. Alan ___ 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] nested colors problem
Hi, the nested color inherits the transparency from it's surrounding color. \definecolor[colA] [r=0,g=0,b=0.01,t=0.2,a=1] % transparent \definecolor[colB] [r=.278431,g=.235294,b=.545098] % opaque \starttext \startcolor[colA] \definedfont[SansBold at 96bp]Titanfall\, \startcolor[colB]2\stopcolor \stopcolor \stoptext ConTeXt version: 2014.11.26 21:43 Maybe intended behaviour, maybe a bug. Donno. Best wishes, Peter \definecolor[colA] [r=0,g=0,b=0.01,t=0.2,a=1] % transparent \definecolor[colB] [r=.278431,g=.235294,b=.545098] % opaque \starttext \startcolor[colA] \definedfont[SansBold at 96bp]Titanfall\, \startcolor[colB]2\stopcolor \stopcolor \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 ___
Re: [NTG-context] dorecurse problem
> On 20 Jan 2017, at 18:00, Rik Kabelwrote: > […] > > Otared, > > I am not sure what you are doing, but if you are using only the code snippet > that Hans posted, you will get a blank page. You have to define the layer and > page background in addition to Hans' snippet. Oh yes… sorry, I am ashamed :-( I just put the code sent by Hans below your’s, and then commented out your code, including the definition of layers and backgounds… Indeed everything works as expected with a buffer. Best regards: OK ___ 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] dorecurse problem
On 2017-01-20 11:42, Otared Kavian wrote: Hi Hans, Unfortunately your workaround with \getbuffer does not produce the correct page: it gives only a blank page. Thanks for your attention: OK On 20 Jan 2017, at 10:08, Hans Hagenwrote: On 1/20/2017 8:59 AM, Aditya Mahajan wrote: On Thu, 19 Jan 2017, Rik Kabel wrote: ConTeXters, When \dorecurse is active in the following MWE, the lines of text are overprinted. At least, this is the case for me, please confirm it for yourself. When \dorecurse is disabled, the lines print as they should, separately. Please tell me what I am doing wrong with this, if anything, and how to fix it. (Running ConTeXt ver: 2017.01.17 17:37 MKIV beta fmt: 2017.1.19 on Win10 x64. There are no errors in the log.) This has nothing to do with \dorecurse, but due to the fact that the argument of \dorecurse or any macro is parsed before the catcode changes introduced by \startlines come into effect. Here is a simpler example demonstrating similar behavior: \def\test#1{#1} \starttext \test{Something \startlines Line one Line two \stoplines} \stoptext Depending on what you want to do, it should be possible to come up with a workaround. \startbuffer \startstandardmakeup \setlayerframed [blocks] [preset=lefttop, frame=off, align=right]{ \startlines Line one on the left Line two on the left \stoplines } \setlayerframed [blocks] [preset=righttop, frame=off, align=flushright]{ \startlines thgir eht no eno eniL thgir eht no owt eniL \stoplines } \stopstandardmakeup \stopbuffer \dorecurse{1}{ \getbuffer } ___ Hans and Aditya, Thank you for the explanation and the workaround. Otared, I am not sure what you are doing, but if you are using only the code snippet that Hans posted, you will get a blank page. You have to define the layer and page background in addition to Hans' snippet. --- Rik ___ 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] dorecurse problem
Hi Hans, Unfortunately your workaround with \getbuffer does not produce the correct page: it gives only a blank page. Thanks for your attention: OK > On 20 Jan 2017, at 10:08, Hans Hagenwrote: > > On 1/20/2017 8:59 AM, Aditya Mahajan wrote: >> On Thu, 19 Jan 2017, Rik Kabel wrote: >> >>> ConTeXters, >>> >>> When \dorecurse is active in the following MWE, the lines of text are >>> overprinted. At least, this is the case for me, please confirm it for >>> yourself. When \dorecurse is disabled, the lines print as they should, >>> separately. Please tell me what I am doing wrong with this, if >>> anything, and how to fix it. (Running ConTeXt ver: 2017.01.17 17:37 >>> MKIV beta fmt: 2017.1.19 on Win10 x64. There are no errors in the log.) >> >> This has nothing to do with \dorecurse, but due to the fact that the >> argument of \dorecurse or any macro is parsed before the catcode changes >> introduced by \startlines come into effect. Here is a simpler example >> demonstrating similar behavior: >> >> \def\test#1{#1} >> >> \starttext >> \test{Something >> \startlines >> Line one >> Line two >> \stoplines} >> \stoptext >> >> Depending on what you want to do, it should be possible to come up with >> a workaround. > > \startbuffer > \startstandardmakeup >\setlayerframed > [blocks] > [preset=lefttop, > frame=off, > align=right]{ > \startlines >Line one on the left >Line two on the left > \stoplines >} >\setlayerframed > [blocks] > [preset=righttop, > frame=off, > align=flushright]{ > \startlines >thgir eht no eno eniL >thgir eht no owt eniL > \stoplines >} > \stopstandardmakeup > \stopbuffer > >\dorecurse{1}{ >\getbuffer >} > > - > 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 > ___ ___ 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] \setupinteraction[focus=standard] not working
Dear List, First of all: Thank you Hans and folks for supporting focus=standard for many things. There are, however, some major places where focus=standard does not work correctly yet. I pick out the simplest and in my opinion most severe one: Floats. \setupexternalfigures[location={local,global,default}] \setupinteraction[state=start, focus=standard] \starttext \about[figure]. \page \placefigure[][figure]{Figure}{\externalfigure[cow.pdf]} \page \input tufte \stoptext The link text on page 1 in the resulting PDF correctly displays "Figure" and the overlayed PDF annotation has a seemingly correct destination "(figure)". But, in the PDF catalog's "Names"-tree the only named destination present has the name "(#1)". This destination points to the correct location on the correct page, it is only the name that should read "(figure)" instead of "(#1)". Please consider fixing at least this issue (even if you are not very fond of focus=standard ;-), as it will be of tremendous value for many users. If I can be of any help, then please let me know. Regards, Christoph ___ 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(?): asciimath does not support ||
Dear devs, In mathematics the norm of something is usually denoted by the double vertical bars, e.g. ||v||. This is not available in asciimath. \usemodule[asciimath] \starttext $\asciimath{ x^* = min { x | sum_{kk} ||f(x_{kk}^{20})|| } }$ \stoptext Could you please add this to the parser? Cheers, Henri ___ 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] dorecurse problem
On 1/20/2017 8:59 AM, Aditya Mahajan wrote: On Thu, 19 Jan 2017, Rik Kabel wrote: ConTeXters, When \dorecurse is active in the following MWE, the lines of text are overprinted. At least, this is the case for me, please confirm it for yourself. When \dorecurse is disabled, the lines print as they should, separately. Please tell me what I am doing wrong with this, if anything, and how to fix it. (Running ConTeXt ver: 2017.01.17 17:37 MKIV beta fmt: 2017.1.19 on Win10 x64. There are no errors in the log.) This has nothing to do with \dorecurse, but due to the fact that the argument of \dorecurse or any macro is parsed before the catcode changes introduced by \startlines come into effect. Here is a simpler example demonstrating similar behavior: \def\test#1{#1} \starttext \test{Something \startlines Line one Line two \stoplines} \stoptext Depending on what you want to do, it should be possible to come up with a workaround. \startbuffer \startstandardmakeup \setlayerframed [blocks] [preset=lefttop, frame=off, align=right]{ \startlines Line one on the left Line two on the left \stoplines } \setlayerframed [blocks] [preset=righttop, frame=off, align=flushright]{ \startlines thgir eht no eno eniL thgir eht no owt eniL \stoplines } \stopstandardmakeup \stopbuffer \dorecurse{1}{ \getbuffer } - 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] dorecurse problem
On Thu, 19 Jan 2017, Rik Kabel wrote: ConTeXters, When \dorecurse is active in the following MWE, the lines of text are overprinted. At least, this is the case for me, please confirm it for yourself. When \dorecurse is disabled, the lines print as they should, separately. Please tell me what I am doing wrong with this, if anything, and how to fix it. (Running ConTeXt ver: 2017.01.17 17:37 MKIV beta fmt: 2017.1.19 on Win10 x64. There are no errors in the log.) This has nothing to do with \dorecurse, but due to the fact that the argument of \dorecurse or any macro is parsed before the catcode changes introduced by \startlines come into effect. Here is a simpler example demonstrating similar behavior: \def\test#1{#1} \starttext \test{Something \startlines Line one Line two \stoplines} \stoptext Depending on what you want to do, it should be possible to come up with a workaround. 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 ___