[NTG-context] doublestroke
Hi, I'm writing math and I'm using modern, and I would like to use doublestroke. There is an example here, http://www.ntg.nl/pipermail/ntg-context/2008/037124.html, but I think it's not likely to work since families aren't used anymore. I really can't think how it should be done, and all I've found would be through some substitution mechanism as described in fonts-mkiv.pdf. I could use an example of replacing a vector of a font, by another font. There might be things too with simplefonts and fallback mechanism, but I haven't seen examples with math. Regards, Chris ___ 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] doublestroke
Still trying to have different blackboard symbols than those default with modern, but also to learn more about fonts, I've found these two examples that I've been trying to adapt to math ( http://tex.stackexchange.com/questions/124824/context-unicode-fallback-font), one involving \definefontfallback, the other one using \setmainfontfallback with some range. It is very interesting because in both cases I completely fail to obtain the result I want. In the first case I do have the symbols from termes, but only some N instead of \char0x2115. In the second case (simplefonts), all symbols follow the required fallback, but the math characters. \definefontfallback [termes_fallback] [termes] [0x-0x] %%[force=no] \Umathquad\displaystyle=1em \Umathaxis\textstyle=.8ex \starttypescript [myModern] \definetypeface [myModern] [rm] [serif] [modern] [default] \definetypeface [myModern] [ss] [sans] [modern] [default] [rscale=0.887] \definetypeface [myModern] [tt] [mono] [modern][default] [rscale=1.163] \definetypeface [myModern] [mm] [math] [termes_fallback] [default] [rscale=1.050] \stoptypescript \usetypescript[myModern] \setupbodyfont[myModern,12pt] \starttext The default one doesn't even seem to have $ℕ \char2115 \Umathchar 0 0 2115\alpha$\char2115, α (alpha). \usemodule[simplefonts] \setmainfontfallback[termes][range={0x-0x}, force=yes, rscale=auto] The default one doesn't even seem to have $\Umathchar002115\utfchar{2115}$ (white circle) or α (alpha). \stoptext Some help with those examples would be very helpful. Regards, Chris On Thu, Dec 19, 2013 at 4:50 PM, Elspeth McGullicuddy elspethmcgullicu...@gmail.com wrote: Hi, I'm writing math and I'm using modern, and I would like to use doublestroke. There is an example here, http://www.ntg.nl/pipermail/ntg-context/2008/037124.html, but I think it's not likely to work since families aren't used anymore. I really can't think how it should be done, and all I've found would be through some substitution mechanism as described in fonts-mkiv.pdf. I could use an example of replacing a vector of a font, by another font. There might be things too with simplefonts and fallback mechanism, but I haven't seen examples with math. Regards, Chris ___ 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] doublestroke
Every single bits of the first part is wrong, I didn't noticed it because it just does nothing. The example of the link though works, of course (the one with \definefontfallback). But to do it with math... I've tried so many possibilities none of which worked... Regards, Chris On Sun, Dec 22, 2013 at 2:47 AM, Elspeth McGullicuddy elspethmcgullicu...@gmail.com wrote: Still trying to have different blackboard symbols than those default with modern, but also to learn more about fonts, I've found these two examples that I've been trying to adapt to math ( http://tex.stackexchange.com/questions/124824/context-unicode-fallback-font), one involving \definefontfallback, the other one using \setmainfontfallback with some range. It is very interesting because in both cases I completely fail to obtain the result I want. In the first case I do have the symbols from termes, but only some N instead of \char0x2115. In the second case (simplefonts), all symbols follow the required fallback, but the math characters. \definefontfallback [termes_fallback] [termes] [0x-0x] %%[force=no] \Umathquad\displaystyle=1em \Umathaxis\textstyle=.8ex \starttypescript [myModern] \definetypeface [myModern] [rm] [serif] [modern] [default] \definetypeface [myModern] [ss] [sans] [modern] [default] [rscale=0.887] \definetypeface [myModern] [tt] [mono] [modern][default] [rscale=1.163] \definetypeface [myModern] [mm] [math] [termes_fallback] [default] [rscale=1.050] \stoptypescript \usetypescript[myModern] \setupbodyfont[myModern,12pt] \starttext The default one doesn't even seem to have $ℕ \char2115 \Umathchar 0 0 2115\alpha$\char2115, α (alpha). \usemodule[simplefonts] \setmainfontfallback[termes][range={0x-0x}, force=yes, rscale=auto] The default one doesn't even seem to have $\Umathchar002115\utfchar{2115}$ (white circle) or α (alpha). \stoptext Some help with those examples would be very helpful. Regards, Chris On Thu, Dec 19, 2013 at 4:50 PM, Elspeth McGullicuddy elspethmcgullicu...@gmail.com wrote: Hi, I'm writing math and I'm using modern, and I would like to use doublestroke. There is an example here, http://www.ntg.nl/pipermail/ntg-context/2008/037124.html, but I think it's not likely to work since families aren't used anymore. I really can't think how it should be done, and all I've found would be through some substitution mechanism as described in fonts-mkiv.pdf. I could use an example of replacing a vector of a font, by another font. There might be things too with simplefonts and fallback mechanism, but I haven't seen examples with math. Regards, Chris ___ 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] doublestroke
First of all, thanks for this quick reply. Now what if as in the example I put, I want to mix, in math mode, some range of modern with some range of termes, which are both otf fonts. Say modern is the default, but the character whose codepoint is 0x2115 (ℕ), is provided by termes? This mechanism could be adapted to any glyph one doesn't like the shape, e.g. substitute thin shaft arrows of modern with thicker shaft arrows of xits. Regards, Chris On Sun, Dec 22, 2013 at 11:56 AM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 22.12.2013 um 04:10 schrieb Elspeth McGullicuddy elspethmcgullicu...@gmail.com: Every single bits of the first part is wrong, I didn't noticed it because it just does nothing. The example of the link though works, of course (the one with \definefontfallback). But to do it with math... I've tried so many possibilities none of which worked… The fallback mechanism won’t work for the double stroke font because it uses the old tex math encoding and not unicode encoding for the characters. 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 ___ ___ 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] doublestroke
This will be great. Soon... My ConTEXt is Debian's sid: context (2013.05.28.20130704-3), which I believe is older than the change in simplefonts you are using in the example. So I think I shall have to proceed to a context-standalone installation. Could you tell me where I could see the sources of this simplefonts version, because doing Google with keyword uppercasedoublestruck doesn' even return a thing. Chris On Sun, Dec 22, 2013 at 2:28 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 22.12.2013 um 14:12 schrieb Elspeth McGullicuddy elspethmcgullicu...@gmail.com: First of all, thanks for this quick reply. Now what if as in the example I put, I want to mix, in math mode, some range of modern with some range of termes, which are both otf fonts. Say modern is the default, but the character whose codepoint is 0x2115 (ℕ), is provided by termes? This mechanism could be adapted to any glyph one doesn't like the shape, e.g. substitute thin shaft arrows of modern with thicker shaft arrows of xits. Hans extended the fallback mechanism a while ago to use it also with math fonts. With the new simplefonts code you have now a high level interface when you use a opentype math font. \definefontfamily [mainface] [rm] [Latin Modern Roman] \definefallbackfamily [mainface] [mm] [TeX Gyre Termes Math] [range=uppercasedoublestruck] \definefontfamily [mainface] [mm] [Latin Modern Math] \setupbodyfont[mainface] \starttext \startformula ABC \quad {\blackboard ABC} \stopformula \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ 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] doublestroke
So far I've failed to find the sources. The only place I've found recent enough sources is there: http://minimals.metatex.org/current/context/experimental/tex/context/base/math-act.lua But the link isn't working. All the other sources I've found do not contain the relevant parts (not up to date). Could you tell me +where+ I could find them. I've downloaded this: rsync -rpztlv --stats contextgarden.net::'minimals/beta/base/tex/ minimals/beta/base/metapost/ minimals/beta/base/xetex/ minimals/beta/misc/web2c' texmf rsync -rpztlv --stats contextgarden.net::'minimals/beta/context/current/ minimals/beta/context/img/ minimals/beta/context/config/' texmf-context rsync -rpztlv --stats contextgarden.net::'minimals/beta/fonts/new/ minimals/beta/fonts/common/ minimals/beta/fonts/other/ minimals/beta/fonts/old/' texmf-fonts rsync -rpztlv --stats contextgarden.net::minimals/beta/misc/setuptex/ . rsync -rpztlv --stats contextgarden.net::'minimals/beta/modules/f-urwgaramond/ minimals/beta/modules/t-bnf/ minimals/beta/modules/…/' texmf-extra But the result contains no *.lua neither *.mkiv Regards, Chris On Sun, Dec 22, 2013 at 3:15 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 22.12.2013 um 15:09 schrieb Elspeth McGullicuddy elspethmcgullicu...@gmail.com: This will be great. Soon... My ConTEXt is Debian's sid: context (2013.05.28.20130704-3), which I believe is older than the change in simplefonts you are using in the example. So I think I shall have to proceed to a context-standalone installation. Could you tell me where I could see the sources of this simplefonts version, because doing Google with keyword uppercasedoublestruck doesn' even return a thing. The new simplefonts is part of context and you can find the code in the files font-sel.mkvi and font-sel.lua. The uppercasedoublestruck keyword for the fallback range is set in math-act.lua. 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 ___ ___ 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] doublestroke
I've done the install with the script and it worked just out of the box. I've found all the sources I was looking for (pity (or not), they are not indexed by google). I've made this tiny change to have the behavior I was looking for: \definefontfamily [mainface] [rm] [Latin Modern Roman] \definefallbackfamily [mainface] [mm] [TeX Gyre Termes Math] [range=uppercasedoublestruck] [force=no] \definefontfamily [mainface] [mm] [TeX Gyre Termes Math] \setupbodyfont[mainface] \starttext \startformula ABC \quad {\blackboard ABC} \stopformula \stoptext Very grateful for this example without which it'd took me ages to get there. (or more likely not to.) Chris On Sun, Dec 22, 2013 at 4:49 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 22.12.2013 um 16:23 schrieb Elspeth McGullicuddy elspethmcgullicu...@gmail.com: So far I've failed to find the sources. The only place I've found recent enough sources is there: http://minimals.metatex.org/current/context/experimental/tex/context/base/math-act.lua But the link isn't working. All the other sources I've found do not contain the relevant parts (not up to date). Could you tell me +where+ I could find them. - http://wiki.contextgarden.net/ConTeXt_Standalone#Unix-like_platforms_.28Linux.2FMacOS_X.2FFreeBSD.2FSolaris.29 - http://standalone.contextgarden.net - https://code.launchpad.net/~reviczky/context-beta/debian-context 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 ___ ___ 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] doublestroke
Seeing the code wasn't producing the expected result I did two change in one go, without clearly noticing it: my mistake. The script as it is, with or without the force, keep drawing the blackboard glyphs with Latin Modern Math. I put the script again so that there is no ambiguity: \definefontfamily [mainface] [rm] [Latin Modern Roman] \definefallbackfamily [mainface] [mm] [TeX Gyre Termes Math] [range=uppercasedoublestruck,force=yes] %\definefontfamily [mainface] [mm] [TeX Gyre Termes Math] \definefontfamily [mainface] [mm] [Latin Modern Math] \setupbodyfont[mainface] \starttext \startformula ABC \quad {\blackboard ABCN} \char2115 % still Latin Modern Math \stopformula \stoptext Chris On Sun, Dec 22, 2013 at 5:40 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 22.12.2013 um 17:33 schrieb Elspeth McGullicuddy elspethmcgullicu...@gmail.com: I've done the install with the script and it worked just out of the box. I've found all the sources I was looking for (pity (or not), they are not indexed by google). I've made this tiny change to have the behavior I was looking for: \definefontfamily [mainface] [rm] [Latin Modern Roman] \definefallbackfamily [mainface] [mm] [TeX Gyre Termes Math] [range=uppercasedoublestruck] [force=no] The “range” and “force” settings have to be set in the same argument and even then I don’t think you want “force=no” because this would take the glyphs from Latin Modern and your fallback font is ignored. The purpose of the “force” and “check” keys is explained in the source for the fallback mechanism: % check : only replace when present in replacement font (default: no) % force : force replacent even when basefont has glyph (default: yes) 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 ___ ___ 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] doublestroke
There it is: how beautiful. Many thanks, Chris On Sun, Dec 22, 2013 at 6:23 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 22.12.2013 um 18:06 schrieb Elspeth McGullicuddy elspethmcgullicu...@gmail.com: Seeing the code wasn't producing the expected result I did two change in one go, without clearly noticing it: my mistake. The script as it is, with or without the force, keep drawing the blackboard glyphs with Latin Modern Math. I put the script again so that there is no ambiguity: \definefontfamily [mainface] [rm] [Latin Modern Roman] \definefallbackfamily [mainface] [mm] [TeX Gyre Termes Math] [range=uppercasedoublestruck,force=yes] \definefallbackfamily [mainface] [mm] [TeX Gyre Termes Math] [range={uppercasedoublestruck,letterlikesymbols}] 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 ___ ___ 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] doublestroke
Hi, I hopped you all had a merry Christmas :-) In the very first working example: \definefontfamily [mainface] [rm] [Latin Modern Roman] \definefallbackfamily [mainface] [mm] [TeX Gyre Termes Math] [range={uppercasedoublestruck}] %%%,letterlikesymbols}] \definefontfamily [mainface] [mm] [Latin Modern Math] \setupbodyfont[mainface] \starttext \startformula ABC \quad {\blackboard AB[C]DEFG[H]IJKLM[N]O[PQR]STUVWXY[Z]} \stopformula \stoptext letters here in brackets weren't rendered as expected... Because there are holes in the uft table as can be seen there: http://www.w3.org/TR/MathML2/double-struck.html Adding the bloks letterlikesymbols was, to an extent solving the problem. Now in my document I am also using calligraphic letters which I want to remain in modern. 1- WHAT DIDN'T WORK: First idea that comes to me is modifying the file: math-act.lua I have added all the lines that are commented out here. blocks[uppercasedoublestruck] = { first = 0x1D538, last = 0x1D550 } %0x1D551 is not attributed %blocks[uppercasedoublestruckc] = { first = 0x02102, last = 0x02102 } % %blocks[uppercasedoublestruckh] = { first = 0x0210D, last = 0x0210D } % %blocks[uppercasedoublestruckn] = { first = 0x02115, last = 0x02115 } % %blocks[uppercasedoublestruckp] = { first = 0x02119, last = 0x02119 } % %blocks[uppercasedoublestruckq] = { first = 0x0211A, last = 0x0211A } % %blocks[uppercasedoublestruckr] = { first = 0x0211D, last = 0x0211D } % %blocks[uppercasedoublestruckz] = { first = 0x02124, last = 0x02124 } % It just didn't work. Compiled but fail to provided expected result: Everything was in modern. 2- WHAT WORKED \definefontfamily [mainface] [rm] [Latin Modern Roman] \definefallbackfamily [mainface] [mm] [TeX Gyre Termes Math] [range={uppercasedoublestruck,0x02102,0x0210D,0x02115,0x02119,0x0211A,0x0211D,0x02124}] \definefontfamily [mainface] [mm] [Latin Modern Math] \setupbodyfont[mainface] \starttext \startformula \int_a^b \quad ABC \quad {\blackboard AB[C]DEFG[H]IJKLM[N]O[PQR]STUVWXY[Z]} \stopformula \stoptext 3-QUESTION Unless I'm completely wrong, the modification I've made to the file: math-act.lua haven't been taken into account at all: even if I modify the line uppercasedoublestruck such as to reduce the range: blocks[uppercasedoublestruck] = { first = 0x1D538, last = 0x1D540 } my \blackboard UVXY keep to be rendered with term... So why? Regards, Chris ___ 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] doublestroke
Thanks Wolfgang for the context --make en tips. Thanks Hans for having filled the gaps. Regards, Chris On Thu, Dec 26, 2013 at 12:57 PM, Hans Hagen pra...@wxs.nl wrote: On 12/26/2013 9:09 AM, Wolfgang Schuster wrote: Am 26.12.2013 um 01:01 schrieb Elspeth McGullicuddy elspethmcgullicu...@gmail.com: Hi, I hopped you all had a merry Christmas :-) In the very first working example: \definefontfamily [mainface] [rm] [Latin Modern Roman] \definefallbackfamily [mainface] [mm] [TeX Gyre Termes Math] [range={uppercasedoublestruck}] %%%,letterlikesymbols}] \definefontfamily [mainface] [mm] [Latin Modern Math] \setupbodyfont[mainface] \starttext \startformula ABC \quad {\blackboard AB[C]DEFG[H]IJKLM[N]O[PQR]STUVWXY[Z]} \stopformula \stoptext letters here in brackets weren't rendered as expected... Because there are holes in the uft table as can be seen there: http://www.w3.org/TR/MathML2/double-struck.html Adding the bloks letterlikesymbols was, to an extent solving the problem. Now in my document I am also using calligraphic letters which I want to remain in modern. 1- WHAT DIDN'T WORK: First idea that comes to me is modifying the file: math-act.lua I have added all the lines that are commented out here. blocks[uppercasedoublestruck] = { first = 0x1D538, last = 0x1D550 } %0x1D551 is not attributed %blocks[uppercasedoublestruckc] = { first = 0x02102, last = 0x02102 } % %blocks[uppercasedoublestruckh] = { first = 0x0210D, last = 0x0210D } % %blocks[uppercasedoublestruckn] = { first = 0x02115, last = 0x02115 } % %blocks[uppercasedoublestruckp] = { first = 0x02119, last = 0x02119 } % %blocks[uppercasedoublestruckq] = { first = 0x0211A, last = 0x0211A } % %blocks[uppercasedoublestruckr] = { first = 0x0211D, last = 0x0211D } % %blocks[uppercasedoublestruckz] = { first = 0x02124, last = 0x02124 } % It just didn't work. Compiled but fail to provided expected result: Everything was in modern. 2- WHAT WORKED \definefontfamily [mainface] [rm] [Latin Modern Roman] \definefallbackfamily [mainface] [mm] [TeX Gyre Termes Math] [range={uppercasedoublestruck,0x02102,0x0210D,0x02115,0x02119,0x0211A,0x0211D,0x02124}] \definefontfamily [mainface] [mm] [Latin Modern Math] \setupbodyfont[mainface] \starttext \startformula \int_a^b \quad ABC \quad {\blackboard AB[C]DEFG[H]IJKLM[N]O[PQR]STUVWXY[Z]} \stopformula \stoptext 3-QUESTION Unless I'm completely wrong, the modification I've made to the file: math-act.lua haven't been taken into account at all: even if I modify the line uppercasedoublestruck such as to reduce the range: blocks[uppercasedoublestruck] = { first = 0x1D538, last = 0x1D540 } my \blackboard UVXY keep to be rendered with term... So why? 1. When you make a change in the code you have to remake the format file (context —make en). 2. When you write many lines in the form “blocks[name] = { first=…, last=… }” you do only replace the previous setting but don’t add new entries to the table. 3. Part of the problem is mess in unicode because the symbols you need are scattered, see http://www.unicode.org/charts/PDF/U1D400.pdf and here http://www.unicode.org/charts/PDF/U2100.pdf I now support 'gaps' (blocks have a gaps entry). Beta uploaded. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | 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 ___ ___ 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] kpfonts, math, type 1 font
Hi everybody, (best wishes for this new year by the way). There is this font: http://www.ctan.org/pkg/kpfonts Which is a postscript type 1 font, text and math. I've copied the files in the right places in the ${HOME}/texmf tree. And a call to: mtxrun --script fonts --list --all --pattern=*kp*, after a mtxrun --script fonts --reload seems to indicate that it is found by context all right. But now I haven't got the faintest idea on how to use it in a ConTEXt document -- text + math. My ConTEXt is beta not older than a fortnight. All examples I've found that could possibly apply were at least far too complicate for my understanding, also likely outdated. Regards, Chris ___ 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] kpfonts, math, type 1 font
Thanks for the quick answer. I'm not completely sure about the lua files for math support that I should use as template. The Palatino one I haven't found; The Garamond-math one might be that: mdugm-math.lfg: return { name = mdugm-math, version = 1.00, comment = Math fonts that complement URW Garamond., author = Hans, Mojca, Aditya, copyright = ConTeXt development team, mathematics = { mapfiles = { mdugm.map, mkiv-base.map, }, virtuals = { [mdugm-rm] = { { name = file:ugmr8a, features = virtualmath, main = true }, { name = mdugmr7m, vector = tex-mr, skewchar=0x7F }, { name = mdugmri7m, vector = tex-mi, skewchar=0x7F }, { name = mdugmri7m, vector = tex-it, skewchar=0x7F }, { name = mdugmm7m, vector = tex-bf, skewchar=0x7F }, { name = mdugmmi7m, vector = tex-bi, skewchar=0x7F }, { name = mdugmr7y, vector = tex-sy, skewchar=0x30, parameters = true }, { name = mdugmr7v, vector = tex-ex, extension = true }, { name = mdugmrma, vector = tex-ma }, { name = mdugmrmb, vector = tex-mb }, }, [mdugm-bf] = { { name = file:ugmm8a, features = virtualmath, main = true }, { name = mdugmm7m, vector = tex-mr, skewchar=0x7F }, { name = mdugmmi7m, vector = tex-mi, skewchar=0x7F }, { name = mdugmmi7m, vector = tex-it, skewchar=0x7F }, { name = mdugmm7y, vector = tex-sy, skewchar=0x30, parameters = true }, { name = mdugmm7v, vector = tex-ex, extension = true }, { name = mdugmmma, vector = tex-ma }, { name = mdugmmmb, vector = tex-mb }, } } } } In this example, I believe the files involved are tfm files (ugmr8a.tfm, mdugmr7m.vf, in http://packages.debian.org/squeeze/all/texlive-fonts-extra/filelist) Note: the afm files of kpfonts are ziped in the doc directory. And I've got vf files, 688 of them. If you have other examples which I could be sure about, I'd be glad to have them. Regards, Chris On Tue, Jan 7, 2014 at 12:09 AM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 06.01.2014 um 19:56 schrieb Elspeth McGullicuddy elspethmcgullicu...@gmail.com: Hi everybody, (best wishes for this new year by the way). There is this font: http://www.ctan.org/pkg/kpfonts Which is a postscript type 1 font, text and math. I've copied the files in the right places in the ${HOME}/texmf tree. And a call to: mtxrun --script fonts --list --all --pattern=*kp*, after a mtxrun --script fonts --reload seems to indicate that it is found by context all right. But now I haven't got the faintest idea on how to use it in a ConTEXt document -- text + math. My ConTEXt is beta not older than a fortnight. All examples I've found that could possibly apply were at least far too complicate for my understanding, also likely outdated. Using a text font in type1-format is very easy, all you need is the afm and the pfb-file. The font files are put in the tex folder and to use them in your document you have to write a short typescript, below is a example how to use the urn garamond font. \starttypescript [serif] [charter] \setups[font:fallback:serif] \definefontsynonym [Serif] [file:ugmr8a.afm] [features=complete] \stoptypescript \definetypeface [mainface] [rm] [serif] [charter] [default] \setupbodyfont[mainface] \starttext \input knuth \stoptext The same has to be done for the kpfont but there is one problem, the archive on cyan doesn’t provide afm-files and you have to generate them yourself. Since the font provides only tfm-files it would be also possible to them but it’s better to work with afm-files. Adding support for the math font requires more work because you have to write also a Lua file where you specify which file is used for symbols, operator, letters etc. This isn’t very complicated (you can just modify the files for palatino or garamond math), you have to only look which files are used for the math fonts. 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 ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] kpfonts, math, type 1 font
On Tue, Jan 7, 2014 at 4:32 PM, Hans Hagen pra...@wxs.nl wrote: On 1/7/2014 4:35 AM, Elspeth McGullicuddy wrote: The Garamond-math one might be that: mdugm-math.lfg: return { name = mdugm-math, version = 1.00, comment = Math fonts that complement URW Garamond., author = Hans, Mojca, Aditya, copyright = ConTeXt development team, mathematics = { mapfiles = { mdugm.map, mkiv-base.map, }, virtuals = { [mdugm-rm] = { { name = file:ugmr8a, features = virtualmath, main = true }, { name = mdugmr7m, vector = tex-mr, skewchar=0x7F }, { name = mdugmri7m, vector = tex-mi, skewchar=0x7F }, { name = mdugmri7m, vector = tex-it, skewchar=0x7F }, { name = mdugmm7m, vector = tex-bf, skewchar=0x7F }, { name = mdugmmi7m, vector = tex-bi, skewchar=0x7F }, { name = mdugmr7y, vector = tex-sy, skewchar=0x30, parameters = true }, { name = mdugmr7v, vector = tex-ex, extension = true }, { name = mdugmrma, vector = tex-ma }, { name = mdugmrmb, vector = tex-mb }, }, [mdugm-bf] = { { name = file:ugmm8a, features = virtualmath, main = true }, { name = mdugmm7m, vector = tex-mr, skewchar=0x7F }, { name = mdugmmi7m, vector = tex-mi, skewchar=0x7F }, { name = mdugmmi7m, vector = tex-it, skewchar=0x7F }, { name = mdugmm7y, vector = tex-sy, skewchar=0x30, parameters = true }, { name = mdugmm7v, vector = tex-ex, extension = true }, { name = mdugmmma, vector = tex-ma }, { name = mdugmmmb, vector = tex-mb }, } } } } indeed you have to make such a table for any math font combination you want (when using type 1 fonts) In this example, I believe the files involved are tfm files (ugmr8a.tfm, mdugmr7m.vf, in http://packages.debian.org/squeeze/all/texlive-fonts-extra/filelist) Note: the afm files of kpfonts are ziped in the doc directory. And I've got vf files, 688 of them. normally you don't need more files than the ones you mention in the table; best prevent too much polution of your tree by tfm/vf files (if you know exactly what you need you can make a path fonts/data/xxx/ and put all relevant files there so that you keep the overview) Hans Thanks, I'll experiment in that direction and say when there are results. The files like tfm, afm, pfb,... seem to be found alright by mtxrun --script fonts --reload when they are in the ${HOME}/texmf/fonts/ tree, so I think I can leave them there. So I should make a sort of copy of mdugm-math.lgf and call it kpfonts-math.lgf, and put it in ${HOME}/context/tex/texmf-context/tex/context/fonts/. [Do the same with a copy of type-imp-mathdesign.mkiv, which contains: \loadfontgoodies[mdugm-math].] Or rather put a typescript in my document file as explained here: http://wiki.contextgarden.net/Math_fonts, and insert some \loadfontgoodies[kpfonts-math] in it. Execute: context --make en. And that should be it. What is the \s! syntax for, as in \s!Serif? Chris ___ 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] kpfonts, math, type 1 font
On Tue, Jan 7, 2014 at 8:48 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: You can also put the goodies files and the typescript file in the same folder as your test files which makes it easier to test them and to make changes. When you’re finished you can let us take a look at them and Hans can add them to the core. Two files: kpfonts-math.lfg and testfile004.tex. It works rather well with the formulas of that file: https://github.com/khaledhosny/euler-otf/blob/master/tests/test.tex. Main issue: $\bf \Gamma$ produces medium \Gamma, though: [kpfonts-bf] = {... { name = jkpbmia, vector = tex-mr, skewchar=0x7F }, should make it bold. Why is this vector never selected? Other issue: Two consecutive \Gamma, are overlapping a lot. In case I add a vector for a script font which is in jkpsyd.pfb. What font switch would be used to select this vector (vector=tex-md)? Chris Wolfgang kpfonts-math.lfg Description: Binary data testfile004.tex Description: TeX 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] kpfonts, math, type 1 font
On Fri, Jan 10, 2014 at 4:54 AM, Elspeth McGullicuddy elspethmcgullicu...@gmail.com wrote: On Tue, Jan 7, 2014 at 8:48 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: You can also put the goodies files and the typescript file in the same folder as your test files which makes it easier to test them and to make changes. When you’re finished you can let us take a look at them and Hans can add them to the core. Two files: kpfonts-math.lfg and testfile004.tex. It works rather well with the formulas of that file: https://github.com/khaledhosny/euler-otf/blob/master/tests/test.tex. Main issue: $\bf \Gamma$ produces medium \Gamma, though: [kpfonts-bf] = {... { name = jkpbmia, vector = tex-mr, skewchar=0x7F }, should make it bold. Why is this vector never selected? Other issue: Two consecutive \Gamma, are overlapping a lot. In case I add a vector for a script font which is in jkpsyd.pfb. What font switch would be used to select this vector (vector=tex-md)? Chris I tried the example of Problem to install Garamond font with mathdesign. It for me, save I encounter exactly the same problems as those I've described for KPfonts, using, in fact, mathdesign as template. (Note: it's pure ConTEXt-standalone: I do not have these fonts in my TeX-Live tree. Though I do have these fonts, installed manually, from ctan, in my local ${HOME}/texmf/fonts/ tree.) % file: test.tex \loadtypescriptfile[mathdesign] \starttext $\Gamma\Gamma\bf\Gamma$ \setupbodyfont[garamond] $\Gamma\Gamma\bf\Gamma$ \stoptext (Gammas are squeezed together and \bf is ineffective, which is not so with modern). If the assumption that mdugmr7m.tfm contains the metrics for md-gmm7m.pfb is correct, then fontforge show it (mdugmr7m), contains bold characters, which then should show. Again, I might be misunderstanding. Chris Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem to install Garamond font with mathdesign
On Thu, Jan 2, 2014 at 10:50 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 02.01.2014 um 02:46 schrieb Fabrice Couvreur fabrice1.couvr...@gmail.com: Hi, This seems to work. = \loadtypescriptfile[mathdesign] \setupbodyfont[garamond] \starttext Some random text and \math{\alpha=\frac{-b}{2a}} \stoptext mtx-context | run 1: luatex --fmt=/home/fab/texlive/2013/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en --jobname=demo5 --lua=/home/fab/texlive/2013/texmf-var/luatex-cache/context/a86c089b384a3076dc514ba966a1fac9/formats/luatex/cont-en.lui --no-parse-first-line --c:currentrun=1 --c:fulljobname=./demo5.tex --c:input=./demo5.tex --c:kindofrun=1 --c:maxnofruns=8 cont-yes.mkiv This is LuaTeX, Version beta-0.76.0-2013061708 (rev 4627) \write18 enabled. (/home/fab/texlive/2013/texmf-dist/tex/context/base/cont-yes.mkiv ConTeXt ver: 2013.05.28 00:36 MKIV current fmt: 2013.12.31 int: english/english What have you done because you’re still using TeXLive and the last stable where support for math design wasn’t solved very well. Wolfgang The given example works for me, with context-standalone, with some issues though. I've already put the details in a mail sent a couple of minutes ago (kpfonts). Chris ___ 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] kpfonts, math, type 1 font
As for the point: bold uppercase greek letters aren’t mapped I've inserted the following at the beginning of file pkfonts-math.lfg: (I put the whole file it'll be easier to understand) = capital greek are not showing though I've mimicked the file lucida-typeone-math.lfg. -- file: kpfonts-math.lfg local mathencodings = fonts.encodings.math mathencodings[tex-mrb] = { [0x1D6AA] = 0x00, -- Gamma [0x1D6AB] = 0x01, -- Delta [0x1D6AF] = 0x02, -- Theta [0x1D6B2] = 0x03, -- Lambda [0x1D6B5] = 0x04, -- Xi [0x1D6B7] = 0x05, -- Pi [0x1D6BA] = 0x06, -- Sigma [0x1D6BC] = 0x07, -- Upsilon [0x1D6BD] = 0x08, -- Phi [0x1D6BF] = 0x09, -- Psi [0x1D6C0] = 0x0A, -- Omega [0x1D6A8] = 0x41, -- Alpha [0x1D6A9] = 0x42, -- Beta -- [0x02145] = 0x44, [0x1D6AC] = 0x45, -- Epsilon [0x1D6AE] = 0x48, -- Eta [0x1D6B0] = 0x49, -- Iota [0x1D6B1] = 0x4B, -- Kappa [0x1D6B3] = 0x4D, -- Mu [0x1D6B4] = 0x4E, -- Nu [0x1D6B6] = 0x4F, -- Omicron [0x1D6B8] = 0x52, -- Rho [0x1D6BB] = 0x54, -- Tau [0x1D6BE] = 0x58, -- Chi [0x1D6AD] = 0x5A, -- Zeta --[0x00302] = 0x5E, -- [math]hat -- the real math one --[0x02146] = 0x64, --[0x02147] = 0x65, --[0x00303] = 0x7E, -- [math]tilde -- the real one } return { name = kpfonts-math, version = 1.00, comment = kpfonts, math part., author = Chris, copyright = ConTeXt development team, mathematics = { mapfiles = { kpfonts.map, -- mkiv-base.map, }, virtuals = { [kpfonts-rm] = { -- MathRoman { name = file:jkpmn8a, features = virtualmath, main = true }, { name = jkpmia, vector = tex-mr, skewchar=0x7F }, { name = jkpmi, vector = tex-mi, skewchar=0x7F }, { name = jkpmi, vector = tex-it, skewchar=0x7F }, { name = jkpbn8a, vector = tex-bf, skewchar=0x7F }, { name = jkpbmi, vector = tex-bi, skewchar=0x7F }, { name = jkpsy, vector = tex-sy, skewchar=0x30, parameters = true }, { name = jkpex, vector = tex-ex, extension = true }, { name = jkpsya, vector = tex-ma }, { name = jkpsyb, vector = tex-mb }, }, [kpfonts-bf] = { -- MathRomanBold { name = file:jkpbn8a, features = virtualmath, main = true }, { name = jkpbmia, vector = tex-mrb, skewchar=0x7F }, -- this line modified accordingly { name = jkpbmi, vector = tex-mi, skewchar=0x7F }, { name = jkpbmi, vector = tex-it, skewchar=0x7F }, { name = jkpbsy, vector = tex-sy, skewchar=0x30, parameters = true }, { name = jkpbex, vector = tex-ex, extension = true }, { name = jkpbsya, vector = tex-ma }, { name = jkpbsyb, vector = tex-mb }, } } } } On Sat, Jan 11, 2014 at 3:03 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 10.01.2014 um 23:38 schrieb Elspeth McGullicuddy elspethmcgullicu...@gmail.com: (Gammas are squeezed together and \bf is ineffective, which is not so with modern). The characters are squeezed together because the font has wrong metrics. If the assumption that mdugmr7m.tfm contains the metrics for md-gmm7m.pfb is correct, then fontforge show it (mdugmr7m), contains bold characters, which then should show. When you use a Type 1 math font with ConTeXt MkIV all characters in the different files are mapped to the corresponding unicode points but these mappings aren’t complete (e.g. bold uppercase greek letters aren’t mapped). For some fonts you would also need a custom mapping because not all fonts put the symbols in the same position. 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 ___ ___ 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] kpfonts, math, type 1 font
As for the first point: buggy afm files, I've tried generate font from fontforge interface: Even though I've let fontforge proceed to many auto-corrections, the output produced and then installed seems not to fit the bill: nothing is showing. I reckon I've learned as much as can be done in one go: = I temporarily give up. Nevertheless if one have information about the vector I wrote for bold Greek: why that didn't work, I'll will gladly have it. Chris On Sat, Jan 11, 2014 at 7:36 PM, Elspeth McGullicuddy elspethmcgullicu...@gmail.com wrote: As for the point: bold uppercase greek letters aren’t mapped I've inserted the following at the beginning of file pkfonts-math.lfg: (I put the whole file it'll be easier to understand) = capital greek are not showing though I've mimicked the file lucida-typeone-math.lfg. -- file: kpfonts-math.lfg local mathencodings = fonts.encodings.math mathencodings[tex-mrb] = { [0x1D6AA] = 0x00, -- Gamma [0x1D6AB] = 0x01, -- Delta [0x1D6AF] = 0x02, -- Theta [0x1D6B2] = 0x03, -- Lambda [0x1D6B5] = 0x04, -- Xi [0x1D6B7] = 0x05, -- Pi [0x1D6BA] = 0x06, -- Sigma [0x1D6BC] = 0x07, -- Upsilon [0x1D6BD] = 0x08, -- Phi [0x1D6BF] = 0x09, -- Psi [0x1D6C0] = 0x0A, -- Omega [0x1D6A8] = 0x41, -- Alpha [0x1D6A9] = 0x42, -- Beta -- [0x02145] = 0x44, [0x1D6AC] = 0x45, -- Epsilon [0x1D6AE] = 0x48, -- Eta [0x1D6B0] = 0x49, -- Iota [0x1D6B1] = 0x4B, -- Kappa [0x1D6B3] = 0x4D, -- Mu [0x1D6B4] = 0x4E, -- Nu [0x1D6B6] = 0x4F, -- Omicron [0x1D6B8] = 0x52, -- Rho [0x1D6BB] = 0x54, -- Tau [0x1D6BE] = 0x58, -- Chi [0x1D6AD] = 0x5A, -- Zeta --[0x00302] = 0x5E, -- [math]hat -- the real math one --[0x02146] = 0x64, --[0x02147] = 0x65, --[0x00303] = 0x7E, -- [math]tilde -- the real one } return { name = kpfonts-math, version = 1.00, comment = kpfonts, math part., author = Chris, copyright = ConTeXt development team, mathematics = { mapfiles = { kpfonts.map, -- mkiv-base.map, }, virtuals = { [kpfonts-rm] = { -- MathRoman { name = file:jkpmn8a, features = virtualmath, main = true }, { name = jkpmia, vector = tex-mr, skewchar=0x7F }, { name = jkpmi, vector = tex-mi, skewchar=0x7F }, { name = jkpmi, vector = tex-it, skewchar=0x7F }, { name = jkpbn8a, vector = tex-bf, skewchar=0x7F }, { name = jkpbmi, vector = tex-bi, skewchar=0x7F }, { name = jkpsy, vector = tex-sy, skewchar=0x30, parameters = true }, { name = jkpex, vector = tex-ex, extension = true }, { name = jkpsya, vector = tex-ma }, { name = jkpsyb, vector = tex-mb }, }, [kpfonts-bf] = { -- MathRomanBold { name = file:jkpbn8a, features = virtualmath, main = true }, { name = jkpbmia, vector = tex-mrb, skewchar=0x7F }, -- this line modified accordingly { name = jkpbmi, vector = tex-mi, skewchar=0x7F }, { name = jkpbmi, vector = tex-it, skewchar=0x7F }, { name = jkpbsy, vector = tex-sy, skewchar=0x30, parameters = true }, { name = jkpbex, vector = tex-ex, extension = true }, { name = jkpbsya, vector = tex-ma }, { name = jkpbsyb, vector = tex-mb }, } } } } On Sat, Jan 11, 2014 at 3:03 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 10.01.2014 um 23:38 schrieb Elspeth McGullicuddy elspethmcgullicu...@gmail.com: (Gammas are squeezed together and \bf is ineffective, which is not so with modern). The characters are squeezed together because the font has wrong metrics. If the assumption that mdugmr7m.tfm contains the metrics for md-gmm7m.pfb is correct, then fontforge show it (mdugmr7m), contains bold characters, which then should show. When you use a Type 1 math font with ConTeXt MkIV all characters in the different files are mapped to the corresponding unicode points but these mappings aren’t complete (e.g. bold uppercase greek letters aren’t mapped). For some fonts you would also need a custom mapping because not all fonts put the symbols in the same position. 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 ___ ___ If your question
[NTG-context] \defineframedtext take precedence over \defineframed and add extra padding
In the following example \defineframedtext take precedence over \defineframed, and also I don't know how I can get rid of the extra padding (looks like a good \baselineskip before the text). (What I want is the first output, but with the readability of \startXY \stopXY) As for the take precedence, I can change the name; But for the extra padding I don't know how to remove it. I could add a \vskip-\baselineskip at the beginning, but there is probably a better solution. (By the way, the construction \blueframed{\startformula hello\stopformula \input knuth} behave badly.) % \starttext \setupcolor[x11] \defineframed [blueframed] [width=local,frame=off,rulethickness=2mm,backgroundoffset=1mm,% align=yes,background=color,backgroundcolor=lightblue,% corner=round,radius=1.5mm] \blueframed{\input{knuth}} \defineframedtext [blueframed] [width=local,frame=on,%rulethickness=2mm,backgroundoffset=1mm,% margin=no, align=yes,background=color,backgroundcolor=lightblue,% corner=round,radius=1.5mm] \blueframed{\input{knuth}} \startblueframed \input{knuth} \stopblueframed \stoptext % Regards, Chris ___ 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] \defineframedtext take precedence over \defineframed and add extra padding
On Mon, Jan 13, 2014 at 8:39 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 13.01.2014 um 19:55 schrieb Elspeth McGullicuddy elspethmcgullicu...@gmail.com: In the following example \defineframedtext take precedence over \defineframed, and also I don't know how I can get rid of the extra padding (looks like a good \baselineskip before the text). (What I want is the first output, but with the readability of \startXY \stopXY) As for the take precedence, I can change the name; But for the extra padding I don't know how to remove it. I could add a \vskip-\baselineskip at the beginning, but there is probably a better solution. \usemodule[annotation] \defineannotation [blueframed] [alternative=command, command=\BlueFramedCommand] \define[2]\BlueFramedCommand {\BlueFramed{#2}} \defineframed [BlueFramed] [width=local, frame=off, rulethickness=2mm, backgroundoffset=1mm, align=yes, background=color, backgroundcolor=lightblue, corner=round, radius=1.5mm] \setupcolor[x11] \starttext \blueframed{\input{knuth}} \startblueframed \input{knuth} \stopblueframed \stoptext Thanks, it works. Chris 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 ___ ___ 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] Difficulties with \startformula
Hi, 1- I put here a far too long example to show difficulties that I have with formulas in conjunction with framed: I haven't find a way to insert a formula (displaystyle, vertical mode), at the beginning of a \framed. 2- It might be related with this other thing: The last examples are about mouse text selection with Okular (haven't tried with another viewer): When I mouse text select elements of the formula, when the \startformula \stopformula in embeded in a \hbox, what is highlighted looks alright. Instead, when it's in vertical mode, what is highlighted is very very large. It's probably not the purpose of pdf documents, but this select (and copy) feature is very convenient. This feature is rather impinged with this not so nice looking behavior. Also in these conditions Okular can't select the text precisely, but instead select a much wider area of text (one example here does this). 3- When embedded in \hbox (not vertical mode then), the height of mouse text section is alright is formula is 'x+y', but there is an error if the formula in instead '\int_a^b'. % \starttext \setupformulas[spacebefore=-1ex] \framed[width=5cm,align=yes]{% Hello } \framed[width=5cm,align=yes]{% Hello \startformula x+y \stopformula } \framed[width=5cm,align=yes]{% %Hello \startformula x+y \stopformula } \framed[width=5cm,align=yes]{% \vskip-1.3\baselineskip \startformula x+y \stopformula } \framed[width=5cm,align=yes]{% \hairline \startformula x+y \stopformula \hairline } \hairline \startformula x+y \stopformula \hairline \framed[align=yes]{% \type{\vrule \hrule \vbox $$}\\ \hbox{\vrule{\hsize=7cm\vbox{\hrule $$ x+y $$ \input{knuth} \hrule}}\vrule}} \framed[align=yes]{% trying to select the ``x'' in the next formula, select text [\type{he ``xhe \vbox x+ syste conyer and}]\\ \type{\vrule \hrule \vbox \startformula}\\ \hbox{\vrule{\hsize=7cm\vbox{\hrule \startformula x+y \stopformula \input{knuth} \hrule}}\vrule}} \framed[align=yes]{% \type{\framed \vbox \startformula}\\ \framed{% {\hsize=5cm\vbox{% \startformula x+y \stopformula \input{knuth} \framed[align=yes]{% \type{\framed $$}\\ \framed[align=yes,width=5cm]{% $$ x+y $$ \input{knuth} }} \startbuffer \hbox{\vrule\startformula \int_a^b x+y \stopformula} \stopbuffer \framed[align=yes]{% This line generates an error\\ \typebuffer} \framed[align=yes]{% When one ``text select'' with mouse with Okular, height of selection is correct.\\ \hbox{\vrule\startformula x+y \stopformula}} \framed[align=yes]{% When one ``text select'' with mouse with Okular, height of selection is much larger than expected.\\ \startformula x+y \stopformula} \stoptext Regards, Chris ___ 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] Colored text's background, which the more lcd-mkiv?
[Colored text's background, which the more lcd-mkiv?; plus: Metapost variable text with \definetextbackground; plus: {\input ward}] Hi list, What would be the best, also the more up to date, way to put colored background behind text, that could cross page boundaries. I have found three ways of doing this: I would like to know which is best practice, and also the more lua context document fashion. 1- Using \startbar[underbar] \input zapf \stopbar as described p. 39 of hybrid.pdf. 2- Using \startMPpositionmethod{mpos:placeholder}, found in http://tex.stackexchange.com/questions/125162/rounded-box-around-placeholder-text-that-supports-line-breaking/125323 (Thanks to Aditya). A bit tricky, but perhaps the more versatile or universal? 3- Start with: \definetextbackground (same ref. as previous). % % About the third one I have had some difficulties, that might be thought of as a bug. % You might want and try the following example: it doesn't work if you have a MetaPost variable % whose name is text. \starttext \startMPcode % numeric text; %% Try and uncomment this line drawarrow (0,0)--(3cm,1cm); \stopMPcode %%% \definecolor [lightblue] [r=0.5, g=0.5, b=1] \definetextbackground [placeholder] [ location=text, background=color, backgroundcolor=lightblue, frame=on, corner=round, radius=0.8\lineheight, ] \placeholder{\input ward } % \placeholder{\input ward} %% Try and uncomment this line \stoptext % Local Variables: % mode: context % coding: utf-8 % End: Regards, Chris ___ 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] Colored text's background, which the more lcd-mkiv?
On Fri, Jan 17, 2014 at 6:16 PM, Aditya Mahajan adit...@umich.edu wrote: On Fri, 17 Jan 2014, Elspeth McGullicuddy wrote: [Colored text's background, which the more lcd-mkiv?; plus: Metapost variable text with \definetextbackground; plus: {\input ward}] Hi list, What would be the best, also the more up to date, way to put colored background behind text, that could cross page boundaries. I have found three ways of doing this: I would like to know which is best practice, and also the more lua context document fashion. 1- Using \startbar[underbar] \input zapf \stopbar as described p. 39 of hybrid.pdf. Use this one, unless the underbars are indequate, as was the case for the OP of the TeX.SX question. This one is very easy to use, but I liked the rounded corners of the example. Also I want it to fill the whole background, as it is the case with \definetextbackground: it starts where you tell it to start, then fill the whole text area, not only where there actually are glyphs, so it keeps going on even if you put a \pagebreak, and stop when you tell it to stop. Instead \startbar[underbar] put color only where there are glyphs, which is not what I'm looking for, unless there is way to do other wise, but it would contradict the name underbar, so it seems unlikely. So I think I'll go to \definetextbackground. And try some experiments with the MPposition stuffs. 2- Using \startMPpositionmethod{mpos:placeholder}, found in http://tex.stackexchange.com/questions/125162/rounded-box-around-placeholder-text-that-supports-line-breaking/125323 (Thanks to Aditya). A bit tricky, but perhaps the more versatile or universal? 3- Start with: \definetextbackground (same ref. as previous). % % About the third one I have had some difficulties, that might be thought of as a bug. % You might want and try the following example: it doesn't work if you have a MetaPost variable % whose name is text. (Untested). Normally this means that there is already a variable with the name text. You can use: Yes it's what I gathered. It took me some time to do so, though. I didn't know of the nuewnumeric which is a good shortcut. Thanks for this quick answer, Chris save text; numeric text; or newnumeric text; which is shortcut for the former. 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] MPpositiongraphic: I don't know when it's going to work and when it's not.
Hi Hans, The tip you gave me (wandering spaces), worked for the previous example, the one where the overlay was attached to the background of the paper. For the other example, where the overlay is attached to the background of a \framed, I haven't been able to make it work. The extra spaces there, were in fact added during the mail process but weren't in my file. I put the file that doesn't work in attached files, so there are no risk it collects extra spaces. There is probably an obvious and silly mistake but I can't find it: for me it's quite similar to the examples in metafun-p.pdf, p. 127: \framed[background=demo circle]{This text is overlayed.}, but mine refuses to work. Chris On Mon, Jan 20, 2014 at 6:57 PM, Hans Hagen pra...@wxs.nl wrote: On 1/19/2014 8:00 AM, Elspeth McGullicuddy wrote: \framed [ background=my first overlay,my fourth The line break here wasn't in my file. overlay,align=middle,width=7cm] { have attached it: \hpos{three}{{\em here}}, the} here background=my first overlay and my fourth overlay a key without value so: be careful with spaces and commas - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | 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 ___ test-012_02.tex Description: TeX 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] MPpositiongraphic: I don't know when it's going to work and when it's not.
On Mon, Jan 27, 2014 at 1:34 PM, Hans Hagen pra...@wxs.nl wrote: you need to anchor the graphic: anchor_box(\MPanchor{\MPvar{self}}) ; Thanks a lot, it works now. I wouldn't have guessed: I learnt a lot with that. Chris ___ 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] lmmath and \cong
Dear list, There might be something obviously wrong with the following minimal example, but it doesn't show the \cong symbol. \enablemode[lmmath] \starttext \math{{\cal B} \cong {\cal C}} \stoptext I use lmmath to have the same output on calligraphic characters as with latex. My context version is beta, less than a fortnight old. Regards, Chris ___ 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] \mathextensible{21FE}
Dear all, The following example doesn't work for me: \setupbodyfont[xits] \starttext \math{x\mathextensible{2194}{hello}{}y} \math{x\mathextensible{21FE}{hello}{}y} \math{\char21FE} \stoptext I found the symbol which I needed there: http://en.wikipedia.org/wiki/Arrow_%28symbol%29#Arrows_in_Unicode and there: http://milde.users.sourceforge.net/LUCR/Math/unimathcmds.pdf Kind regards, Chris ___ 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] \mathextensible{21FE}
Thanks for the answer, I wanted to use to use the mechanism described in about.pdf for extensible arrows with possibly text above, under... I've had a look at the xits-math.tma. Though U+2194 and U+21FE are both arrows, U+2194 has an horizontal part field in contrast to U+21FE how hasn't. So I guess the otf font might be the culprit. And meddle with fonts is impossible a task. For the present I will content myself with something like \math{\overset{f}{-\kern-1ex\rightarrowtriangle}} There might be a better way to achieve that in Context, I don't know. Chris On Thu, Apr 24, 2014 at 10:32 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 24.04.2014 um 18:24 schrieb Elspeth McGullicuddy elspethmcgullicu...@gmail.com: Dear all, The following example doesn't work for me: \setupbodyfont[xits] \starttext \math{x\mathextensible{2194}{hello}{}y} \math{x\mathextensible{21FE}{hello}{}y} \math{\char21FE} \stoptext I found the symbol which I needed there: http://en.wikipedia.org/wiki/Arrow_%28symbol%29#Arrows_in_Unicode and there: http://milde.users.sourceforge.net/LUCR/Math/unimathcmds.pdf \setupbodyfont[xits] \starttext \math{a \leftrightarrow b \rightarrowtriangle c} \math{a ↔ b ⇾ c} \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ 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] \mathextensible{21FE}
In about.pdf on can see that U+21FE (rightarrowtriangle) is eligible for use with \mathextensible. When one look at the code for \mathextensible in math-stc.mkvi, one can see there is a mechanism of fallback. So, since the character is implemented in xits, there might be a way to have \mathextensible{21FE} to work... Chris On Thu, Apr 24, 2014 at 11:25 PM, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: Am 24.04.2014 um 23:06 schrieb Elspeth McGullicuddy elspethmcgullicu...@gmail.com: Thanks for the answer, I wanted to use to use the mechanism described in about.pdf for extensible arrows with possibly text above, under... I've had a look at the xits-math.tma. Though U+2194 and U+21FE are both arrows, U+2194 has an horizontal part field in contrast to U+21FE how hasn't. So I guess the otf font might be the culprit. And meddle with fonts is impossible a task. For the present I will content myself with something like \math{\overset{f}{-\kern-1ex\rightarrowtriangle}} There might be a better way to achieve that in Context, I don't know. \setupbodyfont[xits] \starttext \starttabulate[|l|lm|] \NC \tex{overleftarrow} \NC \overleftarrow{top} \NC\NR \NC \tex{overrightarrow} \NC \overrightarrow{text} \NC\NR \NC \tex{overleftrightarrow} \NC \overleftrightarrow{text} \NC\NR \NC \tex{overtwoheadleftarrow} \NC \overtwoheadleftarrow{text} \NC\NR \NC \tex{overtwoheadrightarrow} \NC \overtwoheadrightarrow{text} \NC\NR \NC \tex{texoverleftharpoondown} \NC \overleftharpoondown{text}\NC\NR \NC \tex{overleftharpoonup} \NC \overleftharpoonup{text} \NC\NR \NC \tex{overrightharpoondown} \NC \overrightharpoondown{text} \NC\NR \NC \tex{overrightharpoonup} \NC \overrightharpoonup{text} \NC\NR \TB \NC \tex{underleftarrow} \NC \underleftarrow{text} \NC\NR \NC \tex{underrightarrow}\NC \underrightarrow{text}\NC\NR \NC \tex{underleftrightarrow}\NC \underleftrightarrow{text}\NC\NR \NC \tex{undertwoheadleftarrow} \NC \undertwoheadleftarrow{text} \NC\NR \NC \tex{undertwoheadrightarrow} \NC \undertwoheadrightarrow{text} \NC\NR \NC \tex{underleftharpoondown} \NC \underleftharpoondown{text} \NC\NR \NC \tex{underleftharpoonup} \NC \underleftharpoonup{text} \NC\NR \NC \tex{underrightharpoondown} \NC \underrightharpoondown{text} \NC\NR \NC \tex{underrightharpoonup}\NC \underrightharpoonup{text}\NC\NR \stoptabulate \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ 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 ___