Re: [NTG-context] Basic \def error?
Am 23.04.2013 um 20:11 schrieb "Verhaag, G.C.H.M." : > Hi Luigi, > > Thanks for your very quick response, just great! Your suggestion works! > > By the way, what does this expanded mean, is it documented somewhere? Is it a > typical MKIV thing related to Lua? It’s a typical way in MkIV to check for the existing of values in “command” keys but it has nothing to do with Lua. I can demonstrate the purpose of \unexpanded with the following example. First I create the two command \one and \two, afterwards I add \expandedone and \expandedtwo which hold the expanded values of \one and \two. As you can see I get the same text with \one and \expandedone. In the next step I redefine \one and \two to hold a new value and compare again the content of all four macros. Unlike in the previous output \one and \expandedone are different while \two and \expandedtwo show the same result. The reason why \expandedtwo show “Second” is that \unexpanded\def prevented the expansion of \two in \edef\expandedtwo{…}. \starttext \def\one{One} \unexpanded\def\two{Two} \edef\expandedone{\one} \edef\expandedtwo{\two} \startlines \one:\expandedone \two:\expandedtwo \stoplines \def\one{First} \def\two{Second} \startlines \one:\expandedone \two:\expandedtwo \stoplines \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] [luatex-fonts] error with Amiri due to inclusion of font-otp.lua
On 4/24/2013 12:02 AM, Philipp Gesang wrote: Hi, including font-otp triggers an error with the Amiri font: ! LuaTeX error ./luaotfload-merged.lua:10471: invalid value (nil) at index 1 in table for 'concat'. Which corresponds to line 192 of font-otp.lua. Test code: \font\test={file:amiri-regular.ttf} \test ضرب \bye Or with Context: \mainlanguage[arabic] \definefontsynonym[amiri][file:amiri-regular.ttf] \starttext \definedfont[amiri*arabic at 42pt] \setupalign[r2l] ضرب 0123456789 \stoptext I have tested the Amiri files from TeX Live 2012 and 2013. Can somebody reproduce this, possibly with other fonts? Scheherazade works fine. works ok here .. maybe you need to delete an old cache Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] [luatex-fonts] error with Amiri due to inclusion of font-otp.lua
Hi, including font-otp triggers an error with the Amiri font: ! LuaTeX error ./luaotfload-merged.lua:10471: invalid value (nil) at index 1 in table for 'concat'. Which corresponds to line 192 of font-otp.lua. Test code: \font\test={file:amiri-regular.ttf} \test ضرب \bye Or with Context: \mainlanguage[arabic] \definefontsynonym[amiri][file:amiri-regular.ttf] \starttext \definedfont[amiri*arabic at 42pt] \setupalign[r2l] ضرب 0123456789 \stoptext I have tested the Amiri files from TeX Live 2012 and 2013. Can somebody reproduce this, possibly with other fonts? Scheherazade works fine. Thanks for any advice Philipp pgpZFK9XHk4Vz.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] Basic \def error?
Am 23.04.2013 um 19:08 schrieb luigi scarso : > On Tue, Apr 23, 2013 at 7:04 PM, Verhaag, G.C.H.M. > wrote: >> Hi ConTeXt User's, >> >> Again I'm struggling with MKIV! >> >> I get the following error message: >> >> ! Argument of \HeadTitle has an extra } >> >> My environment file contains the following definition: >> >> \def\HeadTitle#1#2% >> {\hbox to \hsize \bgroup >> \hfill >> \lbox to 2cm{\hsize 7cm #2}% >> \egroup} > > \unexpanded\def\HeadTitle#1#2% > {\hbox to \hsize \bgroup >\hfill >\lbox to 2cm{\hsize 7cm #2}% >\egroup} \define[2]\HeadTitle {\startframedtext[right][height=2cm,width=7cm,frame=off,offset=none,align=flushright] #2 \stopframedtext} 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] Cumulating numbered lists
On 4/23/2013 10:31 PM, Aditya Mahajan wrote: On Tue, 23 Apr 2013, Alan Bowen wrote: OK. Thanks for the explanation, Wolfgang. I will await the day when the repeat key can be disabled. the day i do an upload If you are not interested in re-enabling the repeat key in a nested itemize, then the attached example may work (not tested beyond the minimal example) added .. (but with \v!norepeat ... not sure about the keyword, but it's hard to find a better one) 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] Cumulating numbered lists
On Tue, 23 Apr 2013, Alan Bowen wrote: OK. Thanks for the explanation, Wolfgang. I will await the day when the repeat key can be disabled. If you are not interested in re-enabling the repeat key in a nested itemize, then the attached example may work (not tested beyond the minimal example) Aditya\unprotect \setvalue{\??itemgroupkeyword\v!no\v!repeat }{\setfalse\c_strc_itemgroups_repeat} \def\strc_itemgroups_check_for_repeated {\ifconditional\c_strc_itemgroups_repeat \ifx\m_strc_itemgroups_repeat_start\empty \edef\m_strc_itemgroups_repeat_start{\currentitemlevel}% \fi \else \let\m_strc_itemgroups_repeat_start\empty \fi} \protect \setupitemgroup[itemize][broad,joinedup,packed,autointro] \starttext \setupitemize[itemalign=flushright] \startitemize[n,repeat] \item level a \startitemize[n,norepeat] \item level b \startitemize[A] \item level c \stopitemize \stopitemize \stopitemize \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 ___
Re: [NTG-context] Cumulating numbered lists
OK. Thanks for the explanation, Wolfgang. I will await the day when the repeat key can be disabled. Alan On Tue, Apr 23, 2013 at 6:20 AM, Wolfgang Schuster < schuster.wolfg...@gmail.com> wrote: > > Am 22.04.2013 um 23:59 schrieb Alan Bowen : > > > Another try: > > > > Can someone explain why > > > > \setupitemgroup[itemize][broad,joinedup,packed,autointro] > > \setupitemize[itemalign=flushright] > > \startitemize[n,repeat] > > \item level a > > \startitemize[n,repeat] > > \item level b > > \startitemize[A][prefix=no] > > \item level c > > \stopitemize > > \stopitemize > > \stopitemize > > The repeat key enables a internal switch which isn’t disables at the next > level nor this there > any key to disable it yet. Your attempt with the prefix key can’t work > because prefixes are > the values of the current chapter, section etc. > > Wolfgang > > > ___ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > > ___ > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] calculating with dimension unit
Ok, I now put the \ctxlua into an other chapter: http://wiki.contextgarden.net/Calculating_with_dimension_units Can you say something to the missing points there? "Wich meethod?", "\the" and "Expanding If you don't know how to edit the context-wiki, please write your information here in the mailinglist - then I will put it into the wiki. Regards Jannis ___ If your question is of interest to others as well, please add an entry to the Wiki! 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] Basic \def error?
Hi Luigi, Thanks for your very quick response, just great! Your suggestion works! By the way, what does this expanded mean, is it documented somewhere? Is it a typical MKIV thing related to Lua? Regards, Verhaag, G.C.H.M. On 04/23/2013 07:08 PM, luigi scarso wrote: On Tue, Apr 23, 2013 at 7:04 PM, Verhaag, G.C.H.M. wrote: Hi ConTeXt User's, Again I'm struggling with MKIV! I get the following error message: ! Argument of \HeadTitle has an extra } My environment file contains the following definition: \def\HeadTitle#1#2% {\hbox to \hsize \bgroup \hfill \lbox to 2cm{\hsize 7cm #2}% \egroup} \unexpanded\def\HeadTitle#1#2% {\hbox to \hsize \bgroup \hfill \lbox to 2cm{\hsize 7cm #2}% \egroup} -- 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 ___ -- Afz.: Geert C.H.M. Verhaag St. Jorisstraat 29 5954 AN Beesel NETHERLANDS Tel.: +31-(0)774742493, E-mail: verhaagg...@ziggo.nl Ik vertrouw erop dat de persoonlijke gegevens, te vinden in deze mail, uitsluitend voor correspondentie met ondergetekende worden gebruikt en beslist niet voor reclamedoeleinden of welke andere wijze dan ook. Het opnemen van deze gegevens, in welk soort van opslagsysteem dan ook, evenals het doorgeven ervan aan derden, zie ik als een schending van mijn privacy. ___ If your question is of interest to others as well, please add an entry to the Wiki! 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] A simpler way to make a bibliography
After struggling with all the programming prescribed by Context to set up a bibliography, and examining a few dozen *.bib, *.bst and a *bbl file, I decided to do things the simple way. My concept is, that instead of creating a *bib file I could with the same amount of effort create a plain text file to be imported directly into my Context file. I studied the bibliography of "The Chicago Manual of Style" to determine the order, punctuation and format. My file is called "book.foo." Now if I choose to use some of these entries in another book a simple cut and paste between two editor sessions will do. For ease in editing I put each item in each entry on a separate line. TeX/Context will take care of puttng them together in a paragraph. Of course this lacks the generality of the bibtex approach. But I don't need all that flexibilty. None of the current biblio styles specified for Context incorporate the ISBN field. So I just put it at the end of each entry preceded by a \crlf. Without further ado here is the book.foo file: -- \chapter{References} %authors. title. city: publisher, year\crlf %isbn Bah, Tavmjong. {\it Inkscape: Guide to a Vector Drawing Program}. Upper Saddle River, New Jersey: Prentice-Hall, 2011 \crlf ISBN 978-0-13-276414-8 Culleton, John R. Jr. {\it Create Book Covers with Scribus} (pdf e-book). Eldersburg, Maryland: Wexford Press, 2012 \crlf ISBN 978-1-60019-002-5 Drew, Ned and Paul Sternberger. {\it By its Cover: Modern American Book Design}. New York: Princeton Architectural Press, 2005\crlf ISBN 978-1-56898-497-1 Kirsanov, Dimitry. {\it The Book of Inkscape\trademark : The Definitive Guide to the Free Graphics Editor}. San Francisco: No Starch Press, 2009\crlf ISBN 978-159327-181-7 Powers, Alan. {\it Front Cover: Great Book Jacket and Cover Design}. London: Mitchell Beazley, 2006\crlf ISBN 978-1-84533-242-6 --- If by chance an entry ends up split between two pages a simple \page[yes] command can be inserted. I considered instead putting a \goodbreak between entries but figured it wasn't worth the bother. Since I call this fragment a \chapter it is listed in the TOC. I had to put \whitespace[medium] right after the \startbackmatter command just as I did after \startbodymatter. for my purposes for this task simple is better and much faster. -- John Culleton Wexford Press Free list of books for self-publishers: http://wexfordpress.net/shortlist.html PDF e-book: "Create Book Covers with Scribus" available at http://www.booklocker.com/books/4055.html ___ If your question is of interest to others as well, please add an entry to the Wiki! 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] Basic \def error?
On Tue, Apr 23, 2013 at 7:04 PM, Verhaag, G.C.H.M. wrote: > Hi ConTeXt User's, > > Again I'm struggling with MKIV! > > I get the following error message: > > ! Argument of \HeadTitle has an extra } > > My environment file contains the following definition: > > \def\HeadTitle#1#2% > {\hbox to \hsize \bgroup >\hfill >\lbox to 2cm{\hsize 7cm #2}% >\egroup} \unexpanded\def\HeadTitle#1#2% {\hbox to \hsize \bgroup \hfill \lbox to 2cm{\hsize 7cm #2}% \egroup} -- 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 ___
[NTG-context] Basic \def error?
Hi ConTeXt User's, Again I'm struggling with MKIV! I get the following error message: ! Argument of \HeadTitle has an extra } My environment file contains the following definition: \def\HeadTitle#1#2% {\hbox to \hsize \bgroup \hfill \lbox to 2cm{\hsize 7cm #2}% \egroup} \setuphead [chapter] [command=\HeadTitle] In the text I use: \chapter[voorwrd]{Voorwoord} I updated to the following version: ConTeXt ver: 2013.04.20 01:15 MKIV current fmt: 2013.4.22 int: english/english, but must admit that I haven't used ConTeXt for quite a while! Probably I've missed something but couldn't find any hint from the mail archive to solve this problem, sorry! Regards, Verhaag,G.C.H.M. ___ If your question is of interest to others as well, please add an entry to the Wiki! 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] localfootnotes and bodyfontsize in a placetable
The following attached "minimal" example using local footnotes and a small body font size exhibits two problems: 1. The \placelocalfootnotes are incoherently in the "normal" size, as I would expect them to be proportionally reduced. 2. The width of the first column gets incorrectly set (there is a break between "a" and "cell"). Probably there is a better way of achieving this correctly. Alan\setupbodyfont[10pt] \starttext 10pt \startplacetable [title=A title] \switchtobodyfont [6pt] \startlocalfootnotes \bTABLE \bTR \bTD a cell\startfootnote A footnote\stopfootnote\eTD \bTD another cell\eTD \eTR \eTABLE \placelocalfootnotes \stoplocalfootnotes \stopplacetable \stoptext \setupbodyfont[10pt] \starttext 10pt \startplacetable [title=A title] \switchtobodyfont [6pt] \startlocalfootnotes \bTABLE \bTR \bTD a cell\startfootnote A footnote\stopfootnote\eTD \bTD another cell\eTD \eTR \eTABLE \placelocalfootnotes \stoplocalfootnotes \stopplacetable \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 ___
Re: [NTG-context] Set background color for a single page
Aditya, thanks. I like this Lua way, but I have to explore the Lua world first. Ok, reading PIL and coding in Lua. Tim> Date: Tue, 23 Apr 2013 10:51:24 -0400 > From: adit...@umich.edu > To: ntg-context@ntg.nl > Subject: Re: [NTG-context] Set background color for a single page > > > Aditya, I want to know both please. Now I use the \start \definecolor > > ... ... \startmakeup[standard] ... \stopmakeup \stopto assign a > > specific color to the tilepage whose content is on a single page > > exactly. But I don't know how to set the background for a single page, > > say, page 3 if a document has more than three pages. Also, I don't know > > how to cycle pages through a finite list of colors. Can you show me > > that? Tim > > One way to do this is to set > > \setupbackgrounds[page][background=color, backgroundcolor=\PageColor] > > and define \PageColor such that it expands to an appropriate color. For > arbitrary control, you can use a lua function, for example: > > \startluacode >thirddata = thirddata or {} > >function thirddata.getpagecolor(num) > -- A lua function that assigns colors based on page numbers > if num == 3 then > context("blue") > elseif num == 5 then > context("red") > end >end > \stopluacode > > \def\PageColor% >{\ctxlua{thirddata.getpagecolor(\rawcountervalue[userpage])}} > > \setupbackgrounds[page][background=color, backgroundcolor=\PageColor] > > \setuppapersize[S3] > \starttext > > \dorecurse{10}{\input knuth \par} > > \stoptext > > You can also use a lua table to assign colors, and then you do not have to > build a ladder of if statements. > > Aditya > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Set background color for a single page
Aditya, I want to know both please. Now I use the \start \definecolor ... ... \startmakeup[standard] ... \stopmakeup \stopto assign a specific color to the tilepage whose content is on a single page exactly. But I don't know how to set the background for a single page, say, page 3 if a document has more than three pages. Also, I don't know how to cycle pages through a finite list of colors. Can you show me that? Tim One way to do this is to set \setupbackgrounds[page][background=color, backgroundcolor=\PageColor] and define \PageColor such that it expands to an appropriate color. For arbitrary control, you can use a lua function, for example: \startluacode thirddata = thirddata or {} function thirddata.getpagecolor(num) -- A lua function that assigns colors based on page numbers if num == 3 then context("blue") elseif num == 5 then context("red") end end \stopluacode \def\PageColor% {\ctxlua{thirddata.getpagecolor(\rawcountervalue[userpage])}} \setupbackgrounds[page][background=color, backgroundcolor=\PageColor] \setuppapersize[S3] \starttext \dorecurse{10}{\input knuth \par} \stoptext You can also use a lua table to assign colors, and then you do not have to build a ladder of if statements. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Set background color for a single page
Aditya, I want to know both please. Now I use the \start \definecolor ... ... \startmakeup[standard] ... \stopmakeup \stopto assign a specific color to the tilepage whose content is on a single page exactly. But I don't know how to set the background for a single page, say, page 3 if a document has more than three pages. Also, I don't know how to cycle pages through a finite list of colors. Can you show me that? Tim > Date: Tue, 23 Apr 2013 09:47:32 -0400 > From: adit...@umich.edu > To: ntg-context@ntg.nl > Subject: Re: [NTG-context] Set background color for a single page > > On Tue, 23 Apr 2013, Tim Li wrote: > > > Aditya, Thanks. Defining a color conversion is a good idea, and we can > > apply this conversion easily to somethings like chapter, section, etc. > > which has a `color' filed to assign, but not pages. Is there a way to set > > the color of a page like that done for chapters and sections? Tim > > Do you want to assign a specific color to each page, or do you want the > pages to cycle through a finite list of colors. > > Aditya > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Set background color for a single page
On Tue, 23 Apr 2013, Tim Li wrote: Aditya, Thanks. Defining a color conversion is a good idea, and we can apply this conversion easily to somethings like chapter, section, etc. which has a `color' filed to assign, but not pages. Is there a way to set the color of a page like that done for chapters and sections? Tim Do you want to assign a specific color to each page, or do you want the pages to cycle through a finite list of colors. Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Set background color for a single page
Aditya, Thanks. Defining a color conversion is a good idea, and we can apply this conversion easily to somethings like chapter, section, etc. which has a `color' filed to assign, but not pages. Is there a way to set the color of a page like that done for chapters and sections? Tim > Date: Tue, 23 Apr 2013 07:28:09 -0400 > From: adit...@umich.edu > To: ntg-context@ntg.nl > Subject: Re: [NTG-context] Set background color for a single page > > On Tue, 23 Apr 2013, Tim Li wrote: > > > Sometimes, I only want a single page, say, the titlepage or page 32, with > > colored background rather that the whole document. Here are some codes: > > \starttext% titlepage (yellow) > > \startmakeup[standard] > > \midaligned{How to make document} > > \stopmakeup > > % page1 (gray) > > Many \CONTEXT\ users $\ldots$ > > \page > > % page2 (darkyellow) > > Many \TEX\ users $\ldots$ > > \stoptext > > Of course, it is awful that if I set the titlepage yellow, page1 gray and > > page2 darkyellow. How can I achieve this? regrads, Tim > > See: http://thread.gmane.org/gmane.comp.tex.context/75726/focus=75743 > > Another alternative is to pick the color from a list using > \convertnumber{colors}{userpage}, similar to the solution at > http://tex.stackexchange.com/a/54062/323 > > Aditya > ___ > If your question is of interest to others as well, please add an entry to the > Wiki! > > maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://tex.aanhet.net > archive : http://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Set background color for a single page
On Tue, 23 Apr 2013, Tim Li wrote: Sometimes, I only want a single page, say, the titlepage or page 32, with colored background rather that the whole document. Here are some codes: \starttext% titlepage (yellow) \startmakeup[standard] \midaligned{How to make document} \stopmakeup % page1 (gray) Many \CONTEXT\ users $\ldots$ \page % page2 (darkyellow) Many \TEX\ users $\ldots$ \stoptext Of course, it is awful that if I set the titlepage yellow, page1 gray and page2 darkyellow. How can I achieve this? regrads, Tim See: http://thread.gmane.org/gmane.comp.tex.context/75726/focus=75743 Another alternative is to pick the color from a list using \convertnumber{colors}{userpage}, similar to the solution at http://tex.stackexchange.com/a/54062/323 Aditya ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] Set background color for a single page
Sometimes, I only want a single page, say, the titlepage or page 32, with colored background rather that the whole document. Here are some codes: \starttext% titlepage (yellow) \startmakeup[standard] \midaligned{How to make document} \stopmakeup % page1 (gray) Many \CONTEXT\ users $\ldots$ \page % page2 (darkyellow) Many \TEX\ users $\ldots$ \stoptext Of course, it is awful that if I set the titlepage yellow, page1 gray and page2 darkyellow. How can I achieve this? regrads, Tim ___ If your question is of interest to others as well, please add an entry to the Wiki! 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] Cumulating numbered lists
Am 22.04.2013 um 23:59 schrieb Alan Bowen : > Another try: > > Can someone explain why > > \setupitemgroup[itemize][broad,joinedup,packed,autointro] > \setupitemize[itemalign=flushright] > \startitemize[n,repeat] > \item level a > \startitemize[n,repeat] > \item level b > \startitemize[A][prefix=no] > \item level c > \stopitemize > \stopitemize > \stopitemize The repeat key enables a internal switch which isn’t disables at the next level nor this there any key to disable it yet. Your attempt with the prefix key can’t work because prefixes are the values of the current chapter, section etc. 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] ``fallback" in Typescript
Wolfgang, many thanks to you, for your comprehensive explaination. After reading your mail, as a ConTeXt user, I think I can apply the `fallback' to my typescript definition well. Tim From: schuster.wolfg...@gmail.com Date: Tue, 23 Apr 2013 09:28:15 +0200 To: ntg-context@ntg.nl Subject: Re: [NTG-context] ``fallback" in Typescript Am 23.04.2013 um 04:05 schrieb Tim Li :Thanks. I am reading these codes. That won’t help to understand what’s the meaning of these lines. To demonstrate what these lines are for a wrote a small example. \starttypescript[serif][palatino-clone] \definefontsynonym [Serif] [file:texgyrepagellaregular] [features=default] \definefontsynonym [SerifItalic] [file:texgyrepagellaitalic] [features=default]\stoptypescript \starttypescript[sans][helvetica-clone] \definefontsynonym [Sans] [file:texgyreherosregular] [features=default] \definefontsynonym [SansItalic] [file:texgyreherositalic] [features=default]\stoptypescript \definetypeface[mainface][rm][serif][palatino-clone] [default]\definetypeface[mainface][ss][sans] [helvetica-clone][default] %\setupbodyfont[modern]\setupbodyfont[mainface] \starttext \rm\tf Regular \it Italic \sl Slanted \ss\tf Regular \it Italic \sl Slanted \stoptext When you put the code in a file and process you will notice that “\sl Slanted” always usesthe upright Pagella font, this happens because no font was set for this style in the typescriptsand a default font is used. You prevent this unwanted result by adding additional \definefontsynonym lines to thetypescript where you say context to use the italic font for the slanted style. \starttypescript[serif][palatino-clone] \definefontsynonym [Serif] [file:texgyrepagellaregular] [features=default] \definefontsynonym [SerifItalic] [file:texgyrepagellaitalic] [features=default] \definefontsynonym [SerifSlanted] [SerifItalic]\stoptypescript \starttypescript[sans][helvetica-clone] \definefontsynonym [Sans] [file:texgyreherosregular] [features=default] \definefontsynonym [SansItalic] [file:texgyreherositalic] [features=default] \definefontsynonym [SansSlanted] [SansItalic]\stoptypescript Still this wouldn’t be enough when you want to use also the bold and bolditalicstyles for your font even more fallback definitions are needed. The completetypescript for the serif font has to look now like this. \starttypescript[serif][palatino-clone] \definefontsynonym [Serif] [file:texgyrepagellaregular] [features=default] \definefontsynonym [SerifItalic] [file:texgyrepagellaitalic] [features=default] \definefontsynonym [SerifSlanted] [SerifItalic] \definefontsynonym [SerifBold][Serif] \definefontsynonym [SerifBoldItalic] [SerifBold] \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic] \definefontsynonym [SerifCaps][Serif]\stoptypescript Because such fallback definitions are needed for many font (especially the slantedto italic mappings) you can predefined lists in type-fbk.mkiv which you can loadat the begin at your typescript to save a few lines and we can abbreviate the abovetypescript in this form. \starttypescript[serif][palatino-clone] \setups[font:fallback:serif] \definefontsynonym [Serif][file:texgyrepagellaregular] [features=default] \definefontsynonym [SerifItalic] [file:texgyrepagellaitalic] [features=default]\stoptypescript Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] ``fallback" in Typescript
Am 23.04.2013 um 04:05 schrieb Tim Li : > Thanks. I am reading these codes. That won’t help to understand what’s the meaning of these lines. To demonstrate what these lines are for a wrote a small example. \starttypescript[serif][palatino-clone] \definefontsynonym [Serif] [file:texgyrepagellaregular] [features=default] \definefontsynonym [SerifItalic] [file:texgyrepagellaitalic] [features=default] \stoptypescript \starttypescript[sans][helvetica-clone] \definefontsynonym [Sans] [file:texgyreherosregular] [features=default] \definefontsynonym [SansItalic] [file:texgyreherositalic] [features=default] \stoptypescript \definetypeface[mainface][rm][serif][palatino-clone] [default] \definetypeface[mainface][ss][sans] [helvetica-clone][default] %\setupbodyfont[modern] \setupbodyfont[mainface] \starttext \rm\tf Regular \it Italic \sl Slanted \ss\tf Regular \it Italic \sl Slanted \stoptext When you put the code in a file and process you will notice that “\sl Slanted” always uses the upright Pagella font, this happens because no font was set for this style in the typescripts and a default font is used. You prevent this unwanted result by adding additional \definefontsynonym lines to the typescript where you say context to use the italic font for the slanted style. \starttypescript[serif][palatino-clone] \definefontsynonym [Serif][file:texgyrepagellaregular] [features=default] \definefontsynonym [SerifItalic] [file:texgyrepagellaitalic] [features=default] \definefontsynonym [SerifSlanted] [SerifItalic] \stoptypescript \starttypescript[sans][helvetica-clone] \definefontsynonym [Sans][file:texgyreherosregular] [features=default] \definefontsynonym [SansItalic] [file:texgyreherositalic] [features=default] \definefontsynonym [SansSlanted] [SansItalic] \stoptypescript Still this wouldn’t be enough when you want to use also the bold and bolditalic styles for your font even more fallback definitions are needed. The complete typescript for the serif font has to look now like this. \starttypescript[serif][palatino-clone] \definefontsynonym [Serif][file:texgyrepagellaregular] [features=default] \definefontsynonym [SerifItalic] [file:texgyrepagellaitalic] [features=default] \definefontsynonym [SerifSlanted] [SerifItalic] \definefontsynonym [SerifBold][Serif] \definefontsynonym [SerifBoldItalic] [SerifBold] \definefontsynonym [SerifBoldSlanted] [SerifBoldItalic] \definefontsynonym [SerifCaps][Serif] \stoptypescript Because such fallback definitions are needed for many font (especially the slanted to italic mappings) you can predefined lists in type-fbk.mkiv which you can load at the begin at your typescript to save a few lines and we can abbreviate the above typescript in this form. \starttypescript[serif][palatino-clone] \setups[font:fallback:serif] \definefontsynonym [Serif][file:texgyrepagellaregular] [features=default] \definefontsynonym [SerifItalic] [file:texgyrepagellaitalic] [features=default] \stoptypescript 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 ___