[NTG-context] MPenvironment \def gives "Parameters must be numbered consecutively"
This test file (beta 2006.09.28): 1.tex \starttext \startMPenvironment \def\2#1#2{\vbox{\halign{\hfil##\hfil\cr #1\cr #2\cr}}} \stopMPenvironment \startreusableMPgraphic{fig} label(btex sun etex, origin); \stopreusableMPgraphic \reuseMPgraphic{fig} \stoptext fails with the error: ! Parameters must be numbered consecutively. ## l.44 \global \loadfontfileoncetrue \def \2## 1##2{\vbox {\halign {\hfil \... 1-mpgraph.mp gets this figure definition: beginfig(1); verbatimtex \global \loadfontfileoncetrue \def \2##1##2{\vbox {\halign {\hfil \hfil \cr ##1\cr ##2\cr }}} etex; label(btex sun etex , origin); ; endfig; So the parameters in the definition are being doubled up by one of the transformations that inserts the verbatimtex..etex block. By the way, should the verbatimtex..etex block go outside the beginfig..endfig, as it would in a standalone MP file? If only for efficiency rather than MP reparsing it with each beginfig. -Sanjoy `A society of sheep must in time beget a government of wolves.' -- Bertrand de Jouvenal ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] MPenvironment ignored for btex..etex (or should I use sometxt)?
I'm not sure what's going on here, but this file fails (2006.09.28 beta): [well I have a better idea now after writing out the whole email, see the end...] === 3.tex = \starttext \startMPenvironment \def\2{hello} \stopMPenvironment \startreusableMPgraphic{fig} label(btex \2 etex, origin); \stopreusableMPgraphic \reuseMPgraphic{fig} \stoptext = The error is (from 3.log): == error snippet === systems : begin file 3 at line 1 color : currentcolor (def) is not defined \openout7 = `3-mpgraph.mp'. ! Undefined control sequence. label(btex \2 etex, origin); \writecheckedMPgraphic ...icfalse \edef \ascii {#1 }\convertcommand \ascii \t... \startMPgraphic ...hic \writecheckedMPgraphic {#1} \stopwritingMPgraphic \handlereusableMPgraphic ...phic #3\stopMPgraphic \doifobjectssupportedelse ... \douseMPgraphic ...s [#1][#2]\getvalue {\@@MPG #1} {}\elabelgroup l.10 \reuseMPgraphic{fig} ? R etc. == error snippet === But 3-mpgraph.mp (produced after giving 'R' to enter nonstopmode) looks fine: === 3-mpgraph.mp beginfig(1); verbatimtex \global \loadfontfileoncetrue \def \2{hello} etex; label(btex \2 etex , origin); ; endfig; let end=mprunend; end. === 3-mpgraph.mp It processes by hand fine: $ mpost -mem=metafun 3-mpgraph ... 1 output file written: 3-mpgraph.1 (or by using the system(texmfstart ...) command in 3.log) Oh, wait, if metapost is fine with the file but ConTeXt isn't, then the error above must be from ConTeXt parsing the metapost code and seeing the \2, then complaining. So am I supposed to use the global option to \startMPenvironment? If it's needed in this case, I think it would be needed in every case (ConTeXt would see all the metapost uses of the definition). Or is btex deprecated and I should use \sometxt (except in loops)? Or am I just confused?! -Sanjoy `A society of sheep must in time beget a government of wolves.' -- Bertrand de Jouvenal ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Texts after typing environment
I've already solved it now. Just \setuptyping[after=\noindent] is perfectly for me. Thank you anyway. On 9/29/06, Mojca Miklavec <[EMAIL PROTECTED]> wrote: > On 9/27/06, Zhichu Chen wrote: > > Hello everybody, > > > > If I type: > > > > --- > > \starttyping > > some verbatim texts > > \stoptyping > > > > > > does ConTeXt treat it as a complete paragraph? > > In LaTeX, when I type: > > > > -- > > \begin{verbatim} > > some texts here > > \end{verbatim} > > some other texts > > \begin{verbatim} > > some texts here > > \end{verbatim} > > > > other materials > > --- > > > > The output will be > > > > --- > > some texts here > > some other texts > > some texts here > > other meterials -> This line is indented !! > > > > > > What should I do in ConTeXt? I really want to control this. but > > whether I leave a blank line after \stoptyping or not, nothing > > changed. > > In LaTeX paragraph indenting is turned on by default. In ConTeXt you > have to turn it on first, for example with >\setupindenting[first,big,yes] > > After that you probably have contrary problems: you have to turn > indenting explicitely off if you don't want "some other texts" to be > indented: > > \starttyping > some texts here > \stoptyping > \noindent some other texts > \starttyping > some texts here > \stoptyping > > other materials > > But this should be configurable somehow. (I bet it is.) I tried some > of \setuptyping options, but none of those I tried was of any help. > Perhaps some other users may help figuring out the proper option if > available. > > As a workaround this might help temporary. > > Mojca > ___ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] \sometxt bodyfontsize in staticMPfigure (2006.09.27 beta)
Hans Hagen wrote: this is runtime tex into passed to the graphic ... imagine that we flush this to the mp file ... it can contain info that is not known in that session (like overlay info) which willbreak the mp run the issue here is that a static graphic is processed in another, independent run, that's the whole idea behind static graphics (quick hack for independent graphics) That makes sense. So should I use reusableMPgraphic instead of staticMPfigure? My figures started as standalone mpost figures that I incorporate chapter by chapter into the ConTeXt source file. I was using staticMPfigure because I'd noticed the code in the ConTeXt sources and it's so fast. we can spend a lot of time to make it more advanced but within a year from now we will have mp as a library in tex which will reduce runtime to nearly zero (at least that 's what experiments show) so Great! Although earlier you had said, when I wondered whether pdftex+lua will make it easier to meld tex and metapost: not really, for that we need mp as a library (we did experiments with simulating that but it's kind of tricky) concerning lua ... i do have a mkiv file on my machine that uses lua to parse the mp output (precursor to mp natively spitting out such code); currently its a bit slower (two step conversion ps -> lua -> tex) but when using many pen shapes its faster because then we don't need the tex based concat code; also, less (and cleaner) code is needed for parsing Oh I understand what you were saying: that pdftex+lua is not sufficient for clean metapost intergration, one also needs metapost as a library (I guess in lua?). Anyway, don't bother to answer that. Develop in peace, and I'm looking forward to the result (and will be happy to test when that's useful). what we can do [for staticMPfigure] is pass info from the mpenvironment" It works well, thanks for another instant improvement. The 2006.09.28 beta passes the following test case (I will commit it to the contexttest repository). It gives a 12pt "outside sometxt" and a 20pt "in sometxt": = with-static.tex \startMPenvironment \setupbodyfont[20pt] \stopMPenvironment \starttext \startstaticMPfigure{fig} label(\sometxt{in sometxt},origin); \stopstaticMPfigure outside sometxt\quad \usestaticMPfigure[fig] \stoptext = Another difference (not important to fix, just a strange corner case) between staticMPfigure and reusableMPgraphic is the depth of the resulting box. With staticMPfigure, the 'in sometxt' is raised to have its baseline about at the midline of the 'outside sometxt': = with-static12.tex \starttext \startstaticMPfigure{fig} label(\sometxt{in sometxt},origin); \stopstaticMPfigure outside sometxt\quad \usestaticMPfigure[fig] \stoptext = In the reusableMPgraphic method, the outside and inside texts have their baselines aligned: = with-reusable12.tex \starttext \startreusableMPgraphic{fig} label(\sometxt{in sometxt},origin); \stopreusableMPgraphic outside sometxt\quad \reuseMPgraphic{fig} \stoptext = BUT: I don't need this fixed! It's a corner case I happened to notice, and I'm noting it in case it indicates a bug in the box manufacturing. 'See loose thread, any loose thread, pull thread' is how I debug. -Sanjoy `A society of sheep must in time beget a government of wolves.' -- Bertrand de Jouvenal ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] btex..etex fails in reusableMPgraphic (2006.09.28 beta)
Unless I'm doing something very silly, the following should and I am almost certain did work, but it fails with the 2006.09.28 beta: btex.tex === \starttext \startreusableMPgraphic{fig} label(btex in b/e tex etex, origin); \stopreusableMPgraphic outside btex..etex\quad \reuseMPgraphic{fig} \stoptext The output says systems : begin file btex-mpgraph-temp at line 42 ! Missing $ inserted. $ _ l.48 _ special_div_ := 1; ? Here's a snippet from btex-mpgraph-temp.tex: \starttext \startMPXpage " mpgraph:=1; randomseed:=33; _special_div_ := 1; The underscores in the variable name are upsetting to tex. I haven't tracked down the chain of influence that put them there. Meanwhile the same btex..etex test on a static MP figure works fine: btex-static.tex \starttext \startstaticMPfigure{fig} label(btex in b/e tex etex, origin); \stopstaticMPfigure outside btex..etex\quad \usestaticMPfigure[fig] \stoptext -Sanjoy `A society of sheep must in time beget a government of wolves.' -- Bertrand de Jouvenal ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Texts after typing environment
On 9/27/06, Zhichu Chen wrote: > Hello everybody, > > If I type: > > --- > \starttyping > some verbatim texts > \stoptyping > > > does ConTeXt treat it as a complete paragraph? > In LaTeX, when I type: > > -- > \begin{verbatim} > some texts here > \end{verbatim} > some other texts > \begin{verbatim} > some texts here > \end{verbatim} > > other materials > --- > > The output will be > > --- > some texts here > some other texts > some texts here > other meterials -> This line is indented !! > > > What should I do in ConTeXt? I really want to control this. but > whether I leave a blank line after \stoptyping or not, nothing > changed. In LaTeX paragraph indenting is turned on by default. In ConTeXt you have to turn it on first, for example with \setupindenting[first,big,yes] After that you probably have contrary problems: you have to turn indenting explicitely off if you don't want "some other texts" to be indented: \starttyping some texts here \stoptyping \noindent some other texts \starttyping some texts here \stoptyping other materials But this should be configurable somehow. (I bet it is.) I tried some of \setuptyping options, but none of those I tried was of any help. Perhaps some other users may help figuring out the proper option if available. As a workaround this might help temporary. Mojca ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] 3D Artwork with ConTeXt
Renaud AUBIN wrote: > > Hi all, > > I'm now playing with u3d and since I'm at rookie level in ConTeXt dev, > I have (a lot?) of questions for you. > First, download http://www.nibua-r.org/ConTeXt/devel/3dartwork.tgz and > "texexec test-3dartwork". Since I use \externalfigure and u3d mean > nothing to ConTeXt, I obtain > > TeXUtil | running texmfstart rlxtools --identify ./context.u3d > identify: no decode delegate for this image format `./context.u3d'. > RlxTools | unable to identify ./context.u3d > > Ok, this is normal... I used \placefigure and \externalfigure for > convenience for the moment since I found natural to use them... How to > bypass RlxTools ? hm, maybe we need a feature to mark a category as non-rlx-able for the moment use \chardef\figurerlxmode\zerocount it's comparable to movies and so, as long as some kind of dimensions are known ... i'll look into that later > > Now, see t-3dartwork. There is a lot of work. The main idea is to > split \doPDFinsertiiidartwork into several macros ;) . I need help on: > 1. What's the best way to define the following macro > > \defineiiidartworkprojection[name][type=perspective|orthographic , > nf=automatic|explicit , near=number, far=number, fov=number.] try to use existing ones: auto instead of automatic > > You're welcome to give your opinion on naming convention ;) > > 2. Same question for > \defineiiidartworkview[name][bgr=number, bgg=number, bgb=number (or 3 > floats for bgcol), projection=name, camera= 3 floats (but how?), > target= idem, up=idem] > > I'll use ruby and a magic | (see [NTG-context] run a ruby script and > use the standard output ???) to calculate C2W and CO... best is to make that pluggable, so that we can optimize such computations > > 3. ... I need to define a macro to setup the 3D annot before to use it > by \externalfigure or with another brand new macro... just collect whatever we need to do that and i'll integrate it in such a way that multiple backend are supported as well as mkii and mkiv code - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] A new manual
On Don 28.09.2006 09:42, Marcus Vinicius Mesquita de So wrote: >I would buy it too... I too ;-)) Ragards Alex ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] problem making docs from sources
Hans Hagen wrote: > Peter Rolf wrote: >> texmfstart texexec --module page-bck >> context : ver: 2006.09.26 22:12 >> >> I tried to make docs from page-bck.tex and page-lyr.tex, but run into >> this error >> >> [..] >> [MP to PDF] (./texexec-mpgraph.1 >> ! Undefined control sequence. >> \collectPDFresources >> \global \let \currentPDFresources >> \coll... >> >> \stopMPresources ->\the \MPstopresources >> >> \handleMPsequence ...nt {mps end}\stopMPresources >> \egroup \setbox >> \scratchbo... >> l.9065 showpage >> > looks like a messed up system Yes, it was a little bit messed. An old config file (texmf.cnf) in combination with context.cnf was causing the problems. Peter > >> grep \collectPDFresources *.tex > meta-pdf.tex: \collectPDFresources > spec-fdf.tex:\def\collectPDFresources > spec-fdf.tex: \global\let\collectPDFresources\relax} > > > so they this macro really exists > > Hns > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com > | www.pragma-pod.nl > - > > ___ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > > ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] 3D Artwork with ConTeXt
Hi all, I'm now playing with u3d and since I'm at rookie level in ConTeXt dev, I have (a lot?) of questions for you. First, download http://www.nibua-r.org/ConTeXt/devel/3dartwork.tgz and "texexec test-3dartwork". Since I use \externalfigure and u3d mean nothing to ConTeXt, I obtain TeXUtil | running texmfstart rlxtools --identify ./context.u3d identify: no decode delegate for this image format `./context.u3d'. RlxTools | unable to identify ./context.u3d Ok, this is normal... I used \placefigure and \externalfigure for convenience for the moment since I found natural to use them... How to bypass RlxTools ? Now, see t-3dartwork. There is a lot of work. The main idea is to split \doPDFinsertiiidartwork into several macros ;) . I need help on: 1. What's the best way to define the following macro \defineiiidartworkprojection[name][type=perspective|orthographic , nf=automatic|explicit , near=number, far=number, fov=number.] You're welcome to give your opinion on naming convention ;) 2. Same question for \defineiiidartworkview[name][bgr=number, bgg=number, bgb=number (or 3 floats for bgcol), projection=name, camera= 3 floats (but how?), target= idem, up=idem] I'll use ruby and a magic | (see [NTG-context] run a ruby script and use the standard output ???) to calculate C2W and CO... 3. ... I need to define a macro to setup the 3D annot before to use it by \externalfigure or with another brand new macro... That's it for the moment... Renaud ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] problem making docs from sources
Peter Rolf wrote: > texmfstart texexec --module page-bck > context : ver: 2006.09.26 22:12 > > I tried to make docs from page-bck.tex and page-lyr.tex, but run into > this error > > [..] > [MP to PDF] (./texexec-mpgraph.1 > ! Undefined control sequence. > \collectPDFresources > \global \let \currentPDFresources > \coll... > > \stopMPresources ->\the \MPstopresources > > \handleMPsequence ...nt {mps end}\stopMPresources > \egroup \setbox > \scratchbo... > l.9065 showpage > looks like a messed up system >grep \collectPDFresources *.tex meta-pdf.tex: \collectPDFresources spec-fdf.tex:\def\collectPDFresources spec-fdf.tex: \global\let\collectPDFresources\relax} so they this macro really exists Hns - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] problem making docs from sources
texmfstart texexec --module page-bck context : ver: 2006.09.26 22:12 I tried to make docs from page-bck.tex and page-lyr.tex, but run into this error [..] [MP to PDF] (./texexec-mpgraph.1 ! Undefined control sequence. \collectPDFresources \global \let \currentPDFresources \coll... \stopMPresources ->\the \MPstopresources \handleMPsequence ...nt {mps end}\stopMPresources \egroup \setbox \scratchbo... l.9065 showpage ? Greetings, Peter ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] figurenumbering
> \def\floatcounter[#1]% > {\bgroup > \checkfloatracer{\v!float#1}% > \nextnodelocation{\v!float#1}% > \analyzenodelocation{\v!float#1}% > \tagnodelocation{\v!float#1}% >\egroup} Hallo Wolfgang! What ConTeXt Version is it where \checkfloatracer is defined? Gruß, Wolfgang ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Layer Question
Hans Hagen wrote: > Peter Rolf wrote: >> Tobias Burnus wrote: >> >>> Hello, >>> >>> I would like to add a text to a poster, which I load as PDF. >>> >>> The following works nice, except that the layer of the PDF is above the >>> layer "block" thus the text gets overdrawn. >>> >>> How can I change that order? >>> >>> Tobias >>> >>> \setuppapersize[A0,landscape][A0,landscape] >>> \setupbodyfont[26pt] >>> \setuplayout[backspace=0cm,width=fit,height=fit,margin=0cm,topspace=0cm,header=0cm,footer=0pt] >>> \definelayer[block][width=85mm,height=54mm] >>> >>> \setupbackgrounds[page][background=block] >>> >> ...[background={text,block}] >> > {one,two,three,foreground,four,five} > > foreground is a predefined one, the current text It seems I must make some new docs from the tex sources. Thanks for the info. Peter > >> Greetings, Peter >> >> >>> \starttext >>> \startstandardmakeup >>> \combinepages[poster.pdf][nx=1,ny=1] >>> \setlayer[block][x=10cm,y=10cm]{\copyright 2006} >>> \stopstandardmakeup >>> \stoptext >>> >>> ___ >>> ntg-context mailing list >>> ntg-context@ntg.nl >>> http://www.ntg.nl/mailman/listinfo/ntg-context >>> >>> >>> >> ___ >> ntg-context mailing list >> ntg-context@ntg.nl >> http://www.ntg.nl/mailman/listinfo/ntg-context >> > > ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] A new manual
I would buy it too...Marcus Vinicius How low will we go? Check out Yahoo! Messengers low PC-to-Phone call rates.___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Layer Question
Peter Rolf wrote: > Tobias Burnus wrote: > >> Hello, >> >> I would like to add a text to a poster, which I load as PDF. >> >> The following works nice, except that the layer of the PDF is above the >> layer "block" thus the text gets overdrawn. >> >> How can I change that order? >> >> Tobias >> >> \setuppapersize[A0,landscape][A0,landscape] >> \setupbodyfont[26pt] >> \setuplayout[backspace=0cm,width=fit,height=fit,margin=0cm,topspace=0cm,header=0cm,footer=0pt] >> \definelayer[block][width=85mm,height=54mm] >> >> \setupbackgrounds[page][background=block] >> > ...[background={text,block}] > {one,two,three,foreground,four,five} foreground is a predefined one, the current text > Greetings, Peter > > >> \starttext >> \startstandardmakeup >> \combinepages[poster.pdf][nx=1,ny=1] >> \setlayer[block][x=10cm,y=10cm]{\copyright 2006} >> \stopstandardmakeup >> \stoptext >> >> ___ >> ntg-context mailing list >> ntg-context@ntg.nl >> http://www.ntg.nl/mailman/listinfo/ntg-context >> >> >> > > ___ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Layer Question
Tobias Burnus wrote: > Hello, > > I would like to add a text to a poster, which I load as PDF. > > The following works nice, except that the layer of the PDF is above the > layer "block" thus the text gets overdrawn. > > How can I change that order? > > Tobias > > \setuppapersize[A0,landscape][A0,landscape] > \setupbodyfont[26pt] > \setuplayout[backspace=0cm,width=fit,height=fit,margin=0cm,topspace=0cm,header=0cm,footer=0pt] > \definelayer[block][width=85mm,height=54mm] > > \setupbackgrounds[page][background=block] ..[background={text,block}] Greetings, Peter > > \starttext > \startstandardmakeup > \combinepages[poster.pdf][nx=1,ny=1] > \setlayer[block][x=10cm,y=10cm]{\copyright 2006} > \stopstandardmakeup > \stoptext > > ___ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > > ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Layer Question
Hello, I would like to add a text to a poster, which I load as PDF. The following works nice, except that the layer of the PDF is above the layer "block" thus the text gets overdrawn. How can I change that order? Tobias \setuppapersize[A0,landscape][A0,landscape] \setupbodyfont[26pt] \setuplayout[backspace=0cm,width=fit,height=fit,margin=0cm,topspace=0cm,header=0cm,footer=0pt] \definelayer[block][width=85mm,height=54mm] \setupbackgrounds[page][background=block] \starttext \startstandardmakeup \combinepages[poster.pdf][nx=1,ny=1] \setlayer[block][x=10cm,y=10cm]{\copyright 2006} \stopstandardmakeup \stoptext ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] A new manual
On 9/28/06, John R. Culleton <[EMAIL PROTECTED]> wrote: > What is needed now for greater acceptance of Context is not new > features but a new manual, perhaps a multi volume set with a > common index. > If a consolidated manual set were offered for sale there would be a > lot of customers. I'd buy it in an instant. With 38 hits on "LaTeX" in Computers & Internet on Amazon.com I'd say that ConTeXt is lagging behind in the published-book-about department. nikolai ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] A new manual
What is needed now for greater acceptance of Context is not new features but a new manual, perhaps a multi volume set with a common index. The 2001 manual is great, but many of the features discussed daily here are not in it. One must chase around the wiki and the individual manuals like "details", and that is not satisfactory from the point of view of the new user. Most of us have memorized the locations of key information but newcomers have not. If a consolidated manual set were offered for sale there would be a lot of customers. Or an abridged version, something like the 1999 Excursion manual but expanded and updated, would be a possibility. -- John Culleton Able Indexing and Typesetting Precision typesetting (tm) at reasonable cost. Satisfaction guaranteed. http://wexfordpress.com ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] latest beta and \doifnotallmodes
On Sep 28, 2006, at 3:39 AM, Hans Hagen wrote: > Alan Bowen wrote: >> >> On Sep 27, 2006, at 3:04 PM, Hans Hagen wrote: >> >>> Alan Bowen wrote: On Sep 27, 2006, at 12:32 PM, Hans Hagen wrote: > Alan Bowen wrote: >> \doifnotallmodes{mode1,mode2,mode3}{ >> defaultmode instructions >> } >> gets�the following error message: >> >> system� � � � � : mark BibTitle defined [subject] >> ! Missing number, treated as zero. >> >> � � � � � � � � �� \scct:0 >> \catcodetable ...\fi \the \csname @@cct:\number #1 > make suret hat you run the latest beta; catcode management has > been > reorganized a bit > > Hans Hans— The problem— ! Missing number, treated as zero. \scct:0 \catcodetable ...thchardef \currentcatcodetable #1 \the \setdefaultlowercatco... \popcatcodetable atcoderestorelevel \endcsname \tracepopcatcodetable \adv... \docheckforallmodes ...\cleanuplabel {#3}\protect \checkedmodetrue \rawproce... l.344 des{frontbackmatter,memorialnote,article} { still occurs with ConTeXt ver: 2006.09.27 14:45 MK II. >>> >>> can you make a small test file? >>> >>> Hans >> >> Here is a simple test file that shows my problem. > in core-var.tex there is an assymetric (un)protect; > > btw, i now make context quit when unprotect/protect don't match > > Hans Hans—the problem disappears with the latest beta (09/28/06). Thank you! Alan ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] run a ruby script and use the standard output ???
Hans Hagen wrote: > piping: the latest versions of pdftex support this (i\ve forgotten the > syntax, but taco who wrote the patch may remember) piping syntax: \input "|ruby ./myscript.rb \vartest X" the magic trick is the | symbol. With your current tex: \writ18{ruby ./myscript.rb \vartest X > whatever.tex} \input whatever % or something using \openin ... Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] beta
latest upload (in 10 minutes) - static graphics with mpenvironments - fix for modes and protection Hans -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] run a ruby script and use the standard output ???
Renaud AUBIN wrote: > Hi all, > > Is it possible to run a ruby script from a context document during its > processing (I already know how to do that using \write18 but there is > maybe a better way...) then get the output of the script to display or > use it into the document. It's a little bit hard to describe so I have > a simple example: > > \starttext > \def\vartest{3.124325234543523452435} > \write18{ruby ./myscript.rb \vartest > X} > \stoptext > > with myscript.rb: > > temp = ARGV[0] > puts "\nX " + (Math::sqrt(temp.to_f)).to_s + " > X\n" > > I would store the result of puts into a variable usable within ConTeXt... > piping: the latest versions of pdftex support this (i\ve forgotten the syntax, but taco who wrote the patch may remember) you can also let ruby write a definition to a file temp.tmp which you can read in however, luatex can do: \edef\SomeVar{\lua{tex.print(math.sqrt(3.124325234543523452435))} or \def\GimmeARoot#1{\lua{tex.print(math.sqrt(#1))} actually, this is one of the examples i use in prelim demos at user group meetings -) so, be a bit patient and it will come your way ... Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] latest beta and \doifnotallmodes
Alan Bowen wrote: > > On Sep 27, 2006, at 3:04 PM, Hans Hagen wrote: > >> Alan Bowen wrote: >>> >>> On Sep 27, 2006, at 12:32 PM, Hans Hagen wrote: >>> Alan Bowen wrote: > \doifnotallmodes{mode1,mode2,mode3}{ > defaultmode instructions > } > gets�the following error message: > > system� � � � � : mark BibTitle defined [subject] > ! Missing number, treated as zero. > > � � � � � � � � �� \scct:0 > \catcodetable ...\fi \the \csname @@cct:\number #1 make suret hat you run the latest beta; catcode management has been reorganized a bit Hans >>> >>> Hans— >>> >>> The problem— >>> >>> ! Missing number, treated as zero. >>> >>>\scct:0 >>> \catcodetable ...thchardef \currentcatcodetable #1 >>> \the >>> \setdefaultlowercatco... >>> >>> \popcatcodetable atcoderestorelevel \endcsname >>> >>> \tracepopcatcodetable \adv... >>> >>> \docheckforallmodes ...\cleanuplabel {#3}\protect >>> \checkedmodetrue >>> \rawproce... >>> l.344 des{frontbackmatter,memorialnote,article} >>> { >>> >>> still occurs with ConTeXt ver: 2006.09.27 14:45 MK II. >>> >> >> can you make a small test file? >> >> Hans > > Here is a simple test file that shows my problem. in core-var.tex there is an assymetric (un)protect; btw, i now make context quit when unprotect/protect don't match Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] \sometxt bodyfontsize in staticMPfigure (2006.09.27 beta)
Sanjoy Mahajan wrote: > [I'm testing the 2006.09.27 beta on Linux] > > Thanks for the new \sometxt in staticMPfigures. I'm just testing its > operation, and find that the text is not set in the document's bodyfont > size. For example, > > \setupbodyfont[20pt] > \starttext > > \startstaticMPfigure{fig} > label(\sometxt{in sometxt},origin); > \stopstaticMPfigure > > outside sometxt > \usestaticMPfigure[fig] > \stoptext > > produces a small "in sometxt" and a large "outside sometxt". > > With this file both are large, as I expected \sometxt to work: > > \setupbodyfont[20pt] > \starttext > > \startreusableMPgraphic{fig} > label(\sometxt{in sometxt},origin); > \stopreusableMPgraphic{ > > outside sometxt > \reuseMPgraphic{fig} > \stoptext > > I haven't figured out the full story. But in the intermediate .mp files > generated by texexec, the staticMPfigure case has > "BodyFontSize:=12.0pt;" whereas in the reusableMPgraphic case, the file > has "BodyFontSize:=20.0pt;". > this is runtime tex into passed to the graphic ... imagine that we flush this to the mp file ... it can contain info that is not known in that session (like overlay info) which willbreak the mp run the issue here is that a static graphic is processed in another, independent run, that's the whole idea behind static graphics (quick hack for independent graphics) we can spend a lot of time to make it more advanced but within a year from now we will have mp as a library in tex which willreduce runtime to nearly zero (at least that 's what experiments show) so what we can do is pass info from the mpenvironment" \startMPenvironment[global] \setupbodyfont[20pt] \stopMPenvironment \starttext \long\def\startstaticMPgraphic#1#2\stopstaticMPgraphic {\blabelgroup \def\MPgraphicfile{#1}% no \jobname here \let\MPwrite\MPstaticwrite \immediate\openout\MPwrite=\MPgraphicfile.mp \setMPrandomseedfalse \enableincludeMPgraphics \def\sometxt##1{\string\sometxt{##1}}% \the\everyMPgraphic \presetMPdefinitions \theMPinclusions % brrr \writeMPgraphic{\letterpercent mpenvironment: \the\everyMPTEXgraphic}% \writeMPgraphic{beginfig(1);}% \writeMPgraphic{#2}% \writeMPgraphic{endfig; end.}% \immediate\closeout\MPwrite \immediate\closeout\MPwrite \runMPgraphicstrue \executeMPgraphicfile \elabelgroup} \startstaticMPfigure{fig} label(\sometxt{in sometxt},origin); \stopstaticMPfigure outside sometxt \usestaticMPfigure[fig] \stoptext for this we need to patch tex.rb: def processmpstatic if filename = getvariable('filename') then filename += ".mp" unless filename =~ /\..+?$/ if FileTest.file?(filename) then begin data = IO.read(filename) File.open("texexec.tex",'w') do |f| f << "\\setupoutput[pdftex]\n" f << "\\setupcolors[state=start]\n" data.sub!(/^%mpenvironment\:\s*(.*?)$/mois) do f << $1 "\n" end f << "\\starttext\n" f << "\\startMPpage\n" f << data.gsub(/end\.*\s*$/m, '') # a bit of a hack f << "\\stopMPpage\n" f << "\\stoptext\n" end report("converting static '#{filename}'") runtex("texexec.tex") pdffile = File.suffixed(filename,'pdf') File.silentrename("texexec.pdf",pdffile) report ("#{filename} converted to #{pdffile}") rescue report("error in converting #{filename} (#{$!}") end end end reportruntime end but that's about it Hans -- - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context