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
Re: [NTG-context] kpfonts, math, type 1 font
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 - 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 ___
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
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] luatex lunatic
Now that we have double-precision mathematics in MetaPost, you can easily make calculations directly in MetaPost. You can also make such calculations directly in lua without relying on libraries as the functions are rather simple. Alan On Wed, 18 Dec 2013 22:16:45 + DesdeChaves desdecha...@gmail.com wrote: Dear sirs I would like to try luatex lunatic ( http://wiki.contextgarden.net/User:Luigi.scarso/luatex_lunatic) but i d'ont find the luatex-0.42. I'm looking in https://foundry.supelec.fr/frs/?group_id=10release_id=406#luatex-beta-0.76.0-title-content I've been looking for a way to simulate data with different distributions (normal, poisson, exponential, etc.) in the .tex file. The use of GSL library is a good option, but it seems impossible to import in luatex. Another way is using the R-statistical through filter module***, which seems to work well in luatex. At this time I would try to import the GSL functions through python script. For that i think that i need the older luatex 0.42 but I don't find that. *** \defineexternalfilter [R] [ filtercommand={R CMD BATCH -q --save --restore \externalfilterinputfile\space \externalfilteroutputfile}, output=\externalfilterbasefile.out, directory=output, readcommand=\typefile, read=no, cache=yes, ] Jorge -- Alan Braslau CEA DSM-IRAMIS-SPEC CNRS URA 2464 Orme des Merisiers 91191 Gif-sur-Yvette cedex FRANCE tel: +33 1 69 08 73 15 fax: +33 1 69 08 87 86 mailto:alan.bras...@cea.fr ___ 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] Drawing chemical structures
On Thu, 21 Nov 2013 15:55:09 -0500 Aditya Mahajan adit...@umich.edu wrote: Unicode alpha gets translated to \greekalpha, so you need a font (like dejavu) that includes those glyphs Yes, thanks for this clarification. When I tested this earlier, I was indeed using dejavu... In the chemistry macros, we are using a particular version of mathematics mode (subscripts, superscripts, ...) but in normal font, so greek characters, etc. will work if the font includes them. 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] [OT] Crowdfunding project for improving math in ebooks (and the web)
http://www.ulule.com/mathematics-ebooks/ ___ 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] \mframed not aligned in mkiv
Hi Aditya, I wikified your remarks, http://wiki.contextgarden.net/Math/Display#Shaded_background_for_part_of_a_displayed_equation but unfortunately the snippet of code does not compile on ConTeXt Garden: is there a way to typeset mkiv code there? Best regards: OK On 21 oct. 2013, at 22:18, Aditya Mahajan adit...@umich.edu wrote: On Mon, 21 Oct 2013, Otared Kavian wrote: Dear Hans, I noticed a difference between mkii and mkiv in the behavior of \mframed: it seems that in mkiv the frame is not vertically aligned with the the + sign in the following example (or rather it is not vertically centered, please see the attached PDF produced with ConTeXt ver: 2013.10.15 13:52 MKIV). Does one have to use now a new key to require this sort of alignment? Best regard: OK begin mframed-example.tex \setupcolors[state=start] \def\graymath{\mframed[frame=off, background=color, backgroundcolor=lightgray, backgroundoffset=2pt ]} \starttext Since for $|x| 1$ we have \startformula \log(1+x) = \graymath{x- \displaystyle{x^2\over2}} + {x^3 \over 3} + \cdots \stopformula we may write $\log(1+x) = x + O(x^2)$. \stoptext end mframed-example.tex Search for Alignment in inmframed in the mailing list archives. % The next statement is part of the core. Included it here for % illustration. \definemathframed[mcframed] [location=mathematics] \starttext \startformula \ln (1+x) = \mcframed[background=color,backgroundcolor=red,foregroundcolor=white,frame=off]{x - {\frac {x^2}{\frac{x^3}{\frac{x^3}{3} + \frac{x^3}{3}-\cdots. \stopformula \startformula \ln (1+x) = \mcframed{x - {\frac {x^2}{\frac{x^3}{\frac{x^3}{3} + \frac{x^3}{3}-\cdots. \stopformula \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 ___ ___ 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] \mframed not aligned in mkiv
On Tue, 22 Oct 2013, Otared Kavian wrote: Hi Aditya, I wikified your remarks, http://wiki.contextgarden.net/Math/Display#Shaded_background_for_part_of_a_displayed_equation Rather than \def\graymath{\mframed[frame=off, background=color, backgroundcolor=gray, backgroundoffset=3pt]} you can just use: \definemathframed[graymath] [ frame=off, location=mathematics, background=color, ..., ] This way, you can even override the options when using \graymath: \graymath[backgroundcolor=red]{...} but unfortunately the snippet of code does not compile on ConTeXt Garden: is there a way to typeset mkiv code there? Using context mode=mkiv compiles the coding using MkIV, but contextgarden uses a rather old version of mkiv, so it is unlikely that a feature introduced a few months ago will run on the garden. 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] \mframed not aligned in mkiv
On Mon, 21 Oct 2013, Otared Kavian wrote: Dear Hans, I noticed a difference between mkii and mkiv in the behavior of \mframed: it seems that in mkiv the frame is not vertically aligned with the the + sign in the following example (or rather it is not vertically centered, please see the attached PDF produced with ConTeXt ver: 2013.10.15 13:52 MKIV). Does one have to use now a new key to require this sort of alignment? Best regard: OK begin mframed-example.tex \setupcolors[state=start] \def\graymath{\mframed[frame=off, background=color, backgroundcolor=lightgray, backgroundoffset=2pt ]} \starttext Since for $|x| 1$ we have \startformula \log(1+x) = \graymath{x- \displaystyle{x^2\over2}} + {x^3 \over 3} + \cdots \stopformula we may write $\log(1+x) = x + O(x^2)$. \stoptext end mframed-example.tex Search for Alignment in inmframed in the mailing list archives. % The next statement is part of the core. Included it here for % illustration. \definemathframed[mcframed] [location=mathematics] \starttext \startformula \ln (1+x) = \mcframed[background=color,backgroundcolor=red,foregroundcolor=white,frame=off]{x - {\frac {x^2}{\frac{x^3}{\frac{x^3}{3} + \frac{x^3}{3}-\cdots. \stopformula \startformula \ln (1+x) = \mcframed{x - {\frac {x^2}{\frac{x^3}{\frac{x^3}{3} + \frac{x^3}{3}-\cdots. \stopformula \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 ___
Re: [NTG-context] \mframed not aligned in mkiv
Thanks Aditya! I overlooked this change in mkiv… Best regards: OK On 21 oct. 2013, at 22:18, Aditya Mahajan adit...@umich.edu wrote: On Mon, 21 Oct 2013, Otared Kavian wrote: Dear Hans, I noticed a difference between mkii and mkiv in the behavior of \mframed: it seems that in mkiv the frame is not vertically aligned with the the + sign in the following example (or rather it is not vertically centered, please see the attached PDF produced with ConTeXt ver: 2013.10.15 13:52 MKIV). Does one have to use now a new key to require this sort of alignment? Best regard: OK begin mframed-example.tex \setupcolors[state=start] \def\graymath{\mframed[frame=off, background=color, backgroundcolor=lightgray, backgroundoffset=2pt ]} \starttext Since for $|x| 1$ we have \startformula \log(1+x) = \graymath{x- \displaystyle{x^2\over2}} + {x^3 \over 3} + \cdots \stopformula we may write $\log(1+x) = x + O(x^2)$. \stoptext end mframed-example.tex Search for Alignment in inmframed in the mailing list archives. % The next statement is part of the core. Included it here for % illustration. \definemathframed[mcframed] [location=mathematics] \starttext \startformula \ln (1+x) = \mcframed[background=color,backgroundcolor=red,foregroundcolor=white,frame=off]{x - {\frac {x^2}{\frac{x^3}{\frac{x^3}{3} + \frac{x^3}{3}-\cdots. \stopformula \startformula \ln (1+x) = \mcframed{x - {\frac {x^2}{\frac{x^3}{\frac{x^3}{3} + \frac{x^3}{3}-\cdots. \stopformula \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 ___ ___ 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] Mathematics (\lim, \int, ...)
Is something gone funny with mathematics? \starttext $\lim_1^2$ $\int_1^2$ \stoptext Undefined control sequence ... 1 \starttext 2 $\lim_1^2$ 3 4 $\int_1^2$ 5 \stoptext 6 recently read \lim_ l.2 $\lim_ 1^2$ ? ! Undefined control sequence. 1 \starttext 2 $\lim_1^2$ 3 4 $\int_1^2$ 5 \stoptext 6 recently read \int_ l.4 $\int_ 1^2$ ? \lim, \int and others are undefined. -- Alan Braslau CEA DSM-IRAMIS-SPEC CNRS URA 2464 Orme des Merisiers 91191 Gif-sur-Yvette cedex FRANCE tel: +33 1 69 08 73 15 fax: +33 1 69 08 87 86 mailto:alan.bras...@cea.fr ___ 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] Mathematics (\lim, \int, ...)
On 2013–10–08 Alan BRASLAU wrote: Is something gone funny with mathematics? http://thread.gmane.org/gmane.comp.tex.context/84607/focus=84616 It was a bug which has been fixed in the current beta. Marco signature.asc Description: Digital signature ___ 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] (mathematics) Stretching Unicode big operator
On 6/22/2013 10:45 PM, Sander Maijers wrote: If I decide to use, for instance, Σ instead of \sum, this operator is no longer stretched/scaling regardless of the sub/superscripts specified tot it. Is it possible to keep stretching/scaling while using Inicode characters for such operators? This is because it's a greek sigma and I'm pretty sure that e.g. Thomas would be surprised to see a math symbol showing up in his greek. You need to use another one: $$\sum\frac{1}{\frac{1}{\frac{1}{\frac{1}{2$$ $$∑\frac{1}{\frac{1}{\frac{1}{\frac{1}{2$$ 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 ___
[NTG-context] (mathematics) Stretching Unicode big operator
If I decide to use, for instance, Σ instead of \sum, this operator is no longer stretched/scaling regardless of the sub/superscripts specified tot it. Is it possible to keep stretching/scaling while using Inicode characters for such operators? ___ 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] METAFUN+CONTEXT+CUSTOMIZE
Hi everyone. I would like to pose the following question: I would like to know how I can customize the page number using an embedded graphic made with METAFUN. I mean, I wish someone would send me a simple example to do that, for example, a page number or headers (chapter, section, etc..) may appear with a color background or something else. The METAFUN manual provides, for example, the page number within an ellipse, and the sections are underlined in orange. Thank you all for your patience and sorry for my poor English and my poor knowledge of ConTeXt, but I'm studying hard reference manuals ConTeXt and hope to go slowly improving, although I am not expert in computer programming languages or even less in mathematics. Thanks very much.-- Manuel González Suárez ___ 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] METAFUN+CONTEXT+CUSTOMIZE
Am 02.05.2013 um 23:31 schrieb MANUEL GONZALEZ SUAREZ gonzalezsman...@uniovi.es: Hi everyone. I would like to pose the following question: I would like to know how I can customize the page number using an embedded graphic made with METAFUN. I mean, I wish someone would send me a simple example to do that, for example, a page number or headers (chapter, section, etc..) may appear with a color background or something else. The METAFUN manual provides, for example, the page number within an ellipse, and the sections are underlined in orange. Thank you all for your patience and sorry for my poor English and my poor knowledge of ConTeXt, but I'm studying hard reference manuals ConTeXt and hope to go slowly improving, although I am not expert in computer programming languages or even less in mathematics. Thanks very much. These are only simple styles but the show how you can customize the heading and pagenumber. \define[2]\ChapterCommand {\startframed[frame=off,bottomframe=on,framecolor=orange,width=fit] #1\hspace[medium]#2 \stopframed} \setuphead[chapter][command=\ChapterCommand] \startuseMPgraphic{pagenumber} draw fullcircle xyscaled(OverlayWidth,OverlayHeight) withcolor \MPcolor{blue} ; \stopuseMPgraphic \defineoverlay[pagenumber][\useMPgraphic{pagenumber}] \define[1]\PagenumberCommand {\framed[frame=off,background=pagenumber]{#1}} \setuppagenumbering[command=\PagenumberCommand] \starttext \chapter{This is a chapter} \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Nabla operator appears italic in formula
On 24 mars 2013, at 11:24, Hans Hagen pra...@wxs.nl wrote: On 3/23/2013 9:34 PM, Xenia wrote: Dear context list, using the nabla symbol ∇ in formulas, I wondered why it looks italic and not upright as for example in [1]. I attach an example. Because that's how it's defined in math italics ... is nabla always supposed to be upright in standard math italic mode? (I'll change the \nable definition to \unexpanded\def\nabla{∇}.) Hans Hi, \nabla should be italic if all other math greek symbols, like \Omega, \Gamma, \sum, ect are set in italic. Otherwise \nabla and all such symbols should be upright. Would it be possible to make this optional in math italics, something like \setupmathematics[mathsymbols=italic] or \setupmathematics[mathsymbols=upright] Maybe this should be set when one chooses the greek letters to be italic or upright in mathematics. 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Nabla operator appears italic in formula
On 3/24/2013 12:23 PM, Otared Kavian wrote: On 24 mars 2013, at 11:24, Hans Hagen pra...@wxs.nl wrote: On 3/23/2013 9:34 PM, Xenia wrote: Dear context list, using the nabla symbol ∇ in formulas, I wondered why it looks italic and not upright as for example in [1]. I attach an example. Because that's how it's defined in math italics ... is nabla always supposed to be upright in standard math italic mode? (I'll change the \nable definition to \unexpanded\def\nabla{∇}.) Hans Hi, \nabla should be italic if all other math greek symbols, like \Omega, \Gamma, \sum, ect are set in italic. Otherwise \nabla and all such symbols should be upright. Would it be possible to make this optional in math italics, something like \setupmathematics[mathsymbols=italic] or \setupmathematics[mathsymbols=upright] Maybe this should be set when one chooses the greek letters to be italic or upright in mathematics. That is already there \setupmathematics [lcgreek=italic, ucgreek=normal] (normal, italic, none) I've added sygreek so that one can also influence the nable and differential (default normal). I tested with: \starttext \startTEXpage \startlines \type{--}: \mathematics{\nabla \phi = ∇ ϕ = 0} \type{it}: \mathematics{\it \nabla \phi = ∇ ϕ = 0} \type{bf}: \mathematics{\bf \nabla \phi = ∇ ϕ = 0} \type{bi}: \mathematics{\bi \nabla \phi = ∇ ϕ = 0} \type{tf}: \mathematics{\tf \nabla \phi = ∇ ϕ = 0} \blank \type{--}: \mathematics{\mathgreekupright \nabla \phi = ∇ ϕ = 0} \type{it}: \mathematics{\it \mathgreekupright \nabla \phi = ∇ ϕ = 0} \type{bf}: \mathematics{\bf \mathgreekupright \nabla \phi = ∇ ϕ = 0} \type{bi}: \mathematics{\bi \mathgreekupright \nabla \phi = ∇ ϕ = 0} \type{tf}: \mathematics{\tf \mathgreekupright \nabla \phi = ∇ ϕ = 0} \blank \setupmathematics[sygreek=italic] \type{--}: \mathematics{\nabla \phi = ∇ ϕ = 0} \type{it}: \mathematics{\it \nabla \phi = ∇ ϕ = 0} \type{bf}: \mathematics{\bf \nabla \phi = ∇ ϕ = 0} \type{bi}: \mathematics{\bi \nabla \phi = ∇ ϕ = 0} \type{tf}: \mathematics{\tf \nabla \phi = ∇ ϕ = 0} \stoplines \stopTEXpage \stoptext 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 ___
Re: [NTG-context] Nabla operator appears italic in formula
On 24.03.2013 15:17, Hans Hagen wrote: On 3/24/2013 12:23 PM, Otared Kavian wrote: On 24 mars 2013, at 11:24, Hans Hagen pra...@wxs.nl wrote: On 3/23/2013 9:34 PM, Xenia wrote: Dear context list, using the nabla symbol ∇ in formulas, I wondered why it looks italic and not upright as for example in [1]. I attach an example. Because that's how it's defined in math italics ... is nabla always supposed to be upright in standard math italic mode? (I'll change the \nable definition to \unexpanded\def\nabla{∇}.) Hans Hi, \nabla should be italic if all other math greek symbols, like \Omega, \Gamma, \sum, ect are set in italic. Otherwise \nabla and all such symbols should be upright. Would it be possible to make this optional in math italics, something like \setupmathematics[mathsymbols=italic] or \setupmathematics[mathsymbols=upright] Maybe this should be set when one chooses the greek letters to be italic or upright in mathematics. That is already there \setupmathematics [lcgreek=italic, ucgreek=normal] (normal, italic, none) I've added sygreek so that one can also influence the nable and differential (default normal). I tested with: \starttext \startTEXpage \startlines \type{--}: \mathematics{\nabla \phi = ∇ ϕ = 0} \type{it}: \mathematics{\it \nabla \phi = ∇ ϕ = 0} \type{bf}: \mathematics{\bf \nabla \phi = ∇ ϕ = 0} \type{bi}: \mathematics{\bi \nabla \phi = ∇ ϕ = 0} \type{tf}: \mathematics{\tf \nabla \phi = ∇ ϕ = 0} \blank \type{--}: \mathematics{\mathgreekupright \nabla \phi = ∇ ϕ = 0} \type{it}: \mathematics{\it \mathgreekupright \nabla \phi = ∇ ϕ = 0} \type{bf}: \mathematics{\bf \mathgreekupright \nabla \phi = ∇ ϕ = 0} \type{bi}: \mathematics{\bi \mathgreekupright \nabla \phi = ∇ ϕ = 0} \type{tf}: \mathematics{\tf \mathgreekupright \nabla \phi = ∇ ϕ = 0} \blank \setupmathematics[sygreek=italic] \type{--}: \mathematics{\nabla \phi = ∇ ϕ = 0} \type{it}: \mathematics{\it \nabla \phi = ∇ ϕ = 0} \type{bf}: \mathematics{\bf \nabla \phi = ∇ ϕ = 0} \type{bi}: \mathematics{\bi \nabla \phi = ∇ ϕ = 0} \type{tf}: \mathematics{\tf \nabla \phi = ∇ ϕ = 0} \stoplines \stopTEXpage \stoptext Great, thank you! ___ 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] upto current
On 19 mars 2013, at 19:47, Aditya Mahajan adit...@umich.edu wrote: […]Although most active users use ConTeXt standalone and are willing to update frequently, TL still plays an important role in introducing new users to ConTeXt. An experienced TeX user who wants to try ConTeXt is more likely to try ConTeXt distributed as part of TL rather than ConTeXt standalone. When there are serious bugs with ConTeXt TL, it gives the impression that ConTeXt is not a mature macro package. Hi, To support what suggests Aditya, I would like to say that the main issue with the current state of ConTeXt in TeXLive (either mkii or mkiv) is that most « lambda » users of TeX whom I know in the mathematics world and in accademia, that is: --- users who are not familiar with what should be changed in TeXLive, --- users who don't even know TeX and LaTeX are not synonyms, --- users who don't know that there exist another environments and macro packages for typesetting tex-files, --- users who don't know that using ConTeXt one can do better typesetting, and that it has better features, all those users are not going to install a stand alone ConTeXt. They would use TeXLive, they would try everything in it, but all they want is to write a paper and typeset it with a TeX package with a single command (or in the case of Mac users, from within TeXShop or another editor). Most of them do not even know where TeXLive sits on their computer, and they don't know how to install something new. Unfortunately, the ConTeXt in TeXLive does not work out of the box: the user has to issue a few commands before he can typeset a file with ConTeXt, either mkii or mkiv (for instance on my installation of TeXLive, after having issued a few commands, which I don't remember right now, I can use ConTeXt with LuaTeX, that is mkiv, but I cannot use mkii). For my part I have been advocating ConTeXt among my colleagues (especially for course materials and books, since submitting a paper to a journal is essentially impossible if it is a ConTeXt file). Most of them agree that ConTeXt gives a much better result, but when it comes to how to use ConTeXt from TeXLive they are afraid and don't go further. For some of them I have installed a stand alone ConTeXt, but most of them do not update their installation, since they would not use the most recent features or improvements (for most of day to day typesettings, when one does not use complexe features, even a beta version is sufficiently stable for such users). So my pledge is this: make any stable version of ConTeXt in TeXLive so that it works and typesets a tex-file « out of the box », without needing to issue any command other than: context myfile.tex This is the case with LaTeX inside TeXLive, and so I cannot see any strong reason for ConTeXt not having the same behavior. Best regards: OKs ___ 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] MetaPost Function Grapher
Hello Troy. Thank you very much for the link. It looks very nice and I'm sure that I will throw into teaching (I teach mathematics at the high school). I'm doing these things through Tikz and Pgfplots. Metapost unfortunately I don't control. Is it possible allowing export to Tikz or Pgfplots? If I would had the opportunity to also download the source Tikz or Pgfplots, it would be absolutely amazing. My point is that I can post the graphs still adapt, modify, describe, and create animations from those exported sources. Anyway, it's very hilarious application and I provide the link my students for their study purposes. Kind regards. Jaroslav Hajtmar Dne 22.2.2013 19:44, Troy Henderson napsal(a): The MetaPost output from my Function Grapher http://www.tlhiv.org/mpgraph/ is now available in ConTeXt format. This can be illustrated by choosing a graph type and selecting an example from one of the Example buttons. Once the graph is drawn, the ConTeXt source can be downloaded using the Download drop-down box. Simply executing `context mpgraph.tex` should produce the same graph viewed on the website in PDF. If you see any bugs, feel free to let me know. Troy Henderson ___ 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] \| should give two || and not one
On Mon, Feb 18, 2013 at 10:42 AM, luigi scarso luigi.sca...@gmail.com wrote: On Mon, Feb 18, 2013 at 10:23 AM, Mikael P. Sundqvist mic...@gmail.com wrote: Indeed, luigi, but is that what you expect? Hm, hard to say for me. I find natural to use \vert and \Vert or, if possible, | and || . LaTeXt users find natural that \| is ||, but I don't see, as a ConTeXt user, a particular meaning in \| . I think that since \| is defined as \Vert in the TeXbook and everyone writing mathematics in LaTeX are used to \| to mean \Vert there is no reason to have different behaviour in ConTeXt. /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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \| should give two || and not one
Hi All, In a way, it is correct that for compatibility reasons and and convert it is good to keep the old syntax. Yet, ConTeXt is suppose to be more natural. Personally, I find some of the names used in TeX and LaTeX often hard to find. Whenever, I needed a function or symbol I to often go look it up. I mean that \vert and \Vert are still cryptic. They can stand for abs, for all in, etc. .. Me, I prefer names that reflect the their functions, regards Keith. Am 18.02.2013 um 10:51 schrieb Mikael P. Sundqvist mic...@gmail.com: On Mon, Feb 18, 2013 at 10:42 AM, luigi scarso luigi.sca...@gmail.com wrote: On Mon, Feb 18, 2013 at 10:23 AM, Mikael P. Sundqvist mic...@gmail.com wrote: Indeed, luigi, but is that what you expect? Hm, hard to say for me. I find natural to use \vert and \Vert or, if possible, | and || . LaTeXt users find natural that \| is ||, but I don't see, as a ConTeXt user, a particular meaning in \| . I think that since \| is defined as \Vert in the TeXbook and everyone writing mathematics in LaTeX are used to \| to mean \Vert there is no reason to have different behaviour in ConTeXt. ___ 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] \| should give two || and not one
On Fri, Feb 15, 2013 at 1:42 PM, Wim W. Wilhelm ww.wilh...@kpnmail.nl wrote: use $\Vert v \Vert$ Wim W. Wilhelm Dear list, \starttext $\|v\|$ \stoptext I expect two vertical bars on each side of v, but see only one. Tested with the latest beta. /Mikael Thank you for your reply, Wim. I guess most/some people writing mathematics are used to write \| to get double bars from LaTeX, and if I remember correctly it was also like this in ConTeXt some time ago. If this is changed on purpose I can very well use \Vert instead. /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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \| should give two || and not one
Dear Mikael, It is TEX. Wim W. Wilhelm On Fri, Feb 15, 2013 at 1:42 PM, Wim W. Wilhelm ww.wilh...@kpnmail.nl wrote: use $\Vert v \Vert$ Wim W. Wilhelm Dear list, \starttext $\|v\|$ \stoptext I expect two vertical bars on each side of v, but see only one. Tested with the latest beta. /Mikael Thank you for your reply, Wim. I guess most/some people writing mathematics are used to write \| to get double bars from LaTeX, and if I remember correctly it was also like this in ConTeXt some time ago. If this is changed on purpose I can very well use \Vert instead. /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://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] \| should give two || and not one
On Fri, Feb 15, 2013 at 4:26 PM, Wim W. Wilhelm ww.wilh...@kpnmail.nl wrote: Dear Mikael, It is TEX. Wim W. Wilhelm On Fri, Feb 15, 2013 at 1:42 PM, Wim W. Wilhelm ww.wilh...@kpnmail.nl wrote: use $\Vert v \Vert$ Wim W. Wilhelm Dear list, \starttext $\|v\|$ \stoptext I expect two vertical bars on each side of v, but see only one. Tested with the latest beta. /Mikael Thank you for your reply, Wim. I guess most/some people writing mathematics are used to write \| to get double bars from LaTeX, and if I remember correctly it was also like this in ConTeXt some time ago. If this is changed on purpose I can very well use \Vert instead. /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://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 ___ Dear Wim, oh, sorry. I did not know that TeX set \| to \vert and not \Vert. Then probably my memory fails me that \| gave \Vert in earlier versions of ConTeXt aswell. I'll have to get used to \Vert, I guess. /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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \| should give two || and not one
On Fri, Feb 15, 2013 at 4:37 PM, Mikael P. Sundqvist mic...@gmail.com wrote: On Fri, Feb 15, 2013 at 4:26 PM, Wim W. Wilhelm ww.wilh...@kpnmail.nl wrote: Dear Mikael, It is TEX. Wim W. Wilhelm On Fri, Feb 15, 2013 at 1:42 PM, Wim W. Wilhelm ww.wilh...@kpnmail.nl wrote: use $\Vert v \Vert$ Wim W. Wilhelm Dear list, \starttext $\|v\|$ \stoptext I expect two vertical bars on each side of v, but see only one. Tested with the latest beta. /Mikael Thank you for your reply, Wim. I guess most/some people writing mathematics are used to write \| to get double bars from LaTeX, and if I remember correctly it was also like this in ConTeXt some time ago. If this is changed on purpose I can very well use \Vert instead. /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://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 ___ Dear Wim, oh, sorry. I did not know that TeX set \| to \vert and not \Vert. Then probably my memory fails me that \| gave \Vert in earlier versions of ConTeXt aswell. I'll have to get used to \Vert, I guess. /Mikael Dear Wim, funny thing is that now that I had a look in my copy of the TeXBook I see \let\|=\Vert on page 361. /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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Sans Serif Math Font
What I don't know is how to properly switch to sans serif math globally/by default. The command \mathss gives upright instead of italic letters. If you figure that out, please let me know. That would be great. I am about to create an online mathematics course where I will be using quite a few onscreen presentations, and I really should be using sans serif fonts for this. So, any help you could provide would be outstanding. Thanks again Mojca, Troy ___ 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] \startitemize[columns] once again...
Hi Marcin, I think there is a small bug with itemize and columns: in another thread (with Subject « vertical alignment problem in column items» ) Dalyoung reported also an issue, which is related to what you have observed. Please see my message in a reply to Dalyoung's message, where I reported some testings but I am not sure when this bug appeared (in mkii, the behaviour is essentially correct). Best regards: OK On 16 nov. 2012, at 21:00, Marcin Borkowski mb...@wmi.amu.edu.pl wrote: Dnia 2012-11-14, o godz. 11:38:48 Philipp Gesang philipp.ges...@alumni.uni-heidelberg.de napisał(a): ···date: 2012-11-14, Wednesday···from: Marcin Borkowski··· Dnia 2012-11-10, o godz. 03:23:11 Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a): This minimal example behaves in a strange way: \starttext Some text \startitemize[columns,two,joinedup] \item abc% $\frac{x^2-x+3}{x^2+x-3}$; \item xyz% $\frac{x^5-3}{x^3+x-2}$. \stopitemize \stoptext If we remove the percentage signs in the items, an additional vertical skip appears. Is it a feature or a bug? Hi, could anybody look into it? I tried also \smash-ing the formulae - with no luck. Hi Marcin, appears like the vertical spacing is extended when content of the item exceeds the line height. The behavior is not restricted to math mode, though I can’t say if there is an official way to prevent or customize it. If you are desperate to get around it, maybe put the content in a box of fixed height. ·· demo · \defineframed[crampy][height=\ht\strutbox,frame=off] \starttext before \thinrule \startitemize[columns,two,joinedup] \item abc \mathematics{\frac{x^2-x+3}{x^2+x-3}}; \item xyz \mathematics{\frac{x^5-3}{x^3+x-2}}. \stopitemize \thinrule after before \thinrule \startitemize[columns,two,joinedup] \item abc \crampy[frame=on]{\mathematics{\frac{x^2-x+3}{x^2+x-3}}}; \item xyz \crampy[frame=on]{\mathematics{\frac{x^5-3}{x^3+x-2}}}. \stopitemize \thinrule after before \thinrule \startitemize[columns,two,joinedup] \item abc \crampy{\mathematics{\frac{x^2-x+3}{x^2+x-3}}}; \item xyz \crampy{\mathematics{\frac{x^5-3}{x^3+x-2}}}. \stopitemize \thinrule after \stoptext · Hth, Philipp Yes it does, thanks! (It helps in some other strange cases, too.) What is especially interesting, is that \strut\smash{...} didn't help. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University ___ 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] \startitemize[columns] once again...
Dnia 2012-11-14, o godz. 11:38:48 Philipp Gesang philipp.ges...@alumni.uni-heidelberg.de napisał(a): ···date: 2012-11-14, Wednesday···from: Marcin Borkowski··· Dnia 2012-11-10, o godz. 03:23:11 Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a): This minimal example behaves in a strange way: \starttext Some text \startitemize[columns,two,joinedup] \item abc% $\frac{x^2-x+3}{x^2+x-3}$; \item xyz% $\frac{x^5-3}{x^3+x-2}$. \stopitemize \stoptext If we remove the percentage signs in the items, an additional vertical skip appears. Is it a feature or a bug? Hi, could anybody look into it? I tried also \smash-ing the formulae - with no luck. Hi Marcin, appears like the vertical spacing is extended when content of the item exceeds the line height. The behavior is not restricted to math mode, though I can’t say if there is an official way to prevent or customize it. If you are desperate to get around it, maybe put the content in a box of fixed height. ·· demo · \defineframed[crampy][height=\ht\strutbox,frame=off] \starttext before \thinrule \startitemize[columns,two,joinedup] \item abc \mathematics{\frac{x^2-x+3}{x^2+x-3}}; \item xyz \mathematics{\frac{x^5-3}{x^3+x-2}}. \stopitemize \thinrule after before \thinrule \startitemize[columns,two,joinedup] \item abc \crampy[frame=on]{\mathematics{\frac{x^2-x+3}{x^2+x-3}}}; \item xyz \crampy[frame=on]{\mathematics{\frac{x^5-3}{x^3+x-2}}}. \stopitemize \thinrule after before \thinrule \startitemize[columns,two,joinedup] \item abc \crampy{\mathematics{\frac{x^2-x+3}{x^2+x-3}}}; \item xyz \crampy{\mathematics{\frac{x^5-3}{x^3+x-2}}}. \stopitemize \thinrule after \stoptext · Hth, Philipp Yes it does, thanks! (It helps in some other strange cases, too.) What is especially interesting, is that \strut\smash{...} didn't help. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University ___ 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] \startitemize[columns] once again...
···date: 2012-11-14, Wednesday···from: Marcin Borkowski··· Dnia 2012-11-10, o godz. 03:23:11 Marcin Borkowski mb...@wmi.amu.edu.pl napisał(a): This minimal example behaves in a strange way: \starttext Some text \startitemize[columns,two,joinedup] \item abc% $\frac{x^2-x+3}{x^2+x-3}$; \item xyz% $\frac{x^5-3}{x^3+x-2}$. \stopitemize \stoptext If we remove the percentage signs in the items, an additional vertical skip appears. Is it a feature or a bug? Hi, could anybody look into it? I tried also \smash-ing the formulae - with no luck. Hi Marcin, appears like the vertical spacing is extended when content of the item exceeds the line height. The behavior is not restricted to math mode, though I can’t say if there is an official way to prevent or customize it. If you are desperate to get around it, maybe put the content in a box of fixed height. ·· demo · \defineframed[crampy][height=\ht\strutbox,frame=off] \starttext before \thinrule \startitemize[columns,two,joinedup] \item abc \mathematics{\frac{x^2-x+3}{x^2+x-3}}; \item xyz \mathematics{\frac{x^5-3}{x^3+x-2}}. \stopitemize \thinrule after before \thinrule \startitemize[columns,two,joinedup] \item abc \crampy[frame=on]{\mathematics{\frac{x^2-x+3}{x^2+x-3}}}; \item xyz \crampy[frame=on]{\mathematics{\frac{x^5-3}{x^3+x-2}}}. \stopitemize \thinrule after before \thinrule \startitemize[columns,two,joinedup] \item abc \crampy{\mathematics{\frac{x^2-x+3}{x^2+x-3}}}; \item xyz \crampy{\mathematics{\frac{x^5-3}{x^3+x-2}}}. \stopitemize \thinrule after \stoptext · Hth, Philipp Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University ___ 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 ___ -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgpCrhMXZEnyO.pgp Description: PGP signature ___ 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] \everymath
Am 16.09.2012 um 01:32 schrieb Rogers, Michael K mrog...@emory.edu: I often want every math mode (between single $) be \displaystyle. In Plain TeX, you do something like \everymath={\displaystyle} Is the best ConTeXt way to do something like this? \appendtoks\displaystyle\to\everymathematics Or is there a key in \setupmathematics? I don’t think so because I found only the command below the change the appearance of inline formulas and \displaymath/\displaymathematics isn’t what you want because it creates a display formula. \let\normalstopdmath\Ustopdisplaymath % to prevent error message from \displaymath \starttext \mathematics {\frac{1}{2}} \displaymathematics{\frac{1}{2}} \inlinemathematics {\frac{1}{2}} \displaymath{\frac{1}{2}} \inlinemath {\frac{1}{2}} \textmath {\frac{1}{2}} \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] xml cross-references in lua?
On 09/11/2012 08:18 PM, Hans Hagen wrote: If the number of bib items is not that large hashing does not save much. (In x-xfdf.mkiv you can see another example). \starttext \startbuffer[demo] document bibitem xml:id=hagen2011 authorHans Hagen/author titleThe Meaning of Life Is 42/title journalThe Rhetoric of Mathematics/journal date2011/date /bibitem bibitem xml:id=hagen2012 authorHans Hagen/author titleThe New Meaning is Now 43/title journalHigh Energy Metaphysics/journal date2012/date /bibitem text pThis has been successfully proven in papers by bib ref=#hagen2011/ and bib ref=#hagen2012/./p /text /document \stopbuffer \startxmlsetups xml:define \xmlsetsetup{#1}{*}{xml:*} \stopxmlsetups \startxmlsetups xml:document \xmlall{#1}{/text} \stopxmlsetups \startxmlsetups xml:text \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \xmlflush{#1} \par \stopxmlsetups \startxmlsetups xml:bib \BibAuthor{#1}{\xmlatt{#1}{ref}} \stopxmlsetups \startxmlsetups xml:author [[\xmlflush{#1}]] \stopxmlsetups \def\BibAuthor#1#2{[1:\xmlfirst{whatever}{/document/bibitem[@xml:id==string.sub('#2',2)]/author}]} \xmlregistersetup{xml:define} \xmlprocessbuffer{whatever}{demo}{} \startluacode userdata = userdata or { } userdata.bibitems = { } \stopluacode \startxmlsetups xml:document \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:bibitem \ctxlua{userdata.bibitems[\letterhash\xmlatt{#1}{xml:id}] = #1} \stopxmlsetups \def\BibAuthor#1#2{[2:\xmlfirst{\cldcontext{userdata.bibitems['#2']}}{/author}]} \xmlprocessbuffer{whatever}{demo}{} \stoptext (I ran into a recently introduced side effect of an optimization so I'll generate you a new beta. Older versions should work anyway as no special trickery is used.) Hans Ah, wonderful, Hans, I can play with this! Thanks a lot for the swift reply and for the help, this will get me going! All best 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] xml cross-references in lua?
Hi all, I have a question about xml processing and I think that what I want/need can best be achieved by using lua code, but so far, I'm not really sure how to proceed, so any help from one of the resident lua gurus would be welcome. So: the question. xml allows to provide elements with unique identifiers so that one can add cross-references within the document structure. Here is a sample xml file that shows what I mean: document bibitem xml:id=hagen2011 authorHans Hagen/author titleThe Meaning of Life Is 42/title journalThe Rhetoric of Mathematics/journal date2011/date /bibitem bibitem xml:id=hagen2012 authorHans Hagen/author titleThe New Meaning is Now 43/title journalHigh Energy Metaphysics/journal date2012/date /bibitem text pThis has been successfully proven in papers by bib ref=#hagen2011/ and bib ref=#hagen2012/./p /text /document [Note: the TEI guidelines add the hash character in the attribute value to such references, but after much googling, I'm still not sure if this is standard or necessary or bizarre.] So: at the point of the reference (which may be empty, like here, or contain text), I want to refer back to the bibitems. The typesetting engine should then be instructed to pick up the information, so that this is, e.g., typeset as This has been successfully proven in papers by Hans Hagen (2011) and Hans Hagen (2012). My idea: since the xml:id attributes must be unique across the document, it would be easiest to collect them into a lua table, with the xml:id as key, so their content could be accessed and typeset later. But unfortunately, I have no clue how to go about this... Could somebody provide a pointer? Thanks for your interest, if you've read this far! 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] xml cross-references in lua?
On 11-9-2012 19:22, Thomas A. Schmitz wrote: Hi all, I have a question about xml processing and I think that what I want/need can best be achieved by using lua code, but so far, I'm not really sure how to proceed, so any help from one of the resident lua gurus would be welcome. So: the question. xml allows to provide elements with unique identifiers so that one can add cross-references within the document structure. Here is a sample xml file that shows what I mean: document bibitem xml:id=hagen2011 authorHans Hagen/author titleThe Meaning of Life Is 42/title journalThe Rhetoric of Mathematics/journal date2011/date /bibitem bibitem xml:id=hagen2012 authorHans Hagen/author titleThe New Meaning is Now 43/title journalHigh Energy Metaphysics/journal date2012/date /bibitem text pThis has been successfully proven in papers by bib ref=#hagen2011/ and bib ref=#hagen2012/./p /text /document [Note: the TEI guidelines add the hash character in the attribute value to such references, but after much googling, I'm still not sure if this is standard or necessary or bizarre.] So: at the point of the reference (which may be empty, like here, or contain text), I want to refer back to the bibitems. The typesetting engine should then be instructed to pick up the information, so that this is, e.g., typeset as This has been successfully proven in papers by Hans Hagen (2011) and Hans Hagen (2012). My idea: since the xml:id attributes must be unique across the document, it would be easiest to collect them into a lua table, with the xml:id as key, so their content could be accessed and typeset later. But unfortunately, I have no clue how to go about this... Could somebody provide a pointer? Thanks for your interest, if you've read this far! If the number of bib items is not that large hashing does not save much. (In x-xfdf.mkiv you can see another example). \starttext \startbuffer[demo] document bibitem xml:id=hagen2011 authorHans Hagen/author titleThe Meaning of Life Is 42/title journalThe Rhetoric of Mathematics/journal date2011/date /bibitem bibitem xml:id=hagen2012 authorHans Hagen/author titleThe New Meaning is Now 43/title journalHigh Energy Metaphysics/journal date2012/date /bibitem text pThis has been successfully proven in papers by bib ref=#hagen2011/ and bib ref=#hagen2012/./p /text /document \stopbuffer \startxmlsetups xml:define \xmlsetsetup{#1}{*}{xml:*} \stopxmlsetups \startxmlsetups xml:document \xmlall{#1}{/text} \stopxmlsetups \startxmlsetups xml:text \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:p \xmlflush{#1} \par \stopxmlsetups \startxmlsetups xml:bib \BibAuthor{#1}{\xmlatt{#1}{ref}} \stopxmlsetups \startxmlsetups xml:author [[\xmlflush{#1}]] \stopxmlsetups \def\BibAuthor#1#2{[1:\xmlfirst{whatever}{/document/bibitem[@xml:id==string.sub('#2',2)]/author}]} \xmlregistersetup{xml:define} \xmlprocessbuffer{whatever}{demo}{} \startluacode userdata = userdata or { } userdata.bibitems = { } \stopluacode \startxmlsetups xml:document \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:bibitem \ctxlua{userdata.bibitems[\letterhash\xmlatt{#1}{xml:id}] = #1} \stopxmlsetups \def\BibAuthor#1#2{[2:\xmlfirst{\cldcontext{userdata.bibitems['#2']}}{/author}]} \xmlprocessbuffer{whatever}{demo}{} \stoptext (I ran into a recently introduced side effect of an optimization so I'll generate you a new beta. Older versions should work anyway as no special trickery is used.) 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 ___
[NTG-context] Broken Nightly 2012.07.04
Hey list, Nightly 2012.07.04 appears to break when compiling my book. I see the following: ! Undefined control sequence. \math_arrows_construct_single ...s \p_mathspacing \endcsname \p_mathspacing ... \math_arrows_handle_finalize ...7}{#1}{#4}{#8}{#9} }\else \mathrel {\math_arr... \mathematics ...mmode #1\else \normalstartimath #1 \normalstopimath \fi \445i:gives ...e \mathematics {\xrightarrow {}{}} \enspace l.11 \chemicalgives \inlinechemical ...emicals.inline(\!!bs #1\!!es )} } l.128 \inlinechemical{CO_2,+,H_2,+,-,H_2O,+,CO} E ? You want to edit file Terms_and_Concepts/Terms_and_Concepts.tex at line 11 The file in question is located here: https://bazaar.launchpad.net/~avaneya/avaneya/trunk/view/head:/Documentation/Contributors/Handbook/Terms_and_Concepts/Terms_and_Concepts.tex -- Kip Warner -- Software Engineer OpenPGP encrypted/signed mail preferred http://www.thevertigo.com signature.asc Description: This is a digitally signed message part ___ 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] beta
On 06/27/2012 11:22, luigi scarso wrote: On Wed, Jun 27, 2012 at 4:48 PM, Bill Meahanwmeaha...@gmail.com wrote: You can also see an exotic extension of MKIV in http://www.gust.org.pl/bachotex/2011-en/presentations/Scarso_2_2011 Yep. That is definitely exotic! My use-case has nothing to do with mathematics, I'm more interested in typesetting traditional prose according to various book designs. Also in publishing an organizational newsletter which has a fixed layout hence is amenable to using TeX rather than DTP. Terrific product that can handle both your usage and mine just as adroitly. -- Bill Meahan, Westland, Michigan USA “Writing is a combination of intangible creative fantasy and appallingly hard work.” —Anthony Powell This message is digitally signed with an X.509 certificate to prove it is from me and has not been altered since it was sent. smime.p7s Description: S/MIME Cryptographic Signature ___ 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] greek items broken:
On 2012-05-09 13:50, Mojca Miklavec wrote: On Wed, May 9, 2012 at 12:39 PM, Philipp Gesang wrote: On 2012-05-09 12:25, Mojca Miklavec wrote: If he wants to use Lucida, this would look bad, but the Lucida font does have greek glyphs, however they are in the math range. With unicode I thought this was an archaism. I'm sorry, I'm telling you nonsense. There are no Greek letters in LucidaBrightOT, but they are present in LucidaBrightMathOT. The italic version starts at 1D6FC and the regural one is in the normal Greek range. This is the case for LM, Lucida and probably a few more fonts. (Another option would be to define the counter to run through greek letters in math font.) Or to leave the counter untouched and wrap it into a substitution function -- is there a chance you (or anyone else) could supply me with a mapping of the “real” Greek code point to the “math Greek” one? See math-map.lua. If you need any help or explanation, please ask. I believe that the following part might be relevant (but only if you need italic): lcgreek = { [0x03B1]=0x1D6FC, [0x03B2]=0x1D6FD, [0x03B3]=0x1D6FE, [0x03B4]=0x1D6FF, [0x03B5]=0x1D700, [0x03B6]=0x1D701, [0x03B7]=0x1D702, [0x03B8]=0x1D703, [0x03B9]=0x1D704, [0x03BA]=0x1D705, [0x03BB]=0x1D706, [0x03BC]=0x1D707, [0x03BD]=0x1D708, [0x03BE]=0x1D709, [0x03BF]=0x1D70A, [0x03C0]=0x1D70B, [0x03C1]=0x1D70C, [0x03C2]=0x1D70D, [0x03C3]=0x1D70E, [0x03C4]=0x1D70F, [0x03C5]=0x1D710, [0x03C6]=0x1D711, [0x03C7]=0x1D712, [0x03C8]=0x1D713, [0x03C9]=0x1D714, [0x03D1]=0x1D717, [0x03D5]=0x1D719, [0x03D6]=0x1D71B, [0x03F0]=0x1D718, [0x03F1]=0x1D71A, [0x03F4]=0x1D6F3, [0x03F5]=0x1D716, }, Yeah, appears to be the correct range. Couldn’t test with Lucida, though. For regular variant of Lucida it should be enough to use Math font instead of the normal one, but I didn't test or write any code for it. For LM you would have to use the italic version since upright (without resorting to cm-unicode) looks horrible anyway. But if there’s a math font, I’d go with the example that Wolfgang posted; alternatively just wrap the converter into \mathematics: \unprotect \def\math_greek_characters#1{\mathematics{\greeknumerals{#1}}} \defineconversion [mathgreek] [\math_greek_characters] \protect etc. It will depend on your choice of math font whether you get italics or upright glyphs. Philipp -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgp4KUEJkFip5.pgp Description: PGP signature ___ 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] Style file for iPad?
In article 20120306134022.GB29209@khaled-laptop, Khaled Hosny khaledho...@eglug.org wrote: On Tue, Mar 06, 2012 at 10:40:20PM +1100, Alasdair McAndrew wrote: Yes, but what ebook formats handle mathematics and diagrams? Plus the poor layout support in almost all ebook readers (brain dead paragraph builder, no hyphenation, no OpenType support etc. etc. they are usually pieces of junk for any remotely complex text layout job). It's worse than pre-TeX printed books. Which makes me wonder: is anyone in the world addressing this? Are there people in the TeX community involved in the standardization processes (say, Epub3, but also the various W3C specifications), who could push forward ideas from TeX, like minimum requirements for the algorithms that rendering engines should use? These questions (together with sighs) arise every time I see a web page especially with mathematical notation… Nicola ___ 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] Style file for iPad?
Yes, but what ebook formats handle mathematics and diagrams? -A. On Tue, Mar 6, 2012 at 10:36 PM, Philipp A. flying-sh...@web.de wrote: 2012/3/6 Alasdair McAndrew amc...@gmail.com Is there a style file for formatting PDFs from ConTeXt for reading on an iPad? make an ebook instead. PDF files aren’t for screen reading, but for printing. semantic markup like it is used in ebook formats is much better suited for screens of all sizes. ___ 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 ___ -- Blog: http://amca01.wordpress.com Web: http://sites.google.com/site/amca01/ Facebook: http://www.facebook.com/alasdair.mcandrew ___ 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] Style file for iPad?
On Tue, Mar 06, 2012 at 10:40:20PM +1100, Alasdair McAndrew wrote: Yes, but what ebook formats handle mathematics and diagrams? Plus the poor layout support in almost all ebook readers (brain dead paragraph builder, no hyphenation, no OpenType support etc. etc. they are usually pieces of junk for any remotely complex text layout job). Regards, Khaled ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] closesymbol in enumeration broken?
Hi everybody, I might have spotted a problem related to enumerations. The minimal example below results in the given error message. It works without the closesymbol option. Thanks for your help. Cheers, Andreas % ### MINIMAL EXAMPLE ### (ConTeXt ver: 2012.02.18 10:50 MKIV fmt: 2012.2.19) \defineenumeration[myproof][text=Proof,closesymbol={\mathematics{\square}}] \starttext \startmyproof This is a proof \stopmyproof \stoptext % ### % ### ERROR MESSAGE to be read again \normalstartimath \mathematics ...ifmmode #1\else \normalstartimath #1\normalstopimath \fi \strc_constructions_close_symbol_place ...esymbol \fi \fi \140construction ...tructions_close_symbol_place \doifnot {\constructionpar... \140enumeration ...er \v!construction \endcsname \endgroup l.5 \stopmyproof % ### ___ 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] closesymbol in enumeration broken?
Am 19.02.2012 um 23:22 schrieb Andreas Mang: Hi everybody, I might have spotted a problem related to enumerations. The minimal example below results in the given error message. It works without the closesymbol option. Thanks for your help. Cheers, Andreas % ### MINIMAL EXAMPLE ### (ConTeXt ver: 2012.02.18 10:50 MKIV fmt: 2012.2.19) \defineenumeration[myproof][text=Proof,closesymbol={\mathematics{\square}}] \starttext \startmyproof This is a proof \stopmyproof \stoptext strc-con.mkvi: \def\strc_constructions_close_symbol_place {\ifconditional\csname\??constructionclosesymbol\currentconstruction\endcsname \global\expandafter\setfalse\csname\??constructionclosesymbol\currentconstruction\endcsname \edef\p_closesymbol{\constructionparameter\c!closesymbol}% \ifx\p_closesymbol\empty \else - \constructionparameter\c!closecommand\p_closesymbol + \constructionparameter\c!closecommand{\p_closesymbol}% \fi \fi} 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] ConTeXt-- does it make sense for my needs?
Welcome to ConTeXt! I'm a relatively new user so my answers will be brief and partial, but I'm sure others will be able to expand on them. On Tue 13 Dec 2011, Chris Lott wrote: 1) My work is primarily in the humanities and end-user technologies, with small amounts of coding. So mathematics isn't an issue. I do a fair amount of highly academic writing (aka: many sections, citations [handling this in a sensible way is really important], footnotes) with the occasional need for charts, graphs, and photos. In other words, I'm not doing the kind of layout one might associate with InDesign or the like. I also write many paper letters (personal), poetry, fiction, essays, and the like. This looks to me like a good use case for ConTeXt. I've used it for a 380-page dissertation with the full complement of academic paraphernalia: footnotes, appendices, table of figures, citations etc. which all worked well for me. I believe that many others are using it for similar work. 2) That said, I (obviously) have a keen interest in typography, and that includes wanting to use some particular typefaces... I've paid good money for many of them, so why not? I've found ConTeXt to be more pleasant than LaTeX for setting up the layout and typography according to my wishes. (When I used LaTeX I generally just went with the default layout and accepted that things would be a little ugly.) ConTeXt is also good about letting you use your own typefaces -- particularly if they're in OpenType format. 3) PDF is my primary medium of exchange, though I would like to efficiently exchange docs with colleagues, which might mean getting them into something they can open with their beloved Microsoft Word... is there an RTF output for ConTeXt? this isn't super-high on my list, but it would be nice. 4) How about X/HTML? this is my lowest level need but, again, it would be nice. I know that ConTeXt supports direct XHTML output but I'm not sure how mature it is -- I think someone else will be able to provide a more complete answer to this. So, do you think ConTeXt makes more sense than LaTeX? And *what* is the deal with xetex? It seems to be the easiest way for accessing all my fonts, but it also hasn't been updated for years and, since it is tied to an old version of ConTeXt (as far as I can tell) it doesn't seem like much of a winner. In short, there are two versions of ConTeXt: Mk II (stable, and frozen for some time now) and Mk IV (actively developed, new betas more than once a month). Mk II can use pdftex or xetex as the engine; Mk IV uses luatex, which provides the ‘it just works’ font handling of xetex alongside a number of other features (chiefly the integration of the lua scripting language). Despite the worries that may be occasionaed by the word ‘beta’, Mk IV is pretty stable and definitely the recommended option these days. Hope this helps! Pont ___ 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] ConTeXt-- does it make sense for my needs?
Many years ago I used LaTeX quite a bit for academic work, including a fair amount of Memoir class. Back then ConTeXt was quite new, so I didn't mess with it much. Now I'm back and sick of Word/etc for the documents I need to produce as print/pdf and for interaction with colleagues. What I can't figure out is if ConTeXt makes the most sense... and if it does, I have a few questions... 1) My work is primarily in the humanities and end-user technologies, with small amounts of coding. So mathematics isn't an issue. I do a fair amount of highly academic writing (aka: many sections, citations [handling this in a sensible way is really important], footnotes) with the occasional need for charts, graphs, and photos. In other words, I'm not doing the kind of layout one might associate with InDesign or the like. I also write many paper letters (personal), poetry, fiction, essays, and the like. 2) That said, I (obviously) have a keen interest in typography, and that includes wanting to use some particular typefaces... I've paid good money for many of them, so why not? 3) PDF is my primary medium of exchange, though I would like to efficiently exchange docs with colleagues, which might mean getting them into something they can open with their beloved Microsoft Word... is there an RTF output for ConTeXt? this isn't super-high on my list, but it would be nice. 4) How about X/HTML? this is my lowest level need but, again, it would be nice. 5) I generally use a Mac for everything, but I am pretty comfortable in the shell. I've done a bit of programming in PHP. I don't mind monkeying around, and I am interested in creating layouts that suit my needs, but digging into internals is not for me. I used Emacs extensively for years, now using mostly Vim (MacVim) and a variety of GUI editors depending on what I had for breakfast that day. So, do you think ConTeXt makes more sense than LaTeX? And *what* is the deal with xetex? It seems to be the easiest way for accessing all my fonts, but it also hasn't been updated for years and, since it is tied to an old version of ConTeXt (as far as I can tell) it doesn't seem like much of a winner. Finally, if ConTeXt is the way to go, are there any fairly comprehensive materials in one place for learning to use it? What I find on the wiki seems to go from basic to advanced without a lot of in between, and what I find on the web seems a bit fragmented. but at this point my head is in a whirl, so I might just be missing some obvious material. Thanks in advance... c -- Chris Lott ___ 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] Interpreting MathJax HTML in MKIV
On 13-10-2011 19:49, Mojca Miklavec wrote: Hello, I would like to manually create some HTML which would be displayed nicely in both HTML and PDF (using MKIV for conversion from HTML). To a certain degree I'm able to fake mathematics with span class=mathspan class=letterax/spansup2/sup +span class=letterbx/span +span class=letterc/span = 0/span wherespan class=math signals TeX to use \mathematics{...} and span class=letter signals web browser that the letter has to be displayed in italic (I could use class=math, but this would also make numbers italic). But this is very cumbersome to write. MathJax offers an excellent way to enter math formulas in an easy way (see attached HTML), but I'm not sure how I could convince the XML parser to treat contents literally. Any ideas? $\xmlflushcontext{#1}$ another option is to use asciimath which is supported by the mathml module as annotation type 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 ___
Re: [NTG-context] Interpreting MathJax HTML in MKIV
On Thu, Oct 13, 2011 at 21:44, Hans Hagen wrote: On 13-10-2011 19:49, Mojca Miklavec wrote: Hello, I would like to manually create some HTML which would be displayed nicely in both HTML and PDF (using MKIV for conversion from HTML). To a certain degree I'm able to fake mathematics with span class=mathspan class=letterax/spansup2/sup +span class=letterbx/span +span class=letterc/span = 0/span wherespan class=math signals TeX to use \mathematics{...} and span class=letter signals web browser that the letter has to be displayed in italic (I could use class=math, but this would also make numbers italic). But this is very cumbersome to write. MathJax offers an excellent way to enter math formulas in an easy way (see attached HTML), but I'm not sure how I could convince the XML parser to treat contents literally. Any ideas? $\xmlflushcontext{#1}$ But how do I catch the expression that has to be interpreted that way? (I sent an attachment as example.) Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Solution to a superscript problem?
\unexpanded\def\WordDef {\dodoubleargument\doWordDef} \def\doWordDef[#1][#2]% {\dontleavehmode\hbox\bgroup \setbox\scratchbox\hbox{#2}% \raise\strutheight\hbox to \wd\scratchbox{\hss\rotate[rotation=25]{\tfxx\color[red]#1}\hss}% \hskip-\wd\scratchbox \box\scratchbox \egroup} Thank you! I will wikify the examples with an explanation on the syntax. However I would be interested in learning more about the bgrop, dontleavehmode, raise etc. commands. The cont-eni manual uses them but without explanation on their exact syntax and use cases. -- * Otso Helenius * Helsinki University, Faculty of Mathematics * Aalto University, Faculty of Architecture ___ 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] Equilibrium in chemical resulted in Undefined Control Sequence error
Hi, The following minimal example: == \starttext \chemical{A,+,B,-,AB} \stoptext == gives the following error under context version: 2011.10.08 11:42, luatex version beta-0.70.1-2011051918: ! Undefined control sequence. system tex error on line 10 in file test.tex: Undefined control sequence ... 1 \starttext 2 3 \chemical{A,+,B,-,AB} 4 5 \stoptext 6 argument \xrightpverleftarrow {}{} \mathematics ...mmode #1\else \normalstartimath #1 \normalstopimath \fi \@@cm::i:equilibrium ...\xrightpverleftarrow {}{}} \enspace l.10 \chemicalequilibrium \inlinechemical ...emicals.inline(\!!bs #1\!!es )} } l.3 \chemical{A,+,B,-,AB} ? ___ 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] Fwd: Re: Any (other) ConTeXt users in Finland?
Hello! Here's another user from Finland. I'm a student in Helsinki University and also a course teacher in Aalto University. I've switched from LaTeX roughly a year ago and using it for mathematics, essays and my upcoming master's thesis. I would also be interested in sharing experiences. Best regards, Otso Helenius - FROM: Mari Voipio SUBJECT: [NTG-context] Any (other) ConTeXt users in Finland? Hello All! Inspired by the recent ConTeXt meeting where I again enjoyed meeting other users as well as the developers, I'm wondering if there are any other ConTeXt users in Finland? And if so, would you be interested in a mini-meeting for an afternoon or evening, possibly at my work in Vantaa? ___ 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] math signs in itemize
Dear all, After my update a few days ago I have run into the problem earlier described under the subject new beta (Marco Pessotto). The file processed nicely until then. I use gentium as the main font. \definefont[gentium][Xserif][name:Gentium at 12pt] See more details underneath. I am right before a deadline, so any help is welcome. Kind regards, Robert Snippets from log file: structuresectioning subsection @ level 4 : 0.0.1.1 - Sociale vorming ! Math error: parameter \Umathquad\displaystyle is not set. system tex error on line 741 in file asp87b.tex: Math error: parameter \Umathquad\displaystyle is not set ... \mathematics ...rmalstartimath #1\normalstopimath \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname \relax }\relax \donormalsymbol ...bol \redosymbol \currentsymbol \fi \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname \relax }\relax \donormalsymbol ...bol \redosymbol \currentsymbol \fi \fi to be read again } ... l.741 \item h et type van de abc abc abc ? ! \textfont0 is undefined (character 8226). system tex error on line 741 in file asp87b.tex: \textfont0 is undefined (character 8226) ... I use context version: 2011.05.18 18:04. /prog2/context2/tex/texmf-fonts/fonts/data/opentype/public/tex-gyre/texgyretermes-italic.otf/prog2/context2/tex/texmf-fonts/fonts/data/opentype/public/tex-gyre/texgyretermes-bold.otf/prog2/context2/tex/texmf-fonts/fonts/data/opentype/public/tex-gyre/texgyretermes-regular.otf mkiv lua stats used config file - selfautoparent:/texmf/web2c/texmfcnf.lua mkiv lua stats used cache path - /prog2/context2/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e mkiv lua stats input load time - 0.005 seconds mkiv lua stats stored bytecode data - 285 modules, 60 tables, 345 chunks mkiv lua stats loaded tex modules- 4 requested, 4 found (*-newmat t-annotation t-lettrine t-simplefonts), 0 missing mkiv lua stats cleaned up reserved nodes - 33 nodes, 11 lists of 426 mkiv lua stats node memory usage - 62 hlist, 2 vlist, 256 disc, 3 math, 369 glue, 134 kern, 26 penalty, 1 noad, 1 math_char, 1875 glyph, 877 attribute, 106 glue_spec, 183 attribute_list, 2 temp, 7 if_stack, 8 local_par, 3 dir, 2 late_lua mkiv lua stats node list callback tasks - 6 unique task lists, 6 instances (re)created, 4004 calls mkiv lua stats used backend - pdf (backend for directly generating pdf output) mkiv lua stats loaded patterns - en::2 nl::1 mkiv lua stats callbacks - 4337 direct, 5407 indirect, 9744 total mkiv lua stats lxml preparation time - 0.000 seconds, 0 nodes, 17 lpath calls, 6 cached calls mkiv lua stats result saved in file - asp87b.pdf mkiv lua stats loaded fonts - 4 files: lmmono10-regular.otf texgyretermes-bold.otf texgyretermes-italic.otf texgyretermes-regular.otf mkiv lua stats fonts load time - 1.036 seconds mkiv lua stats math processing time - 2.428 seconds mkiv lua stats graphics processing time - 0.003 seconds including tex, 1 processed images mkiv lua stats luatex banner - this is luatex, version beta-0.70.1-2011051908 (rev 4277) mkiv lua stats control sequences - 30844 of 165536 mkiv lua stats current memory usage - 33 MB (ctx: 34 MB) mkiv lua stats runtime - 5.377 seconds, 3 processed pages, 3 shipped pages, 0.558 pages/second ___ 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] Calligraphic math alphabet with xits
On Tue, Aug 30, 2011 at 05:34:52AM +0200, Khaled Hosny wrote: There are few other defined alternates in xits-math.lfg. While at it, Hans, here is an updated copy of the file (adding yet another stylistic set). Since I keep adding stylistic sets, should I maintain the file and bundle it with XITS? So that users of texlive would get updated file with new font releases without the need to update ConTeXt. Regards, Khaled -- Khaled Hosny Egyptian Arab -- \setupbodyfont[xits] -- -- \starttext -- $ABC$ $\cal ABC$ $\mathalternate{cal}\cal ABC$ -- \stoptext return { name = xits-math, version = 1.00, comment = Goodies that complement xits (by Khaled Hosny)., author = Hans Hagen, copyright = ConTeXt development team, mathematics = { alternates = { cal = { feature = 'ss01', value = 1, comment = Mathematical Calligraphic Alphabet }, greekssup = { feature = 'ss02', value = 1, comment = Mathematical Greek Sans Serif Alphabet }, greekssit = { feature = 'ss03', value = 1, comment = Mathematical Italic Sans Serif Digits }, monobfnum = { feature = 'ss04', value = 1, comment = Mathematical Bold Monospace Digits }, mathbbbf = { feature = 'ss05', value = 1, comment = Mathematical Bold Double-Struck Alphabet }, mathbbit = { feature = 'ss06', value = 1, comment = Mathematical Italic Double-Struck Alphabet }, mathbbbi = { feature = 'ss07', value = 1, comment = Mathematical Bold Italic Double-Struck Alphabet }, upint = { feature = 'ss08', value = 1, comment = Upright Integrals }, vertnot = { feature = 'ss09', value = 1, comment = Negated Symbols With Vertical Stroke }, }, } } ___ 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] [beta] grid head
Hi Hans, the new beta appears to modify the behaviour of long headings on the grid. In the following example the chapter head moves up into the page header which it did not prior to the update (cf. mkii’s behaviour): · \setuppapersize[A5][A5] \setuplayout[grid=verystrict] \setupheadertexts[{Blindtext}][{\tfb\bf \pagenumber}] \setuphead[chapter][ style=\WORD, grid=yes, ] \starttext \chapter {This is supposed to mimick a rather long chapter title as is common in German language environments; shorter titles might not look as natural as longer ones} \dorecurse{5}{\input dawkins\par} \stoptext \endinput · Gridless it works ok. I’d just like to know whether this is to be taken as a bug or as a feature. Thanks a lot, Philipp On 2011-07-13 22:50:42, Hans Hagen wrote: Hi, I uploaded a beta: - Project structure related files are now dealt with in lua: it's mostly compatible but somewhat more strict (proper push and pop). In the log file the used structure is summarized. - All writing from lua to tex is now under control of the cld infrastructure. This means that logging is more complete. The speed penalty is neglectable and in some places faster. - There are a couple of fixes related to marks. - There are a couple of fixes (thanks to Wolfgang, who checks all commands as part of the user interface (setups) documentation). - In \asciimode, %% now can be used as traditional tex comment starter. Also, modules and environments are loaded under the normal catcode regime. - Typing gets frontstripped with the number of spaces in front of \stoptyping so that one can have nicely formatted input like: \startitemize \startitem test \starttyping test \stoptyping \stopitem \stopitemize - Entities in xml mode have a slightly different roundtrip treatment now and hopefully Thomas S as well as Hans vd M files still work ok. - Unicode math variants (supported by xits) are supported: \mathematics { \utfchar{2229} = \utfchar{2229}\utfchar{FE00} = \vsone{\utfchar{2229}} } - Defining commands at the lua end now also handles arg only cases and has better tracing. - Some other other things, like \startlayout[page] ... \stoplayout and whatever I forgot. 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 ___ -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgp2r74FN1BGv.pgp Description: PGP signature ___ 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] beta
On 07/13/2011 10:50 PM, Hans Hagen wrote: Hi, I uploaded a beta: - Project structure related files are now dealt with in lua: it's mostly compatible but somewhat more strict (proper push and pop). In the log file the used structure is summarized. - All writing from lua to tex is now under control of the cld infrastructure. This means that logging is more complete. The speed penalty is neglectable and in some places faster. - There are a couple of fixes related to marks. - There are a couple of fixes (thanks to Wolfgang, who checks all commands as part of the user interface (setups) documentation). - In \asciimode, %% now can be used as traditional tex comment starter. Also, modules and environments are loaded under the normal catcode regime. - Typing gets frontstripped with the number of spaces in front of \stoptyping so that one can have nicely formatted input like: \startitemize \startitem test \starttyping test \stoptyping \stopitem \stopitemize - Entities in xml mode have a slightly different roundtrip treatment now and hopefully Thomas S as well as Hans vd M files still work ok. - Unicode math variants (supported by xits) are supported: \mathematics { \utfchar{2229} = \utfchar{2229}\utfchar{FE00} = \vsone{\utfchar{2229}} } - Defining commands at the lua end now also handles arg only cases and has better tracing. - Some other other things, like \startlayout[page] ... \stoplayout and whatever I forgot. Hans Hi Hans, my xml files seem to run OK (I just did a few experiments). However, there is a problem with the new project structure code. My book project is set up like a proper ConTeXt project, and with the new version, context has lost the ability to compile single components. context mycomponent will compile the entire document, and then append the single mycomponent at the end of the document. That can't be right... 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] beta
Hi, I uploaded a beta: - Project structure related files are now dealt with in lua: it's mostly compatible but somewhat more strict (proper push and pop). In the log file the used structure is summarized. - All writing from lua to tex is now under control of the cld infrastructure. This means that logging is more complete. The speed penalty is neglectable and in some places faster. - There are a couple of fixes related to marks. - There are a couple of fixes (thanks to Wolfgang, who checks all commands as part of the user interface (setups) documentation). - In \asciimode, %% now can be used as traditional tex comment starter. Also, modules and environments are loaded under the normal catcode regime. - Typing gets frontstripped with the number of spaces in front of \stoptyping so that one can have nicely formatted input like: \startitemize \startitem test \starttyping test \stoptyping \stopitem \stopitemize - Entities in xml mode have a slightly different roundtrip treatment now and hopefully Thomas S as well as Hans vd M files still work ok. - Unicode math variants (supported by xits) are supported: \mathematics { \utfchar{2229} = \utfchar{2229}\utfchar{FE00} = \vsone{\utfchar{2229}} } - Defining commands at the lua end now also handles arg only cases and has better tracing. - Some other other things, like \startlayout[page] ... \stoplayout and whatever I forgot. 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 ___
Re: [NTG-context] Cambria: integral sign has wrong size
On 30-6-2011 10:46, Julian Becker wrote: Hello everybody! I tried doing some math typesetting with Cambria, but somehow the integral sign comes out somewhat smaller than it should be. Running the following in the latest beta produces the attached pdf. Does anybody have an idea about what's going wrong here, or how to fix it? It will be fixed in the next beta, in the meantime you can replace cambria-math.lfg by this: local function FixDisplayOperatorMinHeight(value,target,original) local o = original.mathparameters.DisplayOperatorMinHeight if o 2800 then return 2800 * target.parameters.factor else return value -- already scaled end end return { name = cambria-math, version = 1.00, comment = Goodies that complement cambria., author = Hans Hagen, copyright = ConTeXt development team, mathematics = { parameters = { DisplayOperatorMinHeight = FixDisplayOperatorMinHeight, } } } - 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 ___
Re: [NTG-context] t-filter: how to use math-mode
Am 24.06.2011 01:23, schrieb Aditya Mahajan: On Thu, 23 Jun 2011, yoraxe wrote: Am 23.06.2011 18:30, schrieb Aditya Mahajan: On Thu, 23 Jun 2011, yoraxe wrote: How can I use math-mode in such a table? Using $a_b$ it just prints $a_b$ instead of identifying this as a math-input. I'm using pandoc 1.8.1.1 and context 2011.06.19. Can you give a complete minimal example? Find all files attached. I see, it is the line \NC \$a\letterunderscore{}b\$ that is not correctly translated. What do I have to type instead of _? It seems that pandoc's rst reader does not handle inline mathematics (at least with pandoc 1.6; I don't know if Pandoc 1.8 fixes this). $echo \$a_b\$ | pandoc -f rst -t native Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []}) [ Para [Str $,Str a,Str _,Str b,Str $] ] In contrast, markdown reader handles inline mathematics correctly. $echo \$a_b\$ | pandoc -f markdown -t native Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []}) [ Para [Math InlineMath a_b] ] So, it would be better to discuss this on the pandoc mailing list. Ok, thanks. I'm using now markdown instead of rest. If someone is interested, it looks fine using: \usemodule[filter] \defineexternalfilter[markdown][filtercommand={pandoc -f markdown -t context -o \externalfilteroutputfile\space \externalfilterinputfile}] \starttext \startmarkdown Right Left Center Default --- -- -- --- $h_1$ 121212 123 123 123 123 1 1 1 1 \stopmarkdown \stoptext Sorry for the noise. Yoraxe ___ 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] t-filter: how to use math-mode
On Thu, 23 Jun 2011, yoraxe wrote: Am 23.06.2011 18:30, schrieb Aditya Mahajan: On Thu, 23 Jun 2011, yoraxe wrote: How can I use math-mode in such a table? Using $a_b$ it just prints $a_b$ instead of identifying this as a math-input. I'm using pandoc 1.8.1.1 and context 2011.06.19. Can you give a complete minimal example? Find all files attached. I see, it is the line \NC \$a\letterunderscore{}b\$ that is not correctly translated. What do I have to type instead of _? It seems that pandoc's rst reader does not handle inline mathematics (at least with pandoc 1.6; I don't know if Pandoc 1.8 fixes this). $echo \$a_b\$ | pandoc -f rst -t native Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []}) [ Para [Str $,Str a,Str _,Str b,Str $] ] In contrast, markdown reader handles inline mathematics correctly. $echo \$a_b\$ | pandoc -f markdown -t native Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []}) [ Para [Math InlineMath a_b] ] So, it would be better to discuss this on the pandoc mailing list. 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] math in antp with MKIV
On Wed, Jun 8, 2011 at 11:58, Hans Hagen wrote: Both work on my machine; maybe Mojca has an old antykwa typescript laying around. It works with minimals, but not with TeX Live. What else could I look for? Taco, does it works for you? \usetypescript[antykwa-poltawskiego] \setupbodyfont[antykwa-poltawskiego,10pt] \starttext \eTeX \stoptext Mojca system logs lua: compiling /Users/mojca/Library/texlive/2011/texmf-var/luatex-cache/context/210a96fef5fbab446fd11afa77acb026/fonts/data/names.tma into /Users/mojca/Library/texlive/2011/texmf-var/luatex-cache/context/210a96fef5fbab446fd11afa77acb026/fonts/data/names.tmc fontsnames accessing the data table failed fontsdefining forced type otf of lmmath not found fontsdefining font with asked name 'lmmath' is not found using lookup 'file' fontsdefining unknown font lmmath, loading aborted fontsdefining unable to define lmmath.otf as \*antykwa-poltawskiego5ptmmmr33* fontsdefining forced type otf of lmmath not found fontsdefining font with asked name 'lmmath' is not found using lookup 'file' fontsdefining unknown font lmmath, loading aborted fontsdefining unable to define lmmath.otf as \*antykwa-poltawskiego7ptmmmr22* fontsdefining forced type otf of lmmath not found fontsdefining font with asked name 'lmmath' is not found using lookup 'file' fontsdefining unknown font lmmath, loading aborted fontsdefining unable to define lmmath.otf as \*antykwa-poltawskiego10ptmmmr11* system begin file a at line 4 ! Math error: parameter \Umathquad\displaystyle is not set. system tex error on line 6 in file a.tex: Math error: parameter \Umathquad\displaystyle is not set ... 1 \usetypescript[antykwa-poltawskiego] 2 \setupbodyfont[antykwa-poltawskiego,10pt] 3 4 \starttext 5 6 \eTeX 7 $a+\alpha$ 8 ε\TeX 9 % \eTeX 10 11 \stoptext \mathematics ...rmalstartimath #1\normalstopimath \fi \eTeX -\mathematics {\varepsilon } -\TeX l.6 \eTeX ? q ___ 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] [OT] Street-Fighting Mathematics
Street-Fighting Mathematics The Art of Educated Guessing and Opportunistic Problem Solving Sanjoy Mahajan Foreword by Carver A. Mead The book is made with ConTeXt mkii (so it's not a 100% off-topic, because we know that Sanjoy uses ConTeXt) -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] [OT] Street-Fighting Mathematics
On Sun 22 May 2011, luigi scarso wrote: Street-Fighting Mathematics The Art of Educated Guessing and Opportunistic Problem Solving Sanjoy Mahajan Foreword by Carver A. Mead The book is made with ConTeXt mkii (so it's not a 100% off-topic, because we know that Sanjoy uses ConTeXt) Saw this in the university library the other week, and almost postted about it. I'd like to add: it is freely available avilable in PDF ( http://mitpress.mit.edu/books/full_pdfs/Street-Fighting_Mathematics.pdf ) and (if I remember rightly) the author effusively thanks the authors of ConTeXt (and the other free software used in the book's production) in three different places :-). Pont ___ 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] [OT] Street-Fighting Mathematics
2011/5/22 Pontus Lurcock p...@talvi.net: http://mitpress.mit.edu/books/full_pdfs/Street-Fighting_Mathematics.pdf - the /ArtBox is an inch too high - for linearizing you can also use qpdf Best Martin ___ 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] [OT] Street-Fighting Mathematics
On 22-5-2011 12:32, luigi scarso wrote: Street-Fighting Mathematics The Art of Educated Guessing and Opportunistic Problem Solving Sanjoy Mahajan Foreword by Carver A. Mead The book is made with ConTeXt mkii (so it's not a 100% off-topic, because we know that Sanjoy uses ConTeXt) Nice reading too (Sanjoy sent me a copy a while ago). (btw, you can also look at http://freevideolectures.com/Course/2704/Teaching-College-Level-Science-and-Engineering to see the author live) 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 ___
Re: [NTG-context] [OT] Street-Fighting Mathematics
On Sun, 22 May 2011, Hans Hagen wrote: On 22-5-2011 12:32, luigi scarso wrote: Street-Fighting Mathematics The Art of Educated Guessing and Opportunistic Problem Solving Sanjoy Mahajan Foreword by Carver A. Mead The book is made with ConTeXt mkii (so it's not a 100% off-topic, because we know that Sanjoy uses ConTeXt) Nice reading too (Sanjoy sent me a copy a while ago). (btw, you can also look at http://freevideolectures.com/Course/2704/Teaching-College-Level-Science-and-Engineering to see the author live) And also: http://tedxcaltech.com/speakers/sanjoy-mahajan 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 ___
[NTG-context] AMSTeX compatibility: `\dotsb` is not defined
Dear ConTeXt folks, `\dotsb` is not defined although it is defined in AMSTeX (amsmath) [1]. Please find the following minimal example also attached. \starttext This throws an error, since »\backslash dotsb« is not defined. \startformula 1 + 2 + 3 + \dotsb + n = \frac{n}{2} (n + 1) \stopformula \stoptext This is the error. […] system begin file dotsb.tex at line 1 ! Undefined control sequence. system tex error on line 5 in file dotsb.tex: Undefined control sequence ... 1 \starttext 2 This throws an error, since »\backslash dotsb« is not defined. 3 4 \startformula 5 1 + 2 + 3 + \dotsb + n = \frac{n}{2} (n + 1) 6 \stopformula 7 \stoptext 8 l.5 1 + 2 + 3 + \dotsb + n = \frac{n}{2} (n + 1) ? […] Is `\dotsb` not defined intentionally? Thanks, Paul [1] http://en.wikibooks.org/wiki/LaTeX/Mathematics#Introducing_text_and_dots_in_formulas \starttext This throws an error, since »\backslash dotsb« is not defined. \startformula 1 + 2 + 3 + \dotsb + n = \frac{n}{2} (n + 1) \stopformula \stoptext signature.asc Description: This is a digitally signed message part ___ 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] modules or packages for abbreviations for common math commands
Dear ConTeXt folks, is there a module or a package people have created for common things used in mathematics. `\set{ a, b, c }` for a set. `\EV{X}` for the expected value. `\P{ X = ½ }` for the probability. … If not, maybe a module could be created and maintained together to not reinvent the wheel. Thanks, Paul signature.asc Description: This is a digitally signed message part ___ 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] modules or packages for abbreviations for common math commands
On Tue, 3 May 2011, Paul Menzel wrote: Dear ConTeXt folks, is there a module or a package people have created for common things used in mathematics. `\set{ a, b, c }` for a set. `\EV{X}` for the expected value. `\P{ X = ½ }` for the probability. … If not, maybe a module could be created and maintained together to not reinvent the wheel. See the mathsets module[1]. The current module does not work with MkIV (I need to debug that; most likely due to catcode changes for _ and ^. I am planning to reimplement the module using lpeg but that is on a low priority. Aditya [1]: http://modules.contextgarden.net/mathsets___ 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] xits-math.lfg
Attached an extended xits-math.lfg, to cover all the 8 stylistic sets the font have. I'm not very satisfied about the sames, so feel free to suggest better ones. BTW, is there any documentation of those lfg files? Regards, Khaled -- Khaled Hosny Egyptian Arab -- \setupbodyfont[xits] -- -- \starttext -- $ABC$ $\cal ABC$ $\mathalternate{cal}\cal ABC$ -- \stoptext return { name = xits-math, version = 1.00, comment = Goodies that complement xits (by Khaled Hosny)., author = Hans Hagen, copyright = ConTeXt development team, mathematics = { alternates = { cal = { feature = 'ss01', value = 1, comment = Mathematical Calligraphic Alphabet }, greekssup = { feature = 'ss02', value = 1, comment = Mathematical Greek Sans Serif Alphabet }, greekssit = { feature = 'ss03', value = 1, comment = Mathematical Italic Sans Serif Digits }, monobfnum = { feature = 'ss04', value = 1, comment = Mathematical Bold Monospace Digits }, mathbbbf = { feature = 'ss05', value = 1, comment = Mathematical Bold Double-Struck Alphabet }, mathbbit = { feature = 'ss06', value = 1, comment = Mathematical Italic Double-Struck Alphabet }, mathbbbi = { feature = 'ss07', value = 1, comment = Mathematical Bold Italic Double-Struck Alphabet }, upint = { feature = 'ss08', value = 1, comment = Upright Integrals }, } } } ___ 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] math spacing
On Sun, Mar 13, 2011 at 13:16, Hans van der Meer wrote: It might be that I am missing something here. But I don not understand why in the math expression below the spacing behind the letters is different. With this behaviour it seems impossible to name a variable PYR and have it typeset as such. Hans van der Meer \starttext $\tfd Q,Y,N,P,Y,Z \quad PYR$ \stoptext I don't know enough about the zillions of math parameters in fonts, but you will notice exactly the same behaviour in plain TeX. If you need to have a variable PYR, you should probably do \def\PYR{PY\kern-2ptR} $\PYR$ (modify kerning at your own will; you might also want to use em instead of pt units, or you could use \! if you don't need to be too accurate) The extensive original spacing is most probably related to the fact that in mathematics you usually mean multiplication when you write one letter after the other. In other cases (for example when you have a function like sin, cos, lim, ...) the spacing will look better. Still, the fact that there is such a huge difference between PY and YR looks more like a tiny font bug to me (but it is already present in CM, so LM is unlikely to change it, at least until they switch to OpenType Math). Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Latest beta: Can't compile a document with lists (with no math fonts)
I think the same happened some time ago when the not-loading (horrible word, my english is rotting) of Latin Modern was still an experimental feature. Anyway, minimal example: start \usetypescript[libertine] \setupbodyfont[libertine,10pt] \starttext \startitemize[1] \item fail \stopitemize \stoptext %%% stop %%% It compiles just fine commenting the first 2 lines or with ConTeXt version 2011.01.26 09:01 While with the latest 2011.02.18 ! Math error: parameter \Umathquad\displaystyle is not set. system tex error on line 8 in file fail.tex: Math error: parameter \Umathquad\displaystyle is not set ... 1 \usetypescript[libertine] 2 \setupbodyfont[libertine,10pt] 3 4 \starttext 5 6 \startitemize[1] 7 8 \item fail 9 10 \stopitemize 11 12 \stoptext \mathematics ...rmalstartimath #1\normalstopimath \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname \relax }\relax \donormalsymbol ...bol \redosymbol \currentsymbol \fi \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname \relax }\relax \donormalsymbol ...bol \redosymbol \currentsymbol \fi \fi to be read again } ... l.8 \item f ail ? Sorry, but I can't typeset math unless various parameters have been set. This is normally done by loading special math fonts into the math family slots. Your font set is lacking at least the parameter mentioned earlier. Best wishes -- Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] defined symbols - question/feature suggestion
Hi Hans, in symb-mis.mkiv you define most symbols with \mathematics. I don't know why you take these symbols from the math font. Just in case the symbol does not exist in the regular font, I would guess. Problem is only, that you will loose most symbols when switching the math font to something else than computer-modern (I tested with euler and cambria). BTW: I wonder how many contexters use modern for math... Anyway it appears most fonts have geometric shapes and common symbols and dingbats. So I end up redefining the symbols: \definesymbol [bullet][\textbullet] \definesymbol [dash] [--] \definesymbol [star] [\char2734] \definesymbol [triangle] [\char25B6] \definesymbol [square][\char25A0] \definesymbol [diamond] [\char25C6] \definesymbol [checkmark] [\char2713] Also it looks nicer when you use item symbols matching the text font. Maybe you would consider this and prefer symbols from the text font rather than those from the math font and keep \mathematics only as fall back should the glyph be unavailable. Cheers, Florian ___ 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] defined symbols - question/feature suggestion
On 18-2-2011 10:39, Florian Wobbe wrote: Hi Hans, in symb-mis.mkiv you define most symbols with \mathematics. I don't know why you take these symbols from the math font. Just in case the symbol does not exist in the regular font, I would guess. Problem is only, that you will loose most symbols when switching the math font to something else than computer-modern (I tested with euler and cambria). BTW: I wonder how many contexters use modern for math... Anyway it appears most fonts have geometric shapes and common symbols and dingbats. So I end up redefining the symbols: \definesymbol [bullet][\textbullet] \definesymbol [dash] [--] \definesymbol [star] [\char2734] \definesymbol [triangle] [\char25B6] \definesymbol [square][\char25A0] \definesymbol [diamond] [\char25C6] \definesymbol [checkmark] [\char2713] Also it looks nicer when you use item symbols matching the text font. Maybe you would consider this and prefer symbols from the text font rather than those from the math font and keep \mathematics only as fall back should the glyph be unavailable. It is on the agenda to look into this. These definitions relate to the fact that not all fonts had/have such characters. Also, textbullet is normally way too small for my taste. References like \char25B6 are likely to fail on most fonts 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 ___
Re: [NTG-context] defined symbols - question/feature suggestion
On 18-2-2011 10:39, Florian Wobbe wrote: Hi Hans, in symb-mis.mkiv you define most symbols with \mathematics. I don't know why you take these symbols from the math font. Just in case the symbol does not exist in the regular font, I would guess. Problem is only, that you will loose most symbols when switching the math font to something else than computer-modern (I tested with euler and cambria). BTW: I wonder how many contexters use modern for math... Anyway it appears most fonts have geometric shapes and common symbols and dingbats. So I end up redefining the symbols: \definesymbol [bullet][\textbullet] \definesymbol [dash] [--] \definesymbol [star] [\char2734] \definesymbol [triangle] [\char25B6] \definesymbol [square][\char25A0] \definesymbol [diamond] [\char25C6] \definesymbol [checkmark] [\char2713] Also it looks nicer when you use item symbols matching the text font. a next beta will have \definesymbol [bullet][\textormathchar{2022}] % • \bullet \definesymbol [dash] [\textormathchar{2013}] % – \definesymbol [star] [\textormathchar{22C6}] % ✴ \star \definesymbol [triangle] [\textormathchar{22B3}] % ⊳ \triangleright \definesymbol [circle][\textormathchar{2218}] % ∘ \circ \definesymbol [square][\textormathchar{25A1}] % □ \square \definesymbol [diamond] [\textormathchar{22C4}] % ⋄ \diamond \definesymbol [checkmark] [\textormathchar{2713}] % ✓ \checkmark \definesymbol [blacktriangle] [\textormathchar{25B6}] % ▶ \definesymbol [blacksquare] [\textormathchar{25A0}] % ■ \definesymbol [blackdiamond] [\textormathchar{25C6}] % ◆ but it's experimental (and fonts like cambria don't have all of them) - 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 ___
Re: [NTG-context] new beta
Hans Hagen pra...@wxs.nl writes: - If you are adventurous you can add the following to cont-new.mkiv \enablemode[*nofonts] This will postpone font loading and will be default soon. This saves runtime when you use another font than latin modern. When no font is loaded before the first \starttext, modern will kick in. A side effect is that any text typeset before \starttext will not show up in the output. If you observe that, you need to setup a bodyfont explicitly beforehand. In practice there should be no problems. The delayed loading is somewhat tricky but has been tested for a while. If felt adventurous and I found the following problem: minimal example \usetypescript[libertine] \setupbodyfont[libertine,12pt] \starttext \startitemize[1] \item one \item two \stopitemize \stoptext end It fails because itemize seems to require some math characters (the bullets) and the libertine font seems not to have them. lmodern don't kick in, it just fails: ! Math error: parameter \Umathquad\displaystyle is not set. \mathematics ...rmalstartimath #1\normalstopimath \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname \relax }\relax \donormalsymbol ...bol \redosymbol \currentsymbol \fi \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname \relax }\relax \donormalsymbol ...bol \redosymbol \currentsymbol \fi \fi to be read again } ... l.7 \item o ne ? Bests and thanks for all your work -- Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] new beta
Andreas Harder ahar...@uni-koblenz.de writes: Am 25.01.2011 um 21:18 schrieb Marco Pessotto: Hans Hagen pra...@wxs.nl writes: - If you are adventurous you can add the following to cont-new.mkiv \enablemode[*nofonts] This will postpone font loading and will be default soon. This saves runtime when you use another font than latin modern. When no font is loaded before the first \starttext, modern will kick in. A side effect is that any text typeset before \starttext will not show up in the output. If you observe that, you need to setup a bodyfont explicitly beforehand. In practice there should be no problems. The delayed loading is somewhat tricky but has been tested for a while. If felt adventurous and I found the following problem: minimal example \usetypescript[libertine] \setupbodyfont[libertine,12pt] \starttext \startitemize[1] \item one \item two \stopitemize \stoptext end It fails because itemize seems to require some math characters (the bullets) and the libertine font seems not to have them. lmodern don't kick in, it just fails: Works for me with the latest minimals. For Libertine bullets you can use the following: \setupbodyfont[libertine] \definesymbol[1][•] % otherwise LMMathSymbols10-Regular \starttext \startitemize \item one \item two \stopitemize \stoptext Greeting Andreas Just to be sure I've updated the Minimals, but with \enablemode[*nofonts] in cont-new.mkiv it fails. I don't need a workaround, because I can comment out the *nofonts in the cont-new.mkiv (which was added by myself). I was just reporting a problem, as asked (IIRC). $ context prova.tex MTXrun | run 1: luatex --fmt=/home/melmoth/usr/context/tex/texmf-cache/luatex-cache/context/161a8cd09bbec9213c251f73843e59e3/formats/cont-en --lua=/home/melmoth/usr/context/tex/texmf-cache/luatex-cache/context/161a8cd09bbec9213c251f73843e59e3/formats/cont-en.lui --backend=pdf ./prova.texThis is LuaTeX, Version beta-0.65.0-2010121316 \write18 enabled. (prova.tex jobcontrol resuming randomizer with 0.71793062133618 ConTeXt ver: 2011.01.25 13:17 MKIV fmt: 2011.1.25 int: english/english system : cont-new.mkiv loaded (/home/melmoth/usr/context/tex/texmf-context/tex/context/base/cont-new.mkiv systems : beware: some patches loaded from cont-new.mkiv ) system : prova.top loaded (prova.top) fonts : latin modern fonts are not preloaded language: language en is active (/home/melmoth/usr/context/tex/texmf-context/tex/context/base/type-siz.mkiv) (/home/melmoth/usr/context/tex/texmf-context/tex/context/base/type-otf.mkiv){/home/melmoth/usr/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map} systems : begin file prova.tex at line 5 ! Math error: parameter \Umathquad\displaystyle is not set. \mathematics ...rmalstartimath #1\normalstopimath \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname \relax }\relax \donormalsymbol ...bol \redosymbol \currentsymbol \fi \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname \relax }\relax \donormalsymbol ...bol \redosymbol \currentsymbol \fi \fi to be read again } ... l.7 \item o ne ? ? Type return to proceed, S to scroll future error messages, R to run without stopping, Q to run quietly, I to insert something, E to edit your file, 1 or ... or 9 to ignore the next 1 to 9 tokens of input, H for help, X to quit. ? X mkiv lua stats : used config file - /home/melmoth/usr/context/tex/texmf/web2c/texmfcnf.lua mkiv lua stats : used cache path - /home/melmoth/usr/context/tex/texmf-cache/luatex-cache/context/161a8cd09bbec9213c251f73843e59e3 mkiv lua stats : input load time - 0.015 seconds mkiv lua stats : stored bytecode data - 265 modules, 56 tables, 321 chunks mkiv lua stats : cleaned up reserved nodes - 30 nodes, 9 lists of 412 mkiv lua stats : node memory usage - 1 hlist, 1 math, 2 glue, 1 noad, 1 math_char, 19 attribute, 20 glue_spec, 4 attribute_list, 2 temp, 7 if_stack, 1 local_par, 3 dir mkiv lua stats : node list callback tasks - 6 unique task lists, 2 instances (re)created, 1773 calls mkiv lua stats : used backend - pdf (backend for directly generating pdf output) mkiv lua stats : loaded patterns - en::2 mkiv lua stats : callbacks - direct: 1788, indirect: 2937, total: 4725 mkiv lua stats : result saved in file - prova.pdf mkiv lua stats : loaded fonts - 1 files: fxlr.otf mkiv lua stats : fonts load time - 0.101 seconds mkiv lua stats : luatex banner - this is luatex, version beta-0.65.0-2010121316 mkiv lua stats
Re: [NTG-context] new beta
On Tue, 25 Jan 2011, Marco Pessotto wrote: Hans Hagen pra...@wxs.nl writes: - If you are adventurous you can add the following to cont-new.mkiv \enablemode[*nofonts] This will postpone font loading and will be default soon. This saves runtime when you use another font than latin modern. When no font is loaded before the first \starttext, modern will kick in. A side effect is that any text typeset before \starttext will not show up in the output. If you observe that, you need to setup a bodyfont explicitly beforehand. In practice there should be no problems. The delayed loading is somewhat tricky but has been tested for a while. If felt adventurous and I found the following problem: minimal example \usetypescript[libertine] \setupbodyfont[libertine,12pt] \starttext \startitemize[1] \item one \item two \stopitemize \stoptext end Can you test if \setupbodyfont[libertine,12pt] \starttext $ABC \bullet \star$ \stoptext also fails? It fails because itemize seems to require some math characters (the bullets) and the libertine font seems not to have them. lmodern don't kick in, it just fails: ! Math error: parameter \Umathquad\displaystyle is not set. \mathematics ...rmalstartimath #1\normalstopimath \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname \relax }\relax \donormalsymbol ...bol \redosymbol \currentsymbol \fi \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname \relax }\relax \donormalsymbol ...bol \redosymbol \currentsymbol \fi \fi to be read again } ... l.7 \item o ne Seems like a bug. If no math typescripts are defined, the fallback should have been loaded. (In any case, the libertine typescript should use either txfonts or perhaps xits as the default math fonts). 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] \qedhere equivalent in ConTeXt
Hi list, I tried something similar to (Mk IV version 2011.11.18 19:34): Am 06.08.10 15:46, schrieb Wolfgang Schuster: \setupdescriptions [proof] [width=broad, distance=0.5em, location=serried, headstyle=it, indentnext=yes, indenting=yes, closesymbol=\mathematics{\square}, closecommand=\ifmmode\eqno\else\wordright\fi] Wolfgang I hope I can get help on an issue I have with this. Please consider the minimal example: \starttext \definedescription[proof][text=Proof., width=fit, location=serried, indenting=yes, closesymbol=\mathematics{\square}, closecommand=\ifmmode\eqno\else\wordright\fi] \startproof \input knuth \stopproof \startproof conclusion conclusion conclusion conclusion conclusion conclusion conclusion. \stopproof \stoptext I don't know how to achieve this, but I would like to have the squares at the end of both proofs one line higher than they are now and placed right, as in (consider the extra space, which avoids the hyphenation): \startproof conclusion conclusion conclusion conclusion conclusion conclusion conclu sion. \stopproof Any help appreciated. Thanks in advance, Stefan ___ 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] new beta
Hi, I uploaded a new beta: The character definitions have been updated (esp math, thanks to Aditya). After some testing by Wolfgang the decision was made to permit _ in macronames in modules. So, the following works: \unprotect \def\test_test_test#1#2{#1+#2=whatever} \test_test_test{1}{2} \protect In principle we can also support ^. The mkiv code base no longer uses _ and ^ in math in modules and those who write modules should avoid them as well. So, when writing macros in unprotected mode, one schould use: $x\normalsuperscript2\normalsubscript n$ Taco and I think that we can safely switch to \nonknuthmode in mkiv so this might happen soon (which means that _ and ^ become normal characters in text mode). Actually, being permanently in \nonknuthmode would permit _ and ^ in modules again. We could even make _ and ^ always letters outside math in which case \text_test etc would become possible everywhere but that needs some more consideration. In that case \def\make_subscript#1#2{\mathematics{#1_{#2}}} \make_subscript{x}{2} becomes valid everywhere. We can discuss this in detail at the dev list. 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 ___
Re: [NTG-context] Proposal for math mappings
Dear Aditya, I do think that your proposal would be of great help in writing mathematics. Indeed the use of different alphabets, or range of characters with different styles, depend on the fields of mathematics, so having a \setup command like the one you suggest would be wonderful. However, IMHO, the new setup command should follow the general rules of ConTeXt commands for setting up different environments. So maybe the option of having all the 12 forms, as you suggest, normal, italic, sans, sansitalic, blackboard, script, bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript would be more homogeneous with the usual style choice. Best regards: OK On 10 déc. 2010, at 16:29, Aditya Mahajan wrote: On Fri, 10 Dec 2010, Vladimir Lomov wrote: ** Aditya Mahajan [2010-12-09 23:49:26 -0500]: This is a proposal for a new way of selecting math mappings in MkIV. I want to get input from other math users whether this syntax would take care of all scenarios or not. There are five different ranges in mathematics: - digits (0..9) - lower case Latin (abc..z) - upper case Latin (ABC..Z) - lower case Greek (αβγ..ζ) - upper case Greek (ΑΒΓ..Z) Should be: αβγ..ω and ΑΒΓ..Ω Thanks. I need to learn my Greek :) A user may want to control what each range is mapped to. So, I suggest a setup command \setupmathmappings [ digits={style,alternative}, lclatin={style,alternative}, uclatin={style,alternative}, lcgreek={style,alternative}, ucgreek={style,alternative}, ] where the options for style are normal, bold while the options for alternative are normal, italic, sans, sansitalic, blackboard, script This command will the mappings for each range. **NOTE**: All combinations are not valid. A companion command \definemathmappings [whatever] [] can be used to define multiple mappings. These mappings can be used by \setupmathmappings[whatever] (An alternative is that these mappings are activated using \whatever ...) For example, we can define a command to typeset vectors using \definemathmappings [vectors] [ digits={bold,normal}, lclatin={bold,normal}, uclatin={bold,normal}, lcgreek={bold,normal}, ucgreek={bold,normal}] \def\VEC{\groupedcommand{\setupmathmappings[vector]}{}} Is it should be \def\VEC{\groupedcommand{\setupmathmappings[vectors]}{}} ? Indeed. Thanks. If later, we want to represent vectors as sans serif, we can use \definemathmappings [vectors] [ digits={normal,sans}, lclatin={normal,sans}, uclatin={normal,sans}, lcgreek={normal,sans}, ucgreek={normal,sans}] This interface makes it easy to switch math fonts for disiplines that want different style for different alphabet ranges. It is relatively easy to implement the above interface. All we need is some bookkeeping to set the right attributes. The default math mapping commands can be reimplmeneted using \definemappings. Before implementing this, I want to ask the opinion of other math users. Would the above interface take care of different use cases, or is it missing something? IMHO, style is already used so it is normal. Finally, I am not too happy with the syntax. There are only a few ConTeXt commands in which the keys take a pair of values. Another option is to allow all 12 valid options normal, italic, sans, sansitalic, blackboard, script, bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript This very depends on used fonts. I am assuming a complete opentype math font. with the variants sansitalic-italicsans, boldsans-sansbold, etc. as synonmyms. Which way of specifying the keys do you prefer? Actually I don't get what you try to do. I'll try to explain better in a later post. I thought that 'font switching' command should take care of font switching either in math or text modes (if typescript is set properly). I am proposing to separate out math font switching from text mode font switching. Right now the only good example of usage of proposed mechanism is \VEC command (for vectors and etc). More on this later. 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
Re: [NTG-context] Proposal for math mappings
I'll try once more to explain the setup. If I understand the unicode philosopy correctly, then we do not any font switching macros in math. If we want math italic A, we can simply type 0x1D434; if we want math bold A, we can type 0x1D400; and so on. One difficulty with this approach is that it is not easy to type (and see) these characters in an editor. One way to circumvent this, as is done by the latex unicode-math package, is to define a macro for each symbol: \mathitA, \mathbfA, etc. Even if we define such macros, writing such macros is inconvinient. A more nature way is to write $A {\bf A}$ rather than $\mathitA \mathbfA$ etc. Traditionally, commands like \bf, \it, etc are font switches. However, in unicode math, rather than font switches, these macros are simply input mapping commands. Thus, by default, 0x0041 (latin A) maps to 0x1D434 (math italic A), and so on. If \bf is active, 0x0041 (latin A) maps to 0x1D400 (math bold A), and so on. Roughly speaking, this is how \bf. \it, \bi, \cal, \Bbd, etc work in the background. However, at present these mappings are unsatisfactory. For example, by default, 0x03B1 (Greek alpha) maps 0x1D6FC (Math italic small alpha), while 0xO391 (Greek capital Alpha) maps to itself. What should these mappings be when \bf is active? Or when \bi is active? The trouble with the current implementation of \bf, \bi, \cal, etc is that these mappings are not explicitly specified. My proposal is to allow users to customize these mappings. I agree that digits, upper and lower case latin and greek does not capture all mathematic characters for which such mappings are needed. Similar mappings might also be needed for some symbols like nabla (are there other such symbols?). These can also be added as a key like nabla={normal,italic} or nabla={bold,normal} Hopefully, the above explanation makes more sense. Aditya On Thu, 9 Dec 2010, Aditya Mahajan wrote: This is a proposal for a new way of selecting math mappings in MkIV. I want to get input from other math users whether this syntax would take care of all scenarios or not. There are five different ranges in mathematics: - digits (0..9) - lower case Latin (abc..z) - upper case Latin (ABC..Z) - lower case Greek (αβγ..ζ) - upper case Greek (ΑΒΓ..Z) A user may want to control what each range is mapped to. So, I suggest a setup command \setupmathmappings [ digits={style,alternative}, lclatin={style,alternative}, uclatin={style,alternative}, lcgreek={style,alternative}, ucgreek={style,alternative}, ] where the options for style are normal, bold while the options for alternative are normal, italic, sans, sansitalic, blackboard, script This command will the mappings for each range. **NOTE**: All combinations are not valid. A companion command \definemathmappings [whatever] [] can be used to define multiple mappings. These mappings can be used by \setupmathmappings[whatever] (An alternative is that these mappings are activated using \whatever ...) For example, we can define a command to typeset vectors using \definemathmappings [vectors] [ digits={bold,normal}, lclatin={bold,normal}, uclatin={bold,normal}, lcgreek={bold,normal}, ucgreek={bold,normal}] \def\VEC{\groupedcommand{\setupmathmappings[vector]}{}} If later, we want to represent vectors as sans serif, we can use \definemathmappings [vectors] [ digits={normal,sans}, lclatin={normal,sans}, uclatin={normal,sans}, lcgreek={normal,sans}, ucgreek={normal,sans}] This interface makes it easy to switch math fonts for disiplines that want different style for different alphabet ranges. It is relatively easy to implement the above interface. All we need is some bookkeeping to set the right attributes. The default math mapping commands can be reimplmeneted using \definemappings. Before implementing this, I want to ask the opinion of other math users. Would the above interface take care of different use cases, or is it missing something? Finally, I am not too happy with the syntax. There are only a few ConTeXt commands in which the keys take a pair of values. Another option is to allow all 12 valid options normal, italic, sans, sansitalic, blackboard, script, bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript with the variants sansitalic-italicsans, boldsans-sansbold, etc. as synonmyms. Which way of specifying the keys do you prefer? 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 ___
[NTG-context] Proposal for math mappings
This is a proposal for a new way of selecting math mappings in MkIV. I want to get input from other math users whether this syntax would take care of all scenarios or not. There are five different ranges in mathematics: - digits (0..9) - lower case Latin (abc..z) - upper case Latin (ABC..Z) - lower case Greek (αβγ..ζ) - upper case Greek (ΑΒΓ..Z) A user may want to control what each range is mapped to. So, I suggest a setup command \setupmathmappings [ digits={style,alternative}, lclatin={style,alternative}, uclatin={style,alternative}, lcgreek={style,alternative}, ucgreek={style,alternative}, ] where the options for style are normal, bold while the options for alternative are normal, italic, sans, sansitalic, blackboard, script This command will the mappings for each range. **NOTE**: All combinations are not valid. A companion command \definemathmappings [whatever] [] can be used to define multiple mappings. These mappings can be used by \setupmathmappings[whatever] (An alternative is that these mappings are activated using \whatever ...) For example, we can define a command to typeset vectors using \definemathmappings [vectors] [ digits={bold,normal}, lclatin={bold,normal}, uclatin={bold,normal}, lcgreek={bold,normal}, ucgreek={bold,normal}] \def\VEC{\groupedcommand{\setupmathmappings[vector]}{}} If later, we want to represent vectors as sans serif, we can use \definemathmappings [vectors] [ digits={normal,sans}, lclatin={normal,sans}, uclatin={normal,sans}, lcgreek={normal,sans}, ucgreek={normal,sans}] This interface makes it easy to switch math fonts for disiplines that want different style for different alphabet ranges. It is relatively easy to implement the above interface. All we need is some bookkeeping to set the right attributes. The default math mapping commands can be reimplmeneted using \definemappings. Before implementing this, I want to ask the opinion of other math users. Would the above interface take care of different use cases, or is it missing something? Finally, I am not too happy with the syntax. There are only a few ConTeXt commands in which the keys take a pair of values. Another option is to allow all 12 valid options normal, italic, sans, sansitalic, blackboard, script, bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript with the variants sansitalic-italicsans, boldsans-sansbold, etc. as synonmyms. Which way of specifying the keys do you prefer? 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] Proposal for math mappings
Hi. ** Aditya Mahajan [2010-12-09 23:49:26 -0500]: This is a proposal for a new way of selecting math mappings in MkIV. I want to get input from other math users whether this syntax would take care of all scenarios or not. There are five different ranges in mathematics: - digits (0..9) - lower case Latin (abc..z) - upper case Latin (ABC..Z) - lower case Greek (αβγ..ζ) - upper case Greek (ΑΒΓ..Z) Should be: αβγ..ω and ΑΒΓ..Ω A user may want to control what each range is mapped to. So, I suggest a setup command \setupmathmappings [ digits={style,alternative}, lclatin={style,alternative}, uclatin={style,alternative}, lcgreek={style,alternative}, ucgreek={style,alternative}, ] where the options for style are normal, bold while the options for alternative are normal, italic, sans, sansitalic, blackboard, script This command will the mappings for each range. **NOTE**: All combinations are not valid. A companion command \definemathmappings [whatever] [] can be used to define multiple mappings. These mappings can be used by \setupmathmappings[whatever] (An alternative is that these mappings are activated using \whatever ...) For example, we can define a command to typeset vectors using \definemathmappings [vectors] [ digits={bold,normal}, lclatin={bold,normal}, uclatin={bold,normal}, lcgreek={bold,normal}, ucgreek={bold,normal}] \def\VEC{\groupedcommand{\setupmathmappings[vector]}{}} Is it should be \def\VEC{\groupedcommand{\setupmathmappings[vectors]}{}} ? If later, we want to represent vectors as sans serif, we can use \definemathmappings [vectors] [ digits={normal,sans}, lclatin={normal,sans}, uclatin={normal,sans}, lcgreek={normal,sans}, ucgreek={normal,sans}] This interface makes it easy to switch math fonts for disiplines that want different style for different alphabet ranges. It is relatively easy to implement the above interface. All we need is some bookkeeping to set the right attributes. The default math mapping commands can be reimplmeneted using \definemappings. Before implementing this, I want to ask the opinion of other math users. Would the above interface take care of different use cases, or is it missing something? IMHO, style is already used so it is normal. Finally, I am not too happy with the syntax. There are only a few ConTeXt commands in which the keys take a pair of values. Another option is to allow all 12 valid options normal, italic, sans, sansitalic, blackboard, script, bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript This very depends on used fonts. with the variants sansitalic-italicsans, boldsans-sansbold, etc. as synonmyms. Which way of specifying the keys do you prefer? Aditya Actually I don't get what you try to do. I thought that 'font switching' command should take care of font switching either in math or text modes (if typescript is set properly). Right now the only good example of usage of proposed mechanism is \VEC command (for vectors and etc). --- WBR, Vladimir Lomov. -- I share the belief of many of my contemporaries that the spiritual crisis pervading all spheres of Western industrial society can be remedied only by a change in our world view. We shall have to shift from the materialistic, dualistic belief that people and their environment are separate, toward a new conciousness of an all-encompassing reality, which embraces the experiencing ego, a reality in which people feel their oneness with animate nature and all of creation. - Dr. Albert Hoffman ___ 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] Proposal for math mappings
On Fri, 10 Dec 2010 05:49:26 +0100, Aditya Mahajan adit...@umich.edu wrote: This is a proposal for a new way of selecting math mappings in MkIV. I want to get input from other math users whether this syntax would take care of all scenarios or not. There are five different ranges in mathematics: - digits (0..9) - lower case Latin (abc..z) - upper case Latin (ABC..Z) - lower case Greek (αβγ..ζ) - upper case Greek (ΑΒΓ..Z) Just to confirm - - 0-9 are 48-57 in ASCII - a-z = 97-122 - A-Z = 65-90 - LC Greek = ?-? (given by \alpha to \omega range) - UC Greek = ?-? (given by \Alpha to \Omega range) - Is that right? A user may want to control what each range is mapped to. So, I suggest a setup command \setupmathmappings [ digits={style,alternative}, lclatin={style,alternative}, uclatin={style,alternative}, lcgreek={style,alternative}, ucgreek={style,alternative}, ] OK, it might be useful when one wants e.g. ALL Greek letters to be printed somehow, e.g. bold. I don't think that the basic criterion for style in math is the (alphabet) range, it's rather the meaning of maths (variable/parameter/vector/tensor/operator (e.g. Nabla operator)). But OK - where the options for style are normal, bold while the options for alternative are normal, italic, sans, sansitalic, blackboard, script This command will the mappings for each range. **NOTE**: All combinations are not valid. A companion command \definemathmappings [whatever] [] can be used to define multiple mappings. These mappings can be used by \setupmathmappings[whatever] (An alternative is that these mappings are activated using \whatever ...) For example, we can define a command to typeset vectors using \definemathmappings [vectors] [ digits={bold,normal}, lclatin={bold,normal}, uclatin={bold,normal}, lcgreek={bold,normal}, ucgreek={bold,normal}] \def\VEC{\groupedcommand{\setupmathmappings[vector]}{}} Or rather the following (?): \def\VEC#1{\groupedcommand{\setupmathmappings[vector]}{#1}} If later, we want to represent vectors as sans serif, we can use \definemathmappings [vectors] [ digits={normal,sans}, lclatin={normal,sans}, uclatin={normal,sans}, lcgreek={normal,sans}, ucgreek={normal,sans}] This kind of switching would be great. This interface makes it easy to switch math fonts for disciplines that want different style for different alphabet ranges. It is relatively easy to implement the above interface. All we need is some bookkeeping to set the right attributes. The default math mapping commands can be reimplmeneted using \definemappings. Before implementing this, I want to ask the opinion of other math users. Would the above interface take care of different use cases, or is it missing something? It looks good. Some examples would be needed, starting at simple ones and ending with wildly switching math formulas. Finally, I am not too happy with the syntax. There are only a few ConTeXt commands in which the keys take a pair of values. Another option is to allow all 12 valid options normal, italic, sans, sansitalic, blackboard, script, bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript with the variants sansitalic-italicsans, boldsans-sansbold, etc. as synonmyms. Which way of specifying the keys do you prefer? Personally, no matter. Programming clarity should be kept at most - so it's up to you. When some samples are provided, someone will follow them. Thank for your effort. Lukas Aditya -- Ing. Lukáš Procházka [mailto:l...@pontex.cz] Pontex s. r. o. [mailto:pon...@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 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 ___
Re: [NTG-context] Proposal for math mappings
On Fri, 10 Dec 2010, Procházka Lukáš Ing. - Pontex s. r. o. wrote: On Fri, 10 Dec 2010 05:49:26 +0100, Aditya Mahajan adit...@umich.edu wrote: This is a proposal for a new way of selecting math mappings in MkIV. I want to get input from other math users whether this syntax would take care of all scenarios or not. There are five different ranges in mathematics: - digits (0..9) - lower case Latin (abc..z) - upper case Latin (ABC..Z) - lower case Greek (αβγ..ζ) - upper case Greek (ΑΒΓ..Z) Just to confirm - - 0-9 are 48-57 in ASCII - a-z = 97-122 - A-Z = 65-90 - LC Greek = ?-? (given by \alpha to \omega range) - UC Greek = ?-? (given by \Alpha to \Omega range) - Is that right? Yes. In addition, Greek will work even if you key in 0x0391-0x03C9. A user may want to control what each range is mapped to. So, I suggest a setup command \setupmathmappings [ digits={style,alternative}, lclatin={style,alternative}, uclatin={style,alternative}, lcgreek={style,alternative}, ucgreek={style,alternative}, ] OK, it might be useful when one wants e.g. ALL Greek letters to be printed somehow, e.g. bold. I don't think that the basic criterion for style in math is the (alphabet) range, it's rather the meaning of maths (variable/parameter/vector/tensor/operator (e.g. Nabla operator)). But OK - where the options for style are normal, bold while the options for alternative are normal, italic, sans, sansitalic, blackboard, script This command will the mappings for each range. **NOTE**: All combinations are not valid. A companion command \definemathmappings [whatever] [] can be used to define multiple mappings. These mappings can be used by \setupmathmappings[whatever] (An alternative is that these mappings are activated using \whatever ...) For example, we can define a command to typeset vectors using \definemathmappings [vectors] [ digits={bold,normal}, lclatin={bold,normal}, uclatin={bold,normal}, lcgreek={bold,normal}, ucgreek={bold,normal}] \def\VEC{\groupedcommand{\setupmathmappings[vector]}{}} Or rather the following (?): \def\VEC#1{\groupedcommand{\setupmathmappings[vector]}{#1}} I haven't tested this, but I think that my definition should work (after changing vector - vectors). The point of grouped command is that you can use \VEC{ABC} as well as {\VEC ABC} If you only need the first variant, you can simply define \def\VEC#1{{\setupmathmappings[vectors]#1}} If later, we want to represent vectors as sans serif, we can use \definemathmappings [vectors] [ digits={normal,sans}, lclatin={normal,sans}, uclatin={normal,sans}, lcgreek={normal,sans}, ucgreek={normal,sans}] This kind of switching would be great. This interface makes it easy to switch math fonts for disciplines that want different style for different alphabet ranges. It is relatively easy to implement the above interface. All we need is some bookkeeping to set the right attributes. The default math mapping commands can be reimplmeneted using \definemappings. Before implementing this, I want to ask the opinion of other math users. Would the above interface take care of different use cases, or is it missing something? It looks good. Some examples would be needed, starting at simple ones and ending with wildly switching math formulas. Finally, I am not too happy with the syntax. There are only a few ConTeXt commands in which the keys take a pair of values. Another option is to allow all 12 valid options normal, italic, sans, sansitalic, blackboard, script, bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript with the variants sansitalic-italicsans, boldsans-sansbold, etc. as synonmyms. Which way of specifying the keys do you prefer? Personally, no matter. Programming clarity should be kept at most - so it's up to you. When some samples are provided, someone will follow them. I will provide a more detailed example. 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] Proposal for math mappings
On Fri, 10 Dec 2010, Vladimir Lomov wrote: ** Aditya Mahajan [2010-12-09 23:49:26 -0500]: This is a proposal for a new way of selecting math mappings in MkIV. I want to get input from other math users whether this syntax would take care of all scenarios or not. There are five different ranges in mathematics: - digits (0..9) - lower case Latin (abc..z) - upper case Latin (ABC..Z) - lower case Greek (αβγ..ζ) - upper case Greek (ΑΒΓ..Z) Should be: αβγ..ω and ΑΒΓ..Ω Thanks. I need to learn my Greek :) A user may want to control what each range is mapped to. So, I suggest a setup command \setupmathmappings [ digits={style,alternative}, lclatin={style,alternative}, uclatin={style,alternative}, lcgreek={style,alternative}, ucgreek={style,alternative}, ] where the options for style are normal, bold while the options for alternative are normal, italic, sans, sansitalic, blackboard, script This command will the mappings for each range. **NOTE**: All combinations are not valid. A companion command \definemathmappings [whatever] [] can be used to define multiple mappings. These mappings can be used by \setupmathmappings[whatever] (An alternative is that these mappings are activated using \whatever ...) For example, we can define a command to typeset vectors using \definemathmappings [vectors] [ digits={bold,normal}, lclatin={bold,normal}, uclatin={bold,normal}, lcgreek={bold,normal}, ucgreek={bold,normal}] \def\VEC{\groupedcommand{\setupmathmappings[vector]}{}} Is it should be \def\VEC{\groupedcommand{\setupmathmappings[vectors]}{}} ? Indeed. Thanks. If later, we want to represent vectors as sans serif, we can use \definemathmappings [vectors] [ digits={normal,sans}, lclatin={normal,sans}, uclatin={normal,sans}, lcgreek={normal,sans}, ucgreek={normal,sans}] This interface makes it easy to switch math fonts for disiplines that want different style for different alphabet ranges. It is relatively easy to implement the above interface. All we need is some bookkeeping to set the right attributes. The default math mapping commands can be reimplmeneted using \definemappings. Before implementing this, I want to ask the opinion of other math users. Would the above interface take care of different use cases, or is it missing something? IMHO, style is already used so it is normal. Finally, I am not too happy with the syntax. There are only a few ConTeXt commands in which the keys take a pair of values. Another option is to allow all 12 valid options normal, italic, sans, sansitalic, blackboard, script, bold, bolditlaic, boldsans, boldsansitalic, boldblackboard, boldscript This very depends on used fonts. I am assuming a complete opentype math font. with the variants sansitalic-italicsans, boldsans-sansbold, etc. as synonmyms. Which way of specifying the keys do you prefer? Actually I don't get what you try to do. I'll try to explain better in a later post. I thought that 'font switching' command should take care of font switching either in math or text modes (if typescript is set properly). I am proposing to separate out math font switching from text mode font switching. Right now the only good example of usage of proposed mechanism is \VEC command (for vectors and etc). More on this later. 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] Math and bold font
Hello, thanks for the explanation - On Sat, 04 Dec 2010 09:55:25 +0100, Hans Hagen pra...@wxs.nl wrote: On 3-12-2010 5:00, Procházka Lukáš Ing. - Pontex s. r. o. wrote: to get slanted chars, I have to call \it or \sl or \bi explicitly. OK, I In fact in math these are not font switches, but switches to a different alphabet. In traditional tex that normally is a font switch so one gets the other bold or whatever shapes for free, given that they are in that font (so it's a side effect of the way math alphabets are implemented), but not so in open type math. there is no default math font in mkiv: one uses regular math or bold math (given that there are two font(set)s available which is seldom the case) and within them gets bold or heavy alphabets (plus a few chars) - So does it mean that the Vladimir's cambria case is exactly the seldom case when regular and bold math are available, both defining Greek chars like \alpha as well? \setupbodyfont[cambria] \starttext This is a test. $a=\alpha$ $\bf a=\alpha$ $\bi a=\alpha$ \stoptext Please, could you give more examples of normal and bold math fonts of the same kin (to be used for normal and bold math), both having Greek letters as well? - Vladimir showed cambria. Unfortunately, his solution changes the entire document bodyfont (i.e. non-math font as well). - What is the relationship to AMS fonts (http://www.ams.org/publications/authors/tex/amsfonts)? Or how to make them accessible in Ctx document? How to make them work? - - On the site it's written: ... What is AMSFonts? ... *Subscript sizes of bold math italic and bold Greek letters* ... Because these fonts are standard TeX fonts, they may be used with any standard TeX system ... - - Wouldn't this be exactly what I'm looking for? Maybe \setupformulas[What to come here?] should do this? And what \definetypeface[What arguments?] should precede? best try to convert to the unicode math approach: bold a-z is different unicode slots than a-z and in context the \bf command does that transformation on ascii a-z (you can also key in the official unicode chars); the benefit is that you can cut and paste the bold characters in pdf files i.e. you retain that property; a bold b is not a bold one in typographic sense but a special symbol that happens to use a bold rendering; in for instance a section title, one can have all math bold, and then this regular bold character will become real bold Hans I guess this approach won't be useful in my situation. I need to generate some math by Lua. There is a function that should generate a context formulas with mixed case and/or Greek letters, e.g.: function t(var) context($ .. var .. \\alpha = {\\bf .. -- Or something else instead of bf var \\alpha}) end t(Abc) So the variable name a priori cannot have information whether or not to be printed with regular or bold math - this is up to the function 't()'. --- Now I'm trying to understand This Way (11/2003, mag-0005.pdf) where the mixed case is investigated. Also the co-fonts.pdf; but it seems to me that this document is a bit out-of-date and mfonts.pdf should be used instead. And also Mojca's presentation from Brejlov, the some-thoughts-about-typescripts.pdf. To be honest, I have a bit mess with fonts: I'm trying to deduce the relationship between: font script (text/script/scriptscript?), font typescript (serif, sans-serif, math, mono, other?), font size [marking] (xx/x/?/a/b/c/d/e; ?/xsmall/small/?/?...?, 5pt, 6pt... 40pt; ... at 6pt, ... at 20pt...; sixpoint,eightpoint,tenpoint... used in some commands), font weight (light? semilight? normal/semibold/bold/extrabold?), font family, font typeface - When I look at the Figure 1 The current bodyfont environment in mfonts.pdf, I see: \showbodyfontenvironment % [lbr] [lucida] [11.0pt] text script scriptscript x xx small biginterlinespace 20.7pt 14.4pt 12pt 17.3pt 14.4pt 17.3pt 20.7pt not set 17.3pt 12.1pt 8.6pt13.8pt 10.3pt 13.8pt 20.7pt not set ... So what's the relationship between text, script, scriptscript (and?) x, xx, small and big? Why size for the script on the first line is the same for xx, text as for big and x the same as small? Why doesn't work the same on the next lines as well? - The abbreviations for [typefaces?]: rm = ? RoMan? (means serif) (but also wrong Regular Math comes to place) ss = Sans Serif tt = TeleType (but means Mono as well) mm = Math what? MatheMatics? (used for typesetting inside $...$) - When I call \definetypeface[whow][rm][serif][modern][computer-modern][encoding=ec] (mfonts.pdf, pg. 10), why the arguments are rm and serif, although they mark (?) the same [script/shape]? - - Why once modern and once computer-modern? - When I call (mag-0005.pdf, pg. 4): \definetypeface [mainface] [mm] [bfmath] [lucida] [default] \definetypeface
[NTG-context] Strange behavior of '\setupmathematics' and '\iint'
Hi. I faced with strange (for me) behavior of combination of '\setupmathematics' and '\iint'. Consider the following example: example name=ex1.tex \setupbodyfont[xits] \setupmathematics[integral=displaylimits] \starttext This is a sample. \startformula \exp^{\imath\phi}=\cos\phi+\imath\sin\phi \stopformula \startformula \int_{a}^{b}f(x)\text{d}x=F(x)+C \stopformula \startformula \iint_{D}f(x,y)\text{d}x\text{d}y=\mu(D),\quad\text{here $\mu$ is a measure} \stopformula \stoptext /example If I comment line with '\etupmathematics' then I could compile the example without error. The shown example however gives error when compiled by context (mkiv): error ! Missing } inserted. inserted text } to be read again $ \stopdisplaymath -\stopinnermath $ $\par \afterdisplayspace \par \egroup \dostopformula ...eter \c!alternative \v!formula } \dostoptagged \dostoptagge... l.21 \stopformula ? /error Does this mean that 1) something wrong with font setup? 2) mathematics setup? P.S. I took fonts (symlink) from TL2010 installed in parallel. --- WBR, Vladimir Lomov ___ 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] Using fourier-GUT as math font
On 27-10-2010 3:49, nitralime wrote: I have made a mistake in my typescript. Here is the corrected version: %% .. \starttypescript [math] [fourier][texnansi] \definefontsynonym [Fourier-Math-Letters] [name:fouriermathletters] \definefontsynonym [Fourier-Math-Letters-Italic] [name:fouriermathlettersitalic] \definefontsynonym [Fourier-Math-Letters-Bold] [name:fouriermathlettersbold] \definefontsynonym [Fourier-Math-Letters-BoldItalic] [name:fouriermathlettersbolditalic] \definefontsynonym [Fourier-Math-Blackboard] [name:fouriermathblackboard] \definefontsynonym [Fourier-Math-Calligraphic] [name:fouriermathcal] \definefontsynonym [Fourier-Math-Symbols] [name:fouriermathsymbols] \definefontsynonym [Fourier-Math-Extension] [name:fouriermathextension] %--- \definefontsynonym [Euler-Fraktur] [name:eufm10] \definefontsynonym [Euler-Fraktur-Bold] [name:eufb10] %--- \stoptypescript .. %% However, this correction has not affected the final result. The same problem as before:-( It does not work that way in mkiv. (1) you need a proper serif definition: \starttypescript [serif] [utopia] [name] \definefontsynonym [Serif][file:whatever.afm] \definefontsynonym [SerifItalic] [file:...] \definefontsynonym [SerifBold][file:...] \definefontsynonym [SerifBoldItalic] [file:...] \definefontsynonym [SerifSlanted] [file:...] \definefontsynonym [SerifBoldSlanted] [file:...] \stoptypescript (2) you need a math definition: \starttypescript [math] [fourier] \loadfontgoodies[fourier-math] \definefontsynonym[mathroman][four...@fourier-math] \stoptypescript (3) now you can define a typeface: \definetypeface[whatever][rm][serif][utopia] [default] \definetypeface[whatever][mm][math] [fourier][default] \setupbodyfont[whatever] However, first you need to figure out the right names for the utopia files. Next you need to make a file fourier-math.lfg, like: return { name = fourier-math, version = 1.00, comment = Goodies that complement fourier math., author = Hans, copyright = ConTeXt development team, mathematics = { mapfiles = { fourier.map, }, virtuals = { [fourier-math] = { { name = futmi.tfm, vector = tex-mi }, { name = futmii.tfm, vector = tex-it }, { name = futsy.tfm, vector = lbr-sy, skewchar=0x7F, parameters = true }, { name = fourier-mex.tfm, vector = tex-ex, extension = true }, } } } } This does not work at my end as the names of the files are wrong. Also, more entries are needed (see for instance lucida-math.lfg). I have no time to figure out these names. (btw, there is already some math utopia support) - 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 ___
Re: [NTG-context] Using fourier-GUT as math font
] [name:fouriermathsymbols] \definefontsynonym [Fourier-Math-Extension] [name:fouriermathextension] %--- \definefontsynonym [Euler-Fraktur] [name:eufm10] \definefontsynonym [Euler-Fraktur-Bold] [name:eufb10] %--- \stoptypescript .. %% However, this correction has not affected the final result. The same problem as before:-( It does not work that way in mkiv. (1) you need a proper serif definition: \starttypescript [serif] [utopia] [name] \definefontsynonym [Serif][file:whatever.afm] \definefontsynonym [SerifItalic] [file:...] \definefontsynonym [SerifBold][file:...] \definefontsynonym [SerifBoldItalic] [file:...] \definefontsynonym [SerifSlanted] [file:...] \definefontsynonym [SerifBoldSlanted] [file:...] \stoptypescript (2) you need a math definition: \starttypescript [math] [fourier] \loadfontgoodies[fourier-math] \definefontsynonym[mathroman][four...@fourier-math] \stoptypescript (3) now you can define a typeface: \definetypeface[whatever][rm][serif][utopia] [default] \definetypeface[whatever][mm][math] [fourier][default] \setupbodyfont[whatever] However, first you need to figure out the right names for the utopia files. Next you need to make a file fourier-math.lfg, like: return { name = fourier-math, version = 1.00, comment = Goodies that complement fourier math., author = Hans, copyright = ConTeXt development team, mathematics = { mapfiles = { fourier.map, }, virtuals = { [fourier-math] = { { name = futmi.tfm, vector = tex-mi }, { name = futmii.tfm, vector = tex-it }, { name = futsy.tfm, vector = lbr-sy, skewchar=0x7F, parameters = true }, { name = fourier-mex.tfm, vector = tex-ex, extension = true }, } } } } This does not work at my end as the names of the files are wrong. Also, more entries are needed (see for instance lucida-math.lfg). I have no time to figure out these names. (btw, there is already some math utopia support) - 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 ___
[NTG-context] itemize
An example from the documentation: \starttext \startitemize[1,packed] \head supported image formats in \PDFTEX \par \startitemize[a] \item png \item eps \item pdf \stopitemize \head non supported image formats in \PDFTEX \par \startitemize[continue] \item jpg \item gif \item tif \stopitemize \stopitemize \stoptext I get with mkIV (TeXLive2010) [...] systems : begin file .tex at line 3 ! Math error: parameter \Umathquad\displaystyle is not set. \mathematics ... #1\else \Ustartmath #1\Ustopmath \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname [...] Herbert ___ 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] itemize
2010/10/19 Herbert Voss herbert.v...@fu-berlin.de: An example from the documentation: \starttext \startitemize[1,packed] \head supported image formats in \PDFTEX \par \startitemize[a] \item png \item eps \item pdf \stopitemize \head non supported image formats in \PDFTEX \par \startitemize[continue] \item jpg \item gif \item tif \stopitemize \stopitemize \stoptext I get with mkIV (TeXLive2010) [...] systems : begin file .tex at line 3 ! Math error: parameter \Umathquad\displaystyle is not set. \mathematics ... #1\else \Ustartmath #1\Ustopmath \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname [...] Herbert It's ok with latest minimals. Unfortunately minimals still suffers of cont-fil bug: in context.mkiv/mkii \loadcorefile{cont-fil} should be \loadmarkfile{cont-fil} -- 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://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] itemize
On 19-10-2010 11:17, luigi scarso wrote: 2010/10/19 Herbert Vossherbert.v...@fu-berlin.de: An example from the documentation: \starttext \startitemize[1,packed] \head supported image formats in \PDFTEX \par \startitemize[a] \item png \item eps \item pdf \stopitemize \head non supported image formats in \PDFTEX \par \startitemize[continue] \item jpg \item gif \item tif \stopitemize \stopitemize \stoptext I get with mkIV (TeXLive2010) [...] systems : begin file .tex at line 3 ! Math error: parameter \Umathquad\displaystyle is not set. \mathematics ... #1\else \Ustartmath #1\Ustopmath \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname [...] If I remember right this is a bug in the luatex version that ships with texlive. Does \def\Ustartmath{$} \def\Ustopmath {$} help? 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 ___
Re: [NTG-context] itemize
Am 19.10.2010 11:27, schrieb Hans Hagen: I get with mkIV (TeXLive2010) [...] systems : begin file .tex at line 3 ! Math error: parameter \Umathquad\displaystyle is not set. \mathematics ... #1\else \Ustartmath #1\Ustopmath \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname [...] If I remember right this is a bug in the luatex version that ships with texlive. Does \def\Ustartmath{$} \def\Ustopmath {$} help? the same problem Herbert ___ 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] itemize
On Tue, Oct 19, 2010 at 11:27:35AM +0200, Hans Hagen wrote: On 19-10-2010 11:17, luigi scarso wrote: 2010/10/19 Herbert Vossherbert.v...@fu-berlin.de: An example from the documentation: \starttext \startitemize[1,packed] \head supported image formats in \PDFTEX \par \startitemize[a] \item png \item eps \item pdf \stopitemize \head non supported image formats in \PDFTEX \par \startitemize[continue] \item jpg \item gif \item tif \stopitemize \stopitemize \stoptext I get with mkIV (TeXLive2010) [...] systems : begin file .tex at line 3 ! Math error: parameter \Umathquad\displaystyle is not set. \mathematics ... #1\else \Ustartmath #1\Ustopmath \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname [...] If I remember right this is a bug in the luatex version that ships with texlive. Does \def\Ustartmath{$} \def\Ustopmath {$} The problem seems to be with \Umathquad\displaystyle not being said, which usually means he is loading a math font that has no math parameters. For lualatex this used to be some TTF version of CM fonts that are erroneously have similar file names (with different extension) to the TFM fonts so it gets loaded instead of the real CM fonts. On my Debian system, the were two versions, one bundled with LyX and one with some other latex fonts package. Regards, Khaled -- Khaled Hosny Arabic localiser and member of Arabeyes.org team Free font developer ___ 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] itemize
Am 19.10.2010 11:40, schrieb Khaled Hosny: systems : begin file .tex at line 3 ! Math error: parameter \Umathquad\displaystyle is not set. \mathematics ... #1\else \Ustartmath #1\Ustopmath \fi \dodosymbol ...bol \csname \??ss :#1:#2\endcsname [...] If I remember right this is a bug in the luatex version that ships with texlive. Does \def\Ustartmath{$} \def\Ustopmath {$} The problem seems to be with \Umathquad\displaystyle not being said, which usually means he is loading a math font that has no math parameters. For lualatex this used to be some TTF version of CM fonts that are erroneously have similar file names (with different extension) to the TFM fonts so it gets loaded instead of the real CM fonts. On my Debian system, the were two versions, one bundled with LyX and one with some other latex fonts package. it looks like that there are no math fonts available: [..] !define font: forced type tfm of eufm7 not found !define font: font with name eufm7 is not found !define font: forced type tfm of eufb7 not found !define font: font with name eufb7 is not found !math virtual : font LMMath7-Regular, no parameters set !math virtual : the mapping is incomplete for 'LMMath7-Regular' at 7pt !math virtual : font LMMath7-Regular, no parameters set !math virtual : font LMMath7-Regular, no parameters set !math virtual : font LMMath7-Regular, no parameters set !math virtual : font LMMath7-Regular, no parameters set !math virtual : font LMMath7-Regular, no parameters set [...] Herbert ___ 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] A few puzzling problems (bugs?) with enumerations
Ok so after reading the source code of strc-des.mkiv, I found that contrary to earlier documentation such as http://www.ntg.nl/maps/36/09.pdf it is not the 'number' parameter that should be used to share numbering but the 'counter' parameter. After fixing that in my code, theorems now have proper numbers and references to theorems work properly too. However, \starttheorem[number=no] blah \stoptheorem and \starttheorem[-] blih \stoptheorem still don't work as expected inside sections, and I still have problem 1 listed in one of my previous emails, namely Any ideas? On a sidenote, I would like to contribute to the wiki or whatever is the main documentation source of the ConTeXt project something to document those parameters that are specific de \setupenumerations. The context reference manual and the wiki both just refer to \setupdescriptions yet there are a number of parameters that don't exist for \setupdescriptions, such as number, counter, prefix, prefixcomponents, etc. Many thanks, Mathieu On Wed, Oct 13, 2010 at 12:57 PM, Mathieu Boespflug 0xbadc...@gmail.com wrote: Also, I notice that the context reference manual from the svn repository at supelec has the same problem when built with the latest beta (p 241). -- Mathieu On Wed, Oct 13, 2010 at 12:08 PM, Mathieu Boespflug 0xbadc...@gmail.com wrote: Hi, using the latest beta, I've had a bunch of problems using enumerations in mkiv. Earlier betas have had the same problems. Consider the following document: \defineenumeration [definition] [ text=Definition, title=yes, list=all, listtext={Definition }] \defineenumeration [theorem] [ text=Theorem, title=yes, style=italic, list=all, number=definition, listtext={Theorem }] \defineenumeration [proof] [ text=Proof, number=no, headstyle=italic, title=no, closesymbol={\mathematics{\square}}, style=normal] \starttext blah blah \startdefinition{foo} body1 \stopdefinition \startdefinition body2 \stopdefinition \startdefinition[-] body3 \stopdefinition \starttheorem $P = NP$ \stoptheorem \startproof too long to fit here. \stopproof \section{Inside sections} \subsection{Inside subsections} \startdefinition{foo} body1 \stopdefinition \startdefinition body2 \stopdefinition \startdefinition[-] body3 \stopdefinition \starttheorem[thm:pnp] $P = NP$ \stoptheorem \startproof too long to fit here. \stopproof Let's talk about \in{theorem}[thm:pnp]. \stoptext I see five problems : 1. Even when the enumeration has no title, the parentheses appear. Judging by Aditya's code in his MyWay on theorems, it used to be that when there is no title, the parens don't appear. How do I recover this behaviour? 2. I want the theorem enumeration to share its number with the definition environment. That doesn't seem to work. Outside of any section, the theorem just doesn't have any number. Inside a section, the theorem very oddly displays the section number. 3. I want the proof enumeration to have no number. That doesn't work inside a section. As for the theorem enumeration, the section number is printed even though here i requested no number at all! 4. Suppressing the number for a specific enumeration using the [-] switch doesn't work. As before, inside a section, the section number appears instead of no number. 5. Citing a specific theorem using \in{theorem}[thm:pnp] doesn't show the number of a theorem. I'm guessing the last four points are all related. Best regards, Mathieu ___ 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] A few puzzling problems (bugs?) with enumerations
Hi, using the latest beta, I've had a bunch of problems using enumerations in mkiv. Earlier betas have had the same problems. Consider the following document: \defineenumeration [definition] [text=Definition, title=yes, list=all, listtext={Definition }] \defineenumeration [theorem] [text=Theorem, title=yes, style=italic, list=all, number=definition, listtext={Theorem }] \defineenumeration [proof] [ text=Proof, number=no, headstyle=italic, title=no, closesymbol={\mathematics{\square}}, style=normal] \starttext blah blah \startdefinition{foo} body1 \stopdefinition \startdefinition body2 \stopdefinition \startdefinition[-] body3 \stopdefinition \starttheorem $P = NP$ \stoptheorem \startproof too long to fit here. \stopproof \section{Inside sections} \subsection{Inside subsections} \startdefinition{foo} body1 \stopdefinition \startdefinition body2 \stopdefinition \startdefinition[-] body3 \stopdefinition \starttheorem[thm:pnp] $P = NP$ \stoptheorem \startproof too long to fit here. \stopproof Let's talk about \in{theorem}[thm:pnp]. \stoptext I see five problems : 1. Even when the enumeration has no title, the parentheses appear. Judging by Aditya's code in his MyWay on theorems, it used to be that when there is no title, the parens don't appear. How do I recover this behaviour? 2. I want the theorem enumeration to share its number with the definition environment. That doesn't seem to work. Outside of any section, the theorem just doesn't have any number. Inside a section, the theorem very oddly displays the section number. 3. I want the proof enumeration to have no number. That doesn't work inside a section. As for the theorem enumeration, the section number is printed even though here i requested no number at all! 4. Suppressing the number for a specific enumeration using the [-] switch doesn't work. As before, inside a section, the section number appears instead of no number. 5. Citing a specific theorem using \in{theorem}[thm:pnp] doesn't show the number of a theorem. I'm guessing the last four points are all related. Best regards, Mathieu ___ 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] A few puzzling problems (bugs?) with enumerations
Also, I notice that the context reference manual from the svn repository at supelec has the same problem when built with the latest beta (p 241). -- Mathieu On Wed, Oct 13, 2010 at 12:08 PM, Mathieu Boespflug 0xbadc...@gmail.com wrote: Hi, using the latest beta, I've had a bunch of problems using enumerations in mkiv. Earlier betas have had the same problems. Consider the following document: \defineenumeration [definition] [ text=Definition, title=yes, list=all, listtext={Definition }] \defineenumeration [theorem] [ text=Theorem, title=yes, style=italic, list=all, number=definition, listtext={Theorem }] \defineenumeration [proof] [ text=Proof, number=no, headstyle=italic, title=no, closesymbol={\mathematics{\square}}, style=normal] \starttext blah blah \startdefinition{foo} body1 \stopdefinition \startdefinition body2 \stopdefinition \startdefinition[-] body3 \stopdefinition \starttheorem $P = NP$ \stoptheorem \startproof too long to fit here. \stopproof \section{Inside sections} \subsection{Inside subsections} \startdefinition{foo} body1 \stopdefinition \startdefinition body2 \stopdefinition \startdefinition[-] body3 \stopdefinition \starttheorem[thm:pnp] $P = NP$ \stoptheorem \startproof too long to fit here. \stopproof Let's talk about \in{theorem}[thm:pnp]. \stoptext I see five problems : 1. Even when the enumeration has no title, the parentheses appear. Judging by Aditya's code in his MyWay on theorems, it used to be that when there is no title, the parens don't appear. How do I recover this behaviour? 2. I want the theorem enumeration to share its number with the definition environment. That doesn't seem to work. Outside of any section, the theorem just doesn't have any number. Inside a section, the theorem very oddly displays the section number. 3. I want the proof enumeration to have no number. That doesn't work inside a section. As for the theorem enumeration, the section number is printed even though here i requested no number at all! 4. Suppressing the number for a specific enumeration using the [-] switch doesn't work. As before, inside a section, the section number appears instead of no number. 5. Citing a specific theorem using \in{theorem}[thm:pnp] doesn't show the number of a theorem. I'm guessing the last four points are all related. Best regards, Mathieu ___ 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 ___