Re: [NTG-context] Referencing line numbers inside a typing
Am Dienstag 26 Oktober 2010, 21:12:01 schrieb Wolfgang Schuster: Am 26.10.2010 um 20:47 schrieb Stefan Müller: One more question before wikifying: Is there a way to prevent the prefix line? I want to say something like In lines 3 to 13. The texts „line“ and „lines“ are set with \setuplabeltext but you can see alternative texts with \inline{...}[ref]. \setuptyping[numbering=line,escape=yes] \starttext See \inline[line:single] and also \inline[line:range]. See \inline{typeline}[line:single] and also \inline{typelines}[line:range]. See line~\inlinerange[line:single] and also lines~\inlinerange[line:range]. \starttyping line 1 line 2/BTEX\startline[line:range]/ETEX line 3/BTEX\someline[line:single]/ETEX line 4 line 5/BTEX\stopline[line:range]/ETEX line 6 \stoptyping \stoptext Wolfgang Thanks Wolgang, this looks pretty nice. Unfortunately I get the following error when running your example (ConTeXt ver: 2010.10.22 16:46 MKIV fmt: 2010.10.27 int: english/english): references : unknown reference [][lr:b:line:single] references : unknown reference [][lr:b:line:range] Any ideas? 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 ___
Re: [NTG-context] Referencing line numbers inside a typing
Am Mittwoch 27 Oktober 2010, 16:52:07 schrieb Wolfgang Schuster: Am 27.10.2010 um 11:34 schrieb Stefan Müller: Thanks Wolgang, this looks pretty nice. Unfortunately I get the following error when running your example (ConTeXt ver: 2010.10.22 16:46 MKIV fmt: 2010.10.27 int: english/english): references : unknown reference [][lr:b:line:single] references : unknown reference [][lr:b:line:range] Any ideas? Works for me with the same context version. Do you use 'texexec' or 'context' to process the file? Wolfgang My mistake. I forgot \stoptext. It seems kind of inconvenient that I get such a misleading error message. I added some stuff regarding this thread to the wiki. http://wiki.contextgarden.net/Verbatim_text#Referencing_line_numbers http://wiki.contextgarden.net/Reference/en/inline http://wiki.contextgarden.net/Reference/en/someline http://wiki.contextgarden.net/Reference/en/startline http://wiki.contextgarden.net/Reference/en/inlinerange I hope that helps others. Best wishes, 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 ___
[NTG-context] Referencing line numbers inside a typing
Hi list, is there a (preferably easy) way to reference line numbers inside a typing? Minimal (not working) example: \setuptyping[numbering=line] \starttext In the following typing, \in{line}{}[line:intyping] is really interesting. \starttyping This line is so interesting. \stoptyping \stoptext Thanks, 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 ___
Re: [NTG-context] Referencing line numbers inside a typing
Am 26.10.2010 um 10:30 schrieb Stefan Müller: Hi list, is there a (preferably easy) way to reference line numbers inside a typing? Minimal (not working) example: \setuptyping[numbering=line] \starttext In the following typing, \in{line}{}[line:intyping] is really interesting. \starttyping This line is so interesting. \stoptyping \stoptext MkIV: \setuptyping[numbering=line,escape=yes] \starttext In the following typing, \inline[line:intyping] is really interesting. \starttyping line 1 line 2 line 3/BTEX\someline[line:intyping]/ETEX line 4 \stoptyping \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] Referencing line numbers inside a typing
On 26.10.2010 15:31, Wolfgang Schuster wrote: Am 26.10.2010 um 10:30 schrieb Stefan Müller: Hi list, is there a (preferably easy) way to reference line numbers inside a typing? Minimal (not working) example: \setuptyping[numbering=line] \starttext In the following typing, \in{line}{}[line:intyping] is really interesting. \starttyping This line is so interesting. \stoptyping \stoptext MkIV: \setuptyping[numbering=line,escape=yes] \starttext In the following typing, \inline[line:intyping] is really interesting. \starttyping line 1 line 2 line 3/BTEX\someline[line:intyping]/ETEX line 4 \stoptyping \stoptext Wolfgang One more question before wikifying: Is there a way to prevent the prefix line? I want to say something like In lines 3 to 13. Thanks, 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 ___
Re: [NTG-context] Referencing line numbers inside a typing
Am 26.10.2010 um 20:47 schrieb Stefan Müller: One more question before wikifying: Is there a way to prevent the prefix line? I want to say something like In lines 3 to 13. The texts „line“ and „lines“ are set with \setuplabeltext but you can see alternative texts with \inline{...}[ref]. \setuptyping[numbering=line,escape=yes] \starttext See \inline[line:single] and also \inline[line:range]. See \inline{typeline}[line:single] and also \inline{typelines}[line:range]. See line~\inlinerange[line:single] and also lines~\inlinerange[line:range]. \starttyping line 1 line 2/BTEX\startline[line:range]/ETEX line 3/BTEX\someline[line:single]/ETEX line 4 line 5/BTEX\stopline[line:range]/ETEX line 6 \stoptyping \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 ___
[NTG-context] en-dash for ranges of numbers in Bibliographies
Hi, in BibTeX databases ranges of numbers are usually listed with a single dash (e.g. 3-7) for compatibility reasons. Therefore the standard BibTeX styles convert a single dash in page numbers or range of numbers to a double dash (3--7). How do I get the same behaviour for \volume \issue \pages in the bibliographic module? Thanks! Cheers, 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] Verbatim typing with numbers inside float
On 7-10-2010 12:02, Stefan Müller wrote: Thank you very much for your effort. Pretty amazing what's doable. Unfortunately there are two issues: The distance between numbers and source lines is too small for bigger line numbers. I just have to make distance=0em big enough for this to work, right? or width .. just experiment with values The other thing: The width available for the caption is capped by the width of the longest source line. I think I prefer the source lines to start at the left margin. you could move the framed to the right (\hskip1em or so) but on the other hand it might look more consistent if the numbers stick into some virtual margin In addition there is something else I didn't think of when I put up that mail (sorry for that). If I put (a very long piece) source inside a figure I won't have pagebreaks, right? So this makes me think it's probably not what I'm looking for. no page breaks indeed (at least not now in such cases) Splitting up long source code in several pieces (one per page) and put them in separate figures doesn't seem right to me. Setting it as numbered paragraph? Putting up a fake caption with \placefloatcaption (which doesn't seem to work in MkIV)? Are there other possiblities of numbering (by section) more or less big chunks of source code I'm not thinking of? That would help me very much. Thanks for thinking about that. you can make your own construct, maybe something with a background (textbackgrounds can cross pages) 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 ___
Re: [NTG-context] Verbatim typing with numbers inside float
On Thursday 07 October 2010 09:19:42 Hans Hagen wrote: On 7-10-2010 12:02, Stefan Müller wrote: Splitting up long source code in several pieces (one per page) and put them in separate figures doesn't seem right to me. Setting it as numbered paragraph? Putting up a fake caption with \placefloatcaption (which doesn't seem to work in MkIV)? Are there other possiblities of numbering (by section) more or less big chunks of source code I'm not thinking of? That would help me very much. Thanks for thinking about that. you can make your own construct, maybe something with a background (textbackgrounds can cross pages) Hello, I use textbackgrounds to set-off paragraphs, for example, here as secondary material. It does not float and, indeed, may flow over many pages. This is a concrete example (to which you could add line numbering): \definetextbackground [secondary] [location=paragraph, background=color,backgroundscreen=middlegray, leftoffset=0.5cm,rightoffset=0.5cm, topoffset=.25ex,bottomoffset=.25ex, before={\blank[small]\switchtobodyfont[script]}, after={\blank[small]}, frame=off] \kindofpagetextareas3 % fix from Hans % Indeed, there are several internal methods available % for managing text areas. Without this fix, the background % color bleeds over footnotes and floats external to the % secondary material. \startsecondary Here is some less interesting detailed stuff that can be skipped if you wish… \stopsecondary Alan ___ 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] Verbatim typing with numbers inside float
On 07.10.2010 09:35, Alan BRASLAU wrote: On Thursday 07 October 2010 09:19:42 Hans Hagen wrote: On 7-10-2010 12:02, Stefan Müller wrote: Splitting up long source code in several pieces (one per page) and put them in separate figures doesn't seem right to me. Setting it as numbered paragraph? Putting up a fake caption with \placefloatcaption (which doesn't seem to work in MkIV)? Are there other possiblities of numbering (by section) more or less big chunks of source code I'm not thinking of? That would help me very much. Thanks for thinking about that. you can make your own construct, maybe something with a background (textbackgrounds can cross pages) Hello, I use textbackgrounds to set-off paragraphs, for example, here as secondary material. It does not float and, indeed, may flow over many pages. This is a concrete example (to which you could add line numbering): \definetextbackground [secondary] [location=paragraph, background=color,backgroundscreen=middlegray, leftoffset=0.5cm,rightoffset=0.5cm, topoffset=.25ex,bottomoffset=.25ex, before={\blank[small]\switchtobodyfont[script]}, after={\blank[small]}, frame=off] \kindofpagetextareas3 % fix from Hans % Indeed, there are several internal methods available % for managing text areas. Without this fix, the background % color bleeds over footnotes and floats external to the % secondary material. \startsecondary Here is some less interesting detailed stuff that can be skipped if you wish… \stopsecondary Alan Thanks, this is pretty nice. I'm going to use something like that inside an algorithm enumeration, so I get the number I can reference to. This is better than the floating-approach, I think. Thanks for the ideas, 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 ___
[NTG-context] Verbatim typing with numbers inside float
Hi list, I defined a float for typesetting algorithms, so I can reference them at other places in the document. \definefloat[algorithm][algorithms] When I now place such a figure with \placealgorithm[here][alg:myalgorithm]{Very neat algorithm.}{ \starttyping some source code \stoptyping } then the numbering I set up with \setuptyping[numbering=line] \setuplinenumbering[location=text] is gone. Is there a way to get around this? I try to not use itemize for this (although it seems to work with itemize), because I'd rather use the more semantically correct approach. Any help appreciated. Thanks in advance, 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 ___
Re: [NTG-context] Verbatim typing with numbers inside float
On 6-10-2010 4:26, Stefan Müller wrote: Hi list, I defined a float for typesetting algorithms, so I can reference them at other places in the document. \definefloat[algorithm][algorithms] When I now place such a figure with \placealgorithm[here][alg:myalgorithm]{Very neat algorithm.}{ \starttyping some source code \stoptyping } then the numbering I set up with \setuptyping[numbering=line] \setuplinenumbering[location=text] is gone. Is there a way to get around this? I try to not use itemize for this (although it seems to work with itemize), because I'd rather use the more semantically correct approach. Any help appreciated. needs a bit of thinking ... (deeply burried numbering) - 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 ___
Re: [NTG-context] Verbatim typing with numbers inside float
On 6-10-2010 4:26, Stefan Müller wrote: Hi list, I defined a float for typesetting algorithms, so I can reference them at other places in the document. \definefloat[algorithm][algorithms] When I now place such a figure with \placealgorithm[here][alg:myalgorithm]{Very neat algorithm.}{ \starttyping some source code \stoptyping } then the numbering I set up with \setuptyping[numbering=line] \setuplinenumbering[location=text] is gone. Is there a way to get around this? I try to not use itemize for this (although it seems to work with itemize), because I'd rather use the more semantically correct approach. Any help appreciated. this sort of works \startbuffer some source code some source code some source code \stopbuffer \setuplinenumbering[style=\ttx,distance=0em,width=1em] \startsetups algorithm \startlinenumbering \setuptyping[file][before=,after=] \framed[strut=no,align=normal,frame=off]{\typebuffer} \stoplinenumbering \stopsetups \placealgorithm [here][alg:myalgorithm] {Very neat algorithm.} {\directsetup{algorithm}} - 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] numbers missing in subsubsubsubsubsubsection
Hi all, how do I get my numbers in level nine (and higher) back? See example below please. Did someone change module[subsub] ?? Thanks in advance, Steffen [2010.09.05 13:23 MKIV] = \usemodule[subsub] \starttext \definehead [LevelSeven] [subsubsubsubsection] \definehead [LevelNine] [subsubsubsubsubsubsection] \setuphead [LevelSeven] [sectionsegments=7:7] \setuphead [LevelNine] [sectionsegments=9:9] \LevelSeven{Seven} \LevelNine{Nine} \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] varying headers, footers, page numbers
Hi, I'm trying to create a book where the front matter has no headers/footers, except roman numeral page numbers at the top outside of the page. The main matter should have Arabic numeral page numbers (restarting with '1') at the top outside of each page, plus the name of the book in the header of each even page and the name of the chapter in the header of each odd page, with no footer. However, on the pages where a new chapter starts (which is set to always be an odd page), there should be no header, and the page number should appear centered at the bottom of the page. I'm quite confused about how to achieve this in ConTeXt. An excerpt from the project structure is ./env.tex ./project.tex ./book/book.tex ./book/chapters/chapter1.tex The following is a shortened excerpt from book.tex: \startfrontmatter \setuppagenumbering[state=stop] % nothing for now, should be roman page % numbers later \component book/frontmatter % ToC ... \stopfrontmatter \startbodymatter \setuppagenumber[number=1] \setupheadertexts [{Name of Chapter}] [{}] [{}] [{Name of Book}] \setuppagenumbering[ alternative=doublesided, % mirrored even/odd pages location={header,margin}, style=small] \component vol04_1/articles/azimov \stopbodymatter This leads to my first question: I generally try to keep all formatting definitions in env.tex. However, it seems to me that since I want to have different settings in the frontmatter compared to the mainmatter, I need to put the \setuppagenumbering and \setupheadertexts in book.tex, which slightly bothers me. The way I intuitively feel it should work is that I would define various headertexts and pagenumberings under some label in env.tex, and then activate the different configurations in book.tex via that label. Is there anything in ConTeXt that I may have overlooked that makes something like that (centrally defining several alternative header/footer/pagenumber configurations) possible? Next, the problem of having a different header/footer/pagenumber on pages where a new chapter starts. In env.tex, I have \setuphead[chapter][ page=mychapterpagebreak, number=no, alternative=c, align={center, nothyphenated, verytolerant}, style={\switchtobodyfont[16pt]}, header=high, footer=none, ] This causes the chapter pages to have no header/footer/pagenumber at all, which is halfway what I want. But actually, I don't really understands why that works either. My understanding is that header=high means there should be no header on the first page and the normal header on all subsequent pages. The way I've set it up though, the page number is not really part of the header (it's separately set up through \setuppagenumbering). So why does the page number disappear as well? And, of course, the main question: How do I get the page number centered in the bottom of that page? Again, I feel if there was some way to define different configurations for the header/footer/pagenumbers under different labels, e.g. a label 'chapterfooter', it would then make sense to do something like 'footer=chapterfooter', instead of 'footer=none'. But I guess that's not the way it works -- so how *does* it work? Thanks, Michael ___ 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] varying headers, footers, page numbers
On Tue, Aug 24, 2010 at 6:01 PM, Michael Goerz go...@physik.fu-berlin.de wrote: I'm trying to create a book where the front matter has no headers/footers, except roman numeral page numbers at the top outside of the page. The main matter should have Arabic numeral page numbers (restarting with '1') at the top outside of each page, plus the name of the book in the header of each even page and the name of the chapter in the header of each odd page, with no footer. However, on the pages where a new chapter starts (which is set to always be an odd page), there should be no header, and the page number should appear centered at the bottom of the page. I'm quite confused about how to achieve this in ConTeXt. An excerpt from the project structure is ./env.tex ./project.tex ./book/book.tex ./book/chapters/chapter1.tex The following is a shortened excerpt from book.tex: \startfrontmatter \setuppagenumbering[state=stop] % nothing for now, should be roman page % numbers later \component book/frontmatter % ToC ... \stopfrontmatter \startbodymatter \setuppagenumber[number=1] \setupheadertexts [{Name of Chapter}] [{}] [{}] [{Name of Book}] \setuppagenumbering[ alternative=doublesided, % mirrored even/odd pages location={header,margin}, style=small] \component vol04_1/articles/azimov \stopbodymatter This leads to my first question: I generally try to keep all formatting definitions in env.tex. However, it seems to me that since I want to have different settings in the frontmatter compared to the mainmatter, I need to put the \setuppagenumbering and \setupheadertexts in book.tex, which slightly bothers me. The way I intuitively feel it should work is that I would define various headertexts and pagenumberings under some label in env.tex, and then activate the different configurations in book.tex via that label. Is there anything in ConTeXt that I may have overlooked that makes something like that (centrally defining several alternative header/footer/pagenumber configurations) possible? Next, the problem of having a different header/footer/pagenumber on pages where a new chapter starts. In env.tex, I have \setuphead[chapter][ page=mychapterpagebreak, number=no, alternative=c, align={center, nothyphenated, verytolerant}, style={\switchtobodyfont[16pt]}, header=high, footer=none, ] This causes the chapter pages to have no header/footer/pagenumber at all, which is halfway what I want. But actually, I don't really understands why that works either. My understanding is that header=high means there should be no header on the first page and the normal header on all subsequent pages. The way I've set it up though, the page number is not really part of the header (it's separately set up through \setuppagenumbering). So why does the page number disappear as well? And, of course, the main question: How do I get the page number centered in the bottom of that page? Again, I feel if there was some way to define different configurations for the header/footer/pagenumbers under different labels, e.g. a label 'chapterfooter', it would then make sense to do something like 'footer=chapterfooter', instead of 'footer=none'. But I guess that's not the way it works -- so how *does* it work? Digging deeper in the reference manual, it seems that \definetext[chapter][footer][pagenumber] together with \setuphead[chapter][ page=mychapterpagebreak, number=no, alternative=c, align={center, nothyphenated, verytolerant}, style={\switchtobodyfont[16pt]}, header=high, footer=chapter, ] is the answer. Do I understand it correctly that \definetext[chapter][footer]... is exactly the same as \setupfootertext... but with the extra label chapter? So that would be exactly what my intuition said should exist. Can I only use the chapter label inside of \setuphead, like in the above example, or could I also somehow use \definetext to setup different headers/footers for the frontmatter/mainmatter, for example? Thanks, Michael ___ 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] Footnote numbers not following \setupinteraction color
I seem to be full of problems today: --- \setupcolors[state=start] \setupinteraction[state=start, color=black] \setupcolor[hex] \definecolor[titleRed][h=910A00] \starttext This \footnote{should not have a red color, correct?} \stoptext --- The footnote number in the page footer inherits color titleRed, though the footnote notice in the text is properly black. Also, this doesn't seem to affect links in my ToC (they aren't titleRed). ___ 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] Footnote numbers not following \setupinteraction color
On 2010-08-13 17:54:02, John Haltiwanger wrote: I seem to be full of problems today: --- \setupcolors[state=start] \setupinteraction[state=start, color=black] Hi John, it's a link to the same page: \setupinteraction[state=start, color=black, contrastcolor=black] should fix it. Philipp \setupcolor[hex] \definecolor[titleRed][h=910A00] \starttext This \footnote{should not have a red color, correct?} \stoptext --- The footnote number in the page footer inherits color titleRed, though the footnote notice in the text is properly black. Also, this doesn't seem to affect links in my ToC (they aren't titleRed). ___ 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 pgpxClyMZh7dy.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] Footnote numbers not following \setupinteraction color
On 13-8-2010 7:54, John Haltiwanger wrote: I seem to be full of problems today: --- \setupcolors[state=start] \setupinteraction[state=start, color=black] \setupcolor[hex] \definecolor[titleRed][h=910A00] \starttext This \footnote{should not have a red color, correct?} \stoptext --- The footnote number in the page footer inherits color titleRed, though the footnote notice in the text is properly black. color=,contrastcolor= red means: link on same page (contrastcolor is used then) - 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 ___
Re: [NTG-context] Roman page numbers
于 2010年08月13日 00:21, Wolfgang Schuster 写道: Should be \setupuserpagenumber. Thanks, this works. ___ 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] an issue with line numbers in the verbatim text
Hi all, this is an example. \setuptyping[numbering=line] \setuplinenumbering[location=intext] \showframe \starttext \starttyping This is the first line. Last line after an empty line. \stoptyping \stoptext the linenumbering setup of location=intext can not work. the line numbers still be inmargin. -- Best regards, Li Yanrui ___ 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] an issue with line numbers in the verbatim text
On 08/11/2010 08:23 PM, Li Yanrui (李延瑞) wrote: Hi all, this is an example. \setuptyping[numbering=line] \setuplinenumbering[location=intext] \showframe \starttext \starttyping This is the first line. Last line after an empty line. \stoptyping \stoptext the linenumbering setup of location=intext can not work. the line numbers still be inmargin. Not location=intext, but location=text will do. ___ 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] an issue with line numbers in the verbatim text
2010/8/11 Hongwen Qiu qiuhong...@gmail.com: On 08/11/2010 08:23 PM, Li Yanrui (李延瑞) wrote: Hi all, this is an example. \setuptyping[numbering=line] \setuplinenumbering[location=intext] \showframe \starttext \starttyping This is the first line. Last line after an empty line. \stoptyping \stoptext the linenumbering setup of location=intext can not work. the line numbers still be inmargin. Not location=intext, but location=text will do. I see, tks! -- Best regards, Li Yanrui (李延瑞) ___ 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 page numbers
Hi, The following minimal example has no effect on page numbering(MkIV): \setuppagenumbering[conversion=romannumerals] % \setuppagenumbering[numberconversion=romannumerals] has no effect too. \starttext \chapter{Alpha} \input tufte \stoptext $ context --version MTXrun | current version: 2010.08.10 17:14 $ luatex --version This is LuaTeX, Version beta-0.61.0-2010072816 ___ 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 page numbers
Am 12.08.10 03:52, schrieb Hongwen Qiu: Hi, The following minimal example has no effect on page numbering(MkIV): \setuppagenumbering[conversion=romannumerals] % \setuppagenumbering[numberconversion=romannumerals] has no effect too. \setupuserpagenumbering[numberconversion=romannumerals] 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] Roman page numbers
于 2010年08月12日 11:08, Wolfgang Schuster 写道: Am 12.08.10 03:52, schrieb Hongwen Qiu: Hi, The following minimal example has no effect on page numbering(MkIV): \setuppagenumbering[conversion=romannumerals] % \setuppagenumbering[numberconversion=romannumerals] has no effect too. \setupuserpagenumbering[numberconversion=romannumerals] Thanks for the reply, but I get the following error: ! Undefined control sequence. l.10 \setupuserpagenumbering [numberconversion=romannumerals] ? ___ 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] Frontmatter page numbers and using ifodd / pageno
With the page layout setups I'm using, the first table of contents entry on each page (except for the first page) is formatted as if it were on the preceding page. I assume that the page number is not advancing until some number of objects are placed on the page. When I compiled the example included below, it was the first three entries on each page (after the first page) that were formatted as if they were on the previous page. Related to this, I need invisible page numbers on the table of contents pages to enable different formatting by odd/even page number (which I accomplish now by using \phantom as a style command for page numbering), but I'd like for the page numbering of the body matter to start at 1. Also, how can I number the front matter backward? Like: xi, x, ix, viii, vii, vi, v, iv, iii, ii, i. \def\SectionListEntry#1#2#3% { \noindent \noexpand{\ifodd\pageno \simplealignedbox{left}{.63667\textwidth}{#2} \simplealignedbox{middle}{.06\textwidth}{·} \simplealignedbox{right}{.30333\textwidth}{#3} \else \simplealignedbox{left}{.30333\textwidth}{#3} \simplealignedbox{middle}{.06\textwidth}{·} \simplealignedbox{right}{.63667\textwidth}{#2} \fi} \par\blank } \setuplist[section] [alternative=command, command=\SectionListEntry] \def\TableOfContents% { \page[empty] \page[odd] \setuppagenumbering[style=command, command=\phantom] \setuppagenumber[state=start] \placelist[section] \setuppagenumber[state=stop] \page[empty] \page[odd] } \startfrontmatter \TableOfContents \stopfrontmatter \startbodymatter \setuppagenumber[state=start] \dorecurse{45}{\section{Section title}\input tufte} \stopbodymatter Thanks, Scott - This is a work of fiction. Names, characters, places, and incidents either are the product of the writer's imagination or are used fictitiously, and any resemblance to actual persons, living or dead, businesses, companies, events, or locales is entirely coïncidental. ___ 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] feauture request - no numbers on blank pages at chapter's end
Am 20.05.10 13:21, schrieb Piotr Kopszak: Many thanks for your help! First the file according to the wiki example. Works if location=footer in \setuppagenumbering but not when \definepagebreak [mychapterpagebreak] [yes,header,right] \setuphead [chapter] [page=mychapterpagebreak,footer=empty] \setuppagenumbering[alternative=doublesided,location=margin] \starttext \chapter{testA} \dorecurse{10}{\input tufte } \chapter{testB} \dorecurse{10}{\input tufte } \chapter{testC} \dorecurse{10}{\input tufte } \stoptext Changing \setuphead to \setuphead[chapter][page={blank,right}] gets rid of the number on the chapter's title page (which I don't want) and still leaves it on the left empty page facing the title page. Not to mention the fact that pagenumbers appear only from page 10. This works for your minimal example: \setuphead [chapter] [page={yes,footer,right}, footer=empty] 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] feauture request - no numbers on blank pages at chapter's end
That's very close indeed. Thanks for putting me on the right track! What I wanted is rather: \setuphead [chapter] [page={yes,footer,right}, footer=nomarking] Best Piotr 2010/5/21 Wolfgang Schuster schuster.wolfg...@googlemail.com: Am 20.05.10 13:21, schrieb Piotr Kopszak: Many thanks for your help! First the file according to the wiki example. Works if location=footer in \setuppagenumbering but not when \definepagebreak [mychapterpagebreak] [yes,header,right] \setuphead [chapter] [page=mychapterpagebreak,footer=empty] \setuppagenumbering[alternative=doublesided,location=margin] \starttext \chapter{testA} \dorecurse{10}{\input tufte } \chapter{testB} \dorecurse{10}{\input tufte } \chapter{testC} \dorecurse{10}{\input tufte } \stoptext Changing \setuphead to \setuphead[chapter][page={blank,right}] gets rid of the number on the chapter's title page (which I don't want) and still leaves it on the left empty page facing the title page. Not to mention the fact that pagenumbers appear only from page 10. This works for your minimal example: \setuphead [chapter] [page={yes,footer,right}, footer=empty] 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 ___ -- http://okle.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 ___
[NTG-context] feauture request - no numbers on blank pages at chapter's end
Hello list, I don't know if it is only an idiosyncrasy of Polish typography but if a chapter ends with a blank page it should not display its number. It would be very useful if this could be an option (if not a default behaviour) of \setuppagenumbering . It's not a huge problem and I think I will not wait for a solution before sending my next book for printing, but it would be nice if it appeared in the future. Best Piotr -- http://okle.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] feauture request - no numbers on blank pages at chapter's end
Piotr Kopszak wrote: Hello list, I don't know if it is only an idiosyncrasy of Polish typography but if a chapter ends with a blank page it should not display its number. It would be very useful if this could be an option (if not a default behaviour) of \setuppagenumbering . It's not a huge problem and I think I will not wait for a solution before sending my next book for printing, but it would be nice if it appeared in the future. Isn't this what \page[blank,right] is supposed to do? Best wishes, Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] feauture request - no numbers on blank pages at chapter's end
Am 20.05.10 11:07, schrieb Piotr Kopszak: Hello list, I don't know if it is only an idiosyncrasy of Polish typography but if a chapter ends with a blank page it should not display its number. It would be very useful if this could be an option (if not a default behaviour) of \setuppagenumbering . It's not a huge problem and I think I will not wait for a solution before sending my next book for printing, but it would be nice if it appeared in the future. This is mentioned here: http://wiki.contextgarden.net/Titles#Truly_empty_pagebreak_before_chapters You don't \definepagebreak as mentioned in the wiki because \setuphead[chapter][page={header,footer,right}] is also valid. 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] feauture request - no numbers on blank pages at chapter's end
It would be handy to avoid inserting \page in this case, I think. 2010/5/20 Taco Hoekwater t...@elvenkind.com: Piotr Kopszak wrote: Hello list, I don't know if it is only an idiosyncrasy of Polish typography but if a chapter ends with a blank page it should not display its number. It would be very useful if this could be an option (if not a default behaviour) of \setuppagenumbering . It's not a huge problem and I think I will not wait for a solution before sending my next book for printing, but it would be nice if it appeared in the future. Isn't this what \page[blank,right] is supposed to do? Best wishes, Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- http://okle.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] feauture request - no numbers on blank pages at chapter's end
Yes, I know but even if it was working in all cases (and it is not, for instace I need pagenumbers in the margin and it didn't work in this case) it looks really, really ugly. Why not wrap something like this in a definition and give users an option? 2010/5/20 Wolfgang Schuster schuster.wolfg...@googlemail.com: Am 20.05.10 11:07, schrieb Piotr Kopszak: Hello list, I don't know if it is only an idiosyncrasy of Polish typography but if a chapter ends with a blank page it should not display its number. It would be very useful if this could be an option (if not a default behaviour) of \setuppagenumbering . It's not a huge problem and I think I will not wait for a solution before sending my next book for printing, but it would be nice if it appeared in the future. This is mentioned here: http://wiki.contextgarden.net/Titles#Truly_empty_pagebreak_before_chapters You don't \definepagebreak as mentioned in the wiki because \setuphead[chapter][page={header,footer,right}] is also valid. 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 ___ -- http://okle.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] feauture request - no numbers on blank pages at chapter's end
Am 20.05.10 12:58, schrieb Piotr Kopszak: Yes, I know but even if it was working in all cases (and it is not, for instace I need pagenumbers in the margin and it didn't work in this case) it looks really, really ugly. Why not wrap something like this in a definition and give users an option? Make a example and i can try to provide a solution. 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] feauture request - no numbers on blank pages at chapter's end
Am 20.05.10 12:53, schrieb Piotr Kopszak: It would be handy to avoid inserting \page in this case, I think. \setuphead[chapter][page={blank,right}] 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] feauture request - no numbers on blank pages at chapter's end
Many thanks for your help! First the file according to the wiki example. Works if location=footer in \setuppagenumbering but not when \definepagebreak [mychapterpagebreak] [yes,header,right] \setuphead [chapter] [page=mychapterpagebreak,footer=empty] \setuppagenumbering[alternative=doublesided,location=margin] \starttext \chapter{testA} \dorecurse{10}{\input tufte } \chapter{testB} \dorecurse{10}{\input tufte } \chapter{testC} \dorecurse{10}{\input tufte } \stoptext Changing \setuphead to \setuphead[chapter][page={blank,right}] gets rid of the number on the chapter's title page (which I don't want) and still leaves it on the left empty page facing the title page. Not to mention the fact that pagenumbers appear only from page 10. Piotr 2010/5/20 Wolfgang Schuster schuster.wolfg...@googlemail.com: Am 20.05.10 12:53, schrieb Piotr Kopszak: It would be handy to avoid inserting \page in this case, I think. \setuphead[chapter][page={blank,right}] 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 ___ -- http://okle.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 ___
[NTG-context] Numbers in \definesynonyms
Dear all, When defining abbreviations through \definesynonyms, if the abbreviation contains a digit then it seems that the built-in macro is not recognized: in the example below the command \EEG is recognized, whereas \M2 or \Y2K are not. Is there a way around this difficulty? Or should one use a definition like \definesynonyms[abbreviation][abbreviations][\inshort][\infull] and then use everywhere \inshort{Y2K}? Many thanks in advance, with my best regards: OK begin example-abbr.tex \definesynonyms[abbreviation][abbreviations][\infull] \starttext \abbreviation{EEG} {Electroencephalogram} \abbreviation{ERP} {Event-Related Potentials} \abbreviation{M2}{Master 2nd year} \abbreviation{Y2K}{Year 2000} Test inshort working: \EEG, \ERP, Test not working \M2, \Y2K Test infull: \infull{EEG}, \infull{ERP}, \infull{M2} \completelistofabbreviations \stoptext end example-abbr.tex ___ 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] Numbers in \definesynonyms
On 13-5-2010 10:42, Otared Kavian wrote: Dear all, When defining abbreviations through \definesynonyms, if the abbreviation contains a digit then it seems that the built-in macro is not recognized: in the example below the command \EEG is recognized, whereas \M2 or \Y2K are not. Is there a way around this difficulty? Or should one use a definition like \definesynonyms[abbreviation][abbreviations][\inshort][\infull] and then use everywhere \inshort{Y2K}? Many thanks in advance, with my best regards: OK begin example-abbr.tex \definesynonyms[abbreviation][abbreviations][\infull] \starttext \abbreviation{EEG} {Electroencephalogram} \abbreviation{ERP} {Event-Related Potentials} \abbreviation{M2}{Master 2nd year} \abbreviation{Y2K}{Year 2000} \abbreviation[MTWO][M2]{Master 2nd year} \MTWO Test inshort working: \EEG, \ERP, Test not working \M2, \Y2K Test infull: \infull{EEG}, \infull{ERP}, \infull{M2} \completelistofabbreviations \stoptext end example-abbr.tex ___ 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 ___ -- - 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] how to compute the sum of numbers
Hello, I'm preparing a simple template for exam tests. I have following commad. \question{3}{text text text} where firtst parametr stands for points. I'd like to compute the sum of points to be used as Total points: xx What is the correct approach to do that if I'm using MKII? greetings Jan -- Tato zpráva byla vytvořena převratným poštovním klientem Opery: http://www.opera.com/mail/ ___ 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 compute the sum of numbers
Jan Pohanka wrote: Hello, I'm preparing a simple template for exam tests. I have following commad. \question{3}{text text text} \newcount\totalpoints \def\question#1#2{\global\advance\totalpoints #1\relax ... #2 ...} where firtst parametr stands for points. I'd like to compute the sum of points to be used as Total points: xx Total points: \the\totalpoints Best wishes, Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] how to compute the sum of numbers
Thank you, I have an additional question. Is it possible to have the sum available before the \question commands? I mean Total points: \the\totalpoints % or something like that \question{5}{text text} \question{3}{text text} \question{1}{text text} greetings, Jan Dne Tue, 11 May 2010 11:23:30 +0200 Taco Hoekwater t...@elvenkind.com napsal(a): Jan Pohanka wrote: Hello, I'm preparing a simple template for exam tests. I have following commad. \question{3}{text text text} \newcount\totalpoints \def\question#1#2{\global\advance\totalpoints #1\relax ... #2 ...} where firtst parametr stands for points. I'd like to compute the sum of points to be used as Total points: xx Total points: \the\totalpoints Best wishes, Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ -- Tato zpráva byla vytvořena převratným poštovním klientem Opery: http://www.opera.com/mail/ ___ 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 compute the sum of numbers
Jan Pohanka wrote: Thank you, I have an additional question. Is it possible to have the sum available before the \question commands? This is what I would do (but I suspect Wolfgang can come up with something cleaner): \def\startquestions {\newcount\totalpoints} \def\stopquestions {\expanded{\reference[totalpoints]{\the\totalpoints}}} \def\question#1#2{\global\advance\totalpoints #1\relax #2\par} \starttext Total points: \in[totalpoints] \startquestions \question{5}{text text} \question{3}{text text} \question{1}{text text} \stopquestions \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] Footnote numbers and leftmargin setup [mkIV]
Hello, in mkII I use to set my left margins to 0pt. When I do this now in mkIV, I get misplaced footnote numbers (at the bottom). Example: \setuplayout [leftmargin=\zeropoint] \starttext just text\footnote{foot text} \stoptext To get correctly placed numbers I have to either set the leftmargin to = 5pt, or leave out the leftmargin key in setuplayout. Is this a bug or just the mkIV way? Thomas ConTeXt ver: 2010.04.29 22:30 MKIV fmt: 2010.4.30 int: english/english ___ 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] Footnote numbers and leftmargin setup [mkIV]
Am 03.05.10 14:11, schrieb Thomas Floeren: Hello, in mkII I use to set my left margins to 0pt. When I do this now in mkIV, I get misplaced footnote numbers (at the bottom). Example: \setuplayout [leftmargin=\zeropoint] \starttext just text\footnote{foot text} \stoptext To get correctly placed numbers I have to either set the leftmargin to= 5pt, or leave out the leftmargin key in setuplayout. Is this a bug or just the mkIV way? The code for footnotes in MkII and MkIV is different, while MkII use it's own code MkIV use enumerations for the notes (that's why you can use nearly all options from enumerations) and the number is placed by default in the left margin but why do you set leftmargin to 0pt? 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] Footnote numbers and leftmargin setup [mkIV]
Wolfgang Schuster mailto:schuster.wolfg...@googlemail.com wrote on Monday, May 03, 2010 2:20 PM: Am 03.05.10 14:11, schrieb Thomas Floeren: Hello, in mkII I use to set my left margins to 0pt. When I do this now in mkIV, I get misplaced footnote numbers (at the bottom). Example: \setuplayout [leftmargin=\zeropoint] \starttext just text\footnote{foot text} \stoptext To get correctly placed numbers I have to either set the leftmargin to= 5pt, or leave out the leftmargin key in setuplayout. Is this a bug or just the mkIV way? The code for footnotes in MkII and MkIV is different, while MkII use it's own code MkIV use enumerations for the notes (that's why you can use nearly all options from enumerations) and the number is placed by default in the left margin but why do you set leftmargin to 0pt? If I dont set the leftmargin, everything is messed up. Try this with and without leftmargin setup key: %-- \setuplayout [backspace=25mm, cutspace=15mm, topspace=10mm, header=\zeropoint, headerdistance=\zeropoint, bottomspace=10mm, footer=5mm, footerdistance=8mm, % leftmargin=\zeropoint, rightmargin=\zeropoint, height=fit, width=fit, location=middle] \setupfooter [state=start,before=\hrule] \setupfootertexts [nice text here][and here] \starttext \dorecurse{20}{just text }\footnote{foot text} \page\null \stoptext %--- Without the leftmargin key, text and footer leave the page borders. Guess I have to to change my way to setup the layout in mkIV(?) 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] Footnote numbers and leftmargin setup [mkIV]
Am 03.05.10 15:23, schrieb Thomas Floeren: Without the leftmargin key, text and footer leave the page borders. Guess I have to to change my way to setup the layout in mkIV(?) There are a few things you should change: 1. Use 'middle' for the width and height keys in \setuplayout, 2. Place the rule above the footer in the text area, 3. Don't set the left and right margins to 0pt, 4. Instead of a rule before the footer you can use the background mechanism to draw the borders of the footer. \setuplayout [backspace=25mm, cutspace=15mm, topspace=10mm, header=0pt, headerdistance=0pt, bottomspace=10mm, footer=5mm, footerdistance=8mm, height=middle, width=middle, location=middle] \setupfooter[text][before=\hairline] %\setupbackgrounds[footer][text][topframe=on] \setupfootertexts[nice text here][and here] \starttext \dorecurse{20}{just text }\footnote{foot text}\page[dummy] \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] Footnote numbers and leftmargin setup [mkIV]
On 3 May 2010, at 15:23, Thomas Floeren wrote: Wolfgang Schuster mailto:schuster.wolfg...@googlemail.com wrote on Monday, May 03, 2010 2:20 PM: Am 03.05.10 14:11, schrieb Thomas Floeren: Hello, in mkII I use to set my left margins to 0pt. When I do this now in mkIV, I get misplaced footnote numbers (at the bottom). Example: \setuplayout [leftmargin=\zeropoint] \starttext just text\footnote{foot text} \stoptext To get correctly placed numbers I have to either set the leftmargin to= 5pt, or leave out the leftmargin key in setuplayout. Is this a bug or just the mkIV way? The code for footnotes in MkII and MkIV is different, while MkII use it's own code MkIV use enumerations for the notes (that's why you can use nearly all options from enumerations) and the number is placed by default in the left margin but why do you set leftmargin to 0pt? If I don’t set the leftmargin, everything is messed up. Try this with and without leftmargin setup key: %-- \setuplayout [backspace=25mm, cutspace=15mm, topspace=10mm, header=\zeropoint, headerdistance=\zeropoint, bottomspace=10mm, footer=5mm, footerdistance=8mm, % leftmargin=\zeropoint, rightmargin=\zeropoint, height=fit, width=fit, location=middle] \setupfooter [state=start,before=\hrule] \setupfootertexts [nice text here][and here] \starttext \dorecurse{20}{just text }\footnote{foot text} \page\null \stoptext %--- Without the leftmargin key, text and footer leave the page borders. Guess I have to to change my way to setup the layout in mkIV(?) Not really, the problem is, that you use conflicting keys. If you set the topspace, header, headerdistance, footer, footerdistance and the bottomspace then the height is already fixed. The same is applicable for the horizontal measures. I suggest to use the backspace to determine the left rim of the textarea, set the the width to an appropriate value if the left and right margin should be different in size, otherwise use width=middle which makes right and left margin identical i.e. as large as the backspace. The margins and margindistances which are setup in the setuplayout are sort of virtual and they are placed over the area defined by backspace and the rest of the paper right from the right rim of the textarea. This is the reason why marginareas can stick outside the paper. Willi 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 ___
[NTG-context] \setuptyping[numbering=line] don't emit line numbers
$ context --version MTXrun | current version: 2010.04.16 21:08 $ luatex --version This is LuaTeX, Version beta-0.60.0-2010040422 I found that \setuptyping[numbering=line] no longer produces line numbers any more. So are there something changed, or just it's ought to be 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 ___
[NTG-context] Selectively dropping page numbers
The Chicago Manual of Style, 14th edition, states that page numbers are normally omitted on pages containing only illustrations or tables, except in long sequences of figures or tables. Is it practical within ConTeXt to omit page numbers from a single page within a chapter? Tom Benjey 717-258-9733 voice 717-243-0074 fax Twitter: @TomBenjey ___ 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] Selectively dropping page numbers
Am 24.03.10 13:37, schrieb Tom: The Chicago Manual of Style, 14th edition, states that page numbers are normally omitted on pages containing only illustrations or tables, except in long sequences of figures or tables. Is it practical within ConTeXt to omit page numbers from a single page within a chapter? Can you add a entry to the bug/feature tracker (http://tracker.luatex.org/). I agree to have a option to disable headers/footers on float pages. \starttext \dorecurse{10}{\input knuth\par} \placefigure[page,none]{}{\externalfigure[dummy][factor=max]} \dorecurse{10}{\input knuth\par} \placefigure[page,none,header]{}{\externalfigure[dummy][factor=max]} % no header on float page \dorecurse{10}{\input knuth\par} \placefigure[page,none,footer]{}{\externalfigure[dummy][factor=max]} % no footer on float page \dorecurse{10}{\input knuth\par} \placefigure[page,none,empty]{}{\externalfigure[dummy][factor=max]} % no header and footer on float page \dorecurse{10}{\input knuth\par} \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 ___
[NTG-context] oldstyle numbers in TeXGyre fonts
Hi all, Hans, is there or can we have an easy, fast way of setting up the TeXGyre fonts so that they use oldstyle numbers by default? I think this would be attractive at least for the serif fonts termes, pagella, schola, which all have this feature. 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] oldstyle numbers in TeXGyre fonts
On 15-3-2010 14:46, Thomas A. Schmitz wrote: Hi all, Hans, is there or can we have an easy, fast way of setting up the TeXGyre fonts so that they use oldstyle numbers by default? I think this would be attractive at least for the serif fonts termes, pagella, schola, which all have this feature. \definefontfeature[default][default][onum=yes] - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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] Formatting numbers in LuaTeX
On Sun, Feb 14 2010, Hans Hagen wrote: sqrt = math.sqrt pi = math.pi function my_equation(s, r) beware, this creates (and possibly overloads) sqrt, pi and my_equation as gobals Indeed... The following hack was *not* so quick, but there is a bug somewhere (a digit is added at the end): \usemodule[calcmath] \startluacode local exp_replacements = {[*] = $·$} local res_replacements = {[sqrt] = math.sqrt, [π] = math.pi} userdata = userdata or {} function userdata.result_as_string(r) r = math.floor(1000 * r + 0.5) / 1000 r = tostring(r) tex.write(r:gsub(%., ,)) end function userdata.filter_expression(s) for k, v in pairs(exp_replacements) do s = s:gsub(k, v) end tex.write(s) end function userdata.filter_result(s) for k, v in pairs(res_replacements) do s = s:gsub(k, v) end tex.write(s) end \stopluacode \def\calculate#1{% \start \def\Expression{\ctxlua{userdata.filter_expression(#1)}} \def\Result{\ctxlua{userdata.filter_result(#1)}} \calcmath{\Expression=\ctxlua{userdata.result_as_string(\Result)}} \stop } \starttext \startlines \calculate{1+2} \calculate{3/2-1} \calculate{3*2} \calculate{sqrt(2)} \calculate{2*π} \stoplines \stoptext 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 ___
Re: [NTG-context] Formatting numbers in LuaTeX
On 15-2-2010 20:35, Peter Münster wrote: tex.write(r:gsub(%., ,)) tex.write((r:gsub(%., ,))) gsub returns two values - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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] Formatting numbers in LuaTeX
Am 15.02.2010 um 20:35 schrieb Peter Münster: On Sun, Feb 14 2010, Hans Hagen wrote: sqrt = math.sqrt pi = math.pi function my_equation(s, r) beware, this creates (and possibly overloads) sqrt, pi and my_equation as gobals Indeed... The following hack was *not* so quick, but there is a bug somewhere (a digit is added at the end): \usemodule[calcmath] \startluacode local exp_replacements = {[*] = $·$} local res_replacements = {[sqrt] = math.sqrt, [π] = math.pi} userdata = userdata or {} function userdata.result_as_string(r) r = math.floor(1000 * r + 0.5) / 1000 r = tostring(r) tex.write(r:gsub(%., ,)) end function userdata.filter_expression(s) for k, v in pairs(exp_replacements) do s = s:gsub(k, v) end tex.write(s) end function userdata.filter_result(s) for k, v in pairs(res_replacements) do s = s:gsub(k, v) end tex.write(s) end \stopluacode \def\calculate#1{% \start \def\Expression{\ctxlua{userdata.filter_expression(#1)}} \def\Result{\ctxlua{userdata.filter_result(#1)}} \calcmath{\Expression=\ctxlua{userdata.result_as_string(\Result)}} \stop } \starttext \startlines \calculate{1+2} \calculate{3/2-1} \calculate{3*2} \calculate{sqrt(2)} \calculate{2*π} \stoplines \stoptext I've noticed that one can even use such things as \calculate{3^2}, \calculate{2^3} out of the box and it's easy to add [e] = math.exp(1), [sin] = math.sin, … But the $·$-construct is problematic. It do not work in display style (\let\calcmath\displaycalcmath) and without the dollar-signs the placement and the spacing are wrong. Thank you for your elaboration. Greetings Andreas ___ 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] Formatting numbers in LuaTeX
On Mon, Feb 15 2010, Andreas Harder wrote: But the $·$-construct is problematic. It do not work in display style (\let\calcmath\displaycalcmath) and without the dollar-signs the placement and the spacing are wrong. I don't know, why · doesn't work, but you can try this: local exp_replacements = {[*] = cdot} 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] Formatting numbers in LuaTeX
Hi all! I played a little bit with LuaTeX in ConTeXt and two questions have arisen. \usemodule[calcmath] \starttext \def\calculate#1{\calcmath{#1=\ctxlua{tex.print(#1)}}} \calculate{1+2} \par \calculate{3/2-1}\par % the output should be 0,5 \calculate{3*2}\par % \calculate{sqrt(2)} \calculate{2*π} % 2*\pi \stoptext 1) Is it possible to have a comma as decimal separator? 2) If you look at the above definition, it works fine with +, –, /, but not with *. Is it possible to expand my macro that it will also work with a multiplication or even with the last two examples? Thank you in advance Andreas ___ 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] Formatting numbers in LuaTeX
On Sun, Feb 14, 2010 at 11:42 AM, Andreas Harder andreas.har...@rz-online.de wrote: Hi all! I played a little bit with LuaTeX in ConTeXt and two questions have arisen. \usemodule[calcmath] \starttext \def\calculate#1{\calcmath{#1=\ctxlua{tex.print(#1)}}} \calculate{1+2} \par \calculate{3/2-1}\par % the output should be 0,5 \calculate{3*2}\par % \calculate{sqrt(2)} \calculate{2*π} % 2*\pi \stoptext 1) Is it possible to have a comma as decimal separator? string.format ? -- luigi ___ 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] Formatting numbers in LuaTeX
On Sun, Feb 14 2010, Andreas Harder wrote: 1) Is it possible to have a comma as decimal separator? 2) If you look at the above definition, it works fine with +, –, /, but not with *. Is it possible to expand my macro that it will also work with a multiplication or even with the last two examples? Hello Andreas, Just a quick hack: \usemodule[calcmath] \startluacode sqrt = math.sqrt pi = math.pi function my_equation(s, r) r = tostring(r) tex.print(s:gsub(*, ×) .. = .. r:gsub(%., ,)) end \stopluacode \def\calculate#1{\calcmath{\ctxlua{my_equation(#1, #1)}}} \starttext \startlines \calculate{1+2} \calculate{3/2-1} \calculate{3*2} \calculate{sqrt(2)} \calculate{2*pi} \stoplines \stoptext 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 ___
Re: [NTG-context] Formatting numbers in LuaTeX
Am 14.02.2010 um 13:11 schrieb Peter Münster: On Sun, Feb 14 2010, Andreas Harder wrote: 1) Is it possible to have a comma as decimal separator? 2) If you look at the above definition, it works fine with +, –, /, but not with *. Is it possible to expand my macro that it will also work with a multiplication or even with the last two examples? Hello Andreas, Just a quick hack: \usemodule[calcmath] \startluacode sqrt = math.sqrt pi = math.pi function my_equation(s, r) r = tostring(r) tex.print(s:gsub(*, ×) .. = .. r:gsub(%., ,)) end \stopluacode \def\calculate#1{\calcmath{\ctxlua{my_equation(#1, #1)}}} \starttext \startlines \calculate{1+2} \calculate{3/2-1} \calculate{3*2} \calculate{sqrt(2)} \calculate{2*pi} \stoplines \stoptext That’s nice! Thank you very much! I've found an posting on the LuaTeX-mailing-list and incorporated it, so one have rounded results (I didn't find a way to use \%.2f). So, if someone is interested: \usemodule[calcmath] \startluacode local floor = math.floor local round = function(n) return floor(1000*n+0.5)/1000 end sqrt = math.sqrt pi = math.pi function my_equation(s, r) r = round(r) r = tostring(r) tex.print(s:gsub(*, $·$) .. = .. r:gsub(%., ,)) end \stopluacode \def\calculate#1{\calcmath{\ctxlua{my_equation(#1, #1)}}} \starttext \startlines \calculate{1+2} \calculate{3/2-1} \calculate{3*2} \calculate{sqrt(2)} \calculate{2*pi} \stoplines \stoptext Greetings Andreas ___ 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] Formatting numbers in LuaTeX
On 14-2-2010 14:10, Andreas Harder wrote: \startluacode local floor = math.floor local round = function(n) return floor(1000*n+0.5)/1000 end sqrt = math.sqrt pi = math.pi function my_equation(s, r) r = round(r) r = tostring(r) tex.print(s:gsub(*, $·$) .. = .. r:gsub(%., ,)) end \stopluacode beware, this creates (and possibly overloads) sqrt, pi and my_equation as gobals Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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] Where did page numbers go?
On Tue, Feb 9, 2010 at 20:55, Wolfgang Schuster wrote: Am 09.02.10 20:36, schrieb Mojca Miklavec: Hello Hans, \currentpage (as already reported by Peter Münster) doesn't work in MKIV (always returns 1) and \setnumber[page]{0} has zero effect (in MKII; in MKIV I cannot test it anyway). \pagenumber? MkIV has no counter 'page' but 'realpage', 'userpage' and 'subpage'. - But why should \currentpage stop working? (Is there any stong reason to break compatibility?) - I'm testing \subpage and get: 1, I, I, I, the \userpage gives me 1, II, III, IV; \currentpage gives me 1, 1, 1, 1; I'll try to post a minimal example, but I stongly suspect that something is a bit broken here. - Is there a way to say \thisisreallythelastpage, so that \totalnumberofpages (or some other counter) doesn't count any leftovers from the end? (I'll try to play a bit more with that, so you don't need to answer me that last question, but I find the behaviour of other counters really strange.) The number 1 is on frontmatter, the uppercase roman numbers are on bodypart (without setting any conversion at all). Mojca ___ 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] Where did page numbers go?
On 10-2-2010 10:26, Mojca Miklavec wrote: On Tue, Feb 9, 2010 at 20:55, Wolfgang Schuster wrote: Am 09.02.10 20:36, schrieb Mojca Miklavec: Hello Hans, \currentpage (as already reported by Peter Münster) doesn't work in MKIV (always returns 1) and \setnumber[page]{0} has zero effect (in MKII; in MKIV I cannot test it anyway). \pagenumber? MkIV has no counter 'page' but 'realpage', 'userpage' and 'subpage'. - But why should \currentpage stop working? (Is there any stong reason to break compatibility?) because it' set at the wrong place, i'll fix it and upluad a beta dedicated to you (keep in mind that \currentpage in mkii/mkiv is the page in the file, aka realpage) Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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] Where did page numbers go?
Hello Hans, \currentpage (as already reported by Peter Münster) doesn't work in MKIV (always returns 1) and \setnumber[page]{0} has zero effect (in MKII; in MKIV I cannot test it anyway). Thanks, Mojca ___ 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] Where did page numbers go?
Am 09.02.10 20:36, schrieb Mojca Miklavec: Hello Hans, \currentpage (as already reported by Peter Münster) doesn't work in MKIV (always returns 1) and \setnumber[page]{0} has zero effect (in MKII; in MKIV I cannot test it anyway). \pagenumber? MkIV has no counter 'page' but 'realpage', 'userpage' and 'subpage'. 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] Where did page numbers go?
On 9-2-2010 20:36, Mojca Miklavec wrote: Hello Hans, \currentpage (as already reported by Peter Münster) doesn't work in MKIV (always returns 1) and \setnumber[page]{0} has zero effect (in MKII; in MKIV I cannot test it anyway). hm, i'll have a look at it why cannot you run mkiv ... a broken mac again? Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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] Random numbers in metapost
David Arnold wrote: Hi, Does anyone have any strategies for drawing random numbers from various statistics distributions in Metapost? For example, say, drawing 100 random numbers from a beta distribution? Assuming you are using mkiv: create a lua function and use its calculated results to create the metapost code. Metapost only knows about uniformdeviate and normaldeviate, and metapost is not a good language to program mathematics in. Best wishes, Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Random numbers in metapost
Taco et al, I think I've found a way. Anthony Phan has written a brilliant stats package for Metapost. http://www-math.univ-poitiers.fr/~phan/statsmac.html I think (haven't tried yet) I can select a number at random from the uniform distribution on [0,1], then use one of Anthony's functions such as: poissonicdf(expr p, lambda). Inverse cumulative distribution function of P(lambda). See Anthony's manual at: http://www-math.univ-poitiers.fr/~phan/downloads/metapost/statsman.pdf David. On Dec 31, 2009, at 5:13 AM, Taco Hoekwater wrote: David Arnold wrote: Hi, Does anyone have any strategies for drawing random numbers from various statistics distributions in Metapost? For example, say, drawing 100 random numbers from a beta distribution? Assuming you are using mkiv: create a lua function and use its calculated results to create the metapost code. Metapost only knows about uniformdeviate and normaldeviate, and metapost is not a good language to program mathematics in. Best wishes, Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : 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] Random numbers in metapost
Hi, Does anyone have any strategies for drawing random numbers from various statistics distributions in Metapost? For example, say, drawing 100 random numbers from a beta distribution? David ___ 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] Biblography list does not show numbers
On 6 déc. 2009, at 08:53, Taco Hoekwater wrote: […] ConTeXt has never had a very strong presence in the exact sciences. Hi Taco and all, In order to change this, and in order to use more easily the t-bib module, can you please tell us how to put the cited references in square bracket in the typest output, something like: see T. Hoekwater [2]... when in the source file one says ... see T. Hoekwater \cite[THoekwater]... Since I am strongly willling to switch to ConTeXt for writing and submitting my maths papers, there are two other questions which I couldn't fix: 1) in the output of the minimal example below one sees two dots after the title of the Galileo reference; and the number of page of the Hoekwater reference appears as « .14p. » instead of « 14 p. » 2) the other question is that how the reference list can be in the alphabetical order? (Assuming that the publications are defined within the source file) Thanks in advance. Best regards: OK ### begin example-biblio.tex \usemodule[bib] \startbuffer[bibexample] \startpublication[ k=Galileo, t=book, a=Galilei] \author{First Name}[G. ]{}{Galilei} \title{Discorso sul flusso e il reflusso del mare} \pubyear{1616} \stoppublication \startpublication[ k=THoekwater, t=manual, a=Hoekwater, y=2006, s=TH2006, n=1, u=http://contextgarden.net/Bibliography] \author{Taco}[T.]{}{Hoekwater} \title{\CONTEXT\ Publication Module, The user documententation} \pubyear{2006} \note{In case you didn't know: this is the main manual wriiten on bib-module.} \pages{14} \stoppublication \stopbuffer \getbuffer[bibexample] \setuppublications[numbering=yes] \setupcite[num,left={[},right={]}] \section{Introduction} This is an example of article with bibliography, using the bibliography module (\type{t-bib.tex}) which takes care of references to publications and the typesetting of publication lists in \CONTEXT. For more information see T.~Hoekwater~\cite[THoekwater]. If Galileo Galilei knew about this, the book \cite[Galileo] would have been written differently. \completepublications[criterirum=all] \stoptext ### end example-biblio.tex___ 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] Biblography list does not show numbers
Otared Kavian wrote: On 6 déc. 2009, at 08:53, Taco Hoekwater wrote: […] ConTeXt has never had a very strong presence in the exact sciences. Hi Taco and all, In order to change this, and in order to use more easily the t-bib module, can you please tell us how to put the cited references in square bracket in the typest output, something like: see T. Hoekwater [2]... when in the source file one says ... see T. Hoekwater \cite[THoekwater]... \setuppublications[alternative=num] See also the bibliography manual: http://modules.contextgarden.net/bibman Best wishes, Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Biblography list does not show numbers
Many thanks, Taco. Best regards: OK On 6 déc. 2009, at 10:15, Taco Hoekwater wrote: Otared Kavian wrote: On 6 déc. 2009, at 08:53, Taco Hoekwater wrote: […] ConTeXt has never had a very strong presence in the exact sciences. Hi Taco and all, In order to change this, and in order to use more easily the t-bib module, can you please tell us how to put the cited references in square bracket in the typest output, something like: see T. Hoekwater [2]... when in the source file one says ... see T. Hoekwater \cite[THoekwater]... \setuppublications[alternative=num] See also the bibliography manual: http://modules.contextgarden.net/bibman Best wishes, Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ %% Otared Kavian Département de Mathématiques Université de Versailles Saint-Quentin Bâtiment Fermat 45 aveue des Etats Unis 78035 Versailles cedex Téléphone: +33 1 39 25 46 42 Secrétariat: +33 1 39 25 46 44 Secrétariat: +33 1 39 25 46 46 e-mail: otared.kav...@math.uvsq.fr ___ 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] Biblography list does not show numbers
Hi Taco, I have assumed that ConTeXt has more authors that need APA like citations than bracketed numbers. ConTeXt has never had a very strong presence in the exact sciences. If that's the case, then the \cite command does the wrong thing by default, since it generates references as bracketed numbers. My complaint was not one of default style, but of inconsistency: \cite uses bracketed numbers, while the list of references just uses author names and years (which I now understand to be APA style. This also means that this is a MkIV problem, my example did generate (author, year) style references with MkII. Gr. Matthijs signature.asc Description: Digital 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] Biblography list does not show numbers
Matthijs Kooijman wrote: Hi Taco, I have assumed that ConTeXt has more authors that need APA like citations than bracketed numbers. ConTeXt has never had a very strong presence in the exact sciences. If that's the case, then the \cite command does the wrong thing by default, since it generates references as bracketed numbers. My complaint was not one of default style, but of inconsistency: \cite uses bracketed numbers, while the list of references just uses author names and years (which I now understand to be APA style. This also means that this is a MkIV problem, my example did generate (author, year) style references with MkII. Yes. MkII is right. ___ 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] Biblography list does not show numbers
Hey all, I'm trying to use a bibliography, but it seems no numbers are show in the biblography that is generated. The following example: Test.tex: = \usemodule[bib] \setupbibtex[database=Test] \starttext \section{foo} Blaa \cite[foo] Bar \completepublications \stoptext Test.bib: == @article{foo, author = {Bar}, title = {Foo}, year = {2009}, } generates the following text: 1 foo Blaa [1] Bar 1 References Bar (2009). Foo. . So, the citation gets a number as it should, is referenced by the number, but the list of references does not list that number. This makes the bibliography pretty useless :-) This also happens with MkII (though the reference doesn't get a number, but uses the author name and year: (Bar, 2009). Am I missing something, or is this a bug? On a related note, if I remove the \section, no reference will be generated. This is probably not a problem in real documents, though. Gr. Matthijs signature.asc Description: Digital 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] Biblography list does not show numbers
I'm trying to use a bibliography, but it seems no numbers are show in the biblography that is generated. The following example: Ah, using \setuppublications[numbering=yes] solves this. Any reason this is not the default? I'll put this on the wiki (and stress the completeness of the manual over the wiki page). Gr. Matthijs signature.asc Description: Digital 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] Biblography list does not show numbers
Matthijs Kooijman wrote: I'm trying to use a bibliography, but it seems no numbers are show in the biblography that is generated. The following example: Ah, using \setuppublications[numbering=yes] solves this. Any reason this is not the default? I have assumed that ConTeXt has more authors that need APA like citations than bracketed numbers. ConTeXt has never had a very strong presence in the exact sciences. Best wishes, Taco ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] format float numbers in luatex
Hi Jorge, Regarding your first question try this: \starttext The square root of 2 is \ctxlua{tex.print(math.sqrt(2))}\dots, but usually the default value \ctxlua{tex.print(math.floor(1000*math.sqrt(2))/1000)} is considered to be a good approximation. \stoptext (There is also math.ceil) Best regards: OK On 24 oct. 2009, at 18:59, batela wrote: Dear Sirs, I'm looking a way to format float numbers. For example \ctxlua {text.print(sqrt(2))} give me 1.41421356237309504880 but i want 1.414. Is there a way to format real numbers. Note: I had tried \ctxlua{a = sqrt(a) ; aformat = string.format (0.3%f, a) ; text.print(aformat)} but that don't work because the % character thanks a lot Have a nice day jorge ___ 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] format float numbers in luatex
Am 24.10.2009 um 18:59 schrieb batela: Dear Sirs, I'm looking a way to format float numbers. For example \ctxlua {text.print(sqrt(2))} give me 1.41421356237309504880 but i want 1.414. Is there a way to format real numbers. Note: I had tried \ctxlua{a = sqrt(a) ; aformat = string.format (0.3%f, a) ; text.print(aformat)} but that don't work because the % character \ctxlua{text.sprint(string.format(0.3\%f,sqrt(2)))} or \ctxlua{text.sprint(string.format(0.3\letterpercent f,sqrt(2)))} 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] section numbers
Am 19.10.2009 um 14:49 schrieb Thomas A. Schmitz: Hi all, I could have sworn there was a thread recently about the same question, but can't find it: I want section numbers without the prefixed chapter number. Isn't this supposed to work? \setuphead[section] [previousnumber=no] \setuphead [section] [sectionsegments=3:100] % show only the numbers for level 3 (=section) till 100 (subsubsub...section) 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] section numbers
On Oct 19, 2009, at 4:10 PM, Wolfgang Schuster wrote: \setuphead [section] [sectionsegments=3:100] % show only the numbers for level 3 (=section) till 100 (subsubsub...section) Wolfgang Thank you Wolfgang, that does it! At the risk of sounding like a crybaby: would one of the two people who have understood how the new structure code works please add some documentation somewhere? Just imagine what would happen if Hans and Wolfgang were struck by lightning on the same day :-) Thanks, and 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] section numbers
On Mon, Oct 19, 2009 at 4:28 PM, Thomas A. Schmitz thomas.schm...@uni-bonn.de wrote: Just imagine what would happen if Hans and Wolfgang were struck by lightning on the same day :-) They will rise again, just like the Phoenix. -- luigi ___ 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] section numbers
Hi Alan, Try attached example.tex. Best regards, Joshua On Mon, 19 Oct 2009, Alan BRASLAU wrote: Hello, I did not understand that this be the answer to the question, but, of course, I cannot contradict he who posted the question in the beginning. However, I understood that Thomas still wanted chapters to be numbered, but that sections be numbered independently. In my case, I have been struggling to have parts numbered (I, II, III, IV) and to have chapters numbered independently (1, 2, 3, 4, ...), such as: Part I Chapter 1 Chapter 2 Part II Chapter 3 Chapter 4 Part III Chapter 5 For this, I have \setuplabeltext[chapter=Chapter ] % By default, blank when using \part \doifmodeelse{mkiv}{ \setupstructureheads[sectionsegments=2:100] \setupstructurehead[part][resetnumber=no,placehead=yes] }{ % mkii \setuplist[chapter,section,subsection,subsubsection][partnumber=no] } but this is not quite right (works fine in mkii): - the parts are not numbered - the chapters are numbered 1, 2, 1, 2, 1, ... I have not yet figured this out (another problem kept me from using mkiv on this problem, resolved only recently). Alan On Monday 19 October 2009 16:28:10 Thomas A. Schmitz wrote: On Oct 19, 2009, at 4:10 PM, Wolfgang Schuster wrote: \setuphead [section] [sectionsegments=3:100] % show only the numbers for level 3 (=section) till 100 (subsubsub...section) Wolfgang Thank you Wolfgang, that does it! At the risk of sounding like a crybaby: would one of the two people who have understood how the new structure code works please add some documentation somewhere? Just imagine what would happen if Hans and Wolfgang were struck by lightning on the same day :-) Thanks, and 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 ___ -- Joshua Lee Alpha Networks(Chengdu) Co., LTD Shanghai Branch TEL: (86-21)61609650 EXT: 8020 FAX: (86-21)61609650 EXT: 8041 ADD: Suite 301, No.10, 198 Lane, Zhangheng Road, ZJ Hi-Tech Park, Shanghai, China 201204 example.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] oldstyle numbers
Hi, I’m new to ConTeXt and try to compile a document using XeTeX. Loading an otf font works fine, but I don’t get it to use oldstyle numbers. google and contextgarden did give me some hints, but I didn’t get it working. I tried: \starttext \definetypeface[normalfont][rm][Xserif][Arno Pro] \stoptext and several versions of things like [features=oldstyle], [onum=true], \definefontfeature[mine] with oldstyle etc. but nothing worked. So what am I doing wrong? Is there a simple way for oldstyle numbers? (I want them in the whole document, so I prefer a simple, global solution.) cheers, Arno signature.asc Description: OpenPGP digital 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] oldstyle numbers
Am 16.09.2009 um 12:07 schrieb Arno Trautmann: Hi, I’m new to ConTeXt and try to compile a document using XeTeX. Loading an otf font works fine, but I don’t get it to use oldstyle numbers. google and contextgarden did give me some hints, but I didn’t get it working. I tried: \starttext \definetypeface[normalfont][rm][Xserif][Arno Pro] \stoptext and several versions of things like [features=oldstyle], [onum=true], \definefontfeature[mine] with oldstyle etc. but nothing worked. So what am I doing wrong? Is there a simple way for oldstyle numbers? (I want them in the whole document, so I prefer a simple, global solution.) \definefontfeature[default][default][onum=yes] % when this did not work (because your context is too old) use: % \definefontfeature[default] [liga=yes,kern=yes,tlig=yes,trep=yes,onum=yes] \definetypeface[mainface][rm][Xserif][Arno Pro] \setupodyfont[mainface] \starttext 0123456789 \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] oldstyle numbers
Wolfgang Schuster wrote: Am 16.09.2009 um 12:07 schrieb Arno Trautmann: Hi, I’m new to ConTeXt and try to compile a document using XeTeX. Loading an otf font works fine, but I don’t get it to use oldstyle numbers. google and contextgarden did give me some hints, but I didn’t get it working. I tried: \starttext \definetypeface[normalfont][rm][Xserif][Arno Pro] \stoptext and several versions of things like [features=oldstyle], [onum=true], \definefontfeature[mine] with oldstyle etc. but nothing worked. So what am I doing wrong? Is there a simple way for oldstyle numbers? (I want them in the whole document, so I prefer a simple, global solution.) \definefontfeature[default][default][onum=yes] \definetypeface[mainface][rm][Xserif][Arno Pro] \setupodyfont[mainface] \starttext 0123456789 \stoptext Thank you very much, that works fine! Just for future questions: Where could I have found this? (I prefer reading documentation than wasting people’s time by asking …) cheers, Arno signature.asc Description: OpenPGP digital 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] oldstyle numbers
Am 16.09.2009 um 12:25 schrieb Arno Trautmann: Just for future questions: Where could I have found this? (I prefer reading documentation than wasting people’s time by asking …) - http://context.aanhet.net/svn/contextman/context-reference/en/co-typography.pdf - http://context.aanhet.net/svn/contextman/context-reference/en/co-fonts.pdf Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] oldstyle numbers
Wolfgang Schuster wrote: Am 16.09.2009 um 12:25 schrieb Arno Trautmann: Just for future questions: Where could I have found this? (I prefer reading documentation than wasting people’s time by asking …) - http://context.aanhet.net/svn/contextman/context-reference/en/co-typography.pdf - http://context.aanhet.net/svn/contextman/context-reference/en/co-fonts.pdf Thanks again, that will help me a lot! Arno signature.asc Description: OpenPGP digital 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] oldstyle numbers
Hi, \definefontfeature[default][default][onum=yes] Just for rerefence, this works for me as well using MkIV and luatex. Gr. Matthijs signature.asc Description: Digital 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Roman Page numbers
On Sat, Sep 5, 2009 at 10:42 PM, Derek CORDEIRO derekcorde...@gmail.com wrote Thanks a lot, it works as required. I added a note to the wiki Table_of_Contents page. On Fri, Sep 4, 2009 at 3:36 PM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 04.09.2009 um 11:03 schrieb Derek CORDEIRO: I do get romannumerals on each page now, but this is not reflected in the TOC as it does in MkII. Below is the minimal example. The new code is more complicated than i thought, here is solution to the problem. As Hans suggested we should collect such setups on the wiki. \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber] [][numbers] \setuplist[chapter][pageconversionset=pagenumber] \startstructureblockenvironment[frontpart] \setupuserpagenumber[numberconversion=romannumerals] \setuppagenumber[number=1] \stopstructureblockenvironment \startstructureblockenvironment[bodypart] \setuppagenumber[number=1] \stopstructureblockenvironment \starttext \startfrontmatter \completecontent[criterium=all] \chapter{Intro} \input tufte \stopfrontmatter \startbodymatter \chapter{knuth} \input knuth \stopbodymatter \stoptext Wolfgang This is odd. On my system (both MacTeX 2008 and ConTeXt minimals) this does not work properly. The Roman numbers appear in the TOC but not on the textpages themselves. Furthermore, after the frontmatter the page numbers should start again with 1 (at least that is what I think) but they just continue (i.c. with 3). The previous TeX-file, in ntg-context Digest, Vol 63, Issue 6, message 6, showed almost the reverse, i.e. Roman numbers on the pages but not in the TOC but the body matter starting correctly on page 1. So if the present setup works correctly for Derek, why would it be it different on my system and what can I do about it? Sorry for intruding but this topic is important for me. Regards, Robert Blackstone ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Roman Page numbers
Am 06.09.2009 um 10:31 schrieb Robert Blackstone: This is odd. On my system (both MacTeX 2008 and ConTeXt minimals) this does not work properly. The code is for MkIV only and the ConTeXt in TeXLive is too old for the new code. The Roman numbers appear in the TOC but not on the textpages themselves. Furthermore, after the frontmatter the page numbers should start again with 1 (at least that is what I think) but they just continue (i.c. with 3). What ConTeXt version do you use? $ context --version MTXrun | main context file: /Users/wolf/context/tex/texmf-context/tex/ context/base/context.tex MTXrun | current version: 2009.08.30 12:25 Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Roman Page numbers
On Sun, Sep 6, 2009 at 3:25 PM, Robert Blackstone blackstone.rob...@gmail.com wrote: On Sun, Sep 6, 2009 at 12:00 PM, Wolfgang Schuster wrote The code is for MkIV only and the ConTeXt in TeXLive is too old for the new code. The Roman numbers appear in the TOC but not on the textpages themselves. Furthermore, after the frontmatter the page numbers should start again with 1 (at least that is what I think) but they just continue (i.c. with 3). What ConTeXt version do you use? MTXrun | current version: 2009.06.14 21:01 June this year. Too old already? maybe If so, what would be a good frequency of updating the minimals? For bug fixes,you should always have the last stable / beta, it depends what are you using . There is no backward compatibility -- luigi ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Digest, Roman Page numbers
On Sun, Sep 6, 2009 at 12:00 PM,Wolfgang Schuster wrote Am 06.09.2009 um 10:31 schrieb Robert Blackstone: This is odd. On my system (both MacTeX 2008 and ConTeXt minimals) this does not work properly. What ConTeXt version do you use? I updated the minimals today and indeed your setup works perfectly now. Thank you. Regards, Robert Blackstone ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Roman Page numbers
Thanks a lot, it works as required. I added a note to the wiki Table_of_Contents page. Just an unrelated question, Since MkIV is quite different and incompatible with MkII, wouldn't it be better to keep all MkIV specific information separate in the wiki? On Fri, Sep 4, 2009 at 3:36 PM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 04.09.2009 um 11:03 schrieb Derek CORDEIRO: I do get romannumerals on each page now, but this is not reflected in the TOC as it does in MkII. Below is the minimal example. The new code is more complicated than i thought, here is solution to the problem. As Hans suggested we should collect such setups on the wiki. \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber] [][numbers] \setuplist[chapter][pageconversionset=pagenumber] \startstructureblockenvironment[frontpart] \setupuserpagenumber[numberconversion=romannumerals] \setuppagenumber[number=1] \stopstructureblockenvironment \startstructureblockenvironment[bodypart] \setuppagenumber[number=1] \stopstructureblockenvironment \starttext \startfrontmatter \completecontent[criterium=all] \chapter{Intro} \input tufte \stopfrontmatter \startbodymatter \chapter{knuth} \input knuth \stopbodymatter \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Roman Page numbers
Derek CORDEIRO wrote: Thanks a lot, it works as required. I added a note to the wiki Table_of_Contents page. Just an unrelated question, Since MkIV is quite different and incompatible with MkII, wouldn't it be better to keep all MkIV specific information separate in the wiki? keep in mind that we're in the process of getting rid of some of those incompatibilities so update the wiki page accordingly - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Roman Page numbers
On Fri, Sep 4, 2009 at 2:07 AM, Wolfgang Schuster schuster.wolfg...@googlemail.com wrote: Am 03.09.2009 um 15:30 schrieb Derek CORDEIRO: The following minimal example is not working under MkIV. However it works under MkII \setuppagenumbering[conversion=romannumerals] \setupuserpagenumber[numberconversion=romannumerals] I do get romannumerals on each page now, but this is not reflected in the TOC as it does in MkII. Below is the minimal example. \starttext \startfrontmatter \setupuserpagenumber[numberconversion=romannumerals] \setuppagenumber[number=1] \completecontent[criterium=all] \chapter{Intro} \input tufte \stopfrontmatter \startbodymatter \setuppagenumber[number=1] \chapter{knuth} \input knuth \stopbodymatter \stoptext Help, Derek ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Roman Page numbers
Am 04.09.2009 um 11:03 schrieb Derek CORDEIRO: I do get romannumerals on each page now, but this is not reflected in the TOC as it does in MkII. Below is the minimal example. The new code is more complicated than i thought, here is solution to the problem. As Hans suggested we should collect such setups on the wiki. \definestructureconversionset[frontpart:pagenumber][][romannumerals] \definestructureconversionset[bodypart:pagenumber] [][numbers] \setuplist[chapter][pageconversionset=pagenumber] \startstructureblockenvironment[frontpart] \setupuserpagenumber[numberconversion=romannumerals] \setuppagenumber[number=1] \stopstructureblockenvironment \startstructureblockenvironment[bodypart] \setuppagenumber[number=1] \stopstructureblockenvironment \starttext \startfrontmatter \completecontent[criterium=all] \chapter{Intro} \input tufte \stopfrontmatter \startbodymatter \chapter{knuth} \input knuth \stopbodymatter \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Roman Page numbers
The following minimal example is not working under MkIV. However it works under MkII \setuppagenumbering[conversion=romannumerals] \starttext \input knuth \stoptex What am I doing wrong? LuaTeX, Version beta-0.43.0-2009081914 Regards, Derek ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Roman Page numbers
Am 03.09.2009 um 15:30 schrieb Derek CORDEIRO: The following minimal example is not working under MkIV. However it works under MkII \setuppagenumbering[conversion=romannumerals] \setupuserpagenumber[numberconversion=romannumerals] Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___