Re: [NTG-context] toc and macro
What I want to do is something like this: ___ \starttext \completecontent[criterium=all] % how i have to do it \startchapter[colors][Colors] \startsection,[black][Black] black is a dark color \stopsection, \startsection[white][White] white is light color \stopsection \stopchapter % how i want it to write (with the same result of the code above) \startSameCommand[colors][Colors] \startSameCommand[black][Black] black is a dark color \stopSameCommand \startSameCommand[white][White] white is light color \stopSameCommand \stopSameCommand \stoptext ___ The \startSameCommand finds itself out (by the nesting of the command) if its behave as \startpart or \startchapter or \startsection or \startsubsection or \startsubsubsection ... Harry Am 28.05.2015 um 12:47 schrieb Wolfgang Schuster: Am 27.05.2015 um 20:13 schrieb Harry irgk...@gmx.de: Hi, I hope that this is the right address to post my question. If not I would be glad for a tip. I wanted to do something like this: ___ \unprotect %This line uncommented leads to an error \def\tit{Oops!} \def\Teil{\dodoubleempty\doTeil} \def\doTeil[#1][#2]#3{% \def\tit{#1} %... \startchapter[title={\tit},reference={#2}] #3 \stopchapter %... } \protect \starttext \completecontent \doTeil[Hallo][hallo]{Text Text Text Text Text Text Text} Why do you \doTeil and not not \Teil? \stoptext ___ It works if i use #1 direct (like this): \startchapter[title=#1,reference={#2}] But how can I wrap it in the \tit? (wrapping #2 works fine) I wanted to programm \doTeil so, that I can nest it freely (for example with \input) and the table of content uses the hierarchy of the nesting to produce a nice TOC. Is there a reason why you can use use \chapter[reference][title] in your document, I can’t see any advantage with your command. 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] bug in latest beta?
On 5/27/2015 10:38 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \showframe\showgrid \setuplayout[setups=*lessstrict] \startsetups[*lessstrict] \setup[reset] \widowpenalty=1 \clubpenalty=1 \brokenpenalty=0 \stopsetups \setupbodyfont[pagella, 12.6pt] \starttext \chapter{Quotes} \section{Zapf} \dorecurse{4}{\input zapf\par} \subsection{Knuth} \input knuth \stoptext Compiling it with beta from 2015.03.25 22:13, page break is fine. But with latest beta from 2015.05.24 12:42 (or even with beta from 2015.05.15 11:42 includes a wrong page break. The setups for widow and orphan lines move the two last lines to the next page. Could anyone confirm this bug? i wonder if it's a bug or just tex's decision ... you can use \showmakeup[penalty] and see what penalties get injected are the linebreaks identical, i.e. same hyphenation? btw, brokenpenalty 1 gives a different result 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] Automatic character replacements/substitutions
Hi, Can someone please help me remind how to automatically replace a Greek letter (gamma (γ) in particular, but I wouldn't mind if the whole alphabet would be replaced) with $\mathgreekupright γ$. The OpenType font (Lucida) doesn't have Greek characters (except for maybe μ), but the math alphabets in the math font are complete, so I would like to automatically use the characters from the Greek math in main text (possibly upright math in upright text and italic math in italic text). Of course I can always create a shortcut for $\mathgreekupright γ$ but it would be great if things like γ rays or α particles would be typeset automatically. Thank you very much, 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] Automatic character replacements/substitutions
Am 28.05.2015 um 21:39 schrieb Mojca Miklavec mojca.miklavec.li...@gmail.com: Hi, Can someone please help me remind how to automatically replace a Greek letter (gamma (γ) in particular, but I wouldn't mind if the whole alphabet would be replaced) with $\mathgreekupright γ$. The OpenType font (Lucida) doesn't have Greek characters (except for maybe μ), but the math alphabets in the math font are complete, so I would like to automatically use the characters from the Greek math in main text (possibly upright math in upright text and italic math in italic text). Of course I can always create a shortcut for $\mathgreekupright γ$ but it would be great if things like γ rays or α particles would be typeset automatically“. You can use the fallback mechanism for fonts but I don’t there are problems (e.g. missing kerning) when you use the math font as fallback. \definefallbackfamily [textmojca] [rm] [Gentium] [scale=1.15,range={greekandcoptic,greekextended}] \definefontfamily [textmojca] [rm] [Lucida Bright OT] \definefontfamily [textmojca] [mm] [Lucida Bright Math OT] \definefallbackfamily [mathmojca] [rm] [Lucida Bright Math OT] [range=lowercasegreeknormal] \definefontfamily [mathmojca] [rm] [Lucida Bright OT] \definefontfamily [mathmojca] [mm] [Lucida Bright Math OT] \starttext \switchtobodyfont[textmojca] \startlines alpha: α beta: β gamma: γ \stoplines \switchtobodyfont[mathmojca] \startlines alpha: α beta: β gamma: γ \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] toc and macro
Am 28.05.2015 um 23:08 schrieb Harry irgk...@gmx.de: What I want to do is something like this: ___ \starttext \completecontent[criterium=all] % how i have to do it \startchapter[colors][Colors] \startsection,[black][Black] black is a dark color \stopsection, \startsection[white][White] white is light color \stopsection \stopchapter % how i want it to write (with the same result of the code above) \startSameCommand[colors][Colors] \startSameCommand[black][Black] black is a dark color \stopSameCommand \startSameCommand[white][White] white is light color \stopSameCommand \stopSameCommand \stoptext ___ The \startSameCommand finds itself out (by the nesting of the command) if its behave as \startpart or \startchapter or \startsection or \startsubsection or \startsubsubsection … You’re looking for the \startsectionlevel command. %\definesectionlevels[default][part,chapter,section,subsection] \starttext \completecontent[criterium=all] \startsectionlevel[title=Colors,reference=colors] \startsectionlevel[title=Black,reference=black] black is a dark color \stopsectionlevel \startsectionlevel[title=White,reference=white] white is light color \stopsectionlevel \stopsectionlevel \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] toc and macro
Hi, I hope that this is the right address to post my question. If not I would be glad for a tip. I wanted to do something like this: ___ \unprotect %This line uncommented leads to an error \def\tit{Oops!} \def\Teil{\dodoubleempty\doTeil} \def\doTeil[#1][#2]#3{% \def\tit{#1} %... \startchapter[title={\tit},reference={#2}] #3 \stopchapter %... } \protect \starttext \completecontent \doTeil[Hallo][hallo]{Text Text Text Text Text Text Text} \stoptext ___ It works if i use #1 direct (like this): \startchapter[title=#1,reference={#2}] But how can I wrap it in the \tit? (wrapping #2 works fine) I wanted to programm \doTeil so, that I can nest it freely (for example with \input) and the table of content uses the hierarchy of the nesting to produce a nice TOC. thanks for help. Sincerely, Harry ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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 finds font, mtxrun --fonts does not list it?
I'm trying to add a ttf font (Futura) so I can use it in ConTeXt. I've ran mtxrun --script fonts --list --all |less looked at a ttf font that was there, copied my Futura ttfs to the same directory it was in, and ran mtxrun --script fonts --reload --force But I still can't find it in mtxrun --script fonts --list --all |less nor can I use it in ConTeXt. (The filenames don't have spaces.) The curious thing is that the luatex cache has it. It's listed in /home/sandra/.texmf-var/luatex-cache/generic/names/luaotfload-names.luc under various names, all starting with futuralt. Curiously, /home/sandra/.texmf-var/luatex-cache/context/[number]/fonts/otf/futuralt-book.tm[ac] exist. But the only book- related name in luaotfload-names.luc is futuraltbook, not futuralt-book. Neither worked in ConTeXt, though. How do I move forward with this, how do I add ttfs so that ConTeXt understand them? Sandra ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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 finds font, mtxrun --fonts does not list it?
On 5/27/2015 10:10 PM, Sandra Snan wrote: I'm trying to add a ttf font (Futura) so I can use it in ConTeXt. I've ran mtxrun --script fonts --list --all |less looked at a ttf font that was there, copied my Futura ttfs to the same directory it was in, and ran mtxrun --script fonts --reload --force But I still can't find it in mtxrun --script fonts --list --all |less nor can I use it in ConTeXt. (The filenames don't have spaces.) The curious thing is that the luatex cache has it. It's listed in /home/sandra/.texmf-var/luatex-cache/generic/names/luaotfload-names.luc under various names, all starting with futuralt. Curiously, /home/sandra/.texmf-var/luatex-cache/context/[number]/fonts/otf/futuralt-book.tm[ac] exist. But the only book- related name in luaotfload-names.luc is futuraltbook, not futuralt-book. Neither worked in ConTeXt, though. How do I move forward with this, how do I add ttfs so that ConTeXt understand them? when resolving fonts context makes safe filenames for fonts so don't worry about the - being gone the fact that there is a luc file means that the font has been loaded so the question is: how does your tex code look what happens if you put file: before a name? 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] VERY IMPORTANT: 9th ConTeXt meeting
Hello, The 9th ConTeXt Meeting will be held in Nasbinals, France * September 14–18, 2015 * The ConTeXt meetings are a great opportunity to meet other ConTeXt users and developers. It is also a very good opportunity for new users to receive personal tutorials as well as for them to teach other users new tricks, for each and everyone has something to bring to the community of ConTeXt users. Information can be found on the meeting website: http://meeting.contextgarden.net/2015/ Registration is now open and the members of the ConTeXt Group as well as all participants of past meetings are available to answer any questions. The present mailing list can be an excellent forum for general questions and the organizer (myself) as well as the program organizers (Taco and Hans) can be contacted for any specific questions that you might have about this upcoming meeting. 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] LuaTeX finds font, mtxrun --fonts does not list it?
Am 28.05.2015 um 11:37 schrieb Sandra Snan sandra.s...@idiomdrottning.org: Hans Hagen pra...@wxs.nl writes: when resolving fonts context makes safe filenames for fonts so don't worry about the - being gone the fact that there is a luc file means that the font has been loaded so the question is: how does your tex code look what happens if you put file: before a name? Here is the full file. $body$ is filled in by pandoc. Sandra % interface output=luatex \usemodule[simplefonts][protrusion=quality,expansion=quality] \setupsimplefonts[expansion=quality,protrusion=quality] Don’t load the simplefonts module because you don’t need it when you use the \definefontfamily command. \setuppagenumbering[location=] \enableregime [utf-8] You can drop this line because ConTeXt uses UTF-8 as default encoding. \setuppapersize[A4, portrait][A4, portrait] There is no “portrait” keyword for the \setuppapersize and you can also drop this line because ConTeXt uses A4 as default paper size. \setuplanguage[sv][leftquote=›,rightquote=‹,leftquotation=»,rightquotation=«] \mainlanguage [sv] \setupfontsynonym [Serif] [handling=pure] \usetypescript[serif][hanging][pure] You can drop both lines because they are only used by MkII. \definefontfamily[futura][sans][file:futuralt] Don’t use the “file:” prefix in the third argument. \definefontfamily [futura] [sans] [Futura LT] \definefontfamily [praise][serif][junicode] \setupalign[justified,hanging,hz] \usetypescript[serif,sans,mono][hz][quality] Remove the line above because it’s only used by MkII. \setupbodyfont[praise] \setuphead[section][style={\switchtotypeface[futura]\tfd}] \starttext $body$ \stoptext When you use math in your text you have to set a font for it. 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 finds font, mtxrun --fonts does not list it?
Hans Hagen pra...@wxs.nl writes: when resolving fonts context makes safe filenames for fonts so don't worry about the - being gone the fact that there is a luc file means that the font has been loaded so the question is: how does your tex code look what happens if you put file: before a name? Here is the full file. $body$ is filled in by pandoc. Sandra % interface output=luatex \usemodule[simplefonts][protrusion=quality,expansion=quality] \setupsimplefonts[expansion=quality,protrusion=quality] \setuppagenumbering[location=] \enableregime [utf-8] \setuppapersize[A4, portrait][A4, portrait] \setuplanguage[sv][leftquote=›,rightquote=‹,leftquotation=»,rightquotation=«] \mainlanguage [sv] \setupfontsynonym [Serif] [handling=pure] \usetypescript[serif][hanging][pure] \definefontfamily[futura][sans][file:futuralt] \definefontfamily [praise][serif][junicode] \setupalign[justified,hanging,hz] \usetypescript[serif,sans,mono][hz][quality] \setupbodyfont[praise] \setuphead[section][style={\switchtotypeface[futura]\tfd}] \starttext $body$ \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] toc and macro
Am 27.05.2015 um 20:13 schrieb Harry irgk...@gmx.de: Hi, I hope that this is the right address to post my question. If not I would be glad for a tip. I wanted to do something like this: ___ \unprotect %This line uncommented leads to an error \def\tit{Oops!} \def\Teil{\dodoubleempty\doTeil} \def\doTeil[#1][#2]#3{% \def\tit{#1} %... \startchapter[title={\tit},reference={#2}] #3 \stopchapter %... } \protect \starttext \completecontent \doTeil[Hallo][hallo]{Text Text Text Text Text Text Text} Why do you \doTeil and not not \Teil? \stoptext ___ It works if i use #1 direct (like this): \startchapter[title=#1,reference={#2}] But how can I wrap it in the \tit? (wrapping #2 works fine) I wanted to programm \doTeil so, that I can nest it freely (for example with \input) and the table of content uses the hierarchy of the nesting to produce a nice TOC. Is there a reason why you can use use \chapter[reference][title] in your document, I can’t see any advantage with your command. 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] bug in latest beta?
Hi Pablo, I tested your sample with ConTeXt ver: 2014.05.21 22:04 MKIV beta fmt: 2015.3.31 int: english/english (which is from TeXLIve 2014) and also with ConTeXt ver: 2015.05.21 13:39 MKIV beta fmt: 2015.5.21 int: english/english and I get exactly the same result, with the last two line of page 1 pusged to the second page. However with mmkii, thta is ConTeXt ver: 2013.06.07 17:34 MKII fmt: 2015.5.21 int: english/english the penalties act correctly and page one has all the lines expected, while page 2 begins with a new section. Actually I hav enoticed that recent versions of mkiv create strange page breaks in some of documents containing maths, but up to now I have not succeeded to reproduce this bad behavior in a short (and minimal) example. Best regards: OK On 27 May 2015, at 22:38, Pablo Rodriguez oi...@gmx.es wrote: Dear list, I have the following sample: \showframe\showgrid \setuplayout[setups=*lessstrict] \startsetups[*lessstrict] \setup[reset] \widowpenalty=1 \clubpenalty=1 \brokenpenalty=0 \stopsetups \setupbodyfont[pagella, 12.6pt] \starttext \chapter{Quotes} \section{Zapf} \dorecurse{4}{\input zapf\par} \subsection{Knuth} \input knuth \stoptext Compiling it with beta from 2015.03.25 22:13, page break is fine. But with latest beta from 2015.05.24 12:42 (or even with beta from 2015.05.15 11:42 includes a wrong page break. The setups for widow and orphan lines move the two last lines to the next page. Could anyone confirm this bug? Many thanks for your help, Pablo -- http://www.ousia.tk ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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 ___