Re: [NTG-context] Plotting a graph of a function f, like f(x) = e^x, with MetaPost
On Wed, Oct 12, 2011 at 12:45 AM, Paul Menzel paulepan...@users.sourceforge.net wrote: Dear ConTeXt folks, I finally chose MetaPost/MetaFun [1] because of the native integration with ConTeXt and hopefully easy font handling. I want to use that throughout my document. Of course I hit the first problem. Wanting to draw a “simple” function f like f(x) = e^x, seems hard to accomplish. I guess I should stress that MetaPost does not have a high accuracy so it might not be the best solution [5]. There seem to be quite a lot of solutions (mostly macros) on the Web for this problem so I am wondering if one of them is integrated in MetaFun. Here are some of my findings. 1. Reading about the graph package by John D. Hobby [2] and which is also included in ConTeXt [3]. Especially I liked the automatic coordinate systems. The package seems to only be able to plot graphs with data points saved in files. So one solution would be to manually create data files with data points of the relevant function. 2. There is an example in the Drexel Physics Wiki [4]. 3. Anthony Phan has also created some macros in his `mps` [5 (currently not accessible)]. 4. André Heck uses the macro packages `courbes` and `grille` from Jean-Michel Sarlat to show some nice examples in his tutorial »Learning Metapost by Doing« [6]. So what do you suggest? In MKIV you can use Lua to make calculations in floating point, and Metapost to draw the data. -- 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 ___
[NTG-context] How can I align characters vertically middle and not align on baseline ?
Hi, in ConTeXT file, I've this : {\tfa } {\viii AAA} How can I do to middle align vertically all A, and not align on baseline ? Thanks for your help. Regards, Stephane -- Stéphane Klein steph...@harobed.org blog: http://stephane-klein.info Twitter: http://twitter.com/klein_stephane pro: http://www.is-webdesign.com ___ If your question is of interest to others as well, please add an 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] about \startstructureblockenvironment
Dear all, There is an error message, undefined control sequence as below when I use \startstructureblockenvironment: mtx-context | run 1: luatex --fmt=/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en --lua=/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en.lui --backend=pdf ./test4.tex \stoptext This is LuaTeX, Version beta-0.70.1-2011051908 (rev 4277) \write18 enabled. (test4.tex ConTeXt ver: 2011.10.08 11:42 MKIV fmt: 2011.10.12 int: english/english system cont-new.mkiv loaded (/Users/graph/ConTeXt/tex/texmf-context/tex/context/base/cont-new.mkiv system beware: some patches loaded from cont-new.mkiv ) system test4.top loaded (test4.top) fonts latin modern fonts are not preloaded languages language en is active ! Undefined control sequence. system tex error on line 6 in file test4.tex: Undefined control sequence ... 1 \definestructureconversionset[frontpart:pagenumber][][romannumerals] 2 \definestructureconversionset[bodypart:pagenumber] [][numbers] 3 4 \setuplist[chapter][pageconversionset=pagenumber] 5 6 \startstructureblockenvironment[frontpart] 7 \setupuserpagenumber[numberconversion=romannumerals] 8 \setuppagenumber[number=1] 9 \stopstructureblockenvironment 10 11 \startstructureblockenvironment[bodypart] 12 \setuppagenumber[number=1] 13 \stopstructureblockenvironment 14 15 \startcomponent Test 16 l.6 \startstructureblockenvironment [frontpart] ? I followed an example in the wiki - http://wiki.contextgarden.net/Table_of_Contents Would you please tell me what is wrong? Here is a sample code. \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber] [][numbers] \setuplist[chapter][pageconversionset=pagenumber] \startstructureblockenvironment[frontpart] \setupuserpagenumber[numberconversion=romannumerals] \setuppagenumber[number=1] \stopstructureblockenvironment \startstructureblockenvironment[bodypart] \setuppagenumber[number=1] \stopstructureblockenvironment \startcomponent Test \startbodymatter \chapter{One} \input knuth \chpater{Two} \input knuth \stopbodymatter \stopcomponent Thank you. Best regards, Dalyoung ___ If your question is of interest to others as well, please add an 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] about \startstructureblockenvironment
Am 12.10.2011 um 09:11 schrieb Jeong Dalyoung: Dear all, There is an error message, undefined control sequence as below when I use \startstructureblockenvironment: Use \startsectionblockenvironment. 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] Bug in export with \definehighlight
On 12-10-2011 05:26, Aditya Mahajan wrote: The bug is with xml.css.fontspecification function that does not handle style=mono (or sans and serif for that matter). The proper solution is to convert from context font specification into html font specification for all styles. I've added mono/type, sans/sanserif and serif parsing (in next beta). 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] Lucida hangs (?) on latest beta
Hello! Encouraged by the recent User Meeting, I'm experimenting with sans serif fonts, trying to find something that I could use all over our documents (European languages) and that would be acceptable to the design people. One of the possibilities would be Lucida, but I'm not having much success with it... First I tried with the wiki, http://wiki.contextgarden.net/Lucida. The lucida.zip downloads and extracts nicely, but does not contain any .pfb files, so so much for that. Then I took a leap of faith and just put \setupbodyfont[lucida] in the setup area of my file and something is definitely happening, but then the process hangs. I retried with just == \setupbodyfont[lucida] \starttext \chapter{Testing Lucida} \input knuth \stoptext == Same result... The whole log is in the end of this message, but I suspect this is the essential part (which SciTe also marks with red): fontsdefining font with asked name 'lbl' is not found using lookup 'file' fontsvirtual math loading font lucidamath subfont 12 with name file:lbl.afm at 458752 is skipped, not found ! LuaTeX error ...text/tex/texmf-context/tex/context/base/math-vfu.lua:476: bad argument #1 to '(for generator)' (table expected, got nil) stack traceback: [C]: in function '(for generator)' ...text/tex/texmf-context/tex/context/base/math-vfu.lua:476: in function ...text/tex/texmf-context/tex/context/base/math-vfu.lua:397 (tail call): ? (tail call): ? ...text/tex/texmf-context/tex/context/base/font-def.lua:406: in function 'read' ...text/tex/texmf-context/tex/context/base/font-ctx.lua:767: in function 'definefont_two' main ctx instance:1: in main chunk. system tex error on line 1 in file 20111012_Lucida1.tex: LuaTeX error ... I'm running the newest beta, ConTeXt ver: 2011.10.08 11:42 MKIV, and ConTeXt with SciTe in Win7. I compile the pdf with Ctrl+F12 and I get palatino and dejavu to work to an extent (if I switch the font name in the test file from lucida to dejavu, everything works perfectly, so I guess either I'm missing something essential or there's a problem somewhere in the beta. In the font jungle once again, Mari The full log: (20111012_Lucida1.tex ConTeXt ver: 2011.10.08 11:42 MKIV fmt: 2011.10.11 int: english/english system cont-new.mkiv loaded (C:/context/tex/texmf-context/tex/context/base/cont-new.mkiv system beware: some patches loaded from cont-new.mkiv ) system 20111012_Lucida1.top loaded system options start used options used options % runtime options files (command line driven) used options \unprotect used options % feedback and basic job control used options % handy for special styles used options \startluacode used options document = document or { } used options document.arguments={ used options [autopdf]=true, used options } used options document.files={ used options 20111012_Lucida1.tex, used options } used options \stopluacode used options % process info used options \setupsystem[inputfile=20111012_Lucida1.tex] used options \setupsystem[\c!n=1,\c!m=1] used options % modes used options % options (not that important) used options \startsetups *runtime:options used options \stopsetups used options % styles and modules used options \startsetups *runtime:modules used options \stopsetups used options % done used options \protect \endinput system options stop used options (20111012_Lucida1.top) fontslatin modern fonts are not preloaded languageslanguage en is active (C:/context/tex/texmf-context/tex/context/base/type-siz.mkiv) (C:/context/tex/texmf-context/tex/context/base/type-otf.mkiv) filesreadfile asked name: 'loc', not found {C:/context/tex/texmf/fonts/map/dvips/lm/lm-math.map}{C:/context/tex/texmf/fonts/map/dvips/lm/lm-rm.map}{C:/context/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map} fontsdefining font with asked name 'LucidaBright' is not found using lookup 'name' fontsdefining unknown font LucidaBright, loading aborted fontsdefining unable to define LucidaBright as \*lucida12ptrmtfrm* fontsdefining forced type afm of lbr not found fontsdefining font with asked name 'lbr' is not found using lookup 'file' fontsvirtual math loading font lucidamath subfont 1 with name file:lbr.afm*virtualmath at 458752 is skipped, not found fontsdefining forced type tfm of hlcrim not found fontsdefining font with asked name 'hlcrim' is not found using lookup 'file' fontsvirtual math loading font lucidamath subfont 2 with name hlcrim.tfm at 458752 is skipped, not found fontsdefining forced type tfm of hlcrim not found fontsdefining font with asked name 'hlcrim' is not
Re: [NTG-context] Lucida hangs (?) on latest beta
On Wed, Oct 12, 2011 at 11:04 AM, Mari Voipio mari.voi...@iki.fi wrote: Hello! Encouraged by the recent User Meeting, I'm experimenting with sans serif fonts, trying to find something that I could use all over our documents (European languages) and that would be acceptable to the design people. One of the possibilities would be Lucida, but I'm not having much success with it... First I tried with the wiki, http://wiki.contextgarden.net/Lucida. The lucida.zip downloads and extracts nicely, but does not contain any .pfb files, so so much for that. Froma http://www.ctan.org/tex-archive/fonts/psfonts/bh/lucida ... The lucidabr and lucida packages on CTAN are free, but the Lucida fonts are not: you must order them from TUG or another source to actually typeset anything in Lucida. The TUG Lucida web pages explain the details -- see http://tug.org/lucida. ... -- 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] Lucida hangs (?) on latest beta
Am 12.10.2011 um 11:04 schrieb Mari Voipio: Hello! Encouraged by the recent User Meeting, I'm experimenting with sans serif fonts, trying to find something that I could use all over our documents (European languages) and that would be acceptable to the design people. One of the possibilities would be Lucida, but I'm not having much success with it... First I tried with the wiki, http://wiki.contextgarden.net/Lucida. The lucida.zip downloads and extracts nicely, but does not contain any .pfb files, so so much for that. You have to buy them: http://tug.org/store/lucida/ 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] Lucida hangs (?) on latest beta
On 12-10-2011 11:16, Wolfgang Schuster wrote: Am 12.10.2011 um 11:04 schrieb Mari Voipio: Hello! Encouraged by the recent User Meeting, I'm experimenting with sans serif fonts, trying to find something that I could use all over our documents (European languages) and that would be acceptable to the design people. One of the possibilities would be Lucida, but I'm not having much success with it... First I tried with the wiki,http://wiki.contextgarden.net/Lucida. The lucida.zip downloads and extracts nicely, but does not contain any .pfb files, so so much for that. You have to buy them: http://tug.org/store/lucida/ best wait till the otf version is available (Mojca will probably announce that here some day soon) and forget about the type 1's 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] Lucida hangs (?) on latest beta
On Wed, Oct 12, 2011 at 11:20 AM, Hans Hagen pra...@wxs.nl wrote: best wait till the otf version is available (Mojca will probably announce that here some day soon) and forget about the type 1's Uh ... the otf version will be free ? -- 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] Lucida hangs (?) on latest beta
On Wed, Oct 12, 2011 at 12:11, luigi scarso luigi.sca...@gmail.com wrote: The lucidabr and lucida packages on CTAN are free, but the Lucida fonts are not: you must order them from TUG or another source to actually typeset anything in Lucida. The TUG Lucida web pages explain the details -- see http://tug.org/lucida. ... Ummm Sounds like a line I want to add to that wiki page, I'll do it later today. However, my Windows 7 has Lucida Bright, Lucida Console and Lucida Sans, so I kind of have those fonts already, as ttfs. Apparently they came with my Acrobat Pro. Oh well, I can simulate with the ttfs and figure out about buying when the otf:s are around. The 2-user licence isn't that expensive and I doubt I'll ever need more than that in the ConTeXt world. OK, thank you everybody - I knew things had changed, but what I heard at CM5 hadn't quite parsed. :-) Back to the test bench, Mari ___ If your question is of interest to others as well, please add an 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] Lucida hangs (?) on latest beta
On 12-10-2011 11:22, luigi scarso wrote: On Wed, Oct 12, 2011 at 11:20 AM, Hans Hagenpra...@wxs.nl wrote: best wait till the otf version is available (Mojca will probably announce that here some day soon) and forget about the type 1's Uh ... the otf version will be free ? no, but relatively cheap and pretty complete - 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] How can I align characters vertically middle and not align on baseline ?
Am 12.10.2011 um 09:04 schrieb Stéphane Klein: Hi, in ConTeXT file, I've this : It’s ConTeXt with a small “t” at the end. {\tfa } {\viii AAA} How can I do to middle align vertically all A, and not align on baseline ? \defineframed[centerframe][frame=off,location=middle,strut=no] \starttext \leftaligned{\centerframe{\tfa } \centerframe{\vi AAA}} \dontleavehmode\centerframe{\tfa } \centerframe{\vi AAA} \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] \cite doesn't work correctly
On Wed 12 Oct 2011, Steffen Wolfrum wrote: the \cite command behaves strange, when used in projects: The expected output would be: Me and You; Name, P..Test.. but it is only ; Name, P..Test.. And this result is the same when run from product or from component. Hmm. When I comment out your \setupcite [author] [left={},right={}] and process the chapter with context 2011.10.01, it seems to work. I don't know why setting left and right should kill the author citation type, and then only when in a project structure -- I haven't run into this since I don't use that citation type. Sorry, not much help, but maybe it's a start... 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] Lucida hangs (?) on latest beta
Am 12.10.2011 um 11:23 schrieb Mari Voipio: On Wed, Oct 12, 2011 at 12:11, luigi scarso luigi.sca...@gmail.com wrote: The lucidabr and lucida packages on CTAN are free, but the Lucida fonts are not: you must order them from TUG or another source to actually typeset anything in Lucida. The TUG Lucida web pages explain the details -- see http://tug.org/lucida. ... Ummm Sounds like a line I want to add to that wiki page, I'll do it later today. However, my Windows 7 has Lucida Bright, Lucida Console and Lucida Sans, so I kind of have those fonts already, as ttfs. Apparently they came with my Acrobat Pro. When the fonts are in your Windows font directory you can try this: \usemodule[simplefonts] \setmainfont[Lucida Bright] \starttext Lucida Bright \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] Lucida hangs (?) on latest beta
Am 2011-10-12 um 11:04 schrieb Mari Voipio: Encouraged by the recent User Meeting, I'm experimenting with sans serif fonts, trying to find something that I could use all over our documents (European languages) and that would be acceptable to the design people. Besides Lucida you/they might like some of the newer Windows system fonts, like Calibri and Candara. Google Web fonts are another known source: http://www.google.com/webfonts Greetlings from Lake Constance! Hraban --- http://www.fiee.net/texnique/ http://wiki.contextgarden.net https://www.cacert.org (I'm an assurer) ___ If your question is of interest to others as well, please add an 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] Lucida hangs (?) on latest beta
On Wed, Oct 12, 2011 at 12:37, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: When the fonts are in your Windows font directory you can try this: \usemodule[simplefonts] \setmainfont[Lucida Bright] It works! And I learned something new and useful today, now I finally understand why it is called simplefonts (thankfully I already learned this module thing last year, so I had it already...). Not only did I get Lucida to work, this seems to work as well: \usemodule[simplefonts] \setmainfont[Calibri] Now I'm one happy ConTeXter, this'll stop most of the fights with the Word users... NB. I'll wikify some of this stuff once I've got a bit of leftover energy. In the meanwhile, is there a way of finding out what fonts are included in the simplefonts module now? A quick wiki search on simplefonts didn't seem terribly useful, but might just be my inability to concentrate on the task... Wolfgang, you are my hero today. :-D Mari ___ If your question is of interest to others as well, please add an 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] Lucida hangs (?) on latest beta
Am 12.10.2011 um 12:31 schrieb Mari Voipio: On Wed, Oct 12, 2011 at 12:37, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: When the fonts are in your Windows font directory you can try this: \usemodule[simplefonts] \setmainfont[Lucida Bright] It works! And I learned something new and useful today, now I finally understand why it is called simplefonts (thankfully I already learned this module thing last year, so I had it already...). Not only did I get Lucida to work, this seems to work as well: \usemodule[simplefonts] \setmainfont[Calibri] Now I'm one happy ConTeXter, this'll stop most of the fights with the Word users... NB. I'll wikify some of this stuff once I've got a bit of leftover energy. In the meanwhile, is there a way of finding out what fonts are included in the simplefonts module now? A quick wiki search on simplefonts didn't seem terribly useful, but might just be my inability to concentrate on the task… simplefonts hasn’t any fonts included (except latin modern), it uses contexts font database to search for the requested font. You can get information from the database on the command line, e.g. a search for caliber on my system results in this: rover:~ wolf$ mtxrun --script font --list --all calibri* calibri calibri /Library/Fonts/Microsoft/Calibri.ttf calibribold calibribold /Library/Fonts/Microsoft/Calibri Bold.ttf calibribolditalic calibribolditalic /Library/Fonts/Microsoft/Calibri Bold Italic.ttf calibriitalic calibriitalic /Library/Fonts/Microsoft/Calibri Italic.ttf calibrinormal calibriitalic /Library/Fonts/Microsoft/Calibri Italic.ttf 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] How can I align characters vertically middle and not align on baseline ?
Le 12/10/2011 11:32, Wolfgang Schuster a écrit : Am 12.10.2011 um 09:04 schrieb Stéphane Klein: Hi, in ConTeXT file, I've this : It’s ConTeXt with a small “t” at the end. {\tfa } {\viii AAA} How can I do to middle align vertically all A, and not align on baseline ? \defineframed[centerframe][frame=off,location=middle,strut=no] \starttext \leftaligned{\centerframe{\tfa } \centerframe{\vi AAA}} \dontleavehmode\centerframe{\tfa } \centerframe{\vi AAA} \stoptext Thanks for your help. It's work. Another question, where have you found \defineframed documentation ? the documentation of all parameters ? I search in this document http://www.pragma-ade.nl/general/manuals/ms-cb-en.pdf I found nothing about that. What is your bests context / tex reference ? Regards, Stephane -- Stéphane Klein steph...@harobed.org blog: http://stephane-klein.info Twitter: http://twitter.com/klein_stephane pro: http://www.is-webdesign.com ___ If your question is of interest to others as well, please add an 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] I don't understand scale value of \scale[scale=700], 700 = 70% ?
Le 11/10/2011 15:09, Peter Münster a écrit : On Tue, Oct 11 2011, Stéphane Klein wrote: Do you have a tip ? There is \scale[...]{...}: \starttext \dontleavehmode \scale[scale=700]{•} • \scale[scale=1700]{•} \stoptext I don't understand the scale value : * 700 = 70% ? * 1700 = 170% ? Regards, Stephane -- Stéphane Klein steph...@harobed.org blog: http://stephane-klein.info Twitter: http://twitter.com/klein_stephane pro: http://www.is-webdesign.com ___ If your question is of interest to others as well, please add an 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] I don't understand scale value of \scale[scale=700], 700 = 70% ?
On Wed, Oct 12, 2011 at 1:47 PM, Stéphane Klein steph...@harobed.org wrote: Le 11/10/2011 15:09, Peter Münster a écrit : On Tue, Oct 11 2011, Stéphane Klein wrote: Do you have a tip ? There is \scale[...]{...}: \starttext \dontleavehmode \scale[scale=700]{•} • \scale[scale=1700]{•} \stoptext I don't understand the scale value : * 700 = 70% ? * 1700 = 170% ? yes: see \starttext \startTEXpage A\scale[scale=1000]{A} A\scale[scale=500]{A} A\scale[scale=2000]{A} \stopTEXpage \stoptext -- luigi attachment: test.png___ If your question is of interest to others as well, please add an 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] Include section number in reference
Hi, the example below leads to: I Foo A Bar subsection A What I need is: I Foo A Bar subsection I.A How to convince \in… to include the section element? % \definestructureconversionset [myset] [ Romannumerals, Romannumerals, Romannumerals, Character, ] [numbers] \setuphead [sectionconversionset=myset] \setuphead [subsection] [sectionsegments=subsection] \starttext \startsection [title=Foo] \startsubsection [title=Bar, reference=bar] \stopsubsection \in{subsection}[bar] \stopsection \stoptext % Regards 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] \cite doesn't work correctly
Am 12.10.2011 um 11:33 schrieb Pontus Lurcock: On Wed 12 Oct 2011, Steffen Wolfrum wrote: the \cite command behaves strange, when used in projects: The expected output would be: Me and You; Name, P..Test.. but it is only ; Name, P..Test.. And this result is the same when run from product or from component. Hmm. When I comment out your \setupcite [author] [left={},right={}] and process the chapter with context 2011.10.01, it seems to work. I don't know why setting left and right should kill the author citation type, and then only when in a project structure and with context 2011.10.08 it doesn't work at all (even when commented out as you propose). I think it must be a bug. @Hans: can this be fixed in next beta, please? Steffen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] beta
Hi, I uploaded a new beta. There are a few new things and some changes: - The flow chart module has been rewritten for mkiv and cf Wili it does a decent job so I've replaced the old one. This is the one that can be extended (discussed at the context conference). - I'm rewriting stepcharts (something I need myself) but that's work in progress. Here the functionality will change a bit (no problem as I never noticed any other usage). The manual will also be updated. == There is an experimental new s-fnt-35.mkiv module that can be used as: \usemodule[fnt-35,art-01] \setupbodyfont [cambria] \starttext \ctxlua{moduledata.fonts.show_a_lot(Cambria)} \stoptext It probably needs to be improved. Users are welcome to submit additional (language related) sample alphabets etc. It might also become an option for mtx-fonts.lua == There has been a change in storing positional info in the tuc file. No big deal, just another format. == There has been a fix in otf contextual stuff ... for Idris (so that he can finish the context book sooner). == There are some new commands: \startdocument and \stopdocument. Copied from mag-1101: \starttyping \startdocument[settings] structured content \stopdocument \stoptyping The settings are key|/|value pairs and the values can be retrieved using: \starttyping \documentvariable{key} \stoptyping You can set \type {before} and \type {after} parameters and by default these are set up as follows: \starttyping \setvariables [document] [before=\directsetup{document:start}, after=\directsetup{document:stop}] \stoptyping You can for instance define these setups to generate a title page (using document variables) and a colophon page. In the future more functionality might be added. == Yet another new feature is automatic italic correction. There will be an article about it (first version ready), maybe in the conference proceedings as it's a follow up on the conference. Quick howto: \definefontfeature[default][default][itlc=yes] It is enabled with: \setupitaliccorrection[always] % or 'text' or 'none' Or (bit more efficient): \setupitaliccorrection[always,global] or even: \definefontfeature[default][default][itlc=yes,notextitalics=yes] to get rid of \/ too. (we might opt for \/ being just /). Thomas and I will play with additional functonality (range support for fonts that have somewhat italic properties like greek). == Of course there are a couple of patches and for sure some new bugs (or missing files). 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] Solution to a superscript problem?
On 12-10-2011 21:43, Otso Helenius wrote: Hello, I've been trying to come up with a few methods to add definitions to text with the help of the metafun and context manuals. The first method adds the definition as sort of a superscript on top of the word, and the second one marks multiple words with a curly bracket and adds the definition on top of the tip of the bracket. Here is the (ugly and hackish) code: \startuniqueMPgraphic{defline} path p; p:=(0,0)..controls (0,1) and (1,1)..(1,1)--(6,1)..controls(7,1) and (7,1)..(7,2)--(7,2)..controls(7,1) and (7,1)..(8,1)--(13,1)..controls(13,1) and (14,1)..(14,0); draw (0,0)--(0,12pt) withcolor white; draw p xscaled (\overlaywidth/15) yscaled 5 shifted (0,9mm) withpen pencircle scaled 0.25mm withcolor red; \stopuniqueMPgraphic \defineoverlay[curlybracket][\includeMPgraphic{defline}] \def\sentencedef[#1][#2]{\setbox\scratchbox=\hbox{#2}\hbox to \the\wd\scratchbox{\cbox{\hbox{\tfxx\color[red] #1}\\\hbox{\framed[background=curlybracket,frame=off]{#2} \def\worddef[#1][#2]{\setbox\scratchbox=\hbox{#2}\hbox to \the\wd\scratchbox{\cbox{\hbox{\rotate[rotation=25]{\tfxx\color[red] #1}}\\\hbox{#2 \starttext \hbox{\worddef[def1][Lorem] ipsum \worddef[def2][dolor] sit \worddef[def3][amet] consectetur \worddef[def4][adipiscing] elit.} \hbox{\sentencedef[def5][Lorem ipsum] dolor sit \sentencedef[def6][amet consectetur] adipiscing elit.} \stoptext I haven't figured a way to add the curly bracket graphic neatly nor position the definition correctly on top of it. I would be very interested in any advice regarding these two functions and how to rewrite both of them in a more elegant way. Wikifyable ... \startuniqueMPgraphic{defline}{width} path p ; p := ( 0,0) .. controls (0,1) and ( 1,1) .. ( 1,1) -- ( 6,1) .. controls (7,1) and ( 7,1) .. ( 7,2) -- ( 7,2) .. controls (7,1) and ( 7,1) .. ( 8,1) -- (13,1) .. controls (13,1) and (14,1) .. (14,0) ; draw p xysized (\MPvar{width},ExHeight) withpen pencircle scaled .1ExHeight withcolor \MPcolor{red} ; \stopuniqueMPgraphic \defineoverlay[curlybracket][\includeMPgraphic{defline}] \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} \unexpanded\def\LineDef {\dodoubleargument\doLineDef} \def\doLineDef[#1][#2]% {\dontleavehmode\hbox\bgroup \setbox\scratchbox\hbox{#2}% \raise1.5\strutht\hbox to \wd\scratchbox{\hss\rotate[rotation=25]{\tfxx\color[red]#1}\hss}% \hskip-\wd\scratchbox \raise0.9\strutht\hbox to \wd\scratchbox{\uniqueMPgraphic{defline}{width=\the\wd\scratchbox}}% \hskip-\wd\scratchbox \box\scratchbox \egroup} \starttext \WordDef[def1][Lorem] ipsum \WordDef[def2][dolor] sit \WordDef[def3][amet] consectetur \WordDef[def4][adipiscing] elit. \LineDef[def5][Lorem ipsum] dolor sit \LineDef[def6][amet consectetur] adipiscing elit. \stoptext - 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] 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 ___
Re: [NTG-context] Solution to a superscript problem?
On Wed, 12 Oct 2011, Hans Hagen wrote: On 12-10-2011 21:43, Otso Helenius wrote: Hello, I've been trying to come up with a few methods to add definitions to text with the help of the metafun and context manuals. The first method adds the definition as sort of a superscript on top of the word, and the second one marks multiple words with a curly bracket and adds the definition on top of the tip of the bracket. Here is the (ugly and hackish) code: \startuniqueMPgraphic{defline} path p; p:=(0,0)..controls (0,1) and (1,1)..(1,1)--(6,1)..controls(7,1) and (7,1)..(7,2)--(7,2)..controls(7,1) and (7,1)..(8,1)--(13,1)..controls(13,1) and (14,1)..(14,0); draw (0,0)--(0,12pt) withcolor white; draw p xscaled (\overlaywidth/15) yscaled 5 shifted (0,9mm) withpen pencircle scaled 0.25mm withcolor red; \stopuniqueMPgraphic \defineoverlay[curlybracket][\includeMPgraphic{defline}] \def\sentencedef[#1][#2]{\setbox\scratchbox=\hbox{#2}\hbox to \the\wd\scratchbox{\cbox{\hbox{\tfxx\color[red] #1}\\\hbox{\framed[background=curlybracket,frame=off]{#2} \def\worddef[#1][#2]{\setbox\scratchbox=\hbox{#2}\hbox to \the\wd\scratchbox{\cbox{\hbox{\rotate[rotation=25]{\tfxx\color[red] #1}}\\\hbox{#2 \starttext \hbox{\worddef[def1][Lorem] ipsum \worddef[def2][dolor] sit \worddef[def3][amet] consectetur \worddef[def4][adipiscing] elit.} \hbox{\sentencedef[def5][Lorem ipsum] dolor sit \sentencedef[def6][amet consectetur] adipiscing elit.} \stoptext I haven't figured a way to add the curly bracket graphic neatly nor position the definition correctly on top of it. I would be very interested in any advice regarding these two functions and how to rewrite both of them in a more elegant way. Wikifyable ... \startuniqueMPgraphic{defline}{width} path p ; p := ( 0,0) .. controls (0,1) and ( 1,1) .. ( 1,1) -- ( 6,1) .. controls (7,1) and ( 7,1) .. ( 7,2) -- ( 7,2) .. controls (7,1) and ( 7,1) .. ( 8,1) -- (13,1) .. controls (13,1) and (14,1) .. (14,0) ; draw p xysized (\MPvar{width},ExHeight) withpen pencircle scaled .1ExHeight withcolor \MPcolor{red} ; \stopuniqueMPgraphic \defineoverlay[curlybracket][\includeMPgraphic{defline}] \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} \unexpanded\def\LineDef {\dodoubleargument\doLineDef} \def\doLineDef[#1][#2]% {\dontleavehmode\hbox\bgroup \setbox\scratchbox\hbox{#2}% \raise1.5\strutht\hbox to \wd\scratchbox{\hss\rotate[rotation=25]{\tfxx\color[red]#1}\hss}% \hskip-\wd\scratchbox \raise0.9\strutht\hbox to \wd\scratchbox{\uniqueMPgraphic{defline}{width=\the\wd\scratchbox}}% \hskip-\wd\scratchbox \box\scratchbox \egroup} \starttext \WordDef[def1][Lorem] ipsum \WordDef[def2][dolor] sit \WordDef[def3][amet] consectetur \WordDef[def4][adipiscing] elit. \LineDef[def5][Lorem ipsum] dolor sit \LineDef[def6][amet consectetur] adipiscing elit. \stoptext Another solution, which might be easier to understand. This does not affect the lineheight. Depending on the usage, that may or may not be desirable. \unprotect \startuniqueMPgraphic{defline} path p ; p := ( 0,0) .. controls (0,1) and ( 1,1) .. ( 1,1) -- ( 6,1) .. controls (7,1) and ( 7,1) .. ( 7,2) -- ( 7,2) .. controls (7,1) and ( 7,1) .. ( 8,1) -- (13,1) .. controls (13,1) and (14,1) .. (14,0) ; draw p xysized (OverlayWidth,ExHeight) shifted (0,OverlayHeight) withpen pencircle scaled .1ExHeight withcolor \MPcolor{\framedparameter\c!framecolor} ; label.top((textext(\tfxx\color[red] \framedparameter\c!text) rotated 25), (OverlayWidth/2, OverlayHeight+ExHeight)); setbounds currentpicture to boundingbox OverlayBox ; \stopuniqueMPgraphic \defineoverlay[curlybracket][\includeMPgraphic{defline}] \defineframed[LineDef] [ \c!location=\v!low, \c!frame=\v!off, \c!background=curlybracket, \c!framecolor=red, ] \protect \starttext \leavevmode\LineDef[text=def5]{Lorem ipsum} dolor sit \LineDef[text=def6]{amet consectetur} adipiscing elit. \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net
[NTG-context] metafun manual: Typo on page 382, section 9.3 drawing functions
Dear ConTeXt folks, I am sorry to bother you with these kind of messages. On page 382 of the Metafun manual [1] (Fr 08 Okt 2010 13:44:26 CEST) it should be In this case the pairs (log(x), x) and … so (log(x), x) instead of (x, x). Thanks, Paul [1] http://www.pragma-ade.com/general/manuals/metafun-s.pdf 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] Plotting a graph of a function f, like f(x) = e^x, with MetaPost
Dear Alan, Am Mittwoch, den 12.10.2011, 07:36 +0200 schrieb Alan Braslau: Metapost can now perform calculations in double precision floating point. At this time, it is in the svn version and does not work yet as such integrated in ConTeXt (through mplib). Taco promises this for soon... great to hear that. Just to clarify, with »now« you mean MetaPost v2, do not you? Taco, I hope you get there without a lot of problems showing up. If you need testers a good option would be to integrate that into ConTeXt Standalone as an option. The graph package is pretty clever, and I am working on proposals on how to extend/rewrite this taking advantage of the new metapost handling of large and small numbers. Perfect! To plot a function, you can create a path, as in path p ; p := for i=0 upto 1000: hide (x := i/1000 ;) if (i0) -- fi (x,exp(x)) endfor ; gplot p ; What module do I need for `gplot`? Looking at the MetaFun manual [8] I found out MetaFun even provides a macro `function` which probably does exactly what you do above with the for loop. draw function(2,x,x**(-0.5),1,10,1) xyscaled (2cm,2cm) withpen pencircle scaled 5mm withcolor transparent(1,.5,yellow) ; One proposal will be to make this even easier with new macros. Another perfect! One thing coming to my mind though that hopefully the wheel is not reimplemented. I guess Gnuplot can do a lot already, but on the other probably not as neat as Metapost when we want to color certain areas. Thanks, Paul [8] http://www.pragma-ade.com/general/manuals/metafun-s.pdf 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] Plotting a graph of a function f, like f(x) = e^x, with MetaPost
On Thu, Oct 13, 2011 at 00:13, Paul Menzel wrote: Am Mittwoch, den 12.10.2011, 07:36 +0200 schrieb Alan Braslau: Metapost can now perform calculations in double precision floating point. At this time, it is in the svn version and does not work yet as such integrated in ConTeXt (through mplib). Taco promises this for soon... great to hear that. Just to clarify, with »now« you mean MetaPost v2, do not you? No, 1.750. The version 2 is not quite ready yet, but the version 1.750 already deals with floating point numbers. Taco, I hope you get there without a lot of problems showing up. If you need testers a good option would be to integrate that into ConTeXt Standalone as an option. It will become part of distribution as soon as it gets out, but Taco was busy enough organizing conference and dozens of other things. Just give him some time. I bet that he also wants to update documentation, do final bugfixing etc. instead of just releasing a random snapshot. One thing coming to my mind though that hopefully the wheel is not reimplemented. I guess Gnuplot can do a lot already, but on the other probably not as neat as Metapost when we want to color certain areas. Can you please specify your question more precisely? Gnuplot terminal uses metapost output. Gnuplot has some support for transparency, even though I'm not exactly sure if one can specify transparent colors for lines, only for fills. But you can always simply redefine line type colors to be transparent. Gnuplot brings all kinds of other problems like dependency on external tool. If you have enough time to create nice plots in metapost, it is better to avoid external dependency as a general rule. But if you have more questions about it, feel free to ask. I might be able to help you. The ConTeXt terminal was almost included until developers realized that they wanted me to throw away some code for handling units and replace that code with something buggy (like size 10cm,10 - (10cm,10cm); size 10,10cm - (0.35cm,10cm) or (25.40cm,10.00cm) depending on weather). Now I need to either rewrite part of my code or rewrite part of core code or convince them why keeping the old code. 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] Plotting a graph of a function f, like f(x) = e^x, with MetaPost
Am Donnerstag, den 13.10.2011, 00:28 +0200 schrieb Mojca Miklavec: On Thu, Oct 13, 2011 at 00:13, Paul Menzel wrote: Am Mittwoch, den 12.10.2011, 07:36 +0200 schrieb Alan Braslau: Metapost can now perform calculations in double precision floating point. At this time, it is in the svn version and does not work yet as such integrated in ConTeXt (through mplib). Taco promises this for soon... great to hear that. Just to clarify, with »now« you mean MetaPost v2, do not you? No, 1.750. The version 2 is not quite ready yet, but the version 1.750 already deals with floating point numbers. Thank you for the clarification/correction. Taco, I hope you get there without a lot of problems showing up. If you need testers a good option would be to integrate that into ConTeXt Standalone as an option. It will become part of distribution as soon as it gets out, but Taco was busy enough organizing conference and dozens of other things. Just give him some time. I bet that he also wants to update documentation, do final bugfixing etc. instead of just releasing a random snapshot. Of course the user would have to make a conscious decision by enabling this “beta” release. If people could test this and with the right announcement I hope that some people would step up to test and contribute by submitting bug reports or writing documentation. One thing coming to my mind though that hopefully the wheel is not reimplemented. I guess Gnuplot can do a lot already, but on the other probably not as neat as Metapost when we want to color certain areas. Can you please specify your question more precisely? I meant coloring part of the area below a graph. For example if you look at the graphic for Riemann sums on page 51 of the document »Learning MetaPost by Doing« [6]. Gnuplot terminal uses metapost output. Gnuplot has some support for transparency, even though I'm not exactly sure if one can specify transparent colors for lines, only for fills. But you can always simply redefine line type colors to be transparent. Gnuplot brings all kinds of other problems like dependency on external tool. If you have enough time to create nice plots in metapost, it is better to avoid external dependency as a general rule. But if you have more questions about it, feel free to ask. I might be able to help you. Well my only question would be, why should someone use Gnuplot then? Is it only for people already knowing Gnuplot? Or also because it is a little less work to define the coordinate system and legends? Otherwise MetaPost seems to include all functionality Gnuplot offers and seems to offer more possibilities, does not it? The ConTeXt terminal was almost included until developers realized that they wanted me to throw away some code for handling units and replace that code with something buggy (like size 10cm,10 - (10cm,10cm); size 10,10cm - (0.35cm,10cm) or (25.40cm,10.00cm) depending on weather). Now I need to either rewrite part of my code or rewrite part of core code or convince them why keeping the old code. I remember a thread about that [9]. Thanks, Paul [6] http://staff.science.uva.nl/~heck/Courses/mptut.pdf [9] http://www.ntg.nl/pipermail/ntg-context/2010/054196.html 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] Plotting a graph of a function f, like f(x) = e^x, with MetaPost
On Thu, Oct 13, 2011 at 01:19, Paul Menzel wrote: Am Donnerstag, den 13.10.2011, 00:28 +0200 schrieb Mojca Miklavec: On Thu, Oct 13, 2011 at 00:13, Paul Menzel wrote: Am Mittwoch, den 12.10.2011, 07:36 +0200 schrieb Alan Braslau: Metapost can now perform calculations in double precision floating point. At this time, it is in the svn version and does not work yet as such integrated in ConTeXt (through mplib). Taco promises this for soon... great to hear that. Just to clarify, with »now« you mean MetaPost v2, do not you? No, 1.750. The version 2 is not quite ready yet, but the version 1.750 already deals with floating point numbers. Thank you for the clarification/correction. Taco, I hope you get there without a lot of problems showing up. If you need testers a good option would be to integrate that into ConTeXt Standalone as an option. It will become part of distribution as soon as it gets out, but Taco was busy enough organizing conference and dozens of other things. Just give him some time. I bet that he also wants to update documentation, do final bugfixing etc. instead of just releasing a random snapshot. Of course the user would have to make a conscious decision by enabling this “beta” release. And of course the user makes a conscious decision to either compile from trunk if he wants the latest and greatest bugs and new features or to wait patiently until Taco thinks the software is ready and releases a beta. I don't think that one extra week (or two or three or ... for that matter) makes any difference. If people could test this and with the right announcement I hope that some people would step up to test and contribute by submitting bug reports or writing documentation. If people could test LaTeX 3 ... they would most certainly send bug reports and write docs. There will be more than enough time for testing before version 2 is out. Those who want to help writing documentation are already free to do so. The code already works. One thing coming to my mind though that hopefully the wheel is not reimplemented. I guess Gnuplot can do a lot already, but on the other probably not as neat as Metapost when we want to color certain areas. Can you please specify your question more precisely? I meant coloring part of the area below a graph. For example if you look at the graphic for Riemann sums on page 51 of the document »Learning MetaPost by Doing« [6]. I'm not sure how to draw discrete function, but you can try out the following: set style fill solid border -1 f(x)=(x-5)*sin(x)-cos(x)+2 plot [1:7] f(x) w filledcurve y1=0,\ '-' using 1:(f($1)) w boxes lt 0, f(x) lt -1 lw 3 1.5 2.5 3.5 4.5 5.5 6.5 e (But of course you need to draw everything else as well.) Gnuplot terminal uses metapost output. Gnuplot has some support for transparency, even though I'm not exactly sure if one can specify transparent colors for lines, only for fills. But you can always simply redefine line type colors to be transparent. Gnuplot brings all kinds of other problems like dependency on external tool. If you have enough time to create nice plots in metapost, it is better to avoid external dependency as a general rule. But if you have more questions about it, feel free to ask. I might be able to help you. Well my only question would be, why should someone use Gnuplot then? Is it only for people already knowing Gnuplot? Or also because it is a little less work to define the coordinate system and legends? It is much less work to define and draw coordinate system, choose the right units, draw logarithmic plots, parse input data, (past tense: do arithmetics with numbers above 4000), ... Otherwise MetaPost seems to include all functionality Gnuplot offers and seems to offer more possibilities, does not it? MetaPost doesn't know erf and other obscure functions, it wasn't able to calculate with big numbers and it is very inconvenient to parse input data. With gnuplot you get fast plotting, data parsing, range guessing, function calculations ... all for free, but you have slightly less flexibility in drawing. For me the most important part is that I have to use gnuplot for inspecting the data anyway (I would never use metapost to quickly inspect whether my measurement went fine or not) and then I just copy-paste the function call. The trade-off is still in favour of gnuplot, in particular since the quality is acceptable and I don't have any special needs and extra time to do fancy stuff with plots. What I really miss in Gnuplot is 3D support, but that one is not covered in MetaPost either. I remember a thread about that [9]. That was not the same. The last context-terminal-was-almost-included was something recent (less than a month ago). Mojca ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl /