Re: [NTG-context] gnuplot module
Am Montag, den 12.12.2011, 01:40 +0100 schrieb Mojca Miklavec: > (was: gnuplot: `! Undefined control sequence.` with format specifier %) > (sorry, but it was too long to keep it all in title :) > > On Mon, Dec 12, 2011 at 01:30, Paul Menzel wrote: > > > > Thank you for the follow up. I just blindly copied the example from the > > Wiki and did not pay any attention. In my thesis, I of course use the > > ConTeXt terminal. > > What is the thesis going to be about? The topic is how long integrated random walks stay positiv. Not being able to prove that formally for double-integrated(?) random walk, I am doing some simulations. > (I just noticed that mptopdf complains about missing bibtex files. :) It seems to work for me. > > PS: Do you have a BibTeX entry for your gnuplot module? > > Do you suggest me to publish an article about the terminal in arXiv, > to get at least some citations by the time when I need to submit my > thesis? :P That is an idea. ;-) > But no, I don't have it. I could try to create one though, but I'm not > even sure what the webpage should be. Many scientific programs just > ask to cite their first article in some scientific journal if one uses > the software, but I neither have an article nor homepage apart from > that (still outdated) wiki page. > > There is some additional documentation on > https://github.com/mojca/context-gnuplot/tree/master/texmf/doc/context/third/gnuplot > (possibly also in minimals, but I'm not sure when I last synced the > version), but even that is outdated now since they required from me to > strip down terminal options parsing code. I thought asking does not hurt. ;-) So I guess I will just reference ConTeXt and gnuplot then. 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 ___
[NTG-context] gnuplot module
(was: gnuplot: `! Undefined control sequence.` with format specifier %) (sorry, but it was too long to keep it all in title :) On Mon, Dec 12, 2011 at 01:30, Paul Menzel wrote: > > Thank you for the follow up. I just blindly copied the example from the > Wiki and did not pay any attention. In my thesis, I of course use the > ConTeXt terminal. What is the thesis going to be about? (I just noticed that mptopdf complains about missing bibtex files. :) > PS: Do you have a BibTeX entry for your gnuplot module? Do you suggest me to publish an article about the terminal in arXiv, to get at least some citations by the time when I need to submit my thesis? :P But no, I don't have it. I could try to create one though, but I'm not even sure what the webpage should be. Many scientific programs just ask to cite their first article in some scientific journal if one uses the software, but I neither have an article nor homepage apart from that (still outdated) wiki page. There is some additional documentation on https://github.com/mojca/context-gnuplot/tree/master/texmf/doc/context/third/gnuplot (possibly also in minimals, but I'm not sure when I last synced the version), but even that is outdated now since they required from me to strip down terminal options parsing 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] gnuplot: `! Undefined control sequence.` with format specifier %
Am Montag, den 12.12.2011, 01:13 +0100 schrieb Mojca Miklavec: > On Mon, Dec 12, 2011 at 00:51, Paul Menzel wrote: > > I compiled gnuplot 4.5 from source (master) and got everything running. > > Mojca, thank you so much! > > > > Trying the example from the gnuplot page in the Wiki [1] > > > >\usemodule[gnuplot] > > > >\setupGNUPLOT[terminal=mp,option=color] > > But one question. Why do you say that you compile the latest source of > gnuplot (which finally has context terminal built in, after 5 or 6 > years), and yet you use the "mp" terminal instead of the default > "context" (or at least "tikz")? The mp terminal has been there > forever, and hardly ever improved. It also doesn't integrate too well > (if you change the typeface, that won't be reflected in you plots). Thank you for the follow up. I just blindly copied the example from the Wiki and did not pay any attention. In my thesis, I of course use the ConTeXt terminal. Thanks, Paul PS: Do you have a BibTeX entry for your gnuplot module? 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] [solved] gnuplot: mpost: Not writing to .log (openout_any = p). (was: `! Undefined control sequence.` with format specifier %)
Am Montag, den 12.12.2011, 01:20 +0100 schrieb Paul Menzel: […] > I am also getting other errors now and even moving the ConTeXt file to a > new directory I keep getting this error from `mpost`. > > fonts : using map file: original-ams-euler > [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] > [1.1] > [1.1] [1.1] [1.1] [1.1] > systems : end file gnup-gnuplot-1-mp-temp at line 130 > (/srv/filme/context/tex/texmf-context/tex/context/base/cont-err.mkii > systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead > ) ) > Output written on gnup-gnuplot-1-mp-temp.dvi (16 pages, 1360 bytes). > Transcript written on gnup-gnuplot-1-mp-temp.log. > TeXExec | runtime: 0.244803 > > This is MetaPost, version 1.504 (kpathsea version 6.0.0) > > mpost: Not writing to .log (openout_any = p). > ! I can't write on file `.log'. > Please type another transcript file name: Once again I was hit by missing `\{start,stop}text` lines. Thanks and sorry for the noise, 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] gnuplot: `! Undefined control sequence.` with format specifier %
On Mon, Dec 12, 2011 at 01:20, Paul Menzel wrote: > Am Montag, den 12.12.2011, 01:02 +0100 schrieb Mojca Miklavec: > >> ... however I still have some problems. For some reason ConTeXt only >> generates dvi files from metapost code which has never been the case >> before. I need to figure out what is going on. > > I am also getting other errors now and even moving the ConTeXt file to a > new directory I keep getting this error from `mpost`. > > fonts : using map file: original-ams-euler > [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] > [1.1] [1.1] [1.1] [1.1] > systems : end file gnup-gnuplot-1-mp-temp at line 130 > (/srv/filme/context/tex/texmf-context/tex/context/base/cont-err.mkii > systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead > ) ) > Output written on gnup-gnuplot-1-mp-temp.dvi (16 pages, 1360 bytes). > Transcript written on gnup-gnuplot-1-mp-temp.log. > TeXExec | runtime: 0.244803 > > This is MetaPost, version 1.504 (kpathsea version 6.0.0) > > mpost: Not writing to .log (openout_any = p). > ! I can't write on file `.log'. > Please type another transcript file name: Wow! I have never seen this one (metapost unable to write the log file :) :) :) It seems that there are some problems with mptopdf converter. But in any way - can you please try to remove \setupGNUPLOT[terminal=...] command? I just realized that I forgot to update a whole lot of information on that wiki page (in particular there is no single mention that the terminal has been included into official CVS). I also assume that the windows builds from Tatsuro should contain the terminal, but I have never really tested them. 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] gnuplot: `! Undefined control sequence.` with format specifier %
Am Montag, den 12.12.2011, 01:02 +0100 schrieb Mojca Miklavec: > On Mon, Dec 12, 2011 at 00:51, Paul Menzel wrote: > > I compiled gnuplot 4.5 from source (master) and got everything running. > > Mojca, thank you so much! > > > > Trying the example from the gnuplot page in the Wiki [1] > > > >\usemodule[gnuplot] > > > >\setupGNUPLOT[terminal=mp,option=color] > > > >% general settings for the whole document > >\startGNUPLOTinclusions > > > > # you may use TeX commands to format the titles and axes > > set title '\bf Trigonometry' > > set xlabel '$x$' > > set ylabel '$y$' > > set format y '\%.1f' > > This should have been without the backslash. > > In beginning the text was processed with TeX, not it is taken > literally (% doesn't start the comment any more), so maybe it's a > leftover from the very early days. I will check the wiki. I see. Thank you. It does not complain anymore. > > Actually I hope that it is since then upgrading would fix my issue. ;-) > > ... however I still have some problems. For some reason ConTeXt only > generates dvi files from metapost code which has never been the case > before. I need to figure out what is going on. I am also getting other errors now and even moving the ConTeXt file to a new directory I keep getting this error from `mpost`. fonts : using map file: original-ams-euler [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] [1.1] systems : end file gnup-gnuplot-1-mp-temp at line 130 (/srv/filme/context/tex/texmf-context/tex/context/base/cont-err.mkii systems : no file 'cont-sys.tex', using 'cont-sys.rme' instead ) ) Output written on gnup-gnuplot-1-mp-temp.dvi (16 pages, 1360 bytes). Transcript written on gnup-gnuplot-1-mp-temp.log. TeXExec | runtime: 0.244803 This is MetaPost, version 1.504 (kpathsea version 6.0.0) mpost: Not writing to .log (openout_any = p). ! I can't write on file `.log'. Please type another transcript file name: 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] Number formatting in \unit
On 11 December 2011, Xenia wrote: > Am 11.12.2011 11:25, schrieb robin.kirk...@csiro.au: >> All, >> >> I have put together some suggestions to extend the number formatting >> capability in \unit, particularly for scientific and engineering purposes, >> including basic support for tolerances and uncertainties. >> >> It is a bit long, so source is attached and a PDF is at >> >> http://dl.dropbox.com/u/36891398/units6.pdf >> >> Of course, this is just my opinion, so I welcome any feedback from the list. > > I like your suggestions. Especially the current handling of `e-23` etc. > is not intuitive but rather confusing and does not meet the standard. > > I do not know if there is already a solution for automatically > shortening the number of digits in the output, but that would be nice, too. > > Xenia Yes, I thought about that, of course, but did not put it forward because to do it properly the correct numeric rounding/significant figures rules should be applied, and that I guess means the Lua code needs to interpret the number, rather than just treat it as a sequence of digits. However if the Lua code did interpret the number into an internal format it would enable other things like normalisation to scientific or engineering form, etc. However the internal format would have to support arbitrarily long numbers and exponents ... Lua's built-in internal number format (a double precision float, I think) would not do, so there would be a bit of coding involved. Robin ___ If your question is of interest to others as well, please add an 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] gnuplot: `! Undefined control sequence.` with format specifier %
On Mon, Dec 12, 2011 at 00:51, Paul Menzel wrote: > Dear Mojca and ConTeXt folks, > > > I compiled gnuplot 4.5 from source (master) and got everything running. > Mojca, thank you so much! > > Trying the example from the gnuplot page in the Wiki [1] > > \usemodule[gnuplot] > > \setupGNUPLOT[terminal=mp,option=color] But one question. Why do you say that you compile the latest source of gnuplot (which finally has context terminal built in, after 5 or 6 years), and yet you use the "mp" terminal instead of the default "context" (or at least "tikz")? The mp terminal has been there forever, and hardly ever improved. It also doesn't integrate too well (if you change the typeface, that won't be reflected in you plots). 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] mptopdf and btex ... etex (was: gnuplot: `! Undefined control sequence.` with format specifier %)
On Mon, Dec 12, 2011 at 01:02, Mojca Miklavec wrote: > > ... however I still have some problems. For some reason ConTeXt only > generates dvi files from metapost code which has never been the case > before. I need to figure out what is going on. Ouch. > mtxrun mptopdf gptest-gnuplot-2-mp.mp MPtoPDF 1.4.1 : running 'mpost --mem=mpost gptest-gnuplot-2-mp.mp' This is MetaPost, version 1.504 (kpathsea version 6.0.0) (mpost.mp (/context/tex/texmf/metapost/base/plain.mp Preloading the plain mem file, version 1.004)) (./gptest-gnuplot-2-mp.mpTeXExec | processing graphic './gptest-gnuplot-2-mp.mp' TeXExec | using internal mptotex converter TeXExec | processing document './gptest-gnuplot-2-mp-temp.tex' TeXExec | no ctx file found TeXExec | tex processing method: context TeXExec | writing option file gptest-gnuplot-2-mp-temp.top ... (./gptest-gnuplot-2-mp.mp [0 Warning: cannot open font map file psfonts.map ] metafun ii 2011-12-12 01:03 ) ) (end occurred when else on line 5 was incomplete) 1 output file written: gptest-gnuplot-2-mp.0 Transcript written on gptest-gnuplot-2-mp.log. TeXExec | runtime: 0.835873 [0] ) 1 output file written: gptest-gnuplot-2-mp.0 Transcript written on gptest-gnuplot-2-mp.log. This is pdfTeX, Version 3.1415926-1.40.10 (Web2C 2009) \write18 enabled. entering extended mode [MP to PDF] (./gptest-gnuplot-2-mp.0{/Users/mojca/context/tex/texmf/fonts/map/p dftex/plain/pdftex.map}) [1] !pdfTeX error: pdftex (file rm-lmr12): Font rm-lmr12 at 600 not found ==> Fatal error occurred, no output PDF file produced! MPtoPDF 1.4.1 : error while processing tex file It seems that half of the time content is processed with ConTeXt and half of the time it is processed with plain pdfTeX. I need to inspect. In TeX Live 2011 it works since pdftex.map is complete. I could in theory extend pdftex.map, but I need to figure out which step in mptopdf is failing anyway. 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] gnuplot: `! Undefined control sequence.` with format specifier %
On Mon, Dec 12, 2011 at 00:51, Paul Menzel wrote: > Dear Mojca and ConTeXt folks, > > > I compiled gnuplot 4.5 from source (master) and got everything running. > Mojca, thank you so much! > > Trying the example from the gnuplot page in the Wiki [1] > > \usemodule[gnuplot] > > \setupGNUPLOT[terminal=mp,option=color] > > % general settings for the whole document > \startGNUPLOTinclusions > > # you may use TeX commands to format the titles and axes > set title '\bf Trigonometry' > set xlabel '$x$' > set ylabel '$y$' > set format y '\%.1f' This should have been without the backslash. In beginning the text was processed with TeX, not it is taken literally (% doesn't start the comment any more), so maybe it's a leftover from the very early days. I will check the wiki. > Actually I hope that it is since then upgrading would fix my issue. ;-) ... however I still have some problems. For some reason ConTeXt only generates dvi files from metapost code which has never been the case before. I need to figure out what is going on. 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] MetaFun: MetaPost example works with `mpost` but not embedded in ConTeXt: `! Redundant equation.`
On 2011-12-11 Paul Menzel wrote: > […] > > I then copied it into `\{start,stop}useMPgraphic`, > removed the `end ;` and `{begin,end}fig` and replaced > `{e,b}tex` by `textext()` but still get the following > error. I didn't check you code (try to make a minimal example next time), but the problem seems to be the combination of equations and labels. When labels are present, the file is processed twice and the equations are also read twice (in MkIV). It hasn't been fixed for ages, that probably means it will stay. One workaround is to substitute the equations with assignments or to “save” the values beforehand. See also: http://archive.contextgarden.net/message/20101205.035356.1b7bfb72.en.html 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] gnuplot: `! Undefined control sequence.` with format specifier %
Dear Mojca and ConTeXt folks, I compiled gnuplot 4.5 from source (master) and got everything running. Mojca, thank you so much! Trying the example from the gnuplot page in the Wiki [1] \usemodule[gnuplot] \setupGNUPLOT[terminal=mp,option=color] % general settings for the whole document \startGNUPLOTinclusions # you may use TeX commands to format the titles and axes set title '\bf Trigonometry' set xlabel '$x$' set ylabel '$y$' set format y '\%.1f' \stopGNUPLOTinclusions \startGNUPLOTscript[tan] plot tan(x) t '$\tan(x)$' \stopGNUPLOTscript \startGNUPLOTscript[sin] plot 4*sin(x)+x t '$4\sin(x)+x$', x t '$x$' lt 3 \stopGNUPLOTscript \useGNUPLOTgraphic[tan] \useGNUPLOTgraphic[sin][width=10cm] even with the comments removed as above I get the following though. [1.1] [1.1] [1.1] ! Undefined control sequence. l.66 \0 .0% ? [1.1] ! Undefined control sequence. l.71 \1 0.0% ? [1.1] ! Undefined control sequence. l.76 \2 0.0% ? [1.1] ! Undefined control sequence. l.81 \3 0.0% ? ^C! Interruption. 0 l.81 \30 .0% ? I hope that is not related to the used ConTeXt version. ConTeXt ver: 2011.11.25 21:29 MKII fmt: 2011.11.25 int: english/english Actually I hope that it is since then upgrading would fix my issue. ;-) Thanks, Paul [1] http://wiki.contextgarden.net/Gnuplot 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] MnSymbol (math) support in ConTeXt
Hello, I have been developing a new layout environment using Adobe Minion Pro for the main body font. My document will include a significant number of math formulas. I found a thread from earlier this year on the possibility of adding support for the LaTeX MnSymbol font package in ConTeXt, and wondered if anyone has gone farther with this idea. The last recommendation on the thread ( http://www.ntg.nl/pipermail/ntg-context/2011/057426.html) was to merge the Opentype MnSymbol font with Minion Pro using FontForge -- I tried that using the steps outlined, but reached the same obstacle mentioned by the last poster: the new (merged) font is not recognized by ConTeXt. That approach probably violates the Adobe font license anyway... In a 2009 thread on dev-context, Wolfgang Schuster mentioned an attempt to create a virtual font and typescript for MnSymbol, but he encountered problems with Greek characters. ( http://archive.contextgarden.net/message/20091122.164136.5757ec1f.en.html) So, as I don't know how to proceed further, I would be interested in hearing from anyone who has experimented with MnSymbol support, or in finding out what specific steps would be involved in adding support. Also, any recommendations of other math fonts suitable for use with Minion Pro would be welcome. I am currently playing with XITS math, which is Times-like but not too bad a fit. Thanks, PPN -- Peter Park Nelson peter.park.nel...@gmail.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] MetaFun: MetaPost example works with `mpost` but not embedded in ConTeXt: `! Redundant equation.`
Dear ConTeXt folks, looking for graphics example and therefore searching the list I found the answer from David Arnold in the ntg-context list thread »OT: looking for metapost/fun examples« [1]. It is for plain MetaPost and works fine with `mpost` after making sure to remove the line breaks inserted by the mail program. I then copied it into `\{start,stop}useMPgraphic`, removed the `end ;` and `{begin,end}fig` and replaced `{e,b}tex` by `textext()` but still get the following error. ! terminal: ! Redundant equation. ; <*> ...500; dt:=(tstop-tstart)/N; (b-a)*ux=1.75in; (d-c)*uy=1.75in; q=(a,c)-... ! Redundant equation. ; <*> ...start)/N; (b-a)*ux=1.75in; (d-c)*uy=1.75in; q=(a,c)--(b,c)--(b,d)--(a... . system > tex > error on line 39 in file arnold-2005.tex: terminal: ! Redundant equation. ; <*> ...500; dt:=(tstop-tstart)/N; (b-a)*ux=1.75in; (d-c)*uy=1.75in; q=(a,c)-... ! Redundant equation. ; <*> ...start)/N; (b-a)*ux=1.75in; (d-c)*uy=1.75in; q=(a,c)--(b,c)--(b,d)--(a... Does someone have an idea why this fails and how to fix it? Thanks, Paul [1] http://www.ntg.nl/pipermail/ntg-context/2005/009928.html %This file creates two figures associated with the %system x'=f(x,y), y'=g(x,y) %1. Plots the graphs of x(t) and y(t) %2. Plots the graph of (x(t),y(t)) in the phase plane. %verbatimtex %\input mtplain %etex %Generate standard eps prologues:=2; beginfig(0); %Place RHS of x'=f(t,x,y) here def fxy(expr t, x, y)= (0.4-0.01*y)*x enddef; %Place RHS of y'=g(t,x,y) here def gxy(expr t, x, y)= (-0.3+0.005*x)*y enddef; %Declare some variables path q, trajx, trajy; pair L, R, B, T, xt, yt; numeric sx[], sy[]; %Initialize clipping window a:=0; b:=40; %left and right of viewing rectangle c:=0; d:=150; %bottom and top of viewing rectangle %Initialize timespan tstart:=a; tstop:=b; %Initialize number of points to be plotted N:=500; %Calculate time increment dt for Euler's method dt:=(tstop-tstart)/N; %Scaling factors for horizontal and vertical axes. Note that this produces %an image that is 2 inches by 2 inches. (b-a)*ux=1.75in; (d-c)*uy=1.75in; %Clipping boundary q=(a,c)--(b,c)--(b,d)--(a,d)--cycle; %Use Runge-Kutta4 to create path (t,x(t)) %Choose initial condition t:=tstart; x:=40; y:=20; trajx:=(t,x); forever: sx1:=fxy(t,x,y); sy1:=gxy(t,x,y); sx2:=fxy((t+dt/2),(x+dt*sx1/2),(y+dt*sy1/2)); sy2:=gxy((t+dt/2),(x+dt*sx1/2),(y+dt*sy1/2)); sx3:=fxy((t+dt/2),(x+dt*sx2/2),(y+dt*sy2/2)); sy3:=gxy((t+dt/2),(x+dt*sx2/2),(y+dt*sy2/2)); sx4:=fxy((t+dt),(x+dt*sx3),(y+dt*sy3)); sy4:=gxy((t+dt),(x+dt*sx3),(y+dt*sy3)); x:=x+dt*(sx1+2*sx2+2*sx3+sx4)/6; y:=y+dt*(sy1+2*sy2+2*sy3+sy4)/6; t:=t+dt; trajx:=trajx..(t,x); exitif ((t>tstop) or (t>b) or (xd)); endfor; %Use Runge-Kutta4 to create path (t,y(t)) %Choose initial condition t:=tstart; x:=40; y:=20; trajy:=(t,y); forever: sx1:=fxy(t,x,y); sy1:=gxy(t,x,y); sx2:=fxy((t+dt/2),(x+dt*sx1/2),(y+dt*sy1/2)); sy2:=gxy((t+dt/2),(x+dt*sx1/2),(y+dt*sy1/2)); sx3:=fxy((t+dt/2),(x+dt*sx2/2),(y+dt*sy2/2)); sy3:=gxy((t+dt/2),(x+dt*sx2/2),(y+dt*sy2/2)); sx4:=fxy((t+dt),(x+dt*sx3),(y+dt*sy3)); sy4:=gxy((t+dt),(x+dt*sx3),(y+dt*sy3)); x:=x+dt*(sx1+2*sx2+2*sx3+sx4)/6; y:=y+dt*(sy1+2*sy2+2*sy3+sy4)/6; t:=t+dt; trajy:=trajy..(t,y); exitif ((t>tstop) or (t>b) or (yd)); endfor; %Draw the paths x(t) and y(t) and clip them to bounding box draw trajx xscaled ux yscaled uy withcolor red; draw trajy xscaled ux yscaled uy withcolor red dashed evenly; clip currentpicture to (q xscaled ux yscaled uy); %Label graph x(t) and initial condition len:= 0.65*(length trajx); xt:=point len of trajx; label.urt(btex $\scriptstyle x(t)$ etex, (xt xscaled ux yscaled uy)); %Label graph y(t) and initial condition len:= 0.5*(length trajy); yt:=point len of trajy; label.lrt(btex $\scriptstyle y(t)$ etex, (yt xscaled ux yscaled uy)); %Initialize left and right endpoints on time-axis L=(a*ux,0);R=(b*ux,0); %Draw and label t-axis drawarrow L--R; label.rt(btex $\scriptstyle t$ etex,(b*ux,0)); %Initialize bottom and top endpoints on time-axis B=(0,c*uy);T=(0,d*uy); %Draw and label vertical axis drawarrow B--T; label.lft(btex $\scriptstyle 0$ etex, B); label.lft(btex $\scriptstyle 150$ etex, T); endfig; beginfig(2); %Make some variables local save ux, uy; %Place RHS of x'=f(t,x,y) here def fxy(expr t, x, y)= (0.4-0.01*y
Re: [NTG-context] Arabic transliteration—ayn and alif (MKII)
Hi Alan, On Sun, 11 Dec 2011 06:21:31 -0700, Alan Bowen wrote: What is the best way to produce ayn and alif in transliterated Arabic using MKII (Latin Modern)? Why MkII? MkIV is much better for this. Anyway, the old approaches are obsolete, since LM now has the glyphs for 02BE (hamzah) and 02BF (alif). OTOH, they may be needed for other fonts. Let's start with something REALLY obsolete: % ac-trans.tex %%%=low-level \def\SHIFT#1{\dimen0=.001ex \multiply\dimen0 by\fontdimen1\font \multiply\dimen0 by #1 \kern.0040\dimen0} % compensate for slant/italic in lower accents %\def\USHIFT#1{\dimen0=.00#1ex \multiply\dimen0 by\fontdimen1\font % \kern.0040\dimen0} % compensate for slant/italic in upper accents %\def\USHIFTN#1{\dimen0=.00#1ex \multiply\dimen0 by\fontdimen1\font % \kern-.0040\dimen0} % compensate for slant/italic in upper accents \def\buildtextbottombreve{\bottomaccent{.25ex}{0}{19}{\textbreve}} %%%=ayn-hamzah \def\CUPD#1#2{\leavevmode% \SHIFT{#1}\rotate[rotation=180,location=high]{\txx c}% \SHIFT{#2}} %\definecharacter AYN {\leavevmode\raise.9ex\hbox{\txx \SHIFT{4} c\SHIFT{-4}}{}} %\definecharacter HAMZAH{\leavevmode\kern.07em\raise.9ex\hbox{\CUPD{7}{-5}}{}} \define[4]\AYN {\definecharacter Ayn {\leavevmode\kern#1em\raise#2ex\hbox{\txx \SHIFT{#3} c\SHIFT{#4}}{}}} \define[4]\HAMZAH{\definecharacter Hamzah {\leavevmode\kern#1em\raise#2ex\hbox{\CUPD{#3}{#4}}{}}} \AYN{0}{0.9}{4}{-4} % \HAMZAH{0.07}{0.9}{7}{-5} \def\'{\Hamzah} \def\`{\Ayn} \endinput % mkii-trans.tex \starttext \def\ISHA{\`i\v sha\'} For Muslims, \ISHA{} is the last prayer of the day. For Muslims, {\em \ISHA{}} is the last prayer of the day. For Muslims, {\it \ISHA{}} is the last prayer of the day. \stoptext === Brr... Or you have to have to define an encoding that includes the 02BE 02BF chars. I wrote an article on that, and I NEVER want to go back to that again, ever :-) Now we can do better, at least in LM. In MkIV, we simply: \starttext For Muslims, ʿišaʾ is the last prayer of the day. For Muslims, {\em ʿišaʾ} is the last prayer of the day. For Muslims, {\it ʿišaʾ} is the last prayer of the day. \stoptext The italics/slants look better, no need to fight with italic correction etc. I use a transliteration keyboard on Windows that I can send you if you like. Anyway: It's time to switch to MkIV, my man :D Best wishes Idris -- Professor Idris Samawi Hamid, Editor-in-Chief International Journal of Shīʿī Studies Department of Philosophy Colorado State University Fort Collins, CO 80523 ___ If your question is of interest to others as well, please add an 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] wider right margin when it shouldn't be
Am 11.12.2011 um 17:57 schrieb Pablo Rodríguez: > Hi there, > > compiling this document: > > \setuppapersize[A4] > \setuppagenumbering[alternative=singlesided,location=middle] > \starttext > \showsetups > \dorecurse{4}{\input dawkins \par \input knuth \par} > \stoptext > > I should get the exact same length for left and right margin (defining > margin as the total distance from the page edge to the text body edge > [sorry, it isn't as accurate as it should, but I would like to avoid > misunderstandings]). Setups show also that margin width and distance are > equal for both sides. > > What I see on my laptop (and what I have seen on the printed version) is > that the right margin is wider than the left one. Is there something > wrong or which is the measure I'm missing? The margins are unrelated to the position of the left border of the text block. ConTeXt use the value from “backspace” for the inner (left) space and the “cutspace” value (normaly calculated by ConTeXt when you set a value for “backspace” and “width”) for the space on the outer (right) side. These are the three values for the horizontal dimensions: | backspace | width | cutspace | Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] wider right margin when it shouldn't be
Hi there, compiling this document: \setuppapersize[A4] \setuppagenumbering[alternative=singlesided,location=middle] \starttext \showsetups \dorecurse{4}{\input dawkins \par \input knuth \par} \stoptext I should get the exact same length for left and right margin (defining margin as the total distance from the page edge to the text body edge [sorry, it isn't as accurate as it should, but I would like to avoid misunderstandings]). Setups show also that margin width and distance are equal for both sides. What I see on my laptop (and what I have seen on the printed version) is that the right margin is wider than the left one. Is there something wrong or which is the measure I'm missing? Thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] orphan and widow lines
On 12/09/2011 06:05 PM, Stefan Müller wrote: > Hi, > > you can try (and experiment with) > > \clubpenalty=1 > \widowpenalty=1 > > after \starttext. Thanks, Stefan. I didn't know that this only worked in the document itself (and not in the preamble). Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bug with \setuplayout[setups=*strict]?
On 12/09/2011 05:27 PM, Hans Hagen wrote: > On 8-12-2011 13:40, Pablo Rodríguez wrote: >> [...] >> Is there no other way to avoid orphan and widow lines? I need it urgently. > > \startsetups [*lessstrict] > > \setup[*\s!reset] > > \widowpenalty =1000 > \clubpenaltie =1000 > \brokenpenalty=1000 > > \stopsetups > > or whatever makes sense Thanks for your help, Hans. Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] ∫ and $\intop$ is not displayed correctly compared to $\int$.
wow, there is really much magic going on in context. one reason why i love it. i once wrote a script that showed some nice little gui for a similar file (i.e. xkb/symbols/??) that displayed the characters on a grid similar to the keyboard layout and allowed displaying of the different layers. i used it to customize the standard ubuntu keyboard layout to have some much-used symbols, but haven’t really got around to try switching to another layout than quertz (as it would tie me even stronger to my own pc and would take significant time to master) maybe it would be nice to have a similar program that displays the mappings in the char-def.lua since i can’t search for the symbols directly, have no overview and editing would involve looking up the codes or names in a char map, finding it in the file, and so on. xrightarrow and friends are nice, because they adjust their length to the over-and underscripts and work without parameters, too. so $A → B →{woo} C$ would work flawlessly and look nice both in code and the document. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Number formatting in \unit
On 2011-12-11 wrote: > Automatic thousands grouping (again with some style > variants) > My main objection is that one seems to have to insert > thousands separators into the input oneself, which is > rather unnatural; Context could and should do this > itself. +1 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] ∫ and $\intop$ is not displayed correctly compared to $\int$.
On Sun, 11 Dec 2011, Philipp A. wrote: apart from this IMHO very useful change (mapping to \int), maybe we should create a unicode-math module which replaces some commands with symbols. i find myself always using this for chemical and mathematical documents: \catcode`→=\active \def→{\xrightarrow} \catcode`↔=\active \def↔{\xleftrightarrow} \catcode`√=\active \def√{\sqrt} Have a look at char-def.lua. All the symbol mappings are defined there. Please feel free to complete the table (it is a boring and time consuming process, and I have only managed to cover about half of the table). Regarding your mappings, IIRC -> etc are mapped to \rightarrow etc, (not \xrightarrow). We can talk about including style variants for the mappings. 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] Arabic transliteration—ayn and alif (MKII)
What is the best way to produce ayn and alif in transliterated Arabic using MKII (Latin Modern)? ACB ___ If your question is of interest to others as well, please add an 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] ∫ and $\intop$ is not displayed correctly compared to $\int$.
Am Sonntag, den 11.12.2011, 13:28 +0100 schrieb Philipp A.: > apart from this IMHO very useful change (mapping to \int), maybe we should > create a unicode-math module which replaces some commands with symbols. Do you mean symbols by commands? > i find myself always using this for chemical and mathematical documents: > > \catcode`→=\active > \def→{\xrightarrow} > \catcode`↔=\active > \def↔{\xleftrightarrow} > \catcode`√=\active > \def√{\sqrt} Sorry for being a noob. I thought for the first three that is somehow done already. If not, such a mechanism would indeed be useful. > PS: i recently posted two questions to this list which i got no > replies to:“simplefonts: math in headers” and“headers: > numberconversion=something or \definestructureconversionset” > > do you see them or did they get lost in transmission? The message were delivered to the subscribers. You can also check that in the archive [1]. We just have to be patient. I hope Wolfgang is not sick/ill and is doing fine by being on vacation or something similar. PPS: Do you also use the Neo layout [4]? [1] http://www.ntg.nl/pipermail/ntg-context/2011/thread.html [2] http://www.ntg.nl/pipermail/ntg-context/2011/063723.html [3] http://www.ntg.nl/pipermail/ntg-context/2011/063739.html [4] http://neo-layout.org/ 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] ∫ and $\intop$ is not displayed correctly compared to $\int$.
apart from this IMHO very useful change (mapping to \int), maybe we should create a unicode-math module which replaces some commands with symbols. i find myself always using this for chemical and mathematical documents: \catcode`→=\active \def→{\xrightarrow} \catcode`↔=\active \def↔{\xleftrightarrow} \catcode`√=\active \def√{\sqrt} PS: i recently posted two questions to this list which i got no replies to:“simplefonts: math in headers” and“headers: numberconversion=something or \definestructureconversionset” do you see them or did they get lost in transmission? ___ If your question is of interest to others as well, please add an 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] ∫ and $\intop$ is not displayed correctly compared to $\int$.
[My former message was not delivered and awaits moderator approval because it is bigger than 64 KB. I removed the PDF output using XITS.] Am Sonntag, den 12.06.2011, 23:52 +0200 schrieb Mojca Miklavec: > On Sun, Jun 12, 2011 at 15:06, Paul Menzel wrote: > > ConTeXt ver: 2011.05.18 22:26 MKIV fmt: 2011.5.27 int: english/english > > > > the following example produces different integral signs. > > > > --- minimal example --- > > \starttext > > Using the NEO keyboard layout several math symbols can be inserted directly > > like $∫$ or $∩$. > > > > But $\int$ and $∫$ look differently. > > \stoptext > > --- minimal example --- I just wanted to bring this topic up again since it is still reproducible with ConTeXt MKIV 2011.11.25 21:29. > However the character ∫ looks the same as \intop and ∫\nolimits looks > the same as \int. Yes, it does. > As to why \intop looks so weird, I have no idea. If you add > \usetypescript[modern-base] \setupbodyfont[modern] > it will work ok. Cambria Math also results in two different heights of > the operator depending on whether limits are there or not. It might be > a bug somewhere in virtual font setup of LM. In pdfTeX \int and \intop > operators are positioned equally. Using XITS it does also work although in display math mode(?) ∫ and $\intop$ are not scaled. I use the following example. \setupbodyfont[xits] \setupinteraction[state=start] \useurl[context2008][http://wiki.contextgarden.net/Context_2008.04.10][][\ConTeXt\ version 4/10/2008] \starttext Using the NEO keyboard layout several math symbols can be inserted directly like $∫$ or $∩$. But $\int$ by \type{\int} and $∫$ by UTF-8 character look differently. As Mojca pointed out \type{\intop} is also not type set correctly: $\intop$. This suggests that it is a problem with the Latin Modern font. \type{\intop} was added in \from[context2008]. \blank • Using UTF-8 character: \startformula ∫_ℝ dx = ∞ \stopformula • Using UTF-8 character with \type{\nolimits}: \startformula ∫\nolimits_ℝ dx = ∞ \stopformula • Using \type{\intop}: \startformula \intop_ℝ dx = ∞ \stopformula • Using \type{\intop\nolimits} does not work. \startformula \intop\nolimits_ℝ dx = ∞ \stopformula • Using \type{\int}: \startformula \int_ℝ dx = ∞ \stopformula • Using \type{\int_\limits_a}: \startformula \int\limits_a dx = ∞ \stopformula \blank \CONTEXT\ \contextmark\ \contextversion \stoptext Is there a chance to fix `\intop` in Latin Modern (and XITS). Would it be a good idea to map ∫ to $\int$ instead of `\intop`? Do people use `\intop` a lot? Thanks, Paul PS: Although this seems font related, some more information just in case. ∫ has the Unicode number(?) #222B [1] and `xev` returns the following. KeyPress event, serial 33, synthetic NO, window 0x4c1, root 0x102, subw 0x0, time 340829925, (244,21), root:(256,134), state 0x4000, keycode 39 (keysym 0x8bf, integral), same_screen YES, XLookupString gives 3 bytes: (e2 88 ab) "∫" XmbLookupString gives 3 bytes: (e2 88 ab) "∫" XFilterEvent returns: False KeyRelease event, serial 33, synthetic NO, window 0x4c1, root 0x102, subw 0x0, time 340829989, (244,21), root:(256,134), state 0x4000, keycode 39 (keysym 0x8bf, integral), same_screen YES, XLookupString gives 3 bytes: (e2 88 ab) "∫" XFilterEvent returns: False [1] http://unicode.org/charts/nameslist/n_2200.html \setupbodyfont[xits] \setupinteraction[state=start] \useurl[context2008][http://wiki.contextgarden.net/Context_2008.04.10][][\ConTeXt\ version 4/10/2008] \starttext Using the NEO keyboard layout several math symbols can be inserted directly like $∫$ or $∩$. But $\int$ by \type{\int} and $∫$ by UTF-8 character look differently. As Mojca pointed out \type{\intop} is also not type set correctly: $\intop$. This suggests that it is a problem with the Latin Modern font. \type{\intop} was added in \from[context2008]. \blank • Using UTF-8 character: \startformula ∫_ℝ dx = ∞ \stopformula • Using UTF-8 character with \type{\nolimits}: \startformula ∫\nolimits_ℝ dx = ∞ \stopformula • Using \type{\intop}: \startformula \intop_ℝ dx = ∞ \stopformula • Using \type{\intop\nolimits} does not work. \startformula \intop\nolimits_ℝ dx = ∞ \stopformula • Using \type{\int}: \startformula \int_ℝ dx = ∞ \stopformula • Using \type{\int_\limits_a}: \startformula \int\limits_a dx = ∞ \stopformula \blank \CONTEXT\ \contextmark\ \contextversion \stoptext int_latin-modern.pdf Description: Adobe PDF document
Re: [NTG-context] Number formatting in \unit
Am 11.12.2011 11:25, schrieb robin.kirk...@csiro.au: > All, > > I have put together some suggestions to extend the number formatting > capability in \unit, particularly for scientific and engineering purposes, > including basic support for tolerances and uncertainties. > > It is a bit long, so source is attached and a PDF is at > > http://dl.dropbox.com/u/36891398/units6.pdf > > Of course, this is just my opinion, so I welcome any feedback from the list. I like your suggestions. Especially the current handling of `e-23` etc. is not intuitive but rather confusing and does not meet the standard. I do not know if there is already a solution for automatically shortening the number of digits in the output, but that would be nice, too. Xenia ___ If your question is of interest to others as well, please add an 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] Number formatting in \unit
All, I have put together some suggestions to extend the number formatting capability in \unit, particularly for scientific and engineering purposes, including basic support for tolerances and uncertainties. It is a bit long, so source is attached and a PDF is at http://dl.dropbox.com/u/36891398/units6.pdf Of course, this is just my opinion, so I welcome any feedback from the list. Best, Robin units6.tex Description: units6.tex ___ If your question is of interest to others as well, please add an 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 ___