Re: [NTG-context] mkiv: append to buffer
On Sun, Dec 19 2010, Thomas Schmitz wrote: > easy, yet my knowledge of TeX wasn't advanced enough to see this. Is > it because I'm inside a group and TeX empties the tokenlist once I > get out of the group? In this case yes, because the list was empty before the group. In general you get the value, that you had before entering the group. Peter -- Contact information: http://pmrb.free.fr/contact/ ___ 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] mkiv: append to buffer
On 19-12-2010 12:28, Thomas Schmitz wrote: So: I have been trying to write a macro that will retrieve problems from the database (successful, with help by Hans), pack them in an itemize list (successful), and store the solution somewhere so it can be typeset Why do you store the solutions if they're already stored in the xml? You can just filter them any time you want, can't you? Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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] error with m-database example
Hi, The example from http://wiki.contextgarden.net/m-database gives me an error. ! LuaTeX error ...t-beta/texmf-context/tex/context/base/m-database.lua:74: bad argument #2 to 'lpegmatch' (string expected, got nil) stack traceback: [C]: in function 'lpegmatch' ...t-beta/texmf-context/tex/context/base/m-database.lua:74: in function 'process' :1: in main chunk. \doprocessdatabase ...ameter \c!command \!!es , }} l.18 \stopMyTable I also, tried the first example of Mojca's CSV May Way (http://dl.contextgarden.net/myway/csv.pdf) which gives me: ! Undefined control sequence. l.36 \startseparatedlist [NaturalTable] Thanks for any suggestions, Florian ___ 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] startcolumns: text runs into footer
Hi Achim! On 2010-12-19 <13:09:51>, Achim Jander wrote: > Hi at all, > now I've run into the next problem: Trying to set text in 2 columns. > Even in the simples case: > > \showframe > > \starttext > > \startcolumns > > \dorecurse{20}{\input knuth} > > \stopcolumns > > \stoptext > > > The text goes ca 1 line into the footer-region. I played around with > various settings (blank, align=yes, setupwhitespace etc), but can > not figure out > how to keep the text in the main area only. > Another related question: for which purpose is the columns setting > in setuplayout? It doesnt seem to affect the output? > And still another question: how can i fine-control the amount of > whitespace, especially the strechability and shrinkability? > is \setupwhitespace[2pt plus 2pt minus 2pt] the right way? And how > is the equivalent syntax for \blank? (1) Columnsets cause less trouble than the ordinary “\[start|stop]columns”; (2) you have to define the vskips prior to using them with “\setupwhitespace” or “\blank”. ···8< \showframe \definecolumnset[two][n=2] \newskip\Hugeskip \Hugeskip = 4em plus 4em minus 4em \definevspacingamount[Huge][\Hugeskip][\Hugeskip] % for \blank \definewhitespacemethod[Notsohuge]{\ctxparskip.5\Hugeskip} % for \setupwhitespace \starttext \startcolumnset[two] \dorecurse{10}{\input knuth \blank[Huge]} \setupwhitespace[Notsohuge] \dorecurse{10}{\input knuth} \stopcolumnset \stoptext ···8< Further answers reside inside spac-ver.mkiv. Regards, Philipp > > Thanks, > Achim > ___ > 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 > ___ -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgpprtxOkfTFd.pgp Description: PGP signature ___ 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] mkii bug in lucida, again.
BTW, there is also something strange with lucida support in context recently. if I use \usetypescriptfile[type-buy] \usetypescript[lucida][texnansi] \setupbodyfont[lucida,14pt] I suppose it should load texnansi-xxx.tfm but it reports ! Font \*lucida12ptrmtfrm*:=hlhr8y at 12.0pt not loadable: Metric (TFM) file no t found. \relax \definefontglobal ...dcsname \lastfontname \relax \expandafter \let \expanda... \xxdododefinefont ...tspec {#4}\newfontidentifier \let \localrelativefontsiz... \fontstrategy ...me \fontclass #2#3#4#5\endcsname \tryingfontfalse \fi ...yle \fontalternative \fontsize \fi \iftryingfont \fontstr... \synchronizefont ...strategy \the \fontstrategies \relax \fi \iftryingfont \... ... l.3 \setupbodyfont[lucida,14pt] I think this is not correct. Yue Wang On Sun, Dec 19, 2010 at 12:26 PM, Yue Wang wrote: > This bug only exist in mkii. > > it appeared some time ago, but was fixed later, and reappeared again > sometime later this year. > > Hans, I will zip my lucida font and send to you in a private mail. > > Yue Wang > ___ 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] mkii bug in lucida, again.
This bug only exist in mkii. it appeared some time ago, but was fixed later, and reappeared again sometime later this year. Hans, I will zip my lucida font and send to you in a private mail. Yue Wang a.pdf Description: Adobe PDF document a.tex Description: TeX document ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Minimal spacing between sentences
Hi, how can I increase the minimal spacing between sentences? \setfrenchspacing seems to work only in a justified line: \starttext \setfrenchspacing{15000} This is a short sentence. It is not followed by a big space. Here are some justified lines which have big spaces: \input tufte \stoptext Thanks, Florian ___ 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] mkiv: append to buffer
Hooray, not it works!!! s/not/now/ 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 ___
Re: [NTG-context] mkiv: append to buffer
On Sun, 19 Dec 2010 13:21:26 +0100 Peter Münster wrote: On Sun, Dec 19 2010, Thomas Schmitz wrote: and this doesn't: \newtoks\mytoks \def\TestMacro#1#2#3% {\item[#1] #2\par \appendtoks \in[#1]: {#3} \to\mytoks} \doglobal \appendtoks \in[#1]: {#3} \to\mytoks} Cheers, Peter Hooray, not it works!!! Thanks a lot, everyone, thanks Peter - so easy, yet my knowledge of TeX wasn't advanced enough to see this. Is it because I'm inside a group and TeX empties the tokenlist once I get out of the group? All best 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 ___
Re: [NTG-context] mkiv: append to buffer
On Sun, Dec 19 2010, Thomas Schmitz wrote: > and this doesn't: > > \newtoks\mytoks > > \def\TestMacro#1#2#3% > {\item[#1] #2\par >\appendtoks \in[#1]: {#3} \to\mytoks} \doglobal \appendtoks \in[#1]: {#3} \to\mytoks} Cheers, Peter -- Contact information: http://pmrb.free.fr/contact/ ___ 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] startcolumns: text runs into footer
Hi at all, now I've run into the next problem: Trying to set text in 2 columns. Even in the simples case: \showframe \starttext \startcolumns \dorecurse{20}{\input knuth} \stopcolumns \stoptext The text goes ca 1 line into the footer-region. I played around with various settings (blank, align=yes, setupwhitespace etc), but can not figure out how to keep the text in the main area only. Another related question: for which purpose is the columns setting in setuplayout? It doesnt seem to affect the output? And still another question: how can i fine-control the amount of whitespace, especially the strechability and shrinkability? is \setupwhitespace[2pt plus 2pt minus 2pt] the right way? And how is the equivalent syntax for \blank? Thanks, Achim ___ 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] mkiv: append to buffer
On Sat, 18 Dec 2010 19:35:53 +0100 Wolfgang Schuster wrote: Am 18.12.2010 um 17:52 schrieb Aditya Mahajan: I am not sure what you want to do, and why you want to use buffers. Wont a simple token list work? I can only agree with this, token lists are the easiest solution but the new cld manuals mentions the context.tobuffer function which allows one to add content to a buffer. Wolfgang Aditya, Wolfgang, thanks for your replies. I didn't want to bore the list with lengthy explanations, but maybe I didn't give enough information. So here comes what I hope are the relevant bits: I'm typesetting sheets with problems and solutions for a class. Those come from an xml database. Unfortunately, there is one catch: depending on the type of the problem, some problems don't have an explicit solution. The problems are typeset as a numbered itemization on page 1; on page 2, I want the solutions, with matching numbers. And since I'm lazy, I don't want to take care of this myself but have context do it for me. So let's begin with the output. I want: PROBLEMS 1. problem without solution 2. problem with solution 3. problem without solution 4. problem with solution and then, on a new page: SOLUTIONS 2. solution to 2 4. solution to 4 So: I have been trying to write a macro that will retrieve problems from the database (successful, with help by Hans), pack them in an itemize list (successful), and store the solution somewhere so it can be typeset on the next page (unsuccessful as yet). I thought buffers were the natural way to go, but I must admit I didn't know about tokenlists. Aditya's suggestion unfortunately doesn't seem to work with itemizations. Test files: This works: \newtoks\mytoks \def\TestMacro#1#2#3% {\color[darkred]{#1} \color[darkblue]{#2}\endgraf \appendtoks \color[darkgreen]{#3} \to\mytoks} \starttext \TestMacro{A}{B}{C} \TestMacro{X}{Y}{Z} \hairline \the\mytoks and this doesn't: \newtoks\mytoks \def\TestMacro#1#2#3% {\item[#1] #2\par \appendtoks \in[#1]: {#3} \to\mytoks} \starttext \startitemize[n] \TestMacro{A}{B}{C} \TestMacro{X}{Y}{Z} \stopitemize \hairline \the\mytoks I have absolutely no preference for buffers or itemizations or whatever, so if there's a better solution, I'm all open. But for the time being, I don't get what I want. I'll look into "context.tobuffer" next... Thanks for any suggestions, and best wishes 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 ___
Re: [NTG-context] running headers on postponed makeup
On 2010-12-18 <21:06:11>, Hans Hagen wrote: > On 18-12-2010 6:12, Philipp Gesang wrote: > > >after discovering postponed insertions I encountered a problem > >when combining it with the makeup mechanism I am so fond of. > > The next beta will have changes mark behaviour: no reset in > everyforget cases, and a fix for pages with no text. The first case > is experimental as I cannot foresee unwanted side effects where a > reset *is* expected so that might be reverted and done differently. Hi Hans, this is great news and comes right in time. So far no side effects occured. Btw. what are those “systemattributes” for? Is attr-ini.mkiv still as “experimental” as it claims? Thanks for the fix, Philipp > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com > | www.pragma-pod.nl > - > ___ > 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 > ___ -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgpH18XngaXs2.pgp Description: PGP signature ___ 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] ascii ribbon
On 2010-12-18 <20:58:01>, Philipp A. wrote: > hi, > do you really support this obsolete statement? > > if so: why? > >- html mail is supported by every mail reader nowadays, and nowhere near >broken >- semantic html is way better for blind people than plain text, since it >is, well, semantically structured. something enclosed in em-tags will e.g. >pronounced in a accentuated voice by the screen reader. >- e mail sizes are no problem with today's hd capacity >- every proper mail reader does block pics from foreign sources for >privacy reasons > > essentially: this was true, and isn't anymore. > > if you think http://www.xkcd.com/386 , you are right, i'm like that :) I refuse to discuss this matter outside a pub. > > cu in the context forum, > philipp > ___ > 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 > ___ -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments pgp1QUoY3cCQK.pgp Description: PGP signature ___ 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 setupwhitespace
Hi Wolfgang, many thanks, thats what I was looking for. Am 18.12.2010 19:32, schrieb Wolfgang Schuster: Am 18.12.2010 um 16:10 schrieb Achim Jander: Hello, I am trying to setup a layout for a book. Its very simple, consisting only of paragraphs. Regularly, there should be no space between them, but to force the pages getting filled there may be a small space. I cannot figure out how to set it up. In the mailing list I found the sample \setupwhitespace[3pt plus 2pt minus 1pt] but in fact, that seems to have no effect, the page ist not filled. The Reference-Manual doesnt mention this form, but states that there is some stretchability. How can I define the stretchability? You don’t need \setupwhitespace, \setupalign[line] is enough. 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 ___