[NTG-context] \startstaticMPfigure
From the Wiki I learn about \startstaticMPfigure that it creates a separate pdf file containing the graphic. But when I exercise the example given I do not see those staticMPfigure's in sepaarte pdf's. What am I missing? I thought to use this for generating a series of separate pdf's, to be further processed as png/tiff files. \startstaticMPfigure{center} draw fullcircle scaled 2cm ; dotlabel.bot (textext((0,0)),origin); \stopstaticMPfigure \startstaticMPfigure{radius} draw fullcircle scaled 2cm ; drawarrow (0,0)--(1cm,0); label.bot(textext($r$),(5mm,0)) ; \stopstaticMPfigure \starttext Circle centered \usestaticMPfigure[center][width=1cm] at origin with radius \usestaticMPfigure[radius][width=1cm] $r=1\,\text{cm}$. \stoptext By the way, is transparency still working as in the wiki example below, or has transparency vanished? \startreusableMPgraphic{a} fill unitsquare scaled 1cm withcolor yellow; fill unitsquare shifted (0.5,0.5) scaled 1cm withcolor transparent (1,0.5,red); \stopreusableMPgraphic \placefigure[force,none]{}{\reuseMPgraphic{a}} Thanks in advance Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] MetaPost visibly drawing at 0pt
I used to put an invisible frame around figures in MetaPost by setting a pen scaled at 0pt. That left no trace, but defined the area. However I (now) see a thin line drawn by code: pickup pencircle scaled 0pt; draw origin--(w,h); Did I always mis this or has something changed? For example a roundoff away from zero in MetaPost? By the way I am typesetting through ConTeXT with \startMPpage … \stopMPpage. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] sizing MPpage
How can one set the size of a \startMPpage..\stopMPpage generated picture. For example forcing its dimensions to 5X4cm. Or better still, derived from variables in the code. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] sizing MPpage
Thanks, This does the trick for me. Hans van der Meer On 19 sep. 2011, at 15:49, Aditya Mahajan wrote: On Mon, 19 Sep 2011, Meer, H. van der wrote: How can one set the size of a \startMPpage..\stopMPpage generated picture. For example forcing its dimensions to 5X4cm. Or better still, derived from variables in the code. Add something like setbounds currentpicture to (fullsquare xyscaled (5cm,4cm)) ; at the end of the MP code. Aditya ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] metafun shared code
I am using code between \startMPinclusions .. \stopMPinclusions while later additions can be accumulated with \startMPinclusions[+] .. \stopMPinclusions Hans van der Meer On 19 sep. 2011, at 17:01, Marcin Borkowski wrote: Hi all, I'd like to have some MP code shared between unique graphics (in MkIV). One example: I'd like to have drawoptions something for all graphics. Another one: I'd like to have two similar (but different) unique graphics, and I'd like them to share some code. How to do these two things? Best -- Marcin Borkowski http://mbork.pl ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] setupfootnotes failing
Here is your minimal example. \starttext \setupblank[line] \setupfootnotes[way=bychapter,rule=off,split=verystrict] Hello\crlf \stoptext The error is triggered by \setupblank[normal]. The manual lists as possibilities: normal, standard, line dimension big medium small fixed flexible. Of these [blank] and [normal] trigger the error, the others not. However, without the following \setupfootnotes there is no error from \setupblank[normal]. Hans van der Meer On 22 sep. 2011, at 07:48, Wolfgang Schuster wrote: Am 21.09.2011 um 16:10 schrieb Hans van der Meer: The following did work: \setupfootnotes[way=bychapter,rule=off,split=verystrict] Now I get an error: to be read again n argument n ormal \addaskedblankskip ...nce \blankskip #1\dimexpr #2 \relax l.8 } \dovspacingyes ...#1\else \currentvspacing \fi )} \fi to be read again \placenoterule ... l.78 ...s[way=bychapter,rule=off,split=verystrict] What did I miss? A example! Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] setupfootnotes failing
Thanks for the reply. I was relying on my printed out ConTeXt-manual. Of course that on dates back from 2001, but I do not know of a newer one. Your commands-download now sits on my desktop for easy reference! Hans van der Meer On 22 sep. 2011, at 19:39, Wolfgang Schuster wrote: Am 22.09.2011 um 08:13 schrieb Meer, H. van der: Here is your minimal example. \starttext \setupblank[line] \setupfootnotes[way=bychapter,rule=off,split=verystrict] Hello\crlf \stoptext The error is triggered by \setupblank[normal]. The manual lists as possibilities: normal, standard, line dimension big medium small fixed flexible. Of these [blank] and [normal] trigger the error, the others not. However, without the following \setupfootnotes there is no error from \setupblank[normal]. “normal” isn’t a valid parameter for \blank in MkIV, for a complete list of valid argument look here: https://bitbucket.org/wolfs/commands/downloads Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] colon in lucida math
I get the impression there is something wrong with typesetting math with the lucida setup in ConTeXt. I find that the \colon is not printed. Below is a minimal example. See the colon in the first formula that is absent in the second. Perhaps someone is willing to check if this is ConTeXt in general or my own setup in particular. In both cases I will be pleased with a remedy. Hans van der Meer \setuppapersize [A6][A6] \starttext \start \setupbodyfont[lmodern] Using: \verbatim{\setupbodyfont[lmodern]}\par $K\colon\quad A\cdots Z$\par \stop \start \setupbodyfont[lucida] Using: \verbatim{\setupbodyfont[lucida]}\par $K\colon\quad A\cdots Z$\par \stop \stoptext test.pdf Description: test.pdf ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] bibmodule acquired problem
I used the following macro for typsetting literature references in footnotes. It worked without problems until now, but then I didn't use the bib module for some time. It looks like a problem has crept in with the inproceedings type. the macro setup: \usepublications[literature] \setuppublications [alternative=apa] \setuppublications [numbering=short,refcommand=data] \setuppublicationlist [% editor=\normalauthor,% author=\normalauthor,% artauthor=\normalauthor] \setuppublicationlist[firstnamesep={ },surnamesep={}] \def\bibentry#1{\bibentrypar \doifemptyelse{#1}{\def\bibentryspace{}}{\def\bibentryspace{\ }}% \cite[data][#1]\strut} \def\footnotecite{\dodoubleargument\dofootnotecite} \def\dofootnotecite[#1][#2]{% \def\bibentrypar{\def\bibentrypar{\par}}% \unskip\footnote{\processcommalist[#1]\bibentry \doifnotempty{#2}{\bibentryspace#2\strut\par}} } It fails for the following entry: \startpublication[k=campbell:92,t=inproceedings, a={{Campbell},{Wiener}},y=1992, n=54,s=CW92] \author[]{K.~W.}[K.~W.]{}{Campbell} \author[]{M.~J.}[M.~J.]{}{Wiener} \pubyear{1992} \arttitle{{DES is not a group}} \crossref{crypto92} \pages{512--517} \pubname{Springer-Verlag} \stoppublication But it works ok when inproceedings is replaced by book. The error message: to be read again \pbd: \bibgetvart #1-\csname pbd:#1\endcsname \plussix \bibalternative ... \??pv \@@currentalternative #1 \endcsname \dotypesetapublication ...ative {\bibgetvart {#1}} \removeunwantedspaces \egr... \next3 #1,-\dobibdata {#1} \doprocesscommaitem \doprocesscommalist ...item \gobbleoneargument #1, ]\relax \global \advance \... ... l.34 \par Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] postion graphics
Thanks. But after having a closer look I decided to abandon the mechanism. It looks fairly sophisticated: finding positions in the TeX-result and producing overlays for them. Because I used it solely inside table-like structures for pointing from one cell to another, I can replace them by MetaPost pictures. It seems more robust that way. So you do not need spending your time on it. Hans van der Meer On 26 sep. 2011, at 22:37, Wolfgang Schuster wrote: Am 26.09.2011 um 10:51 schrieb Hans van der Meer: I was using something like \setMPpositiongraphic{A1}{syllabus:arrow}{to=B1,bxoff=\celloff} and \hpos{A1}{}\VB \VB \VB \VB \hpos{B1}{}\CR for the placement of arrows (defined with \startMPpositiongraphic on the page. That was mkII. Now the arrows are not placed at the proper position but at the left of the page. Question: has something changed here in ConTeXt mkIV that I didn't notice? The only change I can imagine here is that from mkII to mkIV. Do you have a example? Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bibmodule acquired problem
An addtionial remark here: in the .bib file this is caused by a missing book title. On 27 sep. 2011, at 10:03, Hans van der Meer wrote: Recently I reported the following problem: On 25 sep. 2011, at 19:58, H. van der Meer wrote: I used the following macro for typsetting literature references in footnotes. It worked without problems until now, but then I didn't use the bib module for some time. It looks like a problem has crept in with the inproceedings type. The error message: to be read again \pbd: \bibgetvart #1-\csname pbd:#1\endcsname \plussix Digging into the code I finally was able to nail the problem: the offending citation being of type t=inproceedings was missing the title item. Then I observe a call with #1 in bibgetvart empty, somehow leading to a missing \endcsname error message. Obviously earlier this wasn't a problem but now is. I guess because the code changed since my previous work on the project. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bibmodule acquired problem
Step by step I am able to dig deeper in the problem. The fact that it used to work but now doesn't may well be connected with the fact that the booktitle in those cases came from a crossref = item in the bib file. Could it be the \crossref{} macro is not recognized any longer by the ConTeXt bib module? In file bibl-tra.mkiv I encounter the following comment: %D \macros{bib@crossref} %D %D \type{\crossref} is used in database files to point to another %D entry. Because of this special situation, it has to be defined %D separately. Since this command will not be seen until at %D \type{\placepublications}, it may force extra runs. The same is %D true for \type{\cite} commands inside of publications. In typesetting the citation in the footnote I am solely using cite, not \placepublications. Does someone know why earlier the \crossref worked and now obviously has been switched out of the loop? Is there another way to force these crossref's to be carried out? Hans van der Meer On 27 sep. 2011, at 10:07, Meer, H. van der wrote: An addtionial remark here: in the .bib file this is caused by a missing book title. On 27 sep. 2011, at 10:03, Hans van der Meer wrote: Recently I reported the following problem: On 25 sep. 2011, at 19:58, H. van der Meer wrote: I used the following macro for typsetting literature references in footnotes. It worked without problems until now, but then I didn't use the bib module for some time. It looks like a problem has crept in with the inproceedings type. The error message: to be read again \pbd: \bibgetvart #1-\csname pbd:#1\endcsname \plussix Digging into the code I finally was able to nail the problem: the offending citation being of type t=inproceedings was missing the title item. Then I observe a call with #1 in bibgetvart empty, somehow leading to a missing \endcsname error message. Obviously earlier this wasn't a problem but now is. I guess because the code changed since my previous work on the project. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] bibmodule acquired problem
Yes, we are having the two faces same problem, I guess. The fact is that \booktitle in the crossref'ed publication should be processed as a \title item in the citatation crossreff'd. The error in my case boils down to the fact that the title-entry is called without being actually present. With the missing \title sofar I have nailed it down to macro \bibgetvart#1 from the following bbl entry: \startpublication[k=campbell:92,t=inproceedings, a={{Campbell},{Wiener}},y=1992, .. (no \title) \stoppublication and log printing in the log from the modified macro: \def\bibgetvart#1{\writestatus{ERROR}{Parameter #1 on bibgetvart \expandafter\string\csname pbd:#1\endcsname}\csname pbd:#1\endcsname\plussix}% I find the log: ERRORParameter campbell:92 on bibgetvart \pbd:campbell:92 ERRORParameter on bibgetvart \pbd: ! Missing \endcsname inserted. Thus the missing \title thus seems to result in extra call to a bibliography entry that does not exist. This is about as far as I am at the moment in analyzing the problem. Hans van der Meer On 27 sep. 2011, at 12:09, Stefan Müller wrote: Hi, I think this is related to my message from yesterday [1]. The booktitle key is ignored in inproceedings entries when crossref is present. See the following excerpt from cont-ab.bst: FUNCTION {inproceedings} { start.entry format.authors format.year format.arttitle crossref missing$ { format.in.booktitle.or.series format.number.series \city address do.out format.pages } { format.incoll.inproc.crossref format.pages } if$ \pubname publisher do.out \organization organization do.out stop.entry } So title is not set in the .bbl file. Good to know that I'm not the only one who's having trouble with that. I didn't know what I should expect when using crossref, so I decided to not mind the missing booktitle. But it would still be nice (as seen in your example) if the actual citation style could decide whether or not to use booktitle aka title. HTH, Stefan. [1] http://archive.contextgarden.net/message/20110926.093110.8bc078f6.en.html On 27.09.2011 10:41, Meer, H. van der wrote: Step by step I am able to dig deeper in the problem. The fact that it used to work but now doesn't may well be connected with the fact that the booktitle in those cases came from a crossref = item in the bib file. Could it be the \crossref{} macro is not recognized any longer by the ConTeXt bib module? In file bibl-tra.mkiv I encounter the following comment: %D \macros{bib@crossref} %D %D \type{\crossref} is used in database files to point to another %D entry. Because of this special situation, it has to be defined %D separately. Since this command will not be seen until at %D \type{\placepublications}, it may force extra runs. The same is %D true for \type{\cite} commands inside of publications. In typesetting the citation in the footnote I am solely using cite, not \placepublications. Does someone know why earlier the \crossref worked and now obviously has been switched out of the loop? Is there another way to force these crossref's to be carried out? Hans van der Meer On 27 sep. 2011, at 10:07, Meer, H. van der wrote: An addtionial remark here: in the .bib file this is caused by a missing book title. On 27 sep. 2011, at 10:03, Hans van der Meer wrote: Recently I reported the following problem: On 25 sep. 2011, at 19:58, H. van der Meer wrote: I used the following macro for typsetting literature references in footnotes. It worked without problems until now, but then I didn't use the bib module for some time. It looks like a problem has crept in with theinproceedings type. The error message: to be read again \pbd: \bibgetvart #1-\csname pbd:#1\endcsname \plussix Digging into the code I finally was able to nail the problem: the offending citation being of type t=inproceedings was missing the title item. Then I observe a call with #1 in bibgetvart empty, somehow leading to a missing \endcsname error message. Obviously earlier this wasn't a problem but now is. I guess because the code changed since my previous work on the project. ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest
Re: [NTG-context] bibmodule acquired problem
This does not help. The error is still there. I guess because this doesn't add the missing title. I cannot see in the FUNCTION a format.title. But somwhere the bibmodule calls it from the proceedings entry. Hans van der Meer On 27 sep. 2011, at 12:50, Stefan Müller wrote: Maybe one could modify FUNCTION {inproceedings} { start.entry format.authors format.year format.arttitle crossref missing$ { format.in.booktitle.or.series format.number.series \city address do.out format.pages } { format.incoll.inproc.crossref format.pages } if$ \pubname publisher do.out \organization organization do.out stop.entry } to FUNCTION {inproceedings} { start.entry format.authors format.year format.arttitle format.in.booktitle.or.series format.number.series \city address do.out format.pages format.incoll.inproc.crossref \pubname publisher do.out \organization organization do.out stop.entry } in cont-*.bst? I don't know if this would cause any trouble... Stefan On 27.09.2011 12:35, Meer, H. van der wrote: Yes, we are having the two faces same problem, I guess. The fact is that \booktitle in the crossref'ed publication should be processed as a \title item in the citatation crossreff'd. The error in my case boils down to the fact that the title-entry is called without being actually present. With the missing \title sofar I have nailed it down to macro \bibgetvart#1 from the following bbl entry: \startpublication[k=campbell:92,t=inproceedings, a={{Campbell},{Wiener}},y=1992, .. (no \title) \stoppublication and log printing in the log from the modified macro: \def\bibgetvart#1{\writestatus{ERROR}{Parameter#1 on bibgetvart \expandafter\string\csname pbd:#1\endcsname}\csname pbd:#1\endcsname\plussix}% I find the log: ERROR Parametercampbell:92 on bibgetvart \pbd:campbell:92 ERROR Parameter on bibgetvart \pbd: ! Missing \endcsname inserted. Thus the missing \title thus seems to result in extra call to a bibliography entry that does not exist. This is about as far as I am at the moment in analyzing the problem. Hans van der Meer On 27 sep. 2011, at 12:09, Stefan Müller wrote: Hi, I think this is related to my message from yesterday [1]. The booktitle key is ignored in inproceedings entries when crossref is present. See the following excerpt from cont-ab.bst: FUNCTION {inproceedings} { start.entry format.authors format.year format.arttitle crossref missing$ { format.in.booktitle.or.series format.number.series \city address do.out format.pages } { format.incoll.inproc.crossref format.pages } if$ \pubname publisher do.out \organization organization do.out stop.entry } So title is not set in the .bbl file. Good to know that I'm not the only one who's having trouble with that. I didn't know what I should expect when using crossref, so I decided to not mind the missing booktitle. But it would still be nice (as seen in your example) if the actual citation style could decide whether or not to use booktitle aka title. HTH, Stefan. [1] http://archive.contextgarden.net/message/20110926.093110.8bc078f6.en.html On 27.09.2011 10:41, Meer, H. van der wrote: Step by step I am able to dig deeper in the problem. The fact that it used to work but now doesn't may well be connected with the fact that the booktitle in those cases came from a crossref = item in the bib file. Could it be the \crossref{} macro is not recognized any longer by the ConTeXt bib module? In file bibl-tra.mkiv I encounter the following comment: %D \macros{bib@crossref} %D %D \type{\crossref} is used in database files to point to another %D entry. Because of this special situation, it has to be defined %D separately. Since this command will not be seen until at %D \type{\placepublications}, it may force extra runs. The same is %D true for \type{\cite} commands inside of publications. In typesetting the citation in the footnote I am solely using cite, not \placepublications. Does someone know why earlier the \crossref worked and now obviously has been switched out of the loop? Is there another way to force these crossref's to be carried out? Hans van der Meer On 27 sep. 2011, at 10:07, Meer, H. van der wrote: An addtionial remark here: in the .bib file this is caused by a missing book title. On 27 sep. 2011, at 10:03, Hans van der Meer wrote: Recently I reported the following problem: On 25 sep. 2011, at 19:58, H. van der Meer wrote: I used the following macro for typsetting literature references in footnotes. It worked without problems until now
Re: [NTG-context] bibmodule acquired problem
This problem MIGHT BE SOLVED. I cross my fingers! I tried to analyze what happens. The following is seen when typesetting [campbell:92] with a crosslink to [crypto92]: Parameter campbell:92 on bibgetvard\pbd:campbell:92 -- crossref crypto92 CALLED FROM \bib@crossref#1 Parameter campbell:92 on bibgetvart\pbd:campbell:92 -- authoretallimit -- authoretaldisplay -- firstnamesep -- lastnamesep -- firstnamesep -- | | NOTE THIS COMES FROM \bibinsertcrossref#1#2#3 all 3 are empty -- left Parameter on bibgetvard\pbd: -- \writestatus {ERROR}{Parameter on bibgetvart\pbd:}\pbd: \plussix Parameter on bibgetvart\pbd: ! Missing \endcsname inserted. I can see that \bibinsertcrossref gets the proper reference because the defined variable is: @@pb@crossref=crypto92 Experimenting on \bibinsertcrossref (inside \unprotect-\protect): Redefine \def\bibinsertcrossref#1#2#3{\cite[crypto92]} CITE WORKS! But redefine: \def\bibinsertcrossref#1#2#3{\cite[\@@pb@crossref]} CITE GIVES AN ERROR The redefine: \def\bibinsertcrossref#1#2#3{\edef\tmp{\@@pb@crossref}\cite[\tmp]} CITE WORKS Therefore I propose to change the definition of \bibinsertcrossref to: \def\bibinsertcrossref#1#2#3{\bibdoifelse\@@pb@crossref{\edef\tmp{\@@pb@crossref}#1\cite[\tmp]#2}{#3}} Hans van der Meer On 27 sep. 2011, at 15:07, Stefan Müller wrote: On 27.09.2011 14:56, Taco Hoekwater wrote: On 09/27/2011 02:51 PM, Meer, H. van der wrote: My best guess now is the description of the FUNCTION {format.crossref} { \crossref crossref do.out } entry on the .bst file. Probably this generates the bad code leading to a missing \endcsname. I do not have time to pay close attention right now, but the .bst has not changed in years, as far as I know. Best wishes, Taco Maybe the problem is already present for so long. It occurs only if title of an inproceedings that has crossref set is accessed. The bibl-*.tex files don't do that. Stefan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] usepath?
What are \usepath and \usesubpath supposed to do? I looked into the mkiv-code but could not find an explanation. I have a problem finding files from within a project-product-component structure and I hoped to solve through these macros. Sofar without success. In the wiki there is an item on project structure containing a \usepath but that didn't help me out. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] usepath?
This didn't work for me. I guess it has to do with some misunderstanding about the directory from where projects start reckoning. The directory structure is: directory-project directory-project/product (context runs from here) directory-project/product/component-a-subfiles directory-project/product/component-b-subfiles Code in directory-project/product/component-a-subfile does \input but cannot find files in directories below or in directories alongside. My question is from what directory starts the search tree? Hans van der Meer On 29 sep. 2011, at 17:23, Wolfgang Schuster wrote: Am 29.09.2011 um 17:18 schrieb Meer, H. van der: What are \usepath and \usesubpath supposed to do? I looked into the mkiv-code but could not find an explanation. I have a problem finding files from within a project-product-component structure and I hoped to solve through these macros. Sofar without success. In the wiki there is an item on project structure containing a \usepath but that didn't help me out. You can specify with them subdirectories where context looks when you include a component file, e.g. instead of \startproduct product \component subdirectory/component-1 \component subdirectory/component-2 \stopproduct you can write \startproduct product \usepath[subdirectory] \component component-1 \component component-2 \stopproduct Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] metapost to pdf on the fly
I would like to generate metapost figures in separate pdf-files (in some convenient directory, they are reused elsewhere). This as part of a project structure. I know that on a separate run such a pdf can be generated with: context figurefile running on input \input some-metapost-inclusions \starttext \startMPpage .. \stopMPpage \stoptext But the idea is to do it on the fly while typesetting a project (using mode=*first to prevent further iterations): .. \component figurefile .. And in the figurefile \startcomponent figurefile \environment some-metapost-inclusions \starttext .. BUT THEN WHAT? As such it is not sufficient for the goal proposed. Can this be done at all? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] readfile not understood
I do not understand while \readfile behaves differently from \input with regard to TeX-code processing. I have the following code: \readfile{metapost-setup} %(file with metapost inclusions) \starttext \startMPpage .. \stopMPpage \stoptext Replace the \readfile by: \input ../../../metapost-setup %(file with metapost inclusions) works ok. But with \readfile seems to be skipped silently, that is without any sign of it in the log. The convenience of \readfile should be, if I understand correctly, that it searches upwards to the root of directory tree. Which makes the series of ../'s unnecessary and allows for easily pushing the tex-files further down when their number grows. Can it be explained? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] readfile not understood
Finding the file works with \ReadFile{} works. But is generates another problem because \input ../../../metapost-setup and \ReadFile{metapost-setup} behave differently! The \input process my \startMPinclusions correctly but the ReadFile does not, because the following metapost has the definitions missing. Hans van der Meer On 29 sep. 2011, at 21:05, Wolfgang Schuster wrote: Am 29.09.2011 um 20:57 schrieb Meer, H. van der: I do not understand while \readfile behaves differently from \input with regard to TeX-code processing. I have the following code: \readfile{metapost-setup} %(file with metapost inclusions) \starttext \startMPpage .. \stopMPpage \stoptext Replace the \readfile by: \input ../../../metapost-setup %(file with metapost inclusions) works ok. But with \readfile seems to be skipped silently, that is without any sign of it in the log. The convenience of \readfile should be, if I understand correctly, that it searches upwards to the root of directory tree. Which makes the series of ../'s unnecessary and allows for easily pushing the tex-files further down when their number grows. Can it be explained? \readfile expects three arguments, replace it with \ReadFile which expects only one. Wolfgang ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] no os numbers in lucida?
I am fairly sure the Lucida font has oldstyle numbers. But I don't get them with the \os macro. Here two minimal examples. The one with lmodern does the oldstyle numbers, the one with lucida not. I would be obliged for a solution. Hans van der Meer \setuppapersize[A6][A6] \setupbodyfont[lucida] % the other example has [lmodern] \starttext \type{\setupbodyfont[lucida]}\crlf numbers {\rm 1234567890} in rm\crlf numbers {\os 1234567890} in os\par \stoptext ostest-lucida.pdf Description: ostest-lucida.pdf ostest-lmodern.pdf Description: ostest-lmodern.pdf ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] metapost to pdf on the fly
I am afraid I don't completely understand this. Doing: \startbuffer[fig-1] \startMPcode draw origin-(20,0) .. origin+(0,20) .. origin+(20,0) .. origin+(0,-20) .. cycle withcolor darkgreen; label(textext(Test),origin); \stopMPcode \stopbuffer \starttext \processMPbuffer[fig-1] \stoptext I get the error: ! Argument of \dostartMPpositiongraphic has an extra }. system tex error on line 8 in file onfly.tex: Argument of ... 1 \startbuffer[fig-1] 2 \startMPcode 3 draw origin-(20,0) .. origin+(0,20) .. origin+(20,0) .. origin+(0,-20) .. cycle withcolor darkgreen; 4 label(textext(Test),origin); 5 \stopMPcode 6 \stopbuffer 7 \starttext 8 \processMPbuffer[fig-1] .. inserted text \par to be read again } \processMPgraphic ...le ;\!!es , \MPaskedfigure )} }\egroup \placeMPgraphic \... \doprocessMPbuffer ...(\currentMPgraphicname )}} \endMPgraphicgroup l.8 \processMPbuffer[fig-1] Hans van der Meer On 29 sep. 2011, at 21:21, Aditya Mahajan wrote: On Thu, 29 Sep 2011, Meer, H. van der wrote: I would like to generate metapost figures in separate pdf-files (in some convenient directory, they are reused elsewhere). This as part of a project structure. I know that on a separate run such a pdf can be generated with: context figurefile running on input \input some-metapost-inclusions \starttext \startMPpage .. \stopMPpage \stoptext But the idea is to do it on the fly while typesetting a project (using mode=*first to prevent further iterations): .. \component figurefile .. And in the figurefile \startcomponent figurefile \environment some-metapost-inclusions \starttext .. BUT THEN WHAT? As such it is not sufficient for the goal proposed. Can this be done at all? What I usually do is have all the figures in separate buffers: \startenvironment figures \startbuffer[fig-1] ... \stopbuffer \stopenvironment and in the main file \environment figures \starttext \processMPbuffer[fig-1] \stoptext This way you can also combine multiple figures using \processMPbuffer[fig-common,fig-1] etc. The metapost processing is fast enough that there is no noticable speed difference. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] metapost to pdf on the fly
Thanks, this works indeed. But I hoped to be able to produce in this manner at one stroke a series of separate figures, each in its own pdf file. Or is this an impossible action? Hans van der Meer On 3 okt. 2011, at 09:09, Wolfgang Schuster wrote: Am 03.10.2011 um 09:05 schrieb Meer, H. van der: I am afraid I don't completely understand this. Doing: \startbuffer[fig-1] \startMPcode draw origin-(20,0) .. origin+(0,20) .. origin+(20,0) .. origin+(0,-20) .. cycle withcolor darkgreen; label(textext(Test),origin); \stopMPcode \stopbuffer \starttext \processMPbuffer[fig-1] \stoptext This works: \startbuffer[fig-1] draw (-20,0) .. (0,20) .. (20,0) .. (0,-20) .. cycle withcolor \MPcolor{darkgreen}; label(textext(Test),origin); \stopbuffer \starttext \processMPbuffer[fig-1] \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \doifmode and friends
I find that abc \doifmode{mode}{text} more text can introduce extra whitespace. I conclude therefore that there is no \ignorespaces at work here. As a consequence the \doifmode does not completely disappear if mode is not satisfied. Is this intentional or should this behaviour be changed? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \doifmode and friends
On 4 okt. 2011, at 20:44, Wolfgang Schuster wrote: Am 04.10.2011 um 20:37 schrieb Aditya Mahajan: On Tue, 4 Oct 2011, Meer, H. van der wrote: I find that abc \doifmode{mode}{text} more text can introduce extra whitespace. I conclude therefore that there is no \ignorespaces at work here. As a consequence the \doifmode does not completely disappear if mode is not satisfied. Is this intentional or should this behaviour be changed? Can you provide a minimal example. I don't get any extra spaces \enablemode[test] \starttext A\doifmode{test}{B}C A\doifmode{notest}{B}C \stoptext There is a unwanted space in the second paragraph. I dare voicing a different opinion. Allthough there indeed is both a space before the \doifmode as well as after it, I am aware of that but that is besides my point. I expected the \doifmode to vanish completely when the condition is not met. As is the case, even if the condition is not met it has a measurable effect because of the extra space being typeset. To be more explicit, my expectations were: A \doifmode{condition-not-met}{B} C resulting in: AC whereas it becomes: A C. \enablemode[test] \starttext A \doifmode{test}{B} C A \doifmode{notest}{B} C \stoptext Wolfgang ___ Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] margin notes from inside combination
It seems that margin notes when called from inside \startcombination..\stopcombination do not reach the margin of the paper. Instead they use a margin inside the combination. Is that as intended or unavoidable? It was my objective to have them at the edge of the paper. See minimal example below. % Testing margin notes from inside combinations. % Margin notes do not leave the combinations box. \setuppapersize[A6][A6] \starttext \setupcombinations[location=middle] test\crlf \startcombination[2*1] {abcdefg\inright{m1}}{l1} {abcdefg\inright{m2}}{l2} \stopcombination \crlf \stoptext combinations.pdf Description: combinations.pdf ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] metapost not adding picture
I have this question on the implementation of metapost. The following program ends in an error: \startMPpage picture v; draw origin--(1cm,1cm); v = currentpicture; clearit; draw (1cm,0)--(0,1cm); currentpicture := currentpicture + v; \stopMPpage The error is: ! Not implemented: (picture)+(picture). Yet Knuth's metafont book in Chapter 13 tells me, quote: Pictures can be added or subtracted; Is the current metafont implementation lacking this feature? Will it be implemented in the near future? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] margin notes
It seems that margin notes when called from inside \startcombination..\stopcombination do not reach the margin of the paper. Instead they use a margin inside the combination. Is that as intended or unavoidable? It was my objective to have them at the edge of the paper. See minimal example below. % Testing margin notes from inside combinations. % Margin notes do not leave the combinations box. \setuppapersize[A6][A6] \starttext \setupcombinations[location=middle] test\crlf \startcombination[2*1] {abcdefg\inright{m1}}{l1} {abcdefg\inright{m2}}{l2} \stopcombination \crlf \stoptext combinations.pdf Description: combinations.pdf ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \startmode and \ignorespaces
I made an example of the effect of this on \doifmode and \startmode. The example shows that the appearance of extra space in \doifmode follows a regular pattern. The startmode case differs in that respect because \startmode[condition-true] has the extra space but \startmode[condition-false] has not. In my view that is an unwanted anomaly. A little redefinition remedies that as can be seen in the example. spaces.pdf Description: spaces.pdf On 13 okt. 2011, at 17:43, Hans van der Meer wrote: A little while ago I asked whether \doifmode and friends should have an \ignorespaces at the end. Hans Hagen answered no and after some reasoning (probably along the same lines as his) I agree with him. Thus one uses in a quite natural way: some text\doifmode{xyz}{ conditional text} following text doing nothing else than: some text conditional text following text. With regard to this it is understandable and correct that extra space is taken in the next construct: some text \doifmode{xyz}{ conditional text} following text. But it looks different to me when using the \startmode .. \stopmode pair. some text. \startmode[xyz] some conditional text. \stopmode further text. In order to avoid here the extra space one has to code an extra % some text. \startmode[xyz]% some conditional text. \stopmode further text. or (not preferred imho): some text.% \startmode[xyz] I think this is error prone as it is al too easy to forget the %. The situation here differs from the \doifmode-case. I tend to believe that the fact that the \startmode[] .. \stopmode construct invites one to separate the statements with newlines (whitespace thus). Therefore I would ask if this plea for an \ignorespaces effect at the end of the \startmode[xyz] should be honored. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \startmode and \ignorespaces
On 14 okt. 2011, at 11:26, Wolfgang Schuster wrote: Am 14.10.2011 um 10:38 schrieb Meer, H. van der: I made an example of the effect of this on \doifmode and \startmode. The example shows that the appearance of extra space in \doifmode follows a regular pattern. The startmode case differs in that respect because \startmode[condition-true] has the extra space but \startmode[condition-false] has not. In my view that is an unwanted anomaly. A little redefinition remedies that as can be seen in the example. I wrote you already a few times that you can use the annotation module for this. The module serves also as replacement for the fixme module where it is necessary to take care that no extra spaces are added when the text is hidden. Wolfgang, Thanks for your reply, but I find it takes a sidetrack and does not answer the question. Please let me explain. It might well be that the annotation module does something of the sort, but that is not my point. The mode-mechanism is explicitely given as a means to do conditional typesetting. If I may cite from the wiki: Very often, you want to generate multiple versions of the same document: one version for printing and one for viewing on the screen, one version for students and one version for the instructor, and so on. .. Or you could use modes - the ConTeXt way of doing conditional processing Well, that is exactly what I want to do and I fail to see why another module (like annotation) should be necessary. Therefore, please do not keep pointing me to something that in my opinion is not needed in this case and is already fully provided for in ConTeXt. When I am pointing out something that I think is an anomaly in the behaviour of ConTeXt or probably not intentional, it is not meant as criticizing. To the contrary, my intention is always to make a constructive contribution. Your reply however is not an answer to the question I brought forward. It might be that there are reasons for not changing ConTeXt in the manner I proposed on this issue. I can live with that, because I have no role in the development. But I think it is legitimate to ask why that decision is made. I am certain you will understand this. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Lucida \colon, \lll, \ggg
Changing to the [mathtimes] font did help with the \lll and \ggg math symbols, present in mathtimes but not in lucida. But now the \oplus is absent in mathtimes whereas it is present in lucida. I am thus stuck with having two fonts missing different math symbols. Is Math Times suffering from the same problems as Lucida? By the way, I have the fonts pfb's which were bought quite some time ago. On 15 okt. 2011, at 16:48, Hans van der Meer wrote: I see dat in Lucida (I am using \setupbodyfont[lucida,sans,10pt]) various math symbols are recognized (no error) but their glyphs stay empty in the typeset product. I know there has been some discussion on Lucida and talk of forgetting pfb's and waiting for an opentype version. But can this be remedied fairly simply? I am somewhat attached to Lucida and would like to keep using it. Otherwise, is there some good (free) font selection to replace it, even if for the time being? Especially the fit with monotye and math I deem important. Thanks in advance, Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] arguments on context call
The context --help shows the following option: --arguments=list set variables that can be consulted during a run (key/value pairs) It looks like something I need at the moment. There seems to be no further information on it, at least not be searching the wiki with context arguments. I have the two questions: (1) how is the list given? context arguments=key1=value1,key2=value2 or context arguments=key1=value1,key2=value2 or otherwise (2) how are these values picked up inside the TeX-run for use in typesetting? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] arguments on context call
Thanks, but I am afraid I do not understand the mechanism well enough. I did the follwoing call in the shell: context --fontchoice=my font choice test And in the test.tex file: variable mykey = \getvariable{documents.arguments}{fontchoice}\crlf But that clearly didn't work. Hans van der Meer On 16 okt. 2011, at 18:02, Thomas A. Schmitz wrote: On 10/16/11 5:35 PM, Meer, H. van der wrote: The context --help shows the following option: --arguments=list set variables that can be consulted during a run (key/value pairs) It looks like something I need at the moment. There seems to be no further information on it, at least not be searching the wiki with context arguments. I have the two questions: (1) how is the list given? context arguments=key1=value1,key2=value2 or context arguments=key1=value1,key2=value2 or otherwise (2) how are these values picked up inside the TeX-run for use in typesetting? Hans van der Meer I recently looked that up on the list archive, so here's a link: http://archive.contextgarden.net/message/20110107.215824.8d1287ab.en.html Thomas ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] arguments on context call
Thanks, I was already trying to jump through the hoops of \ctxlua, but this is really simple and exactly what I needed. The offline calls to context/metapost figure production now can get all the information needed to synchronize with the main document. Hans van der Meer On 16 okt. 2011, at 19:32, Wolfgang Schuster wrote: Am 16.10.2011 um 19:14 schrieb Meer, H. van der: Thanks, but I am afraid I do not understand the mechanism well enough. I did the follwoing call in the shell: context --fontchoice=my font choice test And in the test.tex file: variable mykey = \getvariable{documents.arguments}{fontchoice}\crlf But that clearly didn't work. file name=test.tex \doifdocumentargument {bodyfont} {\setupbodyfont[\getdocumentargument{bodyfont}]} \starttext This document uses “\doifdocumentargumentelse{bodyfont}{\getdocumentargument{bodyfont}}{Latin Modern}” as bodyfont. \stoptext /file $ context --bodyfont=pagella test.tex Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] beta: Huge log files
syst-ini.mkiv line 626: \tracingstats\plusone The only one I find, but I skipped yhe mkii files. Hans van der Meer On 19 okt. 2011, at 11:46, Hans Hagen wrote: On 19-10-2011 10:03, luigi scarso wrote: Any ideas what's going wrong here? Thanks in advance! it seems that there is a \tracingall somewhere indeed, so best grep for that on your source files Hans ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with MPpage
Does your result differ from mine here? The endpoints on the line suggest it was fully drawn and thus metapost behaves correctly. This was with ConTeXt ver: 2011.10.14 22:47 MKIV fmt: 2011.10.19 int: english/english on a Macintosh. standalone.pdf Description: standalone.pdf Hans van der Meer On 20 okt. 2011, at 07:18, Lutz Haseloff wrote: Hi all, next Metapost problem. \starttext \startMPpage pickup pencircle scaled 2mm ; draw (0,0)--(5cm,5cm) withcolor red; \stopMPpage \stoptext The resulting pdf does not show the whole red line. The size of the pdf is right but it is shifted to the upper right. Thanks for any help Lutz ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] metapost question
On 21 okt. 2011, at 17:13, Peter Rolf wrote: Am 21.10.2011 15:05, schrieb Hans van der Meer: I cannot find the answer to the following question in Knuth's Metafont book. The following definition with a trailing text argument: def mydef (expr a, b, c) text modifier = if modifier = empty: Have you already tried if modifier = : else: fi enddef; I tried it now, but it doesn't work. Something like if(TEXT4) =:;fi in the error log. No, Metapost is not happy with this construct. How can I do the switch on an empty or nonempty modifier argument? It is not a string because calling its length fails with an error. I must do the switch, because fill modifier with an empty modifier gives horrible results. Usage would be calls like: mydef(1,2,3) withcolor green; % with modifier text mydef(1,2,3); % without modifier text Thanks in advance. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] metapost question
Peter, Thanks for trying to help. Because I solved the problem in another way you might be interested or even benefit from it. The underlying problem was drawing a border around a picture of given dimensions. The border being either colored or left uncolored. The border color should come from a withcolor modifier, with the uncolored case done simply by leaving this out, for example: borderinsideframe(u,v,2g); and borderinsideframe(u,v,2g) withcolor red; It turns out this can be done with an unfill. I learned that a bare unfill erases, but add a withcolor modifier and the effect is a coloring. Thus the trick is: def bordercolorframe (expr w, h, off, clr) text modifier = unfill (-off,-off)--(w+off,-off)--(w+off,h+off)--(-off,h+off)--cycle modifier; fill (0,0)--(w,0)--(w,h)--(0,h)--cycle withcolor clr enddef; The omission of a semicolon after the last statement of the def allows one to add in a withcolor somecolor without triggering an error. Hope this will be of use to someone. Hans van der Meer On 21 okt. 2011, at 17:13, Peter Rolf wrote: Am 21.10.2011 15:05, schrieb Hans van der Meer: I cannot find the answer to the following question in Knuth's Metafont book. The following definition with a trailing text argument: def mydef (expr a, b, c) text modifier = if modifier = empty: Have you already tried if modifier = : else: fi enddef; How can I do the switch on an empty or nonempty modifier argument? It is not a string because calling its length fails with an error. I must do the switch, because fill modifier with an empty modifier gives horrible results. Usage would be calls like: mydef(1,2,3) withcolor green; % with modifier text mydef(1,2,3); % without modifier text Thanks in advance. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] color and textext
After some struggling with text colouring in metafun I finally encountered on the wiki: Another difference is the way text is handled in mkiv. In particular, color (withcolor) is not applied to metapost text. For example, draw thelabel(decimal i, (i, 0) scaled 1cm) withcolor red ; currently does not work in mkiv. However, label(textext(\color[red] decimal i), (i, 0) scaled 1cm); does work. This second solution works both in mkiv and in mkii. (Note that \color[red] can be abbreviated \red.) My question: is currently in currently does not work in mkiv in fact permanently or will this restriction soon be lifted? If the restriction is here to stay, I will have to find a workaround for my label-typesetting code in metapost. Or perhaps someone can tell me how to make textext use a color existing in the metapost world. That would work as well. Explaining my setup: The colors are taken up in metapost with def defineColors (expr outlineColor, …) … outlinecolor_ := outlineColor … enddef; which is called in ConTeXt as …(\MPcolor{aColor}… But I do not know how to transform the \MPcolor{aColor} back into a form to be used as for example textext(aColor… Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] macro string in metapost
The goal is to make the following string in metapost: string s; where s must become \MPcolor{Blue}. and ultimately execute this at the right moment with: scantokens s; The following makes s = MPcolor{Blue}: s := MPcolor char oct134 char oct173 Blue char oct134 char oct175; But I seem unable to add a \ in front of it without expanding the string by TeX. Thus it does not work to put: s := char oct134 MPcolor char oct134 char oct173 Blue char oct134 char oct175; Placing a \noexpand in front does not help. How to? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Problem with mkiv under MacOSX 7 (Lion)
Works here too, MacOSX 10.7.2. That is, I installed the latest context beta. If it might help: I have a directory ~/TeX/context containing the following two files: contextbeta Description: contextbeta first-setup.sh Description: first-setup.sh and in the directory ~/TeX/context/tex/texmf-local (actually a link to my own stuff). Installing is done by cd'ing to ~/TeX/context and calling contextbeta. On 5 nov. 2011, at 12:50, Robert Blackstone wrote: Dear All, Is there anyone who could help me with the following: ConTeXt mkiv does not work on my Mac under MacOSX 10.7 (Lion). This holds not only for the minimals installed yesterday (04-11-2011) but also for older versions (september and october, migrated from another Mac under OSX-10.6) I attach the log file. Could it be that Lion is not yet supported? (mkii seems to work OK) Thanks in advance, Robert Blackstone Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] formula placement
I find I get a fairly large whitespace after the formulas placed with: \placeformula\startformula \stopformula How can I reduce this? The wiki does not give a parameter description for \setupformulas. In the code I can only find some [distance=] parameter. But using it with for example \setupformulas[distance=-10pt] scored no visable effect. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] terrible png placement
Sofar I received 2 reactions. (1) Can't reproduce here; I get a 70KB pdf with your file and image. ConTeXt standalone, 32-bit Linux, mkiv, version 2011.10.01 10:48. (2) I've encountered the same problem. The PDF is 1.8MB big. Compressed with qpdf (qpdf --stream-data=compress) its only 60KB! Latest beta on OS-X 10.7.2 Further search for the cause: My system is also OS-X 10.7.2 and latest beta. To find the culprit I reverted to an older version of ConTeXt. ConTeXt ver: 2011.10.14 22:47 MKIV fmt: 2011.11.11 int: english/english Now the filesize becomes 72KB instead of 1.8 MB. This one seems OK. CONCLUSION: This must have been introduced in one of the beta's later than 2011.10.14 and in or before the current one: ConTeXt ver: 2011.11.04 14:15 MKIV. I kindly suggest Hans takes a look into the matter. Hans van der Meer On 10 nov. 2011, at 21:22, Hans van der Meer wrote: Something terrible must be done to png pictures, either in ConTeXt or in luatex. I have the following minimal sample code and picture. I include the png for those who want to check. % Test png addition. \starttext Place png figure.\par \placefigure{Test figure}{\externalfigure[test.png]} \stoptext Without the png-picture it makes an 8KB pdf. But with the png-picture the pdf swells to 1.8MB. And that for a png-picture of only 48KB. Moreover making a zip of all this stuff brought the size back to 110KB. In the log: ConTeXt ver: 2011.11.04 14:15 MKIV fmt: 2011.11.10 int: english/english mkiv lua stats graphics processing time - 0.001 seconds including tex, 1 processed images ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] extra white after equation
I guess I have found the culprit in the bad placement of formulas without an equationnumber. The minimal example I used is that found in strc-mat.mkiv, added a [-] in the middle one. \setuppapersize[A6][A6] \setupformulae[spacebefore=0pt,spaceafter=0pt] % HERE REDEFINED \dododoformulanumber \starttext \placenamedformula[one]{first} \startformula a = 1 \stopformula \endgraf \placeformula[-] \startformula a = 2 \stopformula \endgraf \placenamedformula {second} \startformula a = 3 \stopformula \endgraf \stoptext It appears that in the case of an absent equationnumber extra stretching takes place at the position of the (now absent) equationnumber. Placing phantom ()'s remedies this. The effect is best seen by enabling the \rlap{\tracedformulamode}%-line. May I ask Hans to take a look and change it in the next beta if this indeed a correct solution? For my suggestion for the change see below. Thanks in advance. Hans van der Meer On 13 nov. 2011, at 14:57, Hans van der Meer wrote: I find that the placement of an equation number makes a difference on the amount of white after the equation. Should they both give the same amount of whitespace? Or is the difference intentional? But then why? I add a minimal example. Output (1) as in Context ver: 2011.11.04 14:15 MKIV Output (2) with redefined \ dododoformulanumber % lines 240+ in strc-mat.mkiv \def\dododoformulanumber {\ifconditional\handleformulanumber \hbox\bgroup % main counter \ifconditional\insidesubformulas % nothing \else \ifcase\formulasnumbermode \ifcase\placeformulanumbermode \dohandleformulanumbering \or \dohandleformulanumbering \or % nothing THIS SEEMS BAD \phantom{()}% THIS GIVES CORRECT SPACING \or \dohandleformulanumbering \fi \or \dohandleformulanumbering \or % nothing \or \dohandleformulanumbering \fi \fi % subcounter \ifconditional\insidesubformulas \ifcase\subformulasnumbermode % nothing \or \dohandlesubformulanumbering \or % nothing NOT CHECKED BUT PROBABLY SAME AS ABOVE \phantom{()}% PROBABLY HERE TOO \or \dohandlesubformulanumbering \fi \fi %\rlap{\tracedformulamode}% \egroup \fi} equationwhite-bad.pdf Description: equationwhite-bad.pdf equationwhite-good.pdf Description: equationwhite-good.pdf ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] referencing
Thanks Wolfgang for the code. Just in case it is of use I concocted my variation on this theme. Now this simply replaces the \in, \at and \about macro's with one that does not show on the page where the link originates, but behaves as of old everywhere else. I introduced the unskip in order to remove the space that ruins the end of a line when there is nothing to display. For example from \in{see there}[ref]. --this period would otherwise acquire a space before it. \def\SamePageDo#1[#2]% {\doifreferencefoundelse{#2} {\ifnum\referencepagestate=1 \unskip%\unknown % reference is on the same page \else #1[#2]% \fi} {\unskip}} % reference not found \let\oldin=\in \let\oldat=\at \let\oldabout=\about \def\in{\SamePageDo\oldin} \def\at{\SamePageDo\oldat} \def\about{\SamePageDo\oldabout} Hans van der Meer On 20 nov. 2011, at 19:42, Wolfgang Schuster wrote: Am 20.11.2011 um 18:46 schrieb Hans van der Meer: I have the following question about references. Using for example \at one can say somehting like see on \at{page}[ref] for the figure.. But when the figure is one the same page it seems a bit superfluous to reference to it. In the same manner it is a bit of an overkill to put a hyperlink to the page where this link resides itself. It is clear that ConTeXt knows if it is on the same page as is referenced, because then a link is coloured with contrastcolor instead of color. Now the question: how easy/difficult is it to either suppress such an \at-reference or switch between chosen alternate texts for links on or off the same page as the referenced item? \def\SamePage[#1]% {\doifreferencefoundelse{#1} {\ifnum\referencepagestate=1 \unknown % reference is on the same page \else \at[#1]% \fi} {\donothing}} \starttext \pagereference[one] \pagereference[two] One: \SamePage[one] \page Two: \SamePage[one] \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] setupinteraction kills dodoubleargument
On 21 nov. 2011, at 14:55, Wolfgang Schuster wrote: Am 21.11.2011 um 14:25 schrieb Hans van der Meer: In my documents I use a macro in footnotes, which is defined though \dodoubleargument. However, enabling interactions (which must be done too) plays havoc with \dodoubleargument, though \dosingleargument seems to escape unharmed. Why is this? Can it be repaired? Change your definition for \testa and \testb to \unexpanded\def\testa{\dosingleempty\dotesta} Not needed, because \dosingleargument, \dosingleempty are not harmed. and \unexpanded\def\testb{\dodoubleempty\dotestb} This is a solution, so I can go on with my document. But isn't it better in general when the problem is solved in \footnote? Because outside it I encountered no problem with the \dodouble's. It would be a pity if everyone who tries to something of the sort, will have to tackle this problem (unless looking into the archives of this group, of course). I was lucky, because the addition of \setupinteraction[state=start] was one of the last things I changed and thus suggested itself readily as the source of the troubles. Maybe it can be put on some todo/later-todo list? Wolfgang ___ Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] equation numbering
ConTeXt still has some mysteries for me ;-) This time it is the equationnumbering. Doing \placeformula\startformula..\stopformula gives the equation a certain number, lets say (1.5). Now I change the call to \placeformula[equ:thisfml]\startformula..\stopformula and the number changes to (1.6). Why is this? What I have in mind is to number all formula consecutively with (chapternumber.1), chapternumber.2) etc. Regardless whether I want to reference some of the equations later on and some can stay without a reference because that is not needed. Nevertheless, the ascending numbering pleases me. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] interaction?
On 25 nov. 2011, at 17:33, Wolfgang Schuster wrote: Am 25.11.2011 um 17:26 schrieb Hans van der Meer: I have troubles with interaction in a screen document. (1) I took the example from the wiki: \setuppapersize[A6][A6] \setupinteraction[state=start] \setupreferencing[interaction=all] \starttext Reference is here \reference[label:1]{Some text} \page[yes] % Insert page break Link to \goto{some text elsewhere}[label:1]. \stoptext Although the link on page-2 brings me to page_1, the contents of {Some text} has completely disappeared. Why is this? What is the essence of having this argument if it is not displayed? You can show the text when you call the reference with “\getreference[text][label:1]”. This confuses me more. Perhaps I am misunderstanding but now I get from this: Reference is here \reference[label:1]{Some text}\blank and is: \getreference[tekst][label:1] The output reads as follows, empty at the place of the \getreferenc: Reference is here and is: I also tried \getreference{tekst}[label:1] but that becomes worse: ??tekst[label:1] (2) Transfering this code to a more complex document containing other references, to figures, tables etc. makes the action disappear! Clicking then does nothing, although the links to the figures and tables can be used. The link works when the code above is placed BEFORE \completecontent. But becomes incative when put BEHIND it. The index however has links transferring to the various part of the3 document. Please can some enlighten me? Why are links through \placefigure, \placetable alive and those with \reference-\goto are not? Do you have a example? I quickly tried to put some things together but did not yet find the behaviour. But the real document is part of a project met products and components. Later I will setup a similar textproject to see if that could be the cause. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] captions trouble
Something seems amiss in the code below. The idea is having in general figures with numbered labels, but now and then a figure without. First I thought to use [location=none] on the placement, but then the numbering is not interrupted: label-1 (label-2 invisible), label-3. That is disturbing to the reader who will think a figure is missing. The numbering and the label are suppressed by \setupcations[number=no] and reinstated with \setupcaptions[number=yes]. But this kills the space between the label and the caption. I enclose a minimal example that shows the effect. Could this be a bug? \setuppapersize[A6][A6] \starttext \placefigure[][fig:1]{label with space}{\externalfigure[arrows.pdf]} \setupcaptions[number=no] \placefigure{}{\externalfigure[arrows.pdf]} \setupcaptions[number=yes] \placefigure[][fig:3]{label without space}{\externalfigure[arrows.pdf]} \stoptext Hans van der Meer labelspace.pdf Description: labelspace.pdf ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] captions trouble
My mistake. I remembered [number=no/yes] but it turns out there is also [number=none]. Which does the trick. And the [distance=(dimension)] sets the distande between label and caption. Hans van der Meer On 26 nov. 2011, at 12:50, Jaroslav Hajtmar wrote: Hello Hans, My tip is use \setupcaptions[number=yes, suffix=\hskip5mm] I do not know whether it is a clean solution, but visually it looks OK. Probably will need to determine the exact size of \hskip parameter. Jaroslav \setuppapersize[A6][A6] \starttext \placefigure[][fig:1]{label with space}{\externalfigure[arrows.pdf]} \setupcaptions[number=no] \placefigure{}{\externalfigure[arrows.pdf]} \setupcaptions[number=yes, suffix=\hskip5mm] \placefigure[][fig:3]{label without space}{\externalfigure[arrows.pdf]} \stoptext Dne 26.11.2011 12:29, Meer, H. van der napsal(a): \setuppapersize[A6][A6] \starttext \placefigure[][fig:1]{label with space}{\externalfigure[arrows.pdf]} \setupcaptions[number=no] \placefigure{}{\externalfigure[arrows.pdf]} \setupcaptions[number=yes] \placefigure[][fig:3]{label without space}{\externalfigure[arrows.pdf]} \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] displaylines in textetxt?
Is it impossible to typeset displaylines in textext called inside metapost? The gives an error: \starttext \startMPpage label(textext($$\displaylines{a=b\cr}$$\strut),origin); \stopMPpage \stoptext metapost/context/base/metafun.mpiv ! Missing } inserted. -- inserted text } to be read again \halign \displaylines ...spl@y \tabskip \zeroskip \halign {\hbox to \displaywidth {$… Though for example, \matrix,\cases seems to work. I already have put \unexpanded in front of the definition of \displaylines in math-pln.mkiv Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] crlf in textext?
Thanks. That solves the problem. I obviously missed the fact that textext is an \hbox, a fact that explains its behaviour. Hans van der Meer On 15 dec. 2011, at 16:06, Aditya Mahajan wrote: On Thu, 15 Dec 2011, Hans van der Meer wrote: Is it correct that the use of textext(label,pos) in MetApost pictures does not honor \crlf? I could not make a twoline text with textext(abc\crlf xyz,pos), it comes out as one line abcxyz. Is it a feature or a defect? textext(...) is a hbox. So you need to either use textext(\vbox{... \crlf ...}) or textext(\noexpand\framed[align=normal]{... \crlf ...}) Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] pdf arrange
I am afraid I did not phrase my question clear enough. The problem is producing a rearranged pdf from an existing one. Hans van der Meer On 17 dec. 2011, at 17:50, Marco Pessotto wrote: Hans van der Meer havdm...@xs4all.nl writes: I think I saw in the recent past here something about rearranging the pages of a pdf. However, I cannot find it, therefore I take the liberty to place this question. The idea is to change the pages from 1,2,3,4,etc, into 1,3,2,4,etc. Can it be done with one of the tools in the ConTeXt distribution, or else..? Thanks in advance It's described in Layouts in context. There are plenty of schemas for the imposition. For example: \setuppapersize[A5][A4,landscape] \setuparranging[2UP] % or \setuparranging[2*2*2] \setuppagenumbering[alternative=doublesided] \starttext \dorecurse{20}{\input knuth} \stoptext Then compile with context --arrange source.tex Bests. -- Marco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] new beta
Has the following been found and corrected? \definetypeface [\typescriptone] [tt] [mono] [cursor] [default]argument \@tlstyle argument \@tlstyle \dousestyleparameter ...\currentstyleparameter {#1 }\ifx \currentstyleparamet... argument ...\hss \dousestyleparameter \@tlstyle \dousecolorparameter \@tlc… apparently in: pack-mrl.mkiv My typesetting of an xml-document cannot advance because of this missing \@tlstyle (and possibly also \@tlcolor?) Is there a quick fix? Hans van der Meer On 31 dec. 2011, at 13:32, Hans Hagen wrote: Hi, I uploaded a new beta. As I'm still in cleaning-up mode, the usual problems could show up as quite some code was adapted (moved around). For those interested there is a file 'status-mkiv' that can be run to get an overview of where we stand. One big change has been the way alignments are initialized. There were two methods (one for \setupalign and one for align keywords) and these have been merged into one. A side effect is that an alignment change is twice as fast as before which might make a difference in excessive usage of \framed and some table mechanisms. Another change is that \color[whatever]{} now always expects an argument (in \MKII {\color[red] ...} is valid too. Some more commands might get that restriction but not the style switchers etc). Again this is twice as fast as the previous method (probably not that noticeable as many switches happen otherwise). For those who won't/didn't get it by snail mail .. this years card can be found at http://www.pragma-ade.com/show-gra.pdf#page=33 In 2012 it will of course again be a gamble if the betas work out well, Hans ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] searching xml node tree
In the processing of xml data path expressions like a/(b|c)/*/d etc. can be used. However, I have a node that can be present inside every node of the tree. One method to collect these all together is bij successive calls: \xmlall{#1}{/node}, \xmlall{#1}{/*/node}, \xmlall{#1}{/*/*/node}, etc. But that fails if the tree is deeper than foreseen. I tried recursive searching within the node-setup-processor by calling \xmlall{#1}{../*/node} but either this fails or I am not doing it the right way. Any ideas? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] xml processing
Is there a macro to retrieve the name of the file when inside a call to \xmlprocessfile? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] strip space in xml
I have the following problem with xml processing. Spurious space is typeset, annoyingly visible when nearly equivalent structures are typeset one under another. Take the following node structure where the text node is the one intended to contribute to the typeset material, whereas anothernode is not. root node anothernode../anothernode text .. /text /node /root Doing in the root-node: \xmlstripnolines{#1}{/node}\xmlall{#1}{/node} removes some of the unwanted spaces but not all. Especially the space between /anothernode and text does not completely disappear (seen with \xmlstrippednolines). This also occurs when /anothernode and text are on the same line separated by a number of spaces. The space disappears when /anothernodetext are put next to another. However, this destroys the neat typography of the xml. The manual tells me that \xmlstripnolines ..collapses embedded spaces from nodes under node.. That seems correct in that obviously the code leaves one space from the intervening spaces/newlines. But this gains me nothing! Why leaving a single space between node and next-node? For me this defeats the purpose of xmlstripnolines. Can this be remedied? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \def undefined on xmlsetup
The following setup gives an error. \startxmlsetups xam:parameter \edef\parameter{\xmltrim{#1}} \stopxmlsetups system tex error on line 7 in file xam-test.tex: Undefined control sequence ... \@@su:xam:parameter #1-\edef \parameter {\xmltrim {#1}}\verbose {parameter .. l.7 } How to avoid that one? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] reprocessing xml
The macro \xmlstripped{node}{lpath} gives me the xml resulting from the strip. after some operations on this result I would like to reprocess this in order to typeset. How do I accomplish this? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] reprocessing xml
Another possibility would be to interpose the Lua-code somwhere in between the processing stream. The \directlua-call can get its input from \xmlstripped and then does a tex.print back to ConTeXt. Or is there a more direct way to substitute the manipulated string for the original input? Hans van der Meer On 2 jan. 2012, at 20:04, Meer, H. van der wrote: The macro \xmlstripped{node}{lpath} gives me the xml resulting from the strip. after some operations on this result I would like to reprocess this in order to typeset. How do I accomplish this? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] framedtext in itemize
That is it! Thanks. Hans van der Meer On 4 jan. 2012, at 17:09, Wolfgang Schuster wrote: Am 04.01.2012 um 16:25 schrieb Hans van der Meer: Why does framedtext extends to the right in \itemize? Shouldn't the width be reduced by the extend of the item-shift? Isn't that the idea behind the fit-parameter. It wouldn't be a problem to calculate a reduced width, but how can I access the marginshift caused by the item? Use “width=local”. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] missing macro
The macro \expandoneargafter seems to have been disappeared. Is that true? I need it for repairing an appearent failure in the \Word macro to capitalize the first letter in some case. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] missing macro
In the meantime I have looked further into the problem. Although in the past redefinition of \Word was the only way to repair, this time there was a destructive interference with \startframedtext. It turned out that \startframedtext[align=middle, etc.] played havic with the following input, to the effect that \Word didn't work as expected. The simple solution --after some digging into my notes inside my (very) old copy of the ConTeXt manual-- was to always put the first set of brackets (even if empty) on the start: \startframedtext[][align=..] etc. Then the problem goes away, but I keep my fingers crossed ;-) No cause for calling bug therefore. Hans van der Meer On 5 jan. 2012, at 20:10, Wolfgang Schuster wrote: Am 05.01.2012 um 19:51 schrieb Meer, H. van der: The macro \expandoneargafter seems to have been disappeared. Is that true? I need it for repairing an appearent failure in the \Word macro to capitalize the first letter in some case. Do you have a example where \Word fails in MkIV. The macro was removed because in MkIV many situations can be handled in a better way. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] How to define a command...
Reccently I did something random in ctxlua. I post it in the hope it will be useful. Hans van der Meer \startluacode -- Define our namespace as hvdm hvdm = hvdm or {} -- Return random series of numbers 1..n depending on the number of arguments function hvdm.randomseries (n, straight) local done = {} for i = 1, n do done[i] = i end if straight == false then return table.concat(done,,) end local result = for i = n, 2, -1 do local r = math.random(i) result = result .. done[r] .. , table.remove(done,r) end result = result .. done[1] return result end \stopluacode \def\RandomSeed#1{\directlua{math.randomseed(#1)}} \def\RandomValue{\directlua{tex.print(math.random())}} \def\RandomRange#1{\directlua{tex.print(math.random(#1))}} \def\RandomSeries[#1]#2{\ctxlua{tex.print(hvdm.randomseries(#2,#1))}% On 5 jan. 2012, at 21:05, Otared Kavian wrote: Hi all, I need to define numerical coefficients (essentially at random) and then use them with commands, say like \CoeffAlpha, \CoeffBeta, and so on. More precisely, how can I define the command \RandomCoeff, so that \RandomCoeff{Beta}{1}{10} yields a command named \CoeffBeta, which is a random number chosen between 1 and 10? I tried to use the following approach, but could not make it work: %%% begin random-coeff.tex \setuprandomize[2012] % set a seed \ctxlua{CoeffAlpha = math.random(1,10) ;} \def\CoeffAlpha{\ctxlua{tex.print(CoeffAlpha)}} % \define[3]\RandomCoeff{% \ctxlua{a = math.random(#2,#3)} % \csname{Coeff#1}\endcsname{\ctxlua{tex.print(a)}} %% this line does not work as expected... } \starttext \CoeffAlpha \RandomCoeff{Beta}{1}{10} \ctxlua{tex.print(a)} %\CoeffBeta \stoptext %%% end random-coeff.tex Thanks in advance for any suggestion or hint. Best regards: OK ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] TeX inside XML
Allthough typesetting through xmlcontext crashed, while direct typesetting did not, the culprit does not seem to be in the different routes. After one day ploughing through \halign and friends, I think I can nail it to a specific \omit in my code. Not that all problems are solved with that find, but it is a start. Anyway, for the moment no reason to panic about \xmlcontext. I hope this will please Hans Hagen, a bit. Hans van der Meer On 5 jan. 2012, at 18:33, Hans van der Meer wrote: I need to do some ConTeXt work inside an XML-proces. In principle this works for most TeX-code through an appropriate xmlsetup that calls \xmlcontext. However some code has problems, and it will be no surprise that it concerns table suff. The error is: Misplaced \omit ... \@tbxmultispans #1-\omit \scratchcounter #1\relax \advance \scratchcounter … As this code runs fine in normal ConTeXt environments, the suspicion is some catcode problem. Can I set inside the \xmlsetup-code something to have \xmlcontext using the correct catcode's, iff that turns out to be the problem of course. Thanks in advance. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] buffer broken?
On 11 jan. 2012, at 11:33, luigi scarso wrote: On Wed, Jan 11, 2012 at 11:11 AM, Hans van der Meer havdm...@xs4all.nlmailto:havdm...@xs4all.nl wrote: Something must have been changed with buffers between the versions: ConTeXt ver: 2011.11.29 18:47 MKIV fmt: 2011.12.31 and ConTeXt ver: 2012.01.09 10tel:2012.01.09%2010:08 MKIV fmt: 2012.1.11 Formerly this was ok: \startbuffer[abc] whatever \stopbuffer Now I get: ! Missing } inserted. Because running this in isolation goes without a problem, I suspect the change has to do with the project structure in which I use the buffer. But again, it worked in the past. Does it works with \setbuffer[abc] whatever \endbuffer ? It works with these macros, yes. Thanks. But is \setbuffer..\endbuffer something new? I do not see it on the Reference page of the wiki. Also it doesn't seem in line with ConTeXt's regular naming scheme of \startsomething..\stopsomething. Can you give somewhat more information, for examle what is the difference between \setbuffer and \startbuffer? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] roman pagenumbers?
Trying to use roman numerals as pagenumbers failed. What am I doing wrong or has some other thing changed? A minimal example follows. Changing romannumerals into characters doesn't make a difference. This is ConTeXt ver: 2012.01.09 10:08 MKIV % test pagenumber conversion \setuppapersize[A6][A6] \starttext \setuppagenumber[number=1] \setuppagenumbering[conversion=romannumerals] % or: characters page 1\page page 2\page page 3\page \setuppagenumber[number=1] \setuppagenumbering[conversion=numbers] page 4\page page 5\page page 6\page \stoptext Hans van der Meer Untitled.pdf Description: Untitled.pdf ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] roman pagenumbers?
Thanks. I couldn't find out myself. I examined the wiki's referencepage before asking, but \setuppagenumbering and \setuppagenumber didn't mention this. Hans van der Meer On 11 jan. 2012, at 17:06, Wolfgang Schuster wrote: Am 11.01.2012 um 16:58 schrieb Meer, H. van der: Trying to use roman numerals as pagenumbers failed. What am I doing wrong or has some other thing changed? Use \setuppagenumber[numberconversion=…]. Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nlmailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] placefigure shifting up?
In my document I have a number of \placefigures, some pdf's, some jpg's etc. Mostly the figure are placed correct with respect to, the caption but sometimes for no apparent reason I can spot, the picture is shifted up. In the first illustration taken from the document this is clearly seen, picture and caption should be close together. Compare this with the other one. I do not have a minimal example at hand, the document is too big for that and as said, I could not yet force the behaviour. Both \placefigure's are exactly the same apart from their specific contents. Anyone who knows about this problem? For me it is quite a problem, because it ruins the document layout considerably. Hans van der Meer [cid:003D2B08-D3E6-491B-B30A-C6A5EA7C51A3@fritz.box] [cid:FE6C2B84-C13F-467D-A2B9-FFE45A519496@fritz.box] inline: shifted.jpginline: notshifted.jpg___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] placefigure shifting up?
I think I can nail the responsible one. As far as I can see the problem is tightly coupled with the following structure: \placefigure[][]{caption}{\startcombination[]{contents}{}{contents}{}\stopcombination} The other figures I have seem to placed well enough, the above structures behaving erratic. I could not completely ascertain whether empty desciptions parts in the combination-members plays a role. I really hope this will point the way to a fast solution from the gurus ;-) Hans van der Meer On 11 jan. 2012, at 20:21, Hans van der Meer wrote: I might add to this report the following observation: In a document with \setuppapersize [S8][S8] the shifts appear now and then, whereas these are typeset normally when the document is place on \setuppapersize [A4][A4]. It seems that the papersize and placefigure sometimes have a problem with each other. Hans van der Meer On 11 jan. 2012, at 20:01, H. van der Meer wrote: In my document I have a number of \placefigures, some pdf's, some jpg's etc. Mostly the figure are placed correct with respect to, the caption but sometimes for no apparent reason I can spot, the picture is shifted up. In the first illustration taken from the document this is clearly seen, picture and caption should be close together. Compare this with the other one. I do not have a minimal example at hand, the document is too big for that and as said, I could not yet force the behaviour. Both \placefigure's are exactly the same apart from their specific contents. Anyone who knows about this problem? For me it is quite a problem, because it ruins the document layout considerably. Hans van der Meer shifted.jpg notshifted.jpg ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nlmailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] xmlverbatim api changes?
Did I miss in the recent past some changes in the xmlverbatim API? Exercising from the manual the macros \xmldisplayverbatim{#1}{.} and \xmlinlineverbatim{#1}{.} I get as an error: ! Undefined control sequence. \startxmlinlineverbatim ... \doinitializeverbatim l.4 ] \ctxlxml #1-\directlua \zerocount {lxml.#1} \006:xmlcommon:pre #1-\xmlinlineverbatim {#1} {.} l.7 } \ctxlxml #1-\directlua \zerocount {lxml.#1} This version: ConTeXt ver: 2012.01.09 10:08 MKIV Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] include file in xml processing
I have seen that I can load a file (containing ConTeXt code) with \startxmlsetups xmlcommon:texinclude \writestatus{TEST HVDM}{file: \xmlatt{#1}{file}} \xmlload{#1}{\xmlatt{#1}{file}} \stopxmlsetups But how to use these loaded data? I want them included in ConTeXt-processing like this but it doesn't work: texinclude file=filename/ tex \useMPgraphic{xyz}{param=285} /tex The tex node is just a wrapper around \xmlcontext{#1}{.} Someone who can put me on the right track? Hans van der Meer On 19 jan. 2012, at 21:38, Hans van der Meer wrote: I have the following setup for use of ConTeXt code in an xml-processing setup: % Usage: tex ... /tex \startxmlsetups xmlcommon:tex \ignorespaces \xmlstripnolines{#1}{.} % need to strip sufficient space characters \xmlcontext{#1}{.} \stopxmlsetups Since I need some MetaPost drawings repeatedly I thought to include those from a separate file: tex \input thedirectory/thefile \useMPgraphic{lfsr}{stages=285} /tex The file is read, but typeset as is, MetaPost processing does not occur. By the way, inserting the MetaPost code in place of the \input works ok. I also tried \usemodule[thedirectory/thefile] instead, but then nearly everything MetaPost encounters is undefined. Does someone know how to get the file inclusion right? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nlmailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] checking attributes
Is the following impossible? The aim is checking the value of an attribute on a node: \xmlfilter{#1}{/content[@type ==\whatever]/command(xmlcommon:content)} It seems the \whatever macro is not expanded. How to? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] math error in ConTeXt?
Of these two variants the second works. The first gives as error an old enemy: the \Umathquad error % gives an error: \startsetups[test] $\displaystyle a=1 $ \stopsetups \setup[test] \stoptext % works: \starttext $$\displaylines{a=1\cr b+c+d=3\cr}$$ \stoptext ConTeXt ver: 2012.01.16 18:33 MKIV ! Math error: parameter \Umathquad\displaystyle is not set. \8:test #1-$\displaystyle a=1$ Why this error? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] overfull hbox on items
This setting gives an overfull hbox of exactly 3 points: \setupitemgroup[itemize][each] [joinedup,packed] [symbol=n,distance=3pt, align=right,itemalign=flushright, stopper={.\,} ] In the logfile: Overfull \hbox (3.0pt too wide) detected at line 7 Changing to distance=4pt makes the hbox 4pt too wide. Changing to distance=0pt (or delete parameter) makes the hbox fit. Why is this? Apart from cluttering the logfile, I guess this hbox overflow signals something that can be bettered. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] mathml
I ventured a first try of mathml in my code, but clearly I am doing something wrong. One of the examples in the XML-publication is: math applyroot/ cn3/cn applytimes/ applyplus/cia/cicib/ci/apply applyminus/cic/cicid/ci/apply /apply /apply /math It doesn't result in a neat formula, but there only appears: 3 ab cd. Is there a module I have to include? or what else? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] ntg-style error
Using the NTG-style to reprocess an older article I get the following error: ConTeXt ver: 2012.03.10 13:15 MKIV ... ! Undefined control sequence. ... system tex error on line 358 in file exammaps2.tex: Undefined control sequence ... \setupfootnotedefinition -\setupnotedefinition [\v!footnote ] l.358 \setupfootnotedefinition The style file is marked: %\module [ % file=s-map-se, % version=2005.02.03, % title=\CONTEXT\ Style File, % subtitle=\MAPS\ basis stijl, % author={Hans Hagen, Taco Hoekwater and Siep Kroonenberg}, % date=\currentdate, % copyright={NTG / MAPS}% %] Some change in the style file needed? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \attributedef not working?
Processing xml I get with: \writestatus{}{\xmlattributedef{#1}{.}{default}{???}} output: ??? and \writestatus{}{\xmlattribute{#1}{.}{default}} has no attribute output but with: \writestatus{}{\xmlattdef{#1}{default}{???}} output: mydefault Is something amiss with \xmlattribute and \xmlattributedef? I need these in order to get an attribute from a node higher up in the xml-tree. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] \attributedef not working?
Sorry, my fault. Just found out that the attribute sought is residing in another tree. Understandably the attribute is not found when the wrong root is taken. Thus \attributedef does its thing. Now I have to find out how reference that other tree. Hans van der Meer On 14 mrt. 2012, at 15:24, Meer, H. van der wrote: Processing xml I get with: \writestatus{}{\xmlattributedef{#1}{.}{default}{???}} output: ??? and \writestatus{}{\xmlattribute{#1}{.}{default}} has no attribute output but with: \writestatus{}{\xmlattdef{#1}{default}{???}} output: mydefault Is something amiss with \xmlattribute and \xmlattributedef? I need these in order to get an attribute from a node higher up in the xml-tree. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nlmailto:ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] xml tree extension?
Is it possible to have the following order of actions? root file name=filename1 file name=filename2 .. /root The file contains an xml-tree starting at fileroot.. At the moment I am processing the files with \xmlprocessfile{fileroot}{filename}{}, but this generate separate node-lists for root and fileroot; at least, that is my understanding of its workings. Can I change the processing in such a way that something akin the following tree structure is processed, each time with a new file: root file name=filename1/ fileroot .. /fileroot file name=filename2/ fileroot .. /fileroot .. /root Or is it impossible to accomplish? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] define macro from xml-attribute
I would like to accomplish the following in xml processing. node macro=various macro calls and then define the attribute value as a TeX macro. For example, to use this in font switching: node macro=\switchtobodyfont[helvetica] Doing this in the following manner does not work: \startxmlsetups namespace \def\macro{\xmlattdef{#1}{macro}{\empty}} \stopxmlsetups The contents evaluates not to a working macro. Something with catcodes, I presume, but I do not how to do it properly. Preferably I would like to see \meaning\macro evaluate to: \switchtobodyfont[helvetica]. Can someone enlighten me? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] lucida ot
Where to order? Is there special pricing for NTG members? Or else what does it cost? Hans van der Meer On 16 mrt. 2012, at 21:50, Hans Hagen wrote: Hi, It's now possible to order the new lucida open type (+math) fonts. Pretty cheap for user group members, Hans ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] mathml
I have a mathml question: how to typeset properly a function with an argument: f(x)? In the ConTeXt examples for mathml I see for one: lambda bvar ci x /ci /bvar /lambda But is there something like this for f(x), that is an f properly typeset? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] mathml question
There is something in the processing of mathml I do not understand. I keep the xml-node in a \startxmlsetups my:setup \def\mynode{#1} \stopxmlsetups Doing \xmlflush{\mynode} does typeset the contents of mynode, but not when mynode contains a mathml tree! Then the error is: Undefined control sequence ... \MMLhack -\let \MMLpar \par \let \par \relax \everyvbox {\let \par \MMLpar } \12:mml:math ...}} {\automathematics }}{\MMLhack \xmlflush {#1}}\endgroup Tested it with a simple: math xmlns='http://www.w3c.org/mathml' version='2.0' applyroot/ ci x /ci /apply /math The strange thing is, when putting the mathlml tree insize text mathml-content /text where: \startxmlsetups xam:text \xmltrim{#1}\par \stopxmlsetups then typesetting goes without an error! Can someone explain this behaviour? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] walking xmltree?
Is there a single macro/setup that walks the xml-tree, visiting each node? Either in preorder, inorder or postorder? Thus instead of: \xmlfilter{#1}{./command(xml:thecommand)} \xmlfilter{#1}{./*/command(xml:thecommand)} \xmlfilter{#1}{./*/*/command(xml:thecommand)} \xmlfilter{#1}{./*/*/command(xml:thecommand)} \xmlfilter{#1}{./*/*/*/command(xml:thecommand)} etc. doing this exhaustively with a single \xmlfiltertree{#1}{./command(xml:thecommand)} Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \startxmlsetups: extra parameters?
The \startxmlsetups definition has under #1 the current xml node available. Is it possible to add one or more parameters? Such that for example \xmlcommand{node}{lpath}{command {#1}{#2}…? } can be called with extra parameters? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] hbadness crippled?
Setting the distance parameter for item list to something greater than zero: \setupitemgroup[itemize][each][joinedup,packed][distance=3pt] generates in item lists overfull boxes: Overfull \hbox (3.0pt too wide). (1) At the time I teached programming we always learned students Silence the compiler. Allthough this message does no harm (only annoying me), I wonder why is it appearing? Setting distance seems quite normal. The extra space is exactly the added distance (confirmed by varying its size.) (2) TeX used to keep silent on these messages when one set \hbadness=1. But that does not work for me. Not even putting it right in front of \startitem content\stopitem, makes the warning go away. Is there a solution? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] new lucida font
I just bought the new Lucida font from TUG and installed it in my local texmf under fonts/opentype/bh/lucidaot/ Then I did: mtxrun --generate mtxrun --script font --reload to be sure the new install will be picked up by ConTeXt mkiv. I think I did read somewhere that mkiv will prefer otf above pfb files, if these otfs are present. However, after running \setupbodyfont[lucida,10pt] the log shows the old pfb's used: /Users/hans/TeX/texmf/fonts/type1/yandy/lucida/lbr.pfb instead of an otf? What could have happended? What am I doing wrong? By the way I do not see the lucida math fonts in the package. Are these missing? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] new lucida font
On 19 mrt. 2012, at 10:01, Wolfgang Schuster wrote: The new version of the lucida fonts use different names for the typescript, we have now: - “lucida” for the old type1 version, - “lucidaot” for the new opentype version and - “lucidanova” as alternative name for the opentype version. The lucidaot works. But I have observed the following, which might be caused by a naming difference. I am using ConTexT version 2012.03.13 21:26 MKIV; the latest I can download. The example is: \setuppapersize[A5][A5] \setuppagenumbering[state=off] \setupbodyfont[lucidaot,sans,10pt] \starttext sans {\it sans italic}. \stoptext But sans italic is not typeset in italic, see the output pdf below. In the log I see a message about a missing lucidanova.lfg. Present in a more recent beta perhaps In the opentype font list I do not find LucidaSansOT-Oblique but I do see LucidaSansOT-Italic. Could it be something should be changed in a typescript? Hans van der Meer In the log: ConTeXt ver: 2012.03.13 21:26 MKIV fmt: 2012.3.19 int: english/english system cont-new.mkiv loaded (/Users/hans/TeX/context-new/tex/texmf-context/tex/context/base/cont-new.mkiv system beware: some patches loaded from cont-new.mkiv ) system test.top loaded (test.top) fontslatin modern fonts are not preloaded languageslanguage en is active fontstypescripts unknown: library 'loc' (/Users/hans/TeX/context-new/tex/texmf-context/tex/context/base/type-imp-lucida-opentype.mkiv) fontsgoodies goodie file 'lucidanova-math.lfg' is not found {/Users/hans/TeX/context-new/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map} fontsdefining forced type otf of LucidaSansOT-Oblique not found fontsdefining font with asked name 'LucidaSansOT-Oblique' is not found using lookup 'file' fontsdefining unknown font LucidaSansOT-Oblique, loading aborted fontsdefining unable to define LucidaSansOT-Oblique.otf as [lucidaot-10pt-ss-it-0--0] backend xmp using file '/Users/hans/TeX/context-new/tex/texmf-context/tex/context/base/lpdf-pdx.xml' pagesflushing realpage 1, userpage 1, subpage 1 )/Users/hans/TeX/texmf/fonts/opentype/bh/lucidaot/LucidaSansOT.otf test.pdf Description: test.pdf ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] xmlinclude
Can someone tell me what \xmlinclude is supposed to do? I have experimented a lot but didn't come further to an understanding. I have called it through: \startxmlsetups xam:include \xmlinclude{#1}{include}{file} \stopxmlsetups from a node include in: probleminclude file=functions.xml//problem and indeed \enabletrackers[lxml.loading]gives me in the log: xml tex loading file './xm-test-problem.xml' as 'problem' But then nothing seemed to have happened. The xml-node in that file is never seen. I checked that by listing all these nodes in the log (\xmlcommand{\xmldocument}..) The include and others are listed, but not the contents of the file I thought I had included. Clearly I have some misunderstanding here as to what the manual implicates. It states: \xmlinclude{node}{lpath}{attribute} includes the file specified by attribute of the element located by lpath at node node. I take this 'node' ast the node from where the lpath is rooted, but I might be mistaken. And most of all: what happens to the included file and how can I approach/use its contents? I would appreciate an enlightment. Thanks in advance. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] getting xml instead of context
In the processing of incoming xml-data this is typeset as is, not as processed text. Thus for example: with \xmlflush{#1} the incoming data: textits_content/text is not typeset as: its_content, but as: textits_content/text. Substitution of \xmlcontext{#1}{.} for \xmlflush{#1} makes everything go away. Allthough my program is a bit too long to present here, a minimal example is the application of \xmlstripped{#1}{.} instead of \xmlflush{#1}; it has the same result. The output below shows how things looks and clarifies the issue; see the second answer of the multiple choice. How to process these data to neatly typeset material? Hans van der Meer xm-test-exam.pdf Description: xm-test-exam.pdf ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] howto execute loaded xml?
I made a minimal example showing that load'ed xml is not typeset. In contrast to the first text-node the second comes out as xml and not as typeset text. What has to be done to change that? Thanks in advance. Hans van der Meer \startbuffer[load-1] ?xml version=1.0 encoding=UTF-8? myroot include buffer=load-2/ textbuffer[load-1] contents/text /myroot \stopbuffer \startbuffer[load-2] includes textIncluded buffer[load-2] contents amp; ampersand./text /includes \stopbuffer \startxmlsetups load:setups \xmlsetsetup{\xmldocument}{myroot|text|include}{load:*} \stopxmlsetups\xmlregistersetup{load:setups} \startxmlsetups load:myroot \writestatus{TEST-LOAD}{loading myroot} \xmlall{#1}{include} \xmlall{#1}{text} \xmlall{includes}{text} \stopxmlsetups \startxmlsetups load:text *** \xmlflush{#1} ***\par \stopxmlsetups \startxmlsetups load:include \writestatus{TEST-LOAD}{loading include} \xmlloadbuffer{includes}{load-2} \stopxmlsetups \enabletrackers[lxml.loading] \setuppapersize[S5][S5] \starttext \hairline \xmlprocessbuffer{myroot}{load-1}{} \hairline \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] xml--verbatim in error?
I found something that might be an error in the current xml-processing. In the following minimal example een Undefined control sequence error occurs for the \xmldisplayverbatim and \xmlinlineverbatims. The \xmlverbatim doesn't. \startxmldisplayverbatim ...\doinitializeverbatim \beginofverbatimlines \startbuffer[test-1] ?xml version=1.0 encoding=UTF-8? myroot textbuffer[test-1] contents/text /myroot \stopbuffer \startxmlsetups load:setups \xmlsetsetup{\xmldocument}{myroot|text}{load:*} \stopxmlsetups\xmlregistersetup{load:setups} \startxmlsetups load:myroot \writestatus{TEST}{loading myroot node = #1 = \xmlname{#1}} % \xmlverbatim{#1}{text}\par \xmldisplayverbatim{#1}{text}\par % \xmlinlineverbatim{#1}{text}\par \stopxmlsetups \startxmlsetups load:text \writestatus{TEST}{node = #1 = \xmlname{#1}} \xmlflush{#1} \stopxmlsetups \enabletrackers[lxml.loading] \setuppapersize[S5][S5] \starttext \xmlprocessbuffer{myroot}{test-1}{} \stoptext Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] xml error
lxml-ini.mkiv defines: \unexpanded\def\xmlregisteredsetups {\xmlstarttiming \xmlflushsetups \xmldefaulttotext\xmldocument % after include \xmlstoptiming} but \xmlflushsetups can be found here only, nowhere else in the ConTeXt base-files does a search for it match. Calling \xmlregisteredsetups results in an error: Undefined control sequence \xmlregisteredsetups ...arttiming \xmlflushsetups \xmldefaulttotext \xmldocu... What could have happened to the xml-modules? As there seem more problems with it then this one alone. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] xml manual typo
I am reporting a typo in the MKIV XML-manual. It can put one on the wrong track. Section 3.7 Setups: \xmlsetup{name}{node} expands setup name and pass node as argument Note that name and node in the parameters are interchanged. It should read: \xmlsetup{node}{name} expands setup name and pass node as argument Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] howto execute loaded xml?
It took hours (some far in the night) to solve. Finally. I am posting this message just in case someone starts delving into it. Still standing is the problem of \xmlcommand not obeying the attribute selection but generating an error: \xmlcommand{#1}{path[@attrib==whatever]}{command} Hans van der Meer On 21 mrt. 2012, at 10:29, Meer, H. van der wrote: The output was missing in my previous post. Sorry. Here it is. Hans van der Meer On 21 mrt. 2012, at 10:27, H. van der Meer wrote: I made a minimal example showing that load'ed xml is not typeset. In contrast to the first text-node the second comes out as xml and not as typeset text. What has to be done to change that? Thanks in advance. Hans van der Meer test.pdf ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] greek items broken:
I do not get lowercase greek letters on the itemize as should happen with symbol setup g. A minimal example, showing the demise of lowercase greek against succes for uppercase. \starttext \startitemize[g] \startitem nr 1\stopitem \startitem nr 2\stopitem \startitem nr 3\stopitem \startitem nr 4\stopitem \stopitemize \startitemize[G] \startitem nr 1\stopitem \startitem nr 2\stopitem \startitem nr 3\stopitem \startitem nr 4\stopitem \stopitemize \stoptext Hans van der Meer itemsym.pdf Description: itemsym.pdf ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] greek items broken:
On 8 mei 2012, at 22:25, Wolfgang Schuster wrote: Am 08.05.2012 um 19:32 schrieb Meer, H. van der: I do not get lowercase greek letters on the itemize as should happen with symbol setup g. A minimal example, showing the demise of lowercase greek against succes for uppercase. It’s a font problem because MkII took the greek letters from the math font but MkIV takes them from the text font and Latin Modern doesn’t have lower case greek letters. Thanks. I was not aware of that problem. Indeed, the greek lowercase appears with \setupbodyfont[postscript]. But not with the brandnew \setupbodyfont[lucidaot], which is quite a nuisance. Can it be remedied with a more generic mkiv solution? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] greek items broken:
On 9 mei 2012, at 11:15, Hans Hagen wrote: On 9-5-2012 09:31, Meer, H. van der wrote: On 8 mei 2012, at 22:25, Wolfgang Schuster wrote: Am 08.05.2012 um 19:32 schrieb Meer, H. van der: I do not get lowercase greek letters on the itemize as should happen with symbol setup g. A minimal example, showing the demise of lowercase greek against succes for uppercase. It’s a font problem because MkII took the greek letters from the math font but MkIV takes them from the text font and Latin Modern doesn’t have lower case greek letters. Thanks. I was not aware of that problem. Indeed, the greek lowercase appears with \setupbodyfont[postscript]. But not with the brandnew \setupbodyfont[lucidaot], which is quite a nuisance. Can it be remedied with a more generic mkiv solution? - you can define a combined font that gets greek from a math font - you can define a conversion that takes greek from a math font (the second one could then be hooked into the 'g' option) I see, although I have not the faintest notion how to accomplish that. Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] \xmlcontext inoperative?
Loaded xml with: xmlinclude{problem}{include}{file} Then called up parts of its contents through a setup: \startxmlsetups xam:define:get % The definition is the one with content. \xmldoiftext{#1}{.}{ \foundtrue \xmlflush{#1} \xmlcontext{#1}{.} } \stopxmlsetups The strange thing is that the \xmlflush typesets verbatim the contents of the node called up: math version=2.0 xmlns=http://www.w3c.org/mathml; apply eq/ ci f(x) /ci apply plus/ ci 1 /ci apply power/ ci x /ci ci 4 /ci /apply apply power/ ci x /ci ci 7 /ci /apply /apply /apply /math but, to my surprise the \xmlcontext{#1}{.} lets it disappear completely. So does \xmlflushcontext{#1}. In other parts of the program \xmlcontext does what it should do, thus the mkvi format seems ok. What could have happened? Some detrimental effect of the \xmlinclude? Hans van der Meer ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___