[NTG-context] Re: Collecting command arguments in a startstop environment
[...] Anyhow, I'm finding myself wanting to do this in ConTeXt, with of course replacing \newenvironment with \definestartstop. I didn't want to fiddle with \definestartstop, but here is a quick hack: -- \long\def\foo#1{ Hello #1!} \long\def\startfoo #1 \stopfoo{\unskip \foo{#1}} \starttext \startfoo World \stopfoo \startfoo Brooks \stopfoo \startfoo some lines \stopfoo \stoptext -- Patrick -- ConTeXt wiki: http://contextgarden.net texshow-web: http://texshow.contextgarden.net List archive: http://archive.contextgarden.net ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] patterns
On Tue, 27 Jul 2004 00:36:43 +0200, Hans wrote: So, what i need is for each language a couple of words that hyphenate in unique ways (i.e. they must hyphenate differently than related languages) \language[nl] \hyphenatedword{bijeenkomst} should do the trick for dutch, i hope bij-een-komst. -- groeten, Taco ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Re: Collecting command arguments in a startstop environment
At 01:37 AM 8/2/2004, you wrote: Anyhow, I'm finding myself wanting to do this in ConTeXt, with of course replacing \newenvironment with \definestartstop. I didn't want to fiddle with \definestartstop, but here is a quick hack: -- \long\def\foo#1{ Hello #1!} \long\def\startfoo #1 \stopfoo{\unskip \foo{#1}} [...] Oh, that's clever. I'll have to ponder at whether it's got some drawbacks that mean it doesn't work for what I need, but it does seem promising. Thanks! - Brooks ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Bug report, \frac as redefined in m-newmat.tex
The following simple file works fine if I comment out the \usemodule[newmat] line, but crashes if I put it in. \usemodule[newmat] \starttext \placeformula \startformula \eqalign{\frac{1}{2} \cr} \stopformula \stoptext - Brooks ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] math-ams.tex: \triangleup?
Dear Hans, math-ams.tex defines \triangledown, but for symmetry it should imhoalso define \triangleup: \definemathsymbol [triangleup][ord] [ma] [4D] The symbol is currently only defined as \vartriangle, but that is a relation. regards, Christopher Creutzig ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Understanding registers command
Salman Khilji wrote: \starttext \defineregister[street][streets] \street{Ridderstraat} \placestreets \stoptext However, texexec gives me the following: ! Undefined control sequence. recently read \placestreets As far as I can see, \defineregister, or more precisely \dodefinieerregister, completely ignores its second argument. I guess the #1 in the \setvalue lines (but not the other lines) of \setvalue{\e!plaats#1}% {\doplaatsregister[#1]}% \setvalue{\e!volledige#1}% {\dovolledigregister[#1]}% should be #2. But that would change \completeindex to \completeindices, which would again contradict the manual, so below therewould have to be another change, from \definieerregister [\v!index] [\v!indices] to \definieerregister [\v!index] [\v!index] Note that \placestreet and \completestreet do work. regards, Christopher Creutzig ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] metaobj and transparent colors with \MPcolor
On Fri, Jul 30, 2004 at 12:08:33PM +0200, Vit Zyka wrote: Here is my current file, which just gives a white background in the box. \setupcolors[state=start] \setupbackgrounds[page][background=color,backgroundcolor=red] \definecolor[Transparent][r=0,g=1,b=1,t=0,a=normal] \startreusableMPgraphic{test} input metaobj; color t; t:=\MPcolor{Transparent}; setObjectDefaultOption(Box)(fillcolor)(t); newBox.test(btex Transparent? etex) filled(true); Obj(test).c=origin; drawObj(test); \stopreusableMPgraphic \starttext \reuseMPgraphic{test} \stoptext Sorry I still do not see your white box. Perhaps something is corrupted in my context installation. I had a quick look into mpobj source and I tried to remove default white background, but I was not successful. Me either. Vit Zyka P.S. I played with raw MP code: input metaobj; beginfig(1) fill fullcircle scaled 1cm withcolor red; color t; t:=(1,1,0); %setObjectDefaultOption(Box)(fillcolor)(t); newBox.test(); Obj(test).c=origin; drawObj(test); endfig; end. Your color is not transparent, so it will work as expected: no white box. -- Eckhart ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Metapost: minus sign as unknown
Dear list, please find attached a small ConTeXt file using metapost and mp-format.mp. When compiled directly (with \write18 enabled), the minus sign of the first MPgraphic is rendered (by metapost) as unknown. The very same code in the second example works. When compiling with texexec --automp, the problem does not exist. Versions: This is pdfeTeX, Version 3.14159-1.10b-2.1 (Web2C 7.4.5) ConTeXt ver: 2004.6.26 fmt: 2004.7.17 int: english mes: english This is MetaPost, Version 0.641 (Web2C 7.4.5) metafun 2004-7-17 22:18 TeXExec 3.3 - ConTeXt / PRAGMA ADE 1997-2003 TeXUtil 7.5 - ConTeXt / PRAGMA ADE 1992-2003 regards, Christopher Creutzig testminus.tex Description: TeX document testminus-direct.pdf Description: Adobe PDF document testminus-automp.pdf Description: Adobe PDF document ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Understanding registers command
This looked suspiciously familiar. And indeed, my bib module has the same problem: % Hans, Wat is er mis met [pub][pubs]??? % Werkt absoluut niet! \definieerlijst[pubs][pubs] Greetings, Taco \definieerregister [\v!index] [\v!index] ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] PPCHTeX broken
Hello, PPCHTeX seems to be broken in the latest ConTeXt beta version. Here an example (copied from the manual): \usemodule[pictex,chemic] \starttext \startchemical[scale=small,width=6000,height=6000,frame=on] \chemical[SIX,SB2356,DB14,Z2346,SR36,RZ36] [C,N,C,C,H,H_2] \chemical[PB:Z1,ONE,Z0,DIR8,Z0,SB24,DB7,Z27,PE] [C,C,CH_3,O] \chemical[PB:Z5,ONE,Z0,DIR6,Z0,SB24,DB7,Z47,PE] [C,C,H_3C,O] \chemical[SR24,RZ24] [CH_3,H_3C] \stopchemical \stoptext log-file and dvi-file are attached. Greetings, Peter -- http://pmrb.free.fr/contact/ _ FilmSearch engine: http://f-s.sf.net/This is pdfeTeX, Version 3.14159-1.10b-2.1 (Web2C 7.4.5) (format=cont-en 2004.8.1) 2 AUG 2004 16:22 entering extended mode (/var/lib/texmf/web2c/natural.tcx) **cont-en test.tex (./test.tex{/var/lib/texmf/pdftex/config/pdftex.cfg} ConTeXt ver: 2004.6.30 fmt: 2004.8.1 int: english mes: english language : language en is active protectionstate 0 system : cont-new loaded (/usr/share/texmf/tex/context/base/cont-new.tex systems: beware: some patches loaded from cont-new.tex! color : palette rollover is available system (E-TEX) : [line 599] system (E-TEX) : [line 654] ) system : cont-old loaded (/usr/share/texmf/tex/context/base/cont-old.tex loading: Context Old Macros ) system : cont-fil loaded (/usr/share/texmf/tex/context/base/cont-fil.tex loading: Context File Synonyms ) system : cont-sys loaded (/var/lib/texmf/tex/context/config/cont-sys.tex) system : macros of module tryout loaded (/usr/share/texmf/tex/context/base/m-tryout.tex \openout2 = `test.tui'. ) bodyfont : 12pt rm is loaded language : patterns 2:2-en-2 3:2-uk-2 4:2-de-2 5:2-fr-2 6:2-es-2 7:2-it-2 8:2-nl-2 loaded specials : tex,postscript,rokicki loaded \openout2 = `test.tui'. system : test.top loaded (./test.top) \openout0 = `test-mpgraph.mp'. \openout0 = `mpgraph.mp'. system : macros of module pictex loaded (/usr/share/texmf/tex/context/base/m-pictex.tex (/usr/share/texmf/tex/generic/pictex/pictex.tex)) system : macros of module chemic loaded (/usr/share/texmf/tex/context/base/m-chemic.tex (/usr/share/texmf/tex/context/base/ppchtex.tex ppchtex: using PiCTeX and MetaPost )) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo ) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) (./test.tuo) fonts : needs map file: ec-public-lm.map fonts : needs map file: original-base.map systems: begin file test at line 2 \openout6 = `test-mpgraph.mp'. systems: randomizer starts with 1151741342 [MP as EPS ./test-mpgraph.4000] [MP color conversion ./test-mpgraph.4000 \openout0 = `test-metacmyk.tmp'. not needed] \openout0 = `test-metacmyk.tmp'. [MP as EPS ./test-mpgraph.3999] [MP color conversion ./test-mpgraph.3999 \openout0 = `test-metacmyk.tmp'. not needed] \openout0 = `test-metacmyk.tmp'. [MP as EPS ./test-mpgraph.3998] [MP color conversion ./test-mpgraph.3998 \openout0 = `test-metacmyk.tmp'. not needed] \openout0 = `test-metacmyk.tmp'. [1.1] systems: end file test at line 9 [flush and process test-mpgraph.mp afterwards] ) Here is how much of TeX's memory you used: 2099 strings out of 66360 26067 string characters out of 723502 4466376 words of memory out of 5559653 33518 multiletter control sequences out of 1+5 10565 words of font info for 35 fonts, out of 50 for 1000 62 hyphenation exceptions out of 1000 44i,17n,53p,304b,1505s stack positions out of 1500i,500n,5000p,20b,5000s 0 PDF objects out of 30 0 named destinations out of 131072 0 words of extra memory for PDF output out of 65536 Output written on test.dvi (1 page, 2228 bytes). test.dvi Description: TeX dvi file ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] PPCHTeX broken
Hello, Peter Münster wrote: PPCHTeX seems to be broken in the latest ConTeXt beta version. Here an example (copied from the manual): If I do a dvips -Ppdf test.dvi I get the following warning: dvips: Could not find figure file ./test-mpgraph.4000; continuing dvips: Could not find figure file ./test-mpgraph.3999; continuing dvips: Could not find figure file ./test-mpgraph.3998; continuing I don't see from the log whether you have them, but in any case a DVI file doesn't carry enough information, you need a Post Script or PDF file. \usemodule[pictex,chemic] \starttext \startchemical[scale=small,width=6000,height=6000,frame=on] \chemical[SIX,SB2356,DB14,Z2346,SR36,RZ36] [C,N,C,C,H,H_2] \chemical[PB:Z1,ONE,Z0,DIR8,Z0,SB24,DB7,Z27,PE] [C,C,CH_3,O] \chemical[PB:Z5,ONE,Z0,DIR6,Z0,SB24,DB7,Z47,PE] [C,C,H_3C,O] \chemical[SR24,RZ24] [CH_3,H_3C] \stopchemical \stoptext With 2004.4.9 this works - well, the bonds are a bit randomly distributed but otherwise. Can you state a bit more clearly what should be different from the result you get? Tobias ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Re: Best source of ConTeXt documentation?
Hello, This is one of the sore points of ConTeXt and of the development effort. People at Pragma are willing to show off but not willing to share code and teach by example... contrary to most opensource projects I have seen. Oh come on, this is completely crap. The people at PRAGMA (i.e. Hans) share ConTeXt, wich is the holy grail that PRAGMA is based on (besides the knowledge). It is such a generous gift to the community. Please think about if you write stuff like that. You are right, that not all (only few) manuals are available in .tex format. See pdftex manual and the magazines. Putting source code online needs time, a lot of time. Source code needs to get documented. And I don't know Hans very well, but I'd guess that his day only has 24h. There are already some styles in the ConTeXt wiki. And there are styles that come with the distribution. Maybe it is time for us to start an group to reverse-engineer some of these files and post them into a public archive. Why reverse-engineer? Just cook up the style you want. If you have questions doing this, ask on the ConTeXt list. If you are ready, put the style onto the Wiki. The styles at pragma are very good, but definitely not the only way to go. Making a good style is not copy/paste. It is a matter of experience. Experience is something you have to gain yourself. And yes, it is time for us to put examples online. But the ConTeXt community is still rather small. So there won't be many results in a short time. Paulo, You can do the first step. Go to the wiki, edit a page that states your questions regarding style development. Put a table of contents or something similar there, which steps you would like to see, which things you would like to have explained and so on. After that we (the more experienced ConTeXt users) can fill in the gaps. And finally we all have a small manual on style design. This is much better than being so aggressive on the unwillingness to share source. Patrick (btw: looking for some beta testers for a new service) -- ConTeXt wiki: http://contextgarden.net texshow-web: http://texshow.contextgarden.net List archive: http://archive.contextgarden.net ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Best source of ConTeXt documentation?
Paulo Ney de Souza wrote: This is one of the sore points of ConTeXt and of the development i addition to patricks remarks: - it would take a lot of effort to keep such a source code repository up to date and in sync (else too many questions) with the pdf repositoty - we only publish documented sources - i want to stimulate users to writ etheir own styles not to mimick existing ones (i.e. avoid the 'all tex files look the same' problem) - also: most examples in manuals are typeset using \startbuffer ... \stopbuffer \typebuffer \getbuffer so ... there are no hidden tricks (unless it would bother/confuse users); and .. things like cover designs i wanna keep for myself if only to avoid cutting and pasting in due time, probably more sources will go on line, but only when i have a system/method of keeping things in sync; i don't like the idea to go on-line for each change that i want to make (we only have dsl for half a year, before that i had to do all on 64 lines which is no fun) Hans ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Collecting command arguments in a startstop environment
To answer my own question: At 10:39 PM 8/1/2004, I wrote: There's a nice little problem that arises in LaTeX, of wanting to write a bit of code like the following, to define an environment that passes the contents of the environment to a command as an argument: \newcommand{\foo}[1]{...} \newenvironment{fooenv}{% \foo\bgroup }{% \egroup } There's even a nice FAQ entry about this. [1] As it turns out, the amsmath package defines a handy [EMAIL PROTECTED] command that handles collecting the environment body to pass it to a command. Anyhow, I'm finding myself wanting to do this in ConTeXt, with of course replacing \newenvironment with \definestartstop. Is there by any chance a built-in ConTeXt macro that can do this? Or even things that would make a decent foundation for building such a thing? The \grabuntil and \processbetween commands, as defined in syst-ext.tex, do exactly what I'm asking for. - Brooks ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Best source of ConTeXt documentation?
From [EMAIL PROTECTED] Mon Aug 2 09:08:22 2004 From: Hans Hagen [EMAIL PROTECTED] To: mailing list for ConTeXt users [EMAIL PROTECTED] Subject: Re: [NTG-context] Best source of ConTeXt documentation? Cc: - it would take a lot of effort to keep such a source code repository up to date and in sync (else too many questions) with the pdf repositoty If we are talking about examples, ones does not need to have the latest manual and the latest source in sync. Just one copy of the manual (that will eventually go old) and one copy of the source. For example, the Calculator, mixing TeX and JavaScript http://www.tug.org/applications/pdftex/calculat.pdf has NOT changed in many years now, so there is no problem maitaining the PDF and the source in sync... - we only publish documented sources That is an important point ... and the only one I can give credit to, but I still think the abundance of examples, even without documentation, is better than the short of examples. - i want to stimulate users to writ etheir own styles not to mimick existing ones (i.e. avoid the 'all tex files look the same' problem) so ... there are no hidden tricks (unless it would bother/confuse users); and .. things like cover designs i wanna keep for myself if only to avoid cutting and pasting Hans Hans: Imitation is indeed the truest form of flattery! Paulo Ney ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Some proposed improvements for t-amsl.tex.
Giuseppe and ConTeXt list members - Having figured out how to use \grabuntil (see my previous messages to this list), I've realized that it's really an inconvenient solution in some cases, because it's searching for a literal bit of text rather than an end to the appropriate grouping level. (Apparently there isn't a way to do the latter in TeX, given that AMSmath's [EMAIL PROTECTED] also searches for literal text.) This means that, if I write a LaTeX compatibility function that does things like define \end{myenvironment} to expand to \stopmyenvironment, my redefinition will not work on any environments using \grabuntil. This inconvenience happens to show up in t-amsl.tex's align and gather implementations, which is one place where I really need that compatibility function. However, it turns out that there's a simple way to rewrite the implementation so to avoid needing \grabuntil. Mostly, this works on the fact that the definition of Plain TeX's \eqalign function can be split apart into a before and after part, as follows: \def\starteqalign{\null\,\vcenter\bgroup \openup\jot {\mathsurround=0pt}% \ialign\bgroup \strut\hfil$\displaystyle{##}$$\displaystyle{{}##}$\hfil \crcr} \def\stopeqalign{\crcr\egroup\egroup\,} (This, aside from the \bgroup's and \egroup's, is copied directly from Appendix B of The TeXbook.) Thus, we could expand the instances of \eqalign in the \startalign and \startgather definitions, shuffle things around appropriately, and obtain the following: \def\startalign{\startformula \let\\\cr \starteqalign} \def\stopalign{\crcr\stopeqalign\stopformula} \def\startgather{\startformula \def\\{\cr}% \starteqalign} \def\stopgather{\crcr\stopeqalign\stopformula} This exactly duplicates the existing functionality in the t-amsl.tex package. However, that functionality could be improved to be a better match to what's provided in amsmath.tex; in particular, align should accept multiple columns of equations, and gather should center its lines. Thus, I propose that the following redefinitions be included in t-amsl: \def\startalign{\startformula \let\\\cr \null\vcenter\bgroup \openup\jot {\mathsurround=0pt}% \everycr={}\tabskip=4pt plus1fil \halign to \displaywidth\bgroup \strut\hfil$\displaystyle{##}$% \tabskip=0pt $\displaystyle{{}##}$\hfil% \tabskip=4pt plus1fil \hfil$\displaystyle{##}$% \tabskip=0pt $\displaystyle{{}##}$\hfil% \tabskip=4pt plus1fil \crcr} \def\stopalign{\crcr\crcr\egroup\egroup\stopformula} \def\startgather{\startformula \let\\\cr \null\,\vcenter\bgroup \openup\jot {\mathsurround=0pt}% \ialign\bgroup \strut\hfil$\displaystyle{##}$\hfil \crcr} \def\stopgather{\crcr\crcr\egroup\egroup\,\stopformula} Also, a similar method can be used to replicate the split environment (which, unlike the above, should go inside an explicit \startformula and \stopformula pair). I propose the following definition be added as well: \def\startsplit{% \let\\\cr \null\,\vcenter\bgroup \openup\jot {\mathsurround=0pt}% \ialign\bgroup \strut\hfil$\displaystyle{##}$$\displaystyle{{}##}$\hfil \crcr} \def\stopsplit{\crcr\egroup\egroup\,} This still doesn't address the fact that the lines in the align and gather environments are not given individual equation numbers as they should be, but I think that is a project for another day. - Brooks P.S. A question: is it intentional that the array environment in t-amsl produces notably different spacing than LaTeX's array environment? ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Re: Best source of ConTeXt documentation?
From [EMAIL PROTECTED] Mon Aug 2 08:46:53 2004 From: Patrick Gundlach [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [NTG-context] Re: Best source of ConTeXt documentation? Oh come on, this is completely crap. The people at PRAGMA (i.e. Hans) share ConTeXt, wich is the holy grail that PRAGMA is based on (besides the knowledge). It is such a generous gift to the community. Please think about if you write stuff like that. I realize better that you do Hans contibutions to the Open Source community and I never complained about the sharing of ConTeXt, which is indeed the best typesetting system I have seen. You are taking my comment into a completely different context, pun not intended! You are right, that not all (only few) manuals are available in .tex format. See pdftex manual and the magazines. Putting source code online needs time, a lot of time. Source code needs to get documented. And I don't know Hans very well, but I'd guess that his day only has 24h. There are already some styles in the ConTeXt wiki. And there are styles that come with the distribution. The discussion is not about styles, it is about examples and how-to. Why reverse-engineer? Just cook up the style you want. If you have questions doing this, ask on the ConTeXt list. If you are ready, put the style onto the Wiki. The styles at pragma are very good, but definitely not the only way to go. Making a good style is not copy/paste. It is a matter of experience. Experience is something you have to gain yourself. We are not talking about experience and or copy/paste, if you are assuming that I don't have the experience or that the guy that posted the initial message wants to copy and paste, again you are on the wrong track. And yes, it is time for us to put examples online. But the ConTeXt community is still rather small. So there won't be many results in a short time. I certainly will welcome the day we have a minimal how-to posted in there. You can do the first step. Go to the wiki, edit a page that states your questions regarding style development. Put a table of contents or something similar there, which steps you would like to see, which things you would like to have explained and so on. After that we (the more experienced ConTeXt users) can fill in the gaps. And finally we all have a small manual on style design. This is much better than being so aggressive on the unwillingness to share source. Patrick I'll give it a try, the wiki is certainly the way to go ... Paulo Ney ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Best source of ConTeXt documentation?
Adding to this thread (I don't mean a reply to Paulo, but rather a reply to what Hans was saying earlier)...The problem with normal users cooking up new styles is the lack of artistic abilities in some people (like me). One can, obviously go thru the manual cover the cover, but if one does not have creative thinking, then creating professional looking styles would be hard. That is why, users like me really do not care if our documents look like everybody else's (just as long as they look professional). Its kind of like learning Photoshop and knowing what each toolbar button doesbut not knowing how to mix all the available tools create a professional looking graphic. And of course, once we learn the tool, then making small changes here and there to make it look slightly different is no big deal. Salman ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context