Re: [NTG-context] luatex and xml
Thanks Wolfgang for your time and the attachments you send me. I don't want to sound ungrateful for the hard work and for the nice module you send me, but I was looking for another solution where I don't have to use Context macro's and setups. I want to use a little bit of lua code to get to the data I want. I think I will have greater control independent of the xml macro's (to be honest I find them difficult to understand). The solution I am looking for, is to use the function xml.filter (defined in l-xml.lua) and to assign the outcome to local variables. Kind regards Wim Hi, take a look into invoice.tex in my attachment. Wolfgang On Sun, 18 May 2008 02:20:00 +0200 WN [EMAIL PROTECTED] wrote: Hi, I am trying to parse a xml file with mkiv to process a list of invoices (factuur in dutch). The xml file looks like this ?xml version='1.0 standalone='yes' ? factuur nummer123456789/nummer datum1 januari 2008/datum medewerker/medewerker regels omschrijvingOmschrijving geleverde dienst a/omschrijving bedrag1500,00/bedrag omschrijvingOmschrijving geleverde dienst b/omschrijving bedrag200,00/bedrag /regels /factuur I want to extract and sum the invoices (regels). I managed to get things working (printing) but don't know how to assign these values into lua variables for the summing. The test code looks like this % engine=luatex \starttext \startluacode document.xml = document.xml or { } -- define namespace document.xml = xml.load(factuur.xml) -- load the file n = xml.count(document.xml, /factuur/regels/omschrijving) for i = 1, n do -- -- here I want to assign the values returned by xml.filter into local variable amount -- xml.sprint(xml.filter(document.xml, /factuur/regels/bedrag/position( .. i .. ) )) end \stopluacode \stoptext Kind regards WN ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] luatex and xml
Hi, I am trying to parse a xml file with mkiv to process a list of invoices (factuur in dutch). The xml file looks like this ?xml version='1.0 standalone='yes' ? factuur nummer123456789/nummer datum1 januari 2008/datum medewerker/medewerker regels omschrijvingOmschrijving geleverde dienst a/omschrijving bedrag1500,00/bedrag omschrijvingOmschrijving geleverde dienst b/omschrijving bedrag200,00/bedrag /regels /factuur I want to extract and sum the invoices (regels). I managed to get things working (printing) but don't know how to assign these values into lua variables for the summing. The test code looks like this % engine=luatex \starttext \startluacode document.xml = document.xml or { } -- define namespace document.xml = xml.load(factuur.xml) -- load the file n = xml.count(document.xml, /factuur/regels/omschrijving) for i = 1, n do -- -- here I want to assign the values returned by xml.filter into local variable amount -- xml.sprint(xml.filter(document.xml, /factuur/regels/bedrag/position( .. i .. ) )) end \stopluacode \stoptext Kind regards WN ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bookmark question
Your solution works, but now I have to rewrite my carefully crafted environment and setups. I rather wish your solution works within the start/stop frontmatter construct. Is this possible ? Kind regards Wim WN wrote: This is what I would like to do \startfrontmatter \bookmark[chapter]{Inhoudsopgave} \completecontent[partnumber=no] \page \bookmark[chapter]{Lijst van figuren} \completelistoffigures[partnumber=no] \stopfrontmatter \startbodymatter \component chapter01 \component chapter02 \stopbodymatter the bookmarks only appears with the [chapter] included, but twice. Also they appear twice in the table of contents (which is consistent). \setupinteraction[state=start] \placebookmarks \starttext \completecontent[partnumber=no] \bookmark[chapter]{Inhoudsopgave} \page \completelistoffigures[partnumber=no] \bookmark[chapter]{Lijst van figuren} \chapter{first} \chapter{second} \stoptext I would like the bookmarks to appear once and not in the TOC. Perhaps Hans can take the above code, as indeed your code works but not in the above code. Best wishes Wim Taco Hoekwater wrote: WN wrote: I think chapter titles are supposed appear automatically in the bookmarks, no need for an explicit \bookmark. True enough. But should they appear twice ? I want a custom bookmark for the table of contents and list of figures, so I used \bookmark[chapter] to include these (once not twice). Ah, I see now. Looks like a bug to me. I do not understand the code well enough to fix it, however. I am attaching a minimal example for Hans. (meanwhile, you could use \bookmark without the optional argument). Best wishes, Taco ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Bookmark question
Taco Hoekwater wrote: WN wrote: Hi, When I use \bookmark[chapter]{Some bookmark} the bookmark appears twice in the list of bookmarks but the bookmark also appears twice in the Table of Contents. I think chapter titles are supposed appear automatically in the bookmarks, no need for an explicit \bookmark. True enough. But should they appear twice ? I want a custom bookmark for the table of contents and list of figures, so I used \bookmark[chapter] to include these (once not twice). Best wishes Wim Best wishes, Taco ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Pdf bookmark
Hi, When I use \bookmark[chapter]{Some bookmark} the bookmark appears twice in the list of bookmarks but the bookmark also appears twice in the Table of Contents. Is this a known problem/bug or is there something I should do ? I am using ConTeXt ver: 2008.02.01 17:25 MKII fmt: 2008.2.4 int: english/english Kind regards Wim ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] where is my installer? :)
Hi Vyatcheslav I tried you installer, and have some comments *) The context minimal installer creates a different directory structure as compared to the mswin context I downloaded from Pragma. The setuptex scripts complains that the tex tree is not correct ? *) I installed via your installer and than your program said I have to run texexec etc. from the command line. I tried to do that but as I also have Miktex installed, it took the exe's from Miktex and not from Context. I thought you did some magic in the registry, so Miktex and Context can coexist ? *) I missed the discussion on the mailing list, but what does your installer do exactly ? Thanks for your help Kind regards Wim Hello, Sorry for the question, but where people can find my installer? I've uploaded it to svn, but cannot find it at http://minimals.contextgarden.net/ and have no idea where it also might appear. If no one can find it, it is useless, isn't it? ;) Best regards, Vyatcheslav ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Error updating context with ctxtools
Hi, I thought it might be time to update my standalone Context on Windows (08-08-2007). I am using ctxtools --update but I am getting the following error loading : Context Regime Macros (synonyms) ) (C:/Context/isoimage/usr/local/context/tex/texmf-local/tex/context/base/lang-ini.tex loading : Context Language Macros / Initialization (C:/Context/isoimage/usr/local/context/tex/texmf-local/tex/context/base/lang-ini.mkiv ! LuaTeX error ...ontext/tex/texmf-local/tex/context/base/lang-ini.lua:9: attempt to index global 'lang' (a nil value). \ctxluabytecode ...ode .. #1 .. str) end end } \registerctxluafile ...{\the \luabytecodecounter } \fi \fi l.16 \registerctxluafile{lang-ini}{1.001} ? Kind regards Wim Neimeijer ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Numbered subitems
Hi Wolfgang In the meantime I found another way of getting the desired result. I am now using enumerations out of the box, without needing extra counters. After a bit of experimenting, this is what I did % test code \defineenumeration[artikel][location=left,text=Artikel,headstyle=bold,stopper=.,distance=5pt,width=broad,number=yes] \setupenumerations[subartikel][text=,location=left,stopper=.,width=broad,distance=5pt] \starttext \startartikel First artikel \stopartikel \startsubartikel Text for item 1.1. \stopsubartikel \startsubartikel Text for item 1.2 \stopsubartikel \startartikel Second artikel \stopartikel \startsubartikel Text for item 2.1 \stopsubartikel \startsubartikel Text for item 2.2 \stopsubartikel \stoptext Anyways, thanks for your help Kind regards Wim Neimeijer 2007/10/23, WN [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]: Hi, I want to make a numbered list as follows *Artikel 1. First artikel *1.1. Text for item 1.1. 1.2. Text for item 1.2 *Artikel 2. Second artikel* 2.1. Text for item 2.1 2.2. Text for item 2.2 etc. I am trying to accomplish this with \setupitemgroup and \defineitemgroup as follows, but the second level start also with Artikel and is indented. I looked at the some of the emails relating to numbered subitems but could not find a working example. Thanks for any help Wim % test code \def\firstlevelnumber#1{\xdef\thefirstlevelnumber{#1}#1} \defineconversion[firstlevelnumber][\firstlevelnumber] \def\secondlevelnumber#1{\thefirstlevelnumber.#1} \defineconversion[secondlevelnumber][\secondlevelnumber] \defineitemgroup[mylist][levels=2] \setupitemgroup[mylist][1][atmargin][n,repeat] \setupitemgroup[mylist][1][atmargin][n,firstlevelnumber] \setupitemgroup[mylist][1][width=5em,stopper=.,headstyle=bold,left=Artikel ] \setupitemgroup[mylist][2][atmargin][n,repeat] \setupitemgroup[mylist][2][atmargin][n,secondlevelnumber] \setupitemgroup[mylist][2][width=2em,stopper=.,left=] \startext \startmylist \head First artikel \startmylist \item Text for item 1.1. \item Text for item 1.1. \stopmylist \head Second artikel \startmylist \item Text for item 2.1 \item Text for item 2.2 \stopmylist \stopmylist \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Numbered subitems
Hi, I want to make a numbered list as follows *Artikel 1. First artikel *1.1. Text for item 1.1. 1.2. Text for item 1.2 *Artikel 2. Second artikel* 2.1. Text for item 2.1 2.2. Text for item 2.2 etc. I am trying to accomplish this with \setupitemgroup and \defineitemgroup as follows, but the second level start also with Artikel and is indented. I looked at the some of the emails relating to numbered subitems but could not find a working example. Thanks for any help Wim % test code \defineitemgroup[mylist][levels=2] \setupitemgroup[mylist][1][atmargin][n,repeat] \setupitemgroup[mylist][1][width=5em,stopper=.,headstyle=bold,left=Artikel ] \setupitemgroup[mylist][2][atmargin][n,repeat] \setupitemgroup[mylist][2][width=2em,stopper=.,left=] \startext \startmylist \head First artikel \startmylist \item Text for item 1.1. \item Text for item 1.1. \stopmylist \head Second artikel \startmylist \item Text for item 2.1 \item Text for item 2.2 \stopmylist \stopmylist \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] How to include animation into pdf
Hello All, I made a little animation with Asymptote (http://asymptote.sourceforge.net) which is self contained in a single pdf. The reason of using Asymptote is, that it produces a single pdf without having to combine the resulting pdf's files myself. I now want to include this animation into my main document with the help of \externalfigure[animation.pdf] \setupcolors[state=start] \setupinteraction[state=start] \starttext \externalfigure[animation.pdf] \stoptext Alas I don't see my animation, to be honest I did not expect it to work, but I thought I give it a try. Thanks Wim ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with \starttable \stoptable and some math
Compiles fine here, using the old I know it compiles, that is not the problem. But look closely at the output, in the starttable/stoptable the \oiint is ''ignored but in the startformula/stopformula it is shown. So the starttable/stoptable is doing something , what I don't know. That is what I observed Wim ConTeXt ver: 2007.08.24 14:18 MKII fmt: 2007.8.24 int: english/english So maybe something that changed recently. I cannot test with the current version right now (have a hard deadline, do not want to mess with the system...) 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Math align question
Aditya, This confuses me, I thought when using 3 columns I have to set n=3 otherwise I get errors about extra tab found etc. However doing as you suggested, seems to work. Then another question, the formula numbering is not aligned with the other formula's in my text like in the code below. How can I force the sub formula numbering to be right aligned ? Thanks Wim \def\ms{\,} \starttext \placeformula[calcb-chapter4-eqn2] \startformula f(x) = \sum_{n = - \infty}^{+\infty} c_{n} e^{\displaystyle i n \frac{\pi}{L} x} \quad \text{,} \quad c_{n} = \frac{1}{2L} \int\limits_{-L}^{L} f(x) \ms e^{- \displaystyle in\frac{\pi}{L} x } dx \stopformula Formula number is not right aligned with the previous formula \placesubformula \startformula \startalign[n=2,m=2,distance=2em] %\startalign[n=3] \NC f(x) \NC = \frac{1}{2\pi} \int\limits_{-\infty}^{+\infty} g(y) \ms e^{i y x} \ms dy \NC (x \in \reals) \NR[calcb-chapter4-eqn5:i][i] \NC g(y) \NC = \int\limits_{-\infty}^{+\infty} f(x) \ms e^{-i y x} d x \NC ( y \in \reals) \NR[calcb-chapter4-eqn5:ii][ii] \NC \int\limits_{-\infty}^{+\infty} |f(x)|^{2} dx \NC = \frac{1}{2\pi} \int\limits_{-\infty}^{+\infty} \Big| g(y) \Big|^{2} \ms d y \NC \quad \NR[calcb-chapter4-eqn5:iii][iii] \stopalign \stopformula \stoptext How about \startalign[n=2,m=2,distance=2em] 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] luac-texluac-luatex-texlua-...
Hi, What I did on Ubuntu 7.04 (bash shell) was this downloaded justtex.zip and linuxtex.zip from pragma and unzipped them in my home directory. uncommented all the unset commands in setuptex downloaded luatex and the lua compiler i.e luac (found it via google) I think from www.luatex.org and from www.lua.org. I read on the mailing list that you don't need to download them as everything is self contained in the distro. set the unix variable TMP to /TMP (export TMP=/tmp) set the unix variable TEXMFCACHE to TMP (export TEXMFCACHE=/tmp) I think the last step was not needed because the luatools script will set it to $TMP and rename the lua scripts luatools.lua and mtxrun.lua (from the scripts/lua directory) to their extension less counterparts and moved them to the texmf-linux/bin directory. Also did a chmod 755 on them to make them executable. I also made a copy of luatex and named it texlua and put it in the texmf-linux/bin directory. Then after reading the MyWay on MKIV I did a texexec --make --all --luatex to generate the formats and ran succesfully the following tex script and produced a pdf file. % engine=luatex \starttext Hello from luatex \blank LUA \startlua a = 1.5 b = 1.8 c = a*b tex.print(c) \stoplua \stoptext Could be that I forgot some steps but this is what I remember. Hope it helps Kind regards Wim Hello, It is silly, but luatools urges me to have luac or texluac files, while the magazine tells only about luatex/texlua. It seems like luac not is the same as luatex, so I'm in despair because don't know where to get those additional files. // from luatools.lua // function utils.lua.compile(luafile, lucfile) -- utils.report(compiling,luafile,into,lucfile) os.remove(lucfile) local command = -s -o .. string.quote(lucfile) .. .. string.quote(luafile) if os.execute(texluac .. command) == 0 then return true elseif os.execute(luac .. command) == 0 then return true else return false end end ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] extra math symbols and alignment
Hi Aditya I tried the new code you send me, and of course I did a quick test. But when doing a texmfstart texexec --autopdf --pdf testalignfontnew.tex texexec hangs ''forever'' while trying to process the \section{} command. Actually its pdftex trying to do something. To make sure I did not make a edit mistake, I copied my old test code into the file testalignfontnew.tex and run a diff to see where the difference with the new code are. Looking at the code (and I am not a Tex expert, and forgive me, when I ask a dumb question) I don't see where the \scratchcounter itself is defined ? Must surely be a global Context counter ? Attached the new test code. Hope it helps the debugging process and thanks for all your help sofar. Wim Hi Wim, Quoting WN [EMAIL PROTECTED]: I tried your code and performed more tests. My first tests show your fix works. But than I added a \section{} in my test code and I am sorry to say that the math matrix alignment does not work at that point. :-) Section modifies \!!counta so things get messed up again. Actually, this really helped to narrow down the bug. Basically, dostartmatrix does a test \scratchcounter=\ifnum\eqaligncolumn\scratchcounter \eqaligncolumn \else \plusone \fi which is comparing eqaligncolmn with scratch counter, but scratchcounter is never initialized. Therefore, everything depends on what was the value of scratchcounter, which explains, different behaviour depending on when the matrix occurred, and why you had a hard time pinning down a minimal example. The fix is easy, change the scratchcounter to zerocount (or maybe just change to \ifcase\eqaligncolunm). So add this to your file, \unprotect \def\dostartmathmatrix[#1][#2]% {\begingroup \edef\currentmathmatrix{#1}% \doifassignmentelse{#2}{\setupmathmatrix[#1][#2]}\donothing \null \executeifdefined{\??mx:\mathmatrixparameter\c!location}{\getvalue{\??mx:\v!lohi}}% \mathmatrixleft \mathmatrixbox\bgroup \pushmacro\domatrixNC \let\endmath\relax \def\NC{\domatrixNC}% \def\MC{\domatrixNC\ifmmode\else$\def\endmath{$}\fi}% \global\let\domatrixNC\dodomatrixNC \def\NR{\endmath\global\let\domatrixNC\dodomatrixNC\crcr}% \normalbaselines \mathsurround\zeropoint \everycr\emptytoks \tabskip\zeropoint \eqaligncolumn\zerocount \processcommacommand[\mathmatrixparameter\c!align]{\advance\eqaligncolumn\plusone\dosetmatrixcolumn}% \scratchcounter=\ifnum\eqaligncolumn\zerocount \eqaligncolumn \else \plusone \fi \global\eqaligncolumn\plusone \preparemathmatrix } % uses scratchcounter \protect 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ \tracetypescriptstrue \unprotect \def\dostartmathmatrix[#1][#2]% {\begingroup \edef\currentmathmatrix{#1}% \doifassignmentelse{#2}{\setupmathmatrix[#1][#2]}\donothing \null \executeifdefined{\??mx:\mathmatrixparameter\c!location}{\getvalue{\??mx:\v!lohi}}% \mathmatrixleft \mathmatrixbox\bgroup \pushmacro\domatrixNC \let\endmath\relax \def\NC{\domatrixNC}% \def\MC{\domatrixNC\ifmmode\else$\def\endmath{$}\fi}% \global\let\domatrixNC\dodomatrixNC \def\NR{\endmath\global\let\domatrixNC\dodomatrixNC\crcr}% \normalbaselines \mathsurround\zeropoint \everycr\emptytoks \tabskip\zeropoint \eqaligncolumn\zerocount \processcommacommand[\mathmatrixparameter\c!align]{\advance\eqaligncolumn\plusone\dosetmatrixcolumn}% \scratchcounter=\ifnum\eqaligncolumn\zerocount \eqaligncolumn \else \plusone \fi \global\eqaligncolumn\plusone \preparemathmatrix } % uses scratchcounter \def\buildmathmatrix % beware: etex only {\scratchtoks\emptytoks \expanded{\scratchtoks{\the\scratchtoks\the\!!toksa}}% \dorecurse{\numexpr\!!counta-\plusone\relax} {\expanded{\scratchtoks{\the\scratchtoks\the\!!toksb}}}% \expanded{\scratchtoks{\the\scratchtoks\the\!!toksc }}} \protect \startmathcollection [extra] \definemathsymbol [oiint] [op] [mc] [08] [mc] [09] \definemathsymbol [oiiint] [op] [mc] [29] [mc] [2a] \definemathsymbol [ointctrclockwise][op] [mc] [0A] [mc] [0B] \definemathsymbol [ointclockwise] [op] [mc] [0C] [mc] [0D] \definemathsymbol [varointctrclockwise] [op] [mc] [2B] [mc] [2C] \definemathsymbol [varointclockwise][op] [mc] [2D] [mc] [2E] \definemathsymbol [iint][op] [mc] [21] [mc] [22] \definemathsymbol [iiint] [op] [mc] [23] [mc] [24] \definemathsymbol [nt] [op] [mc] [25] [mc] [26] \definemathsymbol
Re: [NTG-context] extra math symbols and alignment (WORKS)
Hi Aditya, You don't have to check the font stuff. Everything works (alignment and the fonts) :-) Thanks for your all help. Wim Hi Wim, Quoting WN [EMAIL PROTECTED]: I tried the new code you send me, and of course I did a quick test. But when doing a texmfstart texexec --autopdf --pdf testalignfontnew.tex texexec hangs ''forever'' while trying to process the \section{} command. Actually its pdftex trying to do something. To make sure I did not make a edit mistake, I copied my old test code into the file testalignfontnew.tex and run a diff to see where the difference with the new code are. Looking at the code (and I am not a Tex expert, and forgive me, when I ask a dumb question) I don't see where the \scratchcounter itself is defined ? Must surely be a global Context counter ? Yes. \scratchcounter is defined in syst-gen (IIRC). So are a bunch of other temporary variables. Attached the new test code. Hope it helps the debugging process and thanks for all your help sofar. I can not really check the font stuff, since I do not have txfonts and rsfs on this machine. But the matrix alignment appears to be working fine. I am attaching the test for just the matrix alignment. When I get home, I will try to see what goes wrong when you add other fonts. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] extra math symbols and alignment
Hi Aditya Basically I want to include the RSFS font and some user defined symbols from txexa as explained in my previous email. I did some testing with the test code which I send and found the cause of the problem, however no solution yet. The cause of the problem lies in the line where I say \definetypeface[MyFace] [mm] [math] [modern] *[modern] *[encoding=ec] This will enable the user defined symbols and all the math symbols as shown via \showmathcharacters are correct. However all the matrix, mathmatrix environments don't adhere to the aligment I specify except for the first option i.e. when I say \startmatrix[align={right, etc }] everything is aligned to the right but the other aligment options are ignored. When I substitute *[modern]* with *[default] *as in \definetypeface[MyFace] [mm] [math] [modern] *[default] *[encoding=ec] In this instance all the aligment as specified in the matrix, mathmatrix environments work. However some of the math symbols like \Delta are incorrect. And my user defined symbols are also incorrect. Hope you can find a solution. Kind regards Wim ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] extra math symbols and alignment
Hi Aditya I tried your code and performed more tests. My first tests show your fix works. But than I added a \section{} in my test code and I am sorry to say that the math matrix alignment does not work at that point. However the extra math fonts I defined still do work. General observation I thought from the examples like using the RSFS font on the wiki page http://wiki.contextgarden.net/rsfs that using other fonts for math should be easy. Thinking about this specific example I now understand that this example is flawed as some default math characters are also overwritten. Thanks for your help Wim PS Attached my modified test code along with the map file for the RSFS fonts. For the RSFS fonts I am using \definedfont and not using the definebodyfont. Hi Wim, On Tue, 31 Jul 2007, WN wrote: see previous email Phew! This was a hard to find bug. First, to illustrate the bug: \definetypeface[mainface] [rm] [serif] [modern] [default] [encoding=texansi] \definetypeface[mainface] [mm] [math] [modern] [modern] [encoding=texansi] \setupbodyfont[mainface,11pt] \loggingall \starttext \startformula A = \startmatrix[align={left,right}] \NC 11 \NC 2 \NR \NC 2 \NC -5 \NR \stopmatrix \stopformula \stoptext Try with and without the font declarations. With the font declarations, you lost matrix alignment. The reason is that \startmatrix uses \scratchcounter, which gets rewritten when using a font collection other than default. One fix it to replace \scractcounter in matrix constructions by some other counter, for example \!!counta. So, add this to your file (beware of false line breaks in email) \unprotect \def\dostartmathmatrix[#1][#2]% {\begingroup \edef\currentmathmatrix{#1}% \doifassignmentelse{#2}{\setupmathmatrix[#1][#2]}\donothing \null \executeifdefined{\??mx:\mathmatrixparameter\c!location}{\getvalue{\??mx:\v!lohi}}% \mathmatrixleft \mathmatrixbox\bgroup \pushmacro\domatrixNC \let\endmath\relax \def\NC{\domatrixNC}% \def\MC{\domatrixNC\ifmmode\else$\def\endmath{$}\fi}% \global\let\domatrixNC\dodomatrixNC \def\NR{\endmath\global\let\domatrixNC\dodomatrixNC\crcr}% \normalbaselines \mathsurround\zeropoint \everycr\emptytoks \tabskip\zeropoint \eqaligncolumn\zerocount % could be \!!counta \processcommacommand[\mathmatrixparameter\c!align]{\advance\eqaligncolumn\plusone\dosetmatrixcolumn}% \!!counta=\ifnum\eqaligncolumn\!!counta \eqaligncolumn \else \plusone \fi \global\eqaligncolumn\plusone \preparemathmatrix } % uses !!counta \def\buildmathmatrix % beware: etex only {\scratchtoks\emptytoks \expanded{\scratchtoks{\the\scratchtoks\the\!!toksa}}% \dorecurse{\numexpr\!!counta-\plusone\relax} {\expanded{\scratchtoks{\the\scratchtoks\the\!!toksb}}}% \expanded{\scratchtoks{\the\scratchtoks\the\!!toksc }}} \protect Hans, this needs to be changed in core-mat.tex. I do not know if something can be done to avoid such errors in future. Wim, I am attaching a modified version of your file which gives the correct output. (I needed to make some changes since I did not have your map file for rsfs). You loose some symbols from the math collection. I do not know how to add extra math symbol sets without loosing these characters. Look at math-tim.tex to see how more families can be supported. But I would suggest waiting for mkiv, where the limit on font families will be removed and some of this font mess would be cleaner. Aditya \tracetypescriptstrue \unprotect \def\dostartmathmatrix[#1][#2]% {\begingroup \edef\currentmathmatrix{#1}% \doifassignmentelse{#2}{\setupmathmatrix[#1][#2]}\donothing \null \executeifdefined{\??mx:\mathmatrixparameter\c!location}{\getvalue{\??mx:\v!lohi}}% \mathmatrixleft \mathmatrixbox\bgroup \pushmacro\domatrixNC \let\endmath\relax \def\NC{\domatrixNC}% \def\MC{\domatrixNC\ifmmode\else$\def\endmath{$}\fi}% \global\let\domatrixNC\dodomatrixNC \def\NR{\endmath\global\let\domatrixNC\dodomatrixNC\crcr}% \normalbaselines \mathsurround\zeropoint \everycr\emptytoks \tabskip\zeropoint \eqaligncolumn\zerocount % could be \!!counta \processcommacommand[\mathmatrixparameter\c!align]{\advance\eqaligncolumn\plusone\dosetmatrixcolumn}% \!!counta=\ifnum\eqaligncolumn\!!counta \eqaligncolumn \else \plusone \fi \global\eqaligncolumn\plusone \preparemathmatrix } % uses !!counta \def\buildmathmatrix % beware: etex only {\scratchtoks\emptytoks \expanded{\scratchtoks{\the\scratchtoks\the\!!toksa}}% \dorecurse{\numexpr\!!counta-\plusone\relax} {\expanded{\scratchtoks{\the\scratchtoks\the\!!toksb}}}% \expanded{\scratchtoks{\the\scratchtoks\the\!!toksc }}} \protect \startmathcollection [extra] \definemathsymbol [oiint] [op] [mc] [08] [mc] [09] \definemathsymbol [oiiint] [op] [mc] [29] [mc] [2a] \definemathsymbol [ointctrclockwise][op] [mc] [0A] [mc] [0B] \definemathsymbol
[NTG-context] Latest Context version
Hi, I was looking on the Context Wiki and Pragma to check whether the Context version I am using is still up to date. I am using Context version 2007.06.06 09:53. But on Pragma in the download area the main Context distribution has a date/timestamp 2007-04-17 14:03. On the Context Wiki on the Release Notes page it also mentions Context 2007.04.17. How can I have a newer Context version, which apparently does not exist ? Kind regards Wim ___ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Missing \dddot and \ddddot
Hello, I need to use \dddot and \ot in one of my documents, does anyone know how to define these math symbols. Kind regards Wim Neimeijer ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Missing \dddot and \ddddot
Thanks for the quick response, it works. Wim [EMAIL PROTECTED] wrote: On Thu, 14 Sep 2006, WN wrote: Hello, I need to use \dddot and \ot in one of my documents, does anyone know how to define these math symbols. The trouble is that most fonts do not contain these accents. amsmath.sty gets over this definition by faking these symbols. It is easy to port these definitions to context. amsmath.sty definition \newcommand{\dddot}[1]{% {\mathop{#1}\limits^{\vbox [EMAIL PROTECTED]@\ex@ \hbox{\normalfont ...}\vss \newcommand{\ot}[1]{% {\mathop{#1}\limits^{\vbox [EMAIL PROTECTED]@\ex@ \hbox{\normalfont}\vss Converting to context %% \unprotect % The true copy of amsmath definitions \def\amsdddot {\limits^{\vbox to -1.4ex{\kern-2ex\hbox{\the\textfont\z@ ...}\vss}}} \def\amsot{\limits^{\vbox to [EMAIL PROTECTED] % I do not understand why you need to give negative height % This looks better. \def\amsdddot {\limits^{\vbox{\kern-2ex\hbox{\the\textfont\z@ ...}\vss}}} [EMAIL PROTECTED] \def\dddot #1{{\mathop{#1}\amsdddot }} \def\ot#1{{\mathop{#1}\amsot}} \protect \starttext $\dddot{a}_{\dddot{b}}$ $\ot{a}_{\ot{b}}$ \stoptext %%- Aditya ___ 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] Problem with Context ver: 2006.09.11 14:37 MK II fmt: 2006.9.12 int: english/english
When I compile my documents with the new version of Context (beta) I get the following error (see below) with some of my metapost code which uses \sometxt. Does anybody knows how to fix this ? Thanks Wim texmfstart texexec --autopdf --pdf cart.tex TeXExec | processing document 'cart.tex' TeXExec | no ctx file found TeXExec | tex processing method: context TeXExec | TeX run 1 TeXExec | writing option file cart.top TeXExec | using randomseed 1247 TeXExec | tex engine: pdfetex TeXExec | tex format: cont-en TeXExec | progname: context This is pdfeTeX, Version 3.141592-1.30.3-2.2 (Web2c 7.5.5) \write18 enabled. (f:\context\usr\local\context\tex\texmf-local/web2c/natural.tcx) entering extended mode (./cart.tex ConTeXt ver: 2006.09.11 14:37 MK II fmt: 2006.9.12 int: english/english ... color : currentcolor (def) is not defined savetxt(1,64.06398pt,7.43599pt,0.15399pt) shifted (0,-0.15399pt); ! TeX capacity exceeded, sorry [input stack size=1]. [EMAIL PROTECTED]@cart-mpgraph -[EMAIL PROTECTED]@cart-mpgraph ,1 [EMAIL PROTECTED]@cart-mpgraph -[EMAIL PROTECTED]@cart-mpgraph ,1 [EMAIL PROTECTED]@cart-mpgraph -[EMAIL PROTECTED]@cart-mpgraph ,1 [EMAIL PROTECTED]@cart-mpgraph -[EMAIL PROTECTED]@cart-mpgraph ,1 [EMAIL PROTECTED]@cart-mpgraph -[EMAIL PROTECTED]@cart-mpgraph ,1 [EMAIL PROTECTED]@cart-mpgraph -[EMAIL PROTECTED]@cart-mpgraph ,1 ... ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Problem with Context ver: 2006.09.11 14:37 MK II fmt: 2006.9.12 int: english/english
Hans, Here is the minimal test file with the log, a bit strange that the exit code is 0 Btw when I use only 1 \sometxt instead of the 2, the document compiles without errors and Context says it produced 1 page which it did, but the page does not contain any graphics. Another important thing, how can I make sure, when I update or download Context , it's a stable version instead of a beta ? Looking at the entries on the mailinglist related to the ''beta'' release, I wonder if I have to use version control instead so I can always revert back to the release which worked. Or will the version control be built into the Context system instead, just wondering ? Wim \starttext Minimal testfile \startMPcode numeric u; picture pic; u := 1cm; pic := \sometxt{versnelde klok}; pic := pic shifted (2u,2u); draw pic; pic := \sometxt{rechtlijnig bewegende klok}; pic := pic shifted (2u,3u); draw pic; \stopMPcode \stoptext texmfstart texexec --autopdf --pdf testmp.tex TeXExec | processing document 'testmp.tex' TeXExec | no ctx file found TeXExec | tex processing method: context TeXExec | TeX run 1 TeXExec | writing option file testmp.top TeXExec | using randomseed 753 TeXExec | tex engine: pdfetex TeXExec | tex format: cont-en TeXExec | progname: context This is pdfeTeX, Version 3.141592-1.30.3-2.2 (Web2c 7.5.5) \write18 enabled. (f:\context\usr\local\context\tex\texmf-local/web2c/natural.tcx) entering extended mode (./testmp.tex ConTeXt ver: 2006.09.11 14:37 MK II fmt: 2006.9.12 int: english/english language: language en is active protectionstate 0 system : cont-new loaded (f:\context\usr\local\context\tex\texmf-local/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex color : palette rollover is available ) system : cont-old loaded (f:\context\usr\local\context\tex\texmf-local/tex/context/base/cont-old.tex loading : Context Old Macros ) system : cont-fil loaded (f:\context\usr\local\context\tex\texmf-local/tex/context/base/cont-fil.tex loading : Context File Synonyms ) system : cont-sys loaded (f:\context\usr\local\context\tex\texmf-local/tex/context/user/cont-sys.tex) bodyfont: 12pt rm is loaded language: patterns nl-texnansi:texnansi-1-2:3 nl-ec:ec-2-2:3 fr- texnansi:texnansi-3-2:3 fr-ec:ec-4-2:3 de-texnansi:texnansi-5-2:3 de-e c:ec-6-2:3 it-texnansi:texnansi-7-2:3 it-ec:ec-8-2:3 pt-texnansi:texna nsi-9-2:3 pt-ec:ec-10-2:3 hr-ec:ec-11-2:3 pl-pl0:pl0-12-2:3 pl-ec:e c-13-2:3 pl-qx:qx-14-2:3 cz-il2:il2-15-2:3 cz-ec:ec-16-2:3 sk-il2:i l2-17-2:3 sk-ec:ec-18-2:3 sl-ec:ec-19-2:3 ru-t2a:t2a-21-2:3 en-ec:e c-22-2:3 uk-ec:ec-23-2:3 us-ec:ec-24-2:3 agr-agr:agr-25-2:3 da-ec:e c-26-2:3 sv-ec:ec-27-2:3 af-ec:ec-28-2:3 no-ec:ec-29-2:3 deo-ec:ec- 30-2:3 es-ec:ec-31-2:3 ca-ec:ec-32-2:3 la-ec:ec-33-2:3 ro-ec:ec-34 -2:3 tr-ec:ec-35-2:3 fi-ec:ec-37-2:3 hu-ec:ec-38-2:3 loaded specials: tex,postscript,rokicki loaded system : testmp.top loaded (./testmp.top specials: loading definition file tpd (f:\context\usr\local\context\tex\texmf-local/tex/context/base/spec-tpd.tex specials: loading definition file fdf (f:\context\usr\local\context\tex\texmf-local/tex/context/base/spec-fdf.tex) specials: fdf loaded ) specials: fdf,tpd loaded ) systems : system commands are enabled (./testmp.tuo) (./testmp.tuo) (./testmp.tuo) (./testmp.tuo) (./testmp.tuo) (./testmp.tuo) (./testmp.tuo) (./testmp.tuo) (./testmp.tuo) (./testmp.tuo) (f:\context\usr\local\context\tex\texmf-local/tex/context/base/sort-def.tex) (f:\context\usr\local\context\tex\texmf-local/tex/context/base/sort-lan.tex) (./testmp.tuo) (./testmp.tuo) systems : begin file testmp at line 1 color : currentcolor (def) is not defined savetxt(1,72.52364pt,8.26648pt,0.0pt) shifted (0,-0.0pt); savetxt(2,135.12482pt,8.26648pt,2.1pt) shifted (0,-2.1pt); ! TeX capacity exceeded, sorry [input stack size=1]. [EMAIL PROTECTED]@testmp-mpgraph -[EMAIL PROTECTED]@testmp-mpgraph ,1 [EMAIL PROTECTED]@testmp-mpgraph -[EMAIL PROTECTED]@testmp-mpgraph ,1 [EMAIL PROTECTED]@testmp-mpgraph -[EMAIL PROTECTED]@testmp-mpgraph ,1 [EMAIL PROTECTED]@testmp-mpgraph -[EMAIL PROTECTED]@testmp-mpgraph ,1 [EMAIL PROTECTED]@testmp-mpgraph -[EMAIL PROTECTED]@testmp-mpgraph ,1 [EMAIL PROTECTED]@testmp-mpgraph -[EMAIL PROTECTED]@testmp-mpgraph ,1 ... l.16 \stopMPcode No pages of output. Transcript written on testmp.log. TeXExec | runtime: 1.912 Exit code: 0 [EMAIL PROTECTED] wrote: WN wrote: When I compile my documents with the new version of Context (beta) I get
[NTG-context] XML filtering
Hello, I have a couple of XML's generated by a freeware program which I want to process with Context. I started experimenting and things look good, however I want to skip/filter out some of the xml tags like computeraudit Some Text /computeraudit and disclaimer Some Text /disclaimer so they don't show in the resulting PDF. The Tex and XML files are listed below. \usemodule[contml] \defineXMLargument [category] {\chapter{ \XMLpar{category}{title}{} }} \defineXMLargument [subcategory] {\section{ \XMLpar{subcategory}{title}{} }} \defineXMLenvironment [list] \startitemize \stopitemize \defineXMLenvironment [item] \item \par \defineXMLenvironment [recordset] \bTABLE \eTABLE \defineXMLpickup [datarow] \bTR \eTR \defineXMLpickup [fieldvalue] \bTD \eTD \starttext \processXMLfilegrouped{Bios.xml} \stoptext ?xml == File Bios.xml === ?xml version="1.0" encoding="utf-8" standalone="yes"? ?xml-stylesheet type="text/xsl" href=""? computeraudit titleComputer Audit :: 03-Sep-2006 18:25:08/title category title="BIOS Version" subcategory title="" recordset title="" fieldnameItem/fieldname fieldnameValue/fieldname datarow fieldvalueSystem Version/fieldvalue fieldvalueASUS - 30303031 Award Medallion BIOS v6.0 Award Plug and Play BIOS Extension v1.0A Award Modular BIOS v6.0/fieldvalue /datarow datarow fieldvalueSystem Date/fieldvalue fieldvalue08/20/02/fieldvalue /datarow datarow fieldvalueVideo Version/fieldvalue fieldvalueASUS AGP-V7700 VGA BIOS Version 2.15.01.14 ASUS AGP-V7700 VGA BIOS Version 2.15.01.14 ASUS AGP-V7700 VGA BIOS Version 2.15.01.14/fieldvalue /datarow datarow fieldvalueVideo Date/fieldvalue fieldvalue08/17/00/fieldvalue /datarow /recordset /subcategory /category disclaimerNames mentioned herein maybe trademarks or service marks of their respective holders. Errors and Omissions Excepted. /disclaimer /computeraudit ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] XML filtering
[EMAIL PROTECTED] wrote: WN wrote: Another question, still learning, I am struggling with the following. In the XML there is a tag recordset indicating a set of records which I map to table entries. After this tag a couple of tags labelled fieldname should be translated to table header entries followed by datarow which I map to a table row (\bTR \eTR) but the tag fieldname is not grouped in a datarow tag. How can I translate the fieldname tags so they will be interpreted as entries in the table header ? Wim example XML category title="BIOS Version" subcategory title="" recordset title="" fieldnameItem/fieldname fieldnameValue/fieldname datarow fieldvalueSystem Version/fieldvalue fieldvalueASUS - 30303031 Award Medallion BIOS v6.0 Award Plug and Play BIOS Extension v1.0A Award Modular BIOS v6.0/fieldvalue /recordset /subcategory /category Hello, I have a couple of XML's generated by a freeware program which I want to process with Context. I started experimenting and things look good, however I want to skip/filter out some of the xml tags like *computeraudit Some Text /computeraudit* and *disclaimer Some Text /disclaimer* so they don't show in the resulting PDF. \defineXMLignore[*computeraudit]* - 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] Strange math error (bug ??)
Hello, The following is quit strange, in the first formula the [{Q}, {R} ] on the left hand side of the \rightarrow is not processed but on the right hand side of the \rightarrow it is processed (?) \starttext The left side with $[Q,R]$ does not show, but the right side with $[Q,R]$ does show, what is happening here ??? \startformula [ {Q} , {R} ] \rightarrow \frac{1}{i \hslash} [ {Q} , {R} ] \stopformula \stoptext Kind regards Wim ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Strange math error (bug ??)
[EMAIL PROTECTED] wrote: On Fri, 25 Aug 2006, WN wrote: Hello, The following is quit strange, in the first formula the [{Q}, {R} ] on the left hand side of the \rightarrow is not processed but on the right hand side of the \rightarrow it is processed (?) \starttext The left side with $[Q,R]$ does not show, but the right side with $[Q,R]$ does show, what is happening here ??? \startformula \relax [ {Q} , {R} ] \rightarrow \frac{1}{i \hslash} [ {Q} , {R} ] \stopformula \stoptext Should have seen this coming. Thanks. \startformula, like most commands in context, accepts an optional argument, so [...] immediately after \startformula is gobbled. Just add a \relax after \startformula and you should be fine. Aditya ___ 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] Empty last page, broken markings ??
[EMAIL PROTECTED] wrote: Hi, WN wrote: Hello, The last page in my documents is always empty. The document is setup as singlesided via Always, always (as in: it generates an empty page even if that results in an uneven number of pages)? Correct, always an empty page. I have documents which have an uneven number of pages, and even number of pages. Or does it fill out to an even number of generated pages? Or does it always create an odd number of pages (I've heard that happen with some conflicting settings between the use of sectionblocks and \setuppagenumbering)? I used the sectionblock option as described on http://wiki.contextgarden.net/Empty_page_at_the_end just 2 days ago to eliminate the empty page at the end of the document, which it does. I did not use the sectionblock construct before. Since then the markings as explained in my original email don't work for the last couple of pages. I use a couple of environment files which all define several things, title page, Table of contents, Table of Figures, page layout, page numbering, headers/footers etc. I could attach all of them, but I think the above settings are the one's that matter. I am not sure how to proceed to provide the correct but minimal information. I tried to put everything in a test file, but I was not successful. What is the overall structure of your document? The setups look ok, so it is more likely something relating to your use (or not..) of section blocks. For example, it could be that your headings do not work inside appendices or backmatter? I don't use appendices or a backmatter (yet), the overall structure of all my documents look like this \startproject chn \mainlanguage[nl] \enablemode[withsections,font-normal] \input ../global \startbodymatter \input chn-chapter1 \input chn-chapter2 \input chn-chapter3 \input chn-chapter4 \input chn-chapter5 \input chn-chapter6 \input chn-chapter7 \stopbodymatter \stopproject chn I tried to attach the last three pages of my document, which demostrates the problem but I exceeded the 40 KB. Is there another way of uploading documents which are more than 40 KB in size ? Putting them on the wiki temporarily is an option. I will try to do that Thanks so far Wim Good luck, Taco ___ 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] Empty last page, broken markings ??
Hello, The last page in my documents is always empty. The document is setup as singlesided via \setuppagenumbering[location=,alternative=singlesided,way=bytext,partnumber=no] On http://wiki.contextgarden.net/Empty_page_at_the_end a workaround is given, by using \setupsectionblock[frontpart][page=no] \setupsectionblock[bodypart][page=no] \setupsectionblock[appendix][page=no] \setupsectionblock[backpart][page=no] In my environment I only use : \setupsectionblock[bodypart][page=no] This eliminates the empty page at the end of my document, however the chapter and section markers in the page headers/footers for the last couple of pages are not working anymore. I use the following setup % reset footer texts \setupfootertexts[] % % First page of chapter has a footer, no header % \definetext[chapterfooter][footer][{{\blue\pagenumber} \hfill Hoofdstuk \getmarking[chapternumber]} ] \setuphead[chapter][footer=chapterfooter,header=empty] % % All other pages have a header, no footer % \setupheadertexts[\setups{texta}][][][\setups{textb}] \startsetups[texta] \inframed[frame=off,framecolor=black,rulethickness=0.8pt,bottomframe=on,width=\textwidth]{ {\blue\pagenumber} \hfill \getmarking[chapter] \hfill Hoofdstuk \getmarking[chapternumber]} \stopsetups \startsetups[textb] \inframed[frame=off,framecolor=black,rulethickness=0.8pt,bottomframe=on,width=\textwidth]{ {\blue\getmarking[sectionnumber]} \hfill \getmarking[section] \hfill {\blue\pagenumber}} \stopsetups I use a couple of environment files which all define several things, title page, Table of contents, Table of Figures, page layout, page numbering, headers/footers etc. I could attach all of them, but I think the above settings are the one's that matter. I am not sure how to proceed to provide the correct but minimal information. I tried to put everything in a test file, but I was not successful. I tried to attach the last three pages of my document, which demostrates the problem but I exceeded the 40 KB. Is there another way of uploading documents which are more than 40 KB in size ? Any help is appreciated Kind regards Wim Neimeijer ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Updated My Way on math alignment
[EMAIL PROTECTED] wrote: Hi Wim, On Fri, 4 Aug 2006, WN wrote: I have a question about \startcases .. \stopcases. I am trying to adjust the distance of the cases and the right brace, the left brace is empty, see example below. Is this possible ? It is. You can do it in different ways, depending on what you like. % Example \starttext \startformula *\startcases[left={\left.},right={\right\}}]* \NC (\lambda + \mu ) \cdot a = \lambda \cdot a + \mu \cdot a \NC \NR \NC \lambda ( a + b ) = \lambda \cdot a + \lambda \cdot b \NC \NR \stopcases \text{(distributieve eigenschappen)} \stopformula \stoptext \starttext The original one. \startformula \startcases[left={\left.},right={\right\}}] \NC (\lambda + \mu ) \cdot a = \lambda \cdot a + \mu \cdot a \NC \NR \NC \lambda ( a + b ) = \lambda \cdot a + \lambda \cdot b \NC \NR \stopcases \text{(distributieve eigenschappen)} \stopformula You can reduce the \quotation{width} of the cases, \startformula \startcases[left={\left.},right={\right\}},numberdistance=0pt] \NC (\lambda + \mu ) \cdot a = \lambda \cdot a + \mu \cdot a \NC \NR \NC \lambda ( a + b ) = \lambda \cdot a + \lambda \cdot b \NC \NR \stopcases \text{(distributieve eigenschappen)} \stopformula or use a matrix (only one column) \startformula \startmatrix[left={\left.},right={\right\}}] \NC (\lambda + \mu ) \cdot a = \lambda \cdot a + \mu \cdot a \NR \NC \lambda ( a + b ) = \lambda \cdot a + \lambda \cdot b\NR \stopmatrix \text{(distributieve eigenschappen)} \stopformula maybe a right aligned one \startformula \startmatrix[left={\left.},right={\right\}},align=right] \NC (\lambda + \mu ) \cdot a = \lambda \cdot a + \mu \cdot a \NR \NC \lambda ( a + b ) = \lambda \cdot a + \lambda \cdot b\NR \stopmatrix \text{(distributieve eigenschappen)} \stopformula and this is how I would do it \definemathmatrix[aligned][n=2,align={right,left},distance=0pt] \startformula \startaligned[left={\left.},right={\right\}}] \NC (\lambda + \mu ) \cdot a \NC{} = \lambda \cdot a + \mu \cdot a \NR \NC \lambda ( a + b ) \NC {}= \lambda \cdot a + \lambda \cdot b \NR \stopaligned \text{(distributieve eigenschappen)} \stopformula Aditya ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context I did not know the numberdistance existed, I would think it specifies the distance between the columns and the number of the equation. Anyways your solutions work like a charm. Many thanks for your help. Wim ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Updated My Way on math alignment
[EMAIL PROTECTED] wrote: Hi, I have updated myway on using alignment. It now also explains features of matrix (similar to array of latex), cases, substack and intertext. Most of the discussion on mathalignment (similar to align and gather environments of latex) is the same as before. http://dl.contextgarden.net/myway/mathalign.pdf source http://dl.contextgarden.net/myway/mathalign.tex Taco, I am also describing how to use style=... feature of matrix that you sent a while back, hoping that it will make to the core :-) Aditya ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context I have a question about \startcases .. \stopcases. I am trying to adjust the distance of the cases and the right brace, the left brace is empty, see example below. Is this possible ? Kind regards Wim % Example \starttext \startformula *\startcases[left={\left.},right={\right\}}]* \NC (\lambda + \mu ) \cdot a = \lambda \cdot a + \mu \cdot a \NC \NR \NC \lambda ( a + b ) = \lambda \cdot a + \lambda \cdot b \NC \NR \stopcases \text{(distributieve eigenschappen)} \stopformula \stoptext ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Context alternative for Latex's \overset \underset
Hi, In doing my Latex to Context conversion, I stumbled on two Latex math commands : \overset and \underset as in \mathcal{T} = \overset{\infty}{ \underset{r,s = 0}{\cup} } \: \mathcal{T}^{r}_s The page http://wiki.contextgarden.net/Math_with_amsl mentions the commands stackrel and underset when using the AMSL module from Giuseppe Bilotta. I tried to load the AMSL module with \usemodule[amsl] like to test its workings. \usemodule[amsl] \starttext \startformula T = { \underset{r,s = 0}{\cup} } \: T^{r}_{s} \stopformula \stoptext but the log file indicates it cannot find the module amsl ??? Is the AMSL module not part of the standard Context distribution ? I thought it was. I am using ConTeXt ver: 2006.07.24 10:49 fmt: 2006.7.27 int: english mes: english. Kind regards Wim Neimeijer ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Metapost/Metafun/Tex/Context question
Hi all, I am trying to do the following in Metapost but my new math symbol is not recognized. Context knows about it but Tex does not. How can I make this work ? Kind regards Wim Neimeijer % = Test code \loadmapfile[original-youngryu-tx.map] \definebodyfont [28pt,24pt,18pt, 17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] [mm] [ mc=txexa sa 1] \setupbodyfont [11pt] \definemathsymbol [varointctrclockwise] [op] [mc] [2B] [mc] [2C] \starttext \startformula \varointctrclockwise_{\gamma} f(z) \: dz = 0 \stopformula \startMPcode picture p ; path q; numeric u; u := 1cm; p := btex $\varointctrclockwise_{\gamma} f(z) \: dz = 0$ etex; p := p scaled 0.15cm; draw p; \stopMPcode \stoptext === Log file == texmfstart texexec --autopdf --pdf testvaroint.tex TeXExec | processing document 'testvaroint.tex' TeXExec | no ctx file found TeXExec | tex processing method: context TeXExec | TeX run 1 TeXExec | writing option file testvaroint.top TeXExec | using randomseed 1260 TeXExec | tex engine: pdfetex TeXExec | tex format: cont-en TeXExec | progname: context This is pdfeTeX, Version 3.141592-1.30.3-2.2 (Web2c 7.5.5) \write18 enabled. (f:\context\usr\local\context\tex\texmf-local/web2c/natural.tcx) entering extended mode (./testvaroint.tex ConTeXt ver: 2006.07.14 12:08 fmt: 2006.7.14 int: english mes: english language: language en is active protectionstate 0 system : cont-new loaded (f:\context\usr\local\context\tex\texmf-local/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex color : palette rollover is available ) system : cont-old loaded (f:\context\usr\local\context\tex\texmf-local/tex/context/base/cont-old.tex loading : Context Old Macros ) system : cont-fil loaded (f:\context\usr\local\context\tex\texmf-local/tex/context/base/cont-fil.tex loading : Context File Synonyms ) system : cont-sys loaded (f:\context\usr\local\context\tex\texmf-local/tex/context/user/cont-sys.tex) bodyfont: 12pt rm is loaded language: patterns nl-texnansi:texnansi-1-2:3 nl-ec:ec-2-2:3 fr- texnansi:texnansi-3-2:3 fr-ec:ec-4-2:3 de-texnansi:texnansi-5-2:3 de-e c:ec-6-2:3 it-texnansi:texnansi-7-2:3 it-ec:ec-8-2:3 pt-texnansi:texna nsi-9-2:3 pt-ec:ec-10-2:3 hr-ec:ec-11-2:3 pl-pl0:pl0-12-2:3 pl-ec:e c-13-2:3 pl-qx:qx-14-2:3 cz-il2:il2-15-2:3 cz-ec:ec-16-2:3 sk-il2:i l2-17-2:3 sk-ec:ec-18-2:3 sl-ec:ec-19-2:3 en-ec:ec-21-2:3 uk-ec:ec- 22-2:3 us-ec:ec-23-2:3 agr-agr:agr-24-2:3 da-ec:ec-25-2:3 sv-ec:ec- 26-2:3 af-ec:ec-27-2:3 no-ec:ec-28-2:3 deo-ec:ec-29-2:3 es-ec:ec-3 0-2:3 ca-ec:ec-31-2:3 la-ec:ec-32-2:3 ro-ec:ec-33-2:3 tr-ec:ec-34- 2:3 fi-ec:ec-36-2:3 hu-ec:ec-37-2:3 loaded specials: tex,postscript,rokicki loaded system : testvaroint.top loaded (./testvaroint.top specials: loading definition file tpd (f:\context\usr\local\context\tex\texmf-local/tex/context/base/spec-tpd.tex specials: loading definition file fdf (f:\context\usr\local\context\tex\texmf-local/tex/context/base/spec-fdf.tex) specials: fdf loaded ) specials: fdf,tpd loaded ) systems : system commands are enabled (f:\context\usr\local\context\tex\texmf-local/tex/context/base/pdfr-ec.tex) (./testvaroint.tuo) (./testvaroint.tuo) (./testvaroint.tuo) (./testvaroint.tuo) (./testvaroint.tuo) (./testvaroint.tuo) (./testvaroint.tuo) (./testvaroint.tuo) (./testvaroint.tuo) (./testvaroint.tuo) (f:\context\usr\local\context\tex\texmf-local/tex/context/base/sort-def.tex) (f:\context\usr\local\context\tex\texmf-local/tex/context/base/sort-lan.tex) (./testvaroint.tuo) (./testvaroint.tuo)TeXExec | processing graphic 'testvaroint-mpgraph' TeXExec | using internal mptotex converter TeXExec | processing document 'testvaroint-mpgraph-temp.tex' TeXExec | no ctx file found TeXExec | tex processing method: context TeXExec | writing option file testvaroint-mpgraph-temp.top TeXExec | using randomseed 447 TeXExec | tex engine: pdfetex TeXExec | tex format: cont-en TeXExec | progname: context This is pdfeTeX, Version 3.141592-1.30.3-2.2 (Web2c 7.5.5) \write18 enabled. (f:\context\usr\local\context\tex\texmf-local/web2c/natural.tcx) entering extended mode (./testvaroint-mpgraph-temp.tex ConTeXt ver: 2006.07.14 12:08 fmt: 2006.7.14 int: english mes: english language: language en is active protectionstate 0 system : cont-new loaded (f:\context\usr\local\context\tex\texmf-local/tex/context/base/cont-new.tex systems : beware: some patches loaded from cont-new.tex color : palette rollover is available ) system : cont-old loaded (f:\context\usr\local\context\tex\texmf-local/tex/context/base/cont-old.tex loading : Context Old Macros ) system : cont-fil loaded
Re: [NTG-context] Metapost/Metafun/Tex/Context question
[EMAIL PROTECTED] wrote: Hans Hagen wrote: make sure that mp knows about the definitions: - first extend the math collection (use decimen, since there is a linesplit bug with " here) - then load the times font Math family mc has to be txexa or something similar before the code actually shows the integral instead of a plus sign, but Wim can figure that out himself, no doubt :-) - somehow display and inline math render differently; something for taco That is normal. One is with an operator with \limits, one without. Taco ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context For those interested, this is what I did. Taco is right in saying you have to load the txexa font first. The code works for me, but I am not sure it is the proper Context way of doing things. Kind regards Wim Neimeijer % === some extra math symbols I need = \startenvironment layout04 \unprotect % % extra math symbols % \usetypescript[modern] \usetypescript[times] \definetypeface[MyFace][rm][serif][times][default][encoding=ec] \definetypeface[MyFace][mm][math][modern][default][encoding=ec] \setupbodyfont[MyFace,10pt] \loadmapfile[original-youngryu-tx.map] \definebodyfont [28pt,24pt,18pt, 17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] [mm] [ mc=txexa sa 1] \setupbodyfont [11pt] %%% % txfonts %%% \definemathsymbol [oiint] [op] [mc] ["08] [mc] ["09] \definemathsymbol [oiiint] [op] [mc] ["29] [mc] ["2a] \definemathsymbol [ointctrclockwise] [op] [mc] ["0A] [mc] ["0B] \definemathsymbol [ointclockwise] [op] [mc] ["0C] [mc] ["0D] \definemathsymbol [varointctrclockwise] [op] [mc] ["2B] [mc] ["2C] \definemathsymbol [varointclockwise] [op] [mc] ["2D] [mc] ["2E] \definemathsymbol [iint] [op] [mc] ["21] [mc] ["22] \definemathsymbol [iiint] [op] [mc] ["23] [mc] ["24] \definemathsymbol [nt] [op] [mc] ["25] [mc] ["26] \definemathsymbol [idotsint] [op] [mc] ["27] [mc] ["28] \definemathsymbol [oiintctrclockwise] [op] [mc] ["40] [mc] ["41] \definemathsymbol [oiintclockwise] [op] [mc] ["48] [mc] ["49] \definemathsymbol [varoiintctrclockwise][op] [mc] ["4A] [mc] ["4B] \definemathsymbol [varoiintclockwise] [op] [mc] ["42] [mc] ["43] \definemathsymbol [oiiintctrclockwise] [op] [mc] ["44] [mc] ["45] \definemathsymbol [oiiintclockwise] [op] [mc] ["4C] [mc] ["4D] \definemathsymbol [varoiiintctrclockwise][op] [mc] ["4E] [mc] ["4F] \definemathsymbol [varoiiintclockwise] [op] [mc] ["46] [mc] ["47] \protect \stopenvironment ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Metapost/Metafun/Tex/Context question
[EMAIL PROTECTED] wrote: On Wed, 19 Jul 2006, WN wrote: Hi all, I am trying to do the following in Metapost but my new math symbol is not recognized. Context knows about it but Tex does not. How can I make this work ? Hans and Taco have already explained the correct way to do this, so I will not go into that. This is one place where you can use the new sometxt feature. % = Test code \loadmapfile[original-youngryu-tx.map] \definebodyfont [28pt,24pt,18pt, 17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] [mm] [ mc=txexa sa 1] \setupbodyfont [11pt] \definemathsymbol [varointctrclockwise] [op] [mc] [2B] [mc] [2C] \starttext \startformula \varointctrclockwise_{\gamma} f(z) \: dz = 0 \stopformula \startMPcode picture p ; path q; numeric u; u := 1cm; p := btex $\varointctrclockwise_{\gamma} f(z) \: dz = 0$ etex; Replace this by p := \sometxt{$\varointctrclockwise_{\gamma} f(z) \: dz = 0$} ; and everything works! I was wondering about the \sometxt feature, I did not know exactly how to use it, but will certainly do some experiments. Thanks Wim. p := p scaled 0.15cm; draw p; \stopMPcode \stoptext Aditya ___ 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] Mixing fonts ?
I am trying to learn more about font switching (read the font manuals but to no avail). The thing I am trying to do is : * For normal text I want to use the Times-Roman font * For math's I want to use a different font, i.e. Computer Modern I think I have to work with typescripts and use combinations of \setupbodyfont but I cannot work out the proper combination. Thanks for any help Regards Wim ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Table of contents and List of figures
[EMAIL PROTECTED] wrote: On Sun, 30 Apr 2006 19:13:34 +0200, WN [EMAIL PROTECTED] wrote: Question 1) : In my document I am using \setupcombinedlist[content][alternative=c,aligntitle=no,width=4em] and now I want to use the same layout for the list of figures but there is not something equivalent like \setupcombinedlist[figure][alternative=c,aligntitle=no,width=4em] The TOC is a combination of several lists (chapter, section, etc.), but a LOF is a single list. Try: \setuplist[figure][alternative=c,aligntitle=no,width=4em] or: \placelist[figure][alternative=c,aligntitle=no,width=4em] Question 2): In my document I am also using \part and in the TOC the part number prefixes the pagenumber like I want to get rid of the partnumbers which are prefixed to the pagenumbers so my TOC looks like Deel I Klassieke Elektrodynamica . . . . . . . . . . . . . . . . . . 1 Try this: \completecontent[partnumber=no] Regards, BG ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context Both your solutions work, great !! Thanks BTW One question, as I am still learning Context (simple user), but where did you find these options for \completecontent ? I could not find it in the manuals, Wiki and this mailing list. Kind regards Wim ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] defineenumeration and setupenumeration
Hi, I have a question (probably a dumb question) relating to some of the define/setup commands. One in particular, but it may relate to the other define/setup commands as well. Looking at the defineenumeration and setupenumerations command in the Context manual page 223 and page 224 an example is given how to use these commands. I am a bit confused, the example setups the enumaration remark and specifies the location=top \defineenumeration [remark] [location=top, text=Remark, between=\blank, before=\blank, after=\blank] But on page 224 the command \setupenumerations is shown where one can also specify the location among others. What is the difference, reason or usage for doing this ? What is the proper Context way, should I define the location with \defineenumeration or with \setupenumerations ? Kind regards Wim ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Table of contents and List of figures
Question 1) : In my document I am using \setupcombinedlist[content][alternative=c,aligntitle=no,width=4em] and now I want to use the same layout for the list of figures but there is not something equivalent like \setupcombinedlist[figure][alternative=c,aligntitle=no,width=4em] Question 2): In my document I am also using \part and in the TOC the part number prefixes the pagenumber like Deel I Klassieke Elektrodynamica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–1 1 De Maxwell vergelijkingen in vacuüm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–3 1.1 Inleiding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–10 1.2 Behoud van lading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1–20 1.3 Energie en impuls van het elektromagnetische veld . . . . . . . . . . . . . . . . . . . 1–35 I want to get rid of the partnumbers which are prefixed to the pagenumbers so my TOC looks like Deel I Klassieke Elektrodynamica . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 De Maxwell vergelijkingen in vacuüm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Inleiding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.2 Behoud van lading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 1.3 Energie en impuls van het elektromagnetische veld . . . . . . . . . . . . . . . . . . . 35 How can one achieve this in Context ? Kind regards Wim ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Miktex, Metapost and \loadfontfilesoncetrue
Apologies for not replying to earlier emails. To be honest it is sometimes difficult to keep track of the threads and especially to whom the emails are directed. I was/am busy in doing a lot of the Latex - Context conversions with a small perl script and this consumes a lot of my time. Perhaps I should make this perl script public, as more people are making the switch to Context, however my perl programming skills are not that good, just a beginner. If someone is interested, just write an email and I will send you a copy. I will certainly try to follow and implement your suggetions and I will try to give you feedback. Thanks for your time/help Kind regards Wim [EMAIL PROTECTED] wrote: On 3/28/06, WN wrote: Hi, I am using Miktex (latest updated version) and the latest Context on WindowsXP (write18 enabled). This is what happens : 1) First run of texexec gives me ! Undefined control sequence l 1 \global \loadfontfileoncetrue On 3/31/06, Taco Hoekwater wrote: For the original problem, I guess Mojca is closest to the actual problem. She herself has a continuing fight with btex/etex and textext(). If you can, you should try to post a 'recipe': make a minimal example in a clean directory, post that here along with what commands to run, and all of the results (logs, temp files) you get. The perl script (texexec.pl) has some difficulties (sometimes the problem with wrong format loding appears and sometimes not), but since the ruby script is supposed to replace it anyway it doesn't really make sense to lose time fixing old stuff. Hans has just fixed the behaviour of newtexexec.rb, so I would suggest you to do the following: 1. create a file texexec.bat with the following content: texmfstart newtexexec.rb %* and place that file to some arbitrary folder in PATH (but has to be in front of MikTeX in PATH). So that after you type texexec, texmfstart newtexexec.rb will be executed. You might have to download texmfstart if you don't have it yet (cont-win.zip from pragma website, simply drop it into MikTeX bin folder for example). You may also try to politely ask the maintainer of MikTeX to include the texmfstart.exe into MikTeX by default (the more users ask for it, the more likely will be that he'll do that). 2. wait until Hans uploads the new beta extract the content from cont-tfm.zip into the MikTeX tree (to the proper place); I guess that it should be enough if you only replace the content of /scripts/ruby/* (Theoretically you can also wait for update in MikTeX, but that would definitely take much longer.) Then cross your fingers and try to compile your file again! 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
[NTG-context] Myway on using mathalign
Hi Aditya, I read you MyWay document on using \startalign and I was interested in section 4.2 numbering subformula's Everything works fine as stated in your nice document. One thing I want to do with a set of subformula's is to reference the main formula but still subnumbering the equations like \starttext \incrementnumber[formula] \placesubformula \startformula \startalign \NC div \vec{E} \NC = \epsilon_{0}^{-1} \rho \NR[eqn1:A][a] \NC rot \vec{E} \NC = 0 \NR \NC div \vec{B} \NC = 0 \NR[eqn1:B][b] \NC rot \vec{B} \NC = \mu_{0} \vec{j} \NR \stopalign \stopformula See \in[eqn1] for the static Maxwell equations, where we are going to examine \in[eqn1:A] a bit further \stoptext Hope you can help Thanks Wim ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Miktex, Metapost and \loadfontfilesoncetrue
Hans Hagen wrote: WN wrote: Hi, I am using Miktex (latest updated version) and the latest Context on WindowsXP (write18 enabled). This is what happens : 1) First run of texexec gives me ! Undefined control sequence l 1 \global \loadfontfileoncetrue probably a mismatch between an old format and new tex files Hans To Hans, No, the formats are all newly generated after the install of cont-tmf.zip. The \loadfontfileoncetrue is used in meta-ini.tex by \def\resetMPenvironment but what why is it needed ? Does it reload fonts as defined in Context (typescripts) when btex/etex is used in Metapost ?? Wim ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Context math bug ??
Hi The following does not compile \starttext \startformula [ {\bf{Q}},{\bf {R}} ] = {\bf{Q} } {\bf {R}} - \textbf{R} \textbf{Q} \stopformula \stopttext Error ! Missing \endcsname inserted ... where as this compiles \starttext $$ [ {\bf{Q}},{\bf {R}} ] = {\bf{Q} } {\bf {R}} - \textbf{R} \textbf{Q} $$ \stoptext Why ?? Kind regards Wim ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Context math bug ??
[EMAIL PROTECTED] wrote: On Thu, 30 Mar 2006, WN wrote: Hi The following does not compile \starttext \startformula [ {\bf{Q}},{\bf {R}} ] = {\bf{Q} } {\bf {R}} - \textbf{R} \textbf{Q} \stopformula \stopttext Error ! Missing \endcsname inserted ... where as this compiles \starttext $$ [ {\bf{Q}},{\bf {R}} ] = {\bf{Q} } {\bf {R}} - \textbf{R} \textbf{Q} $$ \stoptext Why ?? Sorry about that, I was and am busy converting my Latex code into Context and forgot about this definition. I defined \textbf as follows \def\textbf#1{{\bf #1}} BTW Taco already gave the answer. Thanks Taco Thanks Wim How do you define \textbf? Aditya ___ 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] Miktex, Metapost and \loadfontfilesoncetrue
Hi, I am using Miktex (latest updated version) and the latest Context on WindowsXP (write18 enabled). This is what happens : 1) First run of texexec gives me ! Undefined control sequence l 1 \global \loadfontfileoncetrue 2) Second texexec run compiles fine, and the Metapost code is processed and included in the resulting PDF document 3) Third run of texexec same error as in 1) Looking at i.e *mptrace.tmp* file it says mpgraph:=1; randomseed:=1559; _special_div_ := 1000; if unknown context_tool: input mp-tool; fi; if unknown context_spec: input mp-spec; fi; if unknown context_grph: input mp-grph; fi; graphictextformat:=context; *graphictextdirective \global \loadfontfileoncetrue ;* string contextversion; contextversion:=2006.03.25 13:21; if not known _data_prefix_: string _data_prefix_,_data_suffix_; fi; . Does someone know the solution to this problem ? Thanks Wim ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Guide on align (was Help : Unknown references)
First thanks for your help, I did what you suggested and it worked. But now I am trying your example file align.tex and running texexec, using the latest Context (2006.03.23), I get the following error. I believe the problems lies in verb-tex.tex but I am not sure. section : 1 Basic Alignment align-align.tmp (/usr/local/tex/texmf-local/tex/context/base/verb-tex.tex loading : Context Support Macros / Pretty TEX Verbatim ) ! Missing number, treated as zero. to be read again f \currenttyping -f ile \checkverbatimfileline ...enumber \currenttyping \c!start \else \ifnum \ver... \presetnormalverbatimline ...\doflushverbatimline \global \chardef \verbatim... \readline ...line \else \presetnormalverbatimline \fi \fi \fi \fi \handlever... \processfileverbatim ...expandafter \readline \fi \closein \verbatiminput \e... ... l.25 \ShowExample Greetings Wim Neimeijer [EMAIL PROTECTED] wrote: Here are a few details of _how I understand_ the align mechanism of context. Hope that others will find it useful. Any suggestions for improvement are welcome. Aditya ___ 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] Help : Unknown references
Hi, I think I am using the latest context version texexec --version TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 texexec : TeXExec 5.4.3 - ConTeXt / PRAGMA ADE 1997-2005 texutil : TeXUtil 9.0.1 - ConTeXt / PRAGMA ADE 1992-2006 tex : pdfeTeX, 3.141592-1.30.6-2.2 (Web2C 7.5.5) context : ver: 2006.03.20 10:19 cont-en : ver: 2006.03.20 10:19 fmt: 2006.3.21 mes: english When I compile your code, it works. However my code , which I think, is similar, doesn't work. I cannot see any difference in the setup. I must be doing something basically wrong ??? Here is an excerpt from my code \def\mathrm#1{ {\rm #1}} \def\done#1#2{ \frac{ \mathrm{d} #1}{\mathrm{d} \mathrm{#2}} } \def\dtwo#1#2{ \frac{\mathrm{d}^{2} #1}{\mathrm{d} \mathrm{#2}^{2}} } \starttext Als op het tijdstip $t_{0}$ plaats $\vec{r}_{0}$ en snelheid $v_{0}$ zijn gegeven, dan kan de plaats $\vec{r}$ van een deeltje op ieder tijdstip worden berekend met de vergelijkingen \placeformula[eqn1] \startformula \startalign[n=3] \vec{v} = \done{\vec{r}}{t}\quad \quad \vec{r} - \vec{r}_{0} = \int_{t_{0}}^{t} \vec{v} \: dt \\ \stopalign \stopformula \placeformula[eqn2] \startformula \startalign[n=3] \vec{a} = \done{\vec{v}}{t}\quad \quad \vec{v} - \vec{v}_{0} = \int_{t_{0}}^{t} \vec{a} \: dt \\ \stopalign \stopformula Voor $\vec{a}$ constant volgt uit \in[eqn2] \startformula \vec{v} = \vec{v}_{0} + \vec{a} \: (t - t_0) \stopformula en hieruit met behulp van \in[eqn1] \stoptext Wim [EMAIL PROTECTED] wrote: On Tue, 21 Mar 2006, WN wrote: Hi, I am getting unknown references when I use \startformula \startalign[n=3] Some math .. \stopalign \stopformula in conjunction with \placeformula[eqn1] \startformula math .. \stopformula See \in[eqn1] --- unknown reference It has something to do with the formulanumber not set, I know, but how do I fix this in the above ?? Which context version are you using? The following compiles correctly on live.contextgarden.net \starttext \startformula \startalign[n=3] \NC a \NC b \NC d \NR \NC a \NC b \NC d \NR \stopalign \stopformula in conjunction with \placeformula[eqn1] \startformula a = b \stopformula See \in[eqn1] \unknown \stoptext See if this works for you. Aditya ___ 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] Help : Unknown references
Hi, I am getting unknown references when I use \startformula \startalign[n=3] Some math .. \stopalign \stopformula in conjunction with \placeformula[eqn1] \startformula math .. \stopformula See \in[eqn1] --- unknown reference It has something to do with the formulanumber not set, I know, but how do I fix this in the above ?? Thanks for your help and time WN ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] question about figures and labels
Hi, I am trying to reference the 2 subfigures in my text , something like Some text \placefigure[][figuur7]{Centrifugale kracht $\vec{F}_{F}$ en centripetale kracht $\vec{F}_{c}$} { \startcombination[2*1] {\externalfigure[Drawings/figuur7a]} {} {\externalfigure[Drawings/figuur7b]} {} \stopcombination } In \in{figure}[figuur7a] and \in{figure}[figuur7b] one can see . .. But I don't know how to setup the labels figuur7a, figuur7b ? I cannot find anything related on Wiki or in this newsgroup, I think it should be possible with Context ? Kind regards Wim Neimeijer ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Font question mfonts.pdf manual
I use a lot of mathematics i.e a lot of integral symbols (\oint, \oiint, \oiiint ) for my documentation. I could not find the corresponding Context math symbols. I suppose they are not defined as yet ? Furthermore I use a small tex module written by David Munger and which I posted on this newsgroup a couple of days ago to define some of these math symbols. I was wondering can one switch back and forth using the mechanism of \enablemathcollection[collection 1] \usemathcollection[collection 1] Some math . \enablemathcollection[collection 2] \usemathcollection[collection 2] Some math . Thanks for the help Kind regards Wim Neimeijer [EMAIL PROTECTED] wrote: WN wrote: Hi, I am reading the mfonts.pdf manual to understand more about Context font mechanism. In section 10 Math collection, Hans writes "Math is a complicated matter and therefore we will not spend that many words on the gory details .. . More information can be found in the documentation of the math module" First question is : Why do you not spend more words on this subject ? setting up math fonts is normally not something that a user does: there is a limited amount of math fonts and they are normally supported out-of-the-box I suppose a lot of Latex users are possibly interested in using Context for their math typesetting but not knowing all the gory details, will complicate matters and hinder a possible conversion from Latex to Context. it depends on how many users want to define math symbols, make math font metrics (no fun) etc in most cases there should beno problem to go from latex to context because symbolic names are used for math symbols and resolving them is a low level (hidden) activity. Second question is : where can I find the documentation of the math module ? Is it in PDF or do I need to consult math-ini.tex ? wiki taco and i will make a manual for math (the built in features) some day soon - we will use a special font for that which is work in progress 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 ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] New math collection ?
Hi, I defined some extra math symbols based on the help of David Munger. David posted a question 2 years ago, asking the group how to define extra math symbols. He found a solution himself (see below) and what I am trying to do is to put this into a math collection like math-eul.tex but I am not successfull. I used his solution to define a module math-extra.tex based on math-eul.tex but I am getting errors like ! \textfont 14 is undefined (character). \stopdisplaymath -\stopinnermath $$ \ifgridsnapping \egroup \afterdisplayspa... \dostopformula ...eter \c!alternative \v!formula } \resetlastlinewidth \nonoi... l.18 \stopformula I don't know what I am doing wrong, hope someone can help me Attached my test files. Kind regards W. Neimeijer David's solution % \definebodyfont [28pt,24pt,18pt, 17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt,7pt,6pt,5pt,4pt] [mm] [ ex=txex sa 1, mc=txexa sa 1, mrbf=cmbx10 sa 1, exbf=cmex10 sa 1, mibf=cmmib10 sa 1, sybf=cmbsy10 sa 1, mabf=msam10 sa 1] \setupbodyfont [12pt] %%% % txfonts %%% \definemathsymbol [oiint] [op] [mc] [08] [mc] [09] \definemathsymbol [oiiint] [op] [mc] [29] [mc] [2a] \definemathsymbol [ointctrclockwise][op] [mc] [0A] [mc] [0B] \definemathsymbol [ointclockwise] [op] [mc] [0C] [mc] [0D] \definemathsymbol [varointctrclockwise] [op] [mc] [2B] [mc] [2C] \definemathsymbol [varointclockwise][op] [mc] [2D] [mc] [2E] \definemathsymbol [iint][op] [mc] [21] [mc] [22] \definemathsymbol [iiint] [op] [mc] [23] [mc] [24] \definemathsymbol [nt] [op] [mc] [25] [mc] [26] \definemathsymbol [idotsint][op] [mc] [27] [mc] [28] \definemathsymbol [oiintctrclockwise] [op] [mc] [40] [mc] [41] \definemathsymbol [oiintclockwise] [op] [mc] [48] [mc] [49] \definemathsymbol [varoiintctrclockwise][op] [mc] [4A] [mc] [4B] \definemathsymbol [varoiintclockwise] [op] [mc] [42] [mc] [43] \definemathsymbol [oiiintctrclockwise] [op] [mc] [44] [mc] [45] \definemathsymbol [oiiintclockwise] [op] [mc] [4C] [mc] [4D] \definemathsymbol [varoiiintctrclockwise][op] [mc] [4E] [mc] [4F] \definemathsymbol [varoiiintclockwise] [op] [mc] [46] [mc] [47] \starttext The integral equation \startformula \frac{d}{dt} \iiint_{\Omega} f \,dV = \iiint_{\Omega} Q \,dV - \oiint_{\partial\Omega} \vec J \cdot \vec{da} \stopformula can be written under the differential form \startformula \frac{\partial f}{\partial t} = Q - \vec\nabla\cdot\vec J. \stopformula \stoptext % \usemodule[math-extra] \def\X#1{$#1$ \space {\rm{\string#1}}} \def\Y#1{$#1$ \space \rm{\string#1}} \usetypescript[wim] \enablemathcollection[wim] \usemathcollection[wim] \usemathcollection[ams] %\usetypescript[wim] %\switchtobodyfont[wim] \starttext \startformula \oiint , \oiiint, \ointctrclockwise, \ointclockwise, \varointctrclockwise \stopformula \stoptext \placetable{Binary Operators} \starttable[|l|l|l|l|] \NC \X\amalg \NC \X\cup \NC \X\oplus\NC \X\times \NC\NR \NC \X\ast \NC \X\dagger \NC \X\oslash \NC \X\triangleleft\NC\NR \NC \X\bigcirc \NC \X\ddagger \NC \X\otimes \NC \X\triangleright \NC\NR \NC \X\bigtriangledown \NC \X\diamond \NC \X\pm \NC \X\unlhd \NC\NR \NC \X\bigtriangleup \NC \X\div \NC \X\rhd \NC \X\unrhd \NC\NR \NC \X\bullet \NC \X\lhd \NC \X\setminus \NC \X\uplus \NC\NR \NC \X\cap \NC \X\mp \NC \X\sqcap\NC \X\vee \NC\NR \NC \X\cdot\NC \X\odot \NC \X\sqcup\NC \X\wedge \NC\NR \NC \X\circ\NC \X\ominus \NC \X\star \NC \X\wr \NC\NR \stoptable \blank \placetable{AMS Binary Operators} \starttable[|l|l|l|] \NC \X\barwedge\NC \X\circledcirc \NC \X\intercal\NC\NR \NC \X\boxdot \NC \X\circleddash \NC \X\leftthreetimes \NC\NR \NC \X\boxminus\NC \X\Cup \NC \X\ltimes \NC\NR \NC \X\boxplus \NC \X\curlyvee\NC \X\rightthreetimes \NC\NR \NC \X\boxtimes\NC \X\curlywedge \NC \X\rtimes \NC\NR \NC \X\Cap \NC \X\divideontimes \NC \X\smallsetminus \NC\NR \NC \X\centerdot \NC \X\dotplus \NC \X\veebar \NC\NR \NC \X\circledast \NC \X\doublebarwedge \NC \NC\NR \stoptable \blank \placetable{AMS Negated Binary Operators} \starttable[|l|l|l|] \NC \X\ncong \NC \X\nshortparallel \NC \X\nVDash \NC\NR \NC \X\nmid \NC \X\nsim \NC \X\precnapprox \NC\NR \NC \X\nparallel \NC \X\nsucc \NC \X\precnsim\NC\NR \NC \X\nprec \NC \X\nsucceq