[NTG-context] conditional evaluation and section names
Hi again, I have this in my environment \startsetups[sectioninfo] \ss \rlap{\userpagenumber} \hfill § \getmarking[sectionnumber][current] \emspace \bf \getmarking[section][current] \hfill \llap{} \stopsetups \setupheadertexts[\setups{chapterinfo}][] [][\setups{sectioninfo}] This seems to be working, but there are a couple improvements I'd like to make and I'm not quite sure where to start: 1. If I'm in a later chapter than the current section is defined in, it shows up anyway. I'd like to prevent that. 2. If I'm in a chapter that doesn't have sections, I'd like the chapter name to show up instead (without the §). I'm not sure at all how to go about doing this. I suspect the answer is to use plain TeX but I don't understand TeX's conditional system well enough to figure out how to make it work (nor ConTeXt's marking system). If anyone can help, I'd greatly appreciate it! Thanks again, — Daniel Lyons ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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
I was wondering because not too long ago (e.g. 2010.11.12 18:22 MKIV) this didn't happen… are included files now automatically terminated by an implicit \par? Personally I would find that confusing. No answer to your question, just a workaround: \starttext \section{Paragraph} \input tufte \input tufte \section{No paragraph} {\endlinechar=-1 \input tufte } \input tufte \section{Limitations of this workaround} {\endlinechar=-1 \input knuth } \input knuth \stoptext can you test again? Fixed. Thanks! Oliver ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] Glyph fallbacks
Hi, I thought that if a font does not have certain (accented) glyphs, then MkIV fakes a fallback. But that does not happen. Consider, for example, Delicious font, that does not have scedilla. Using that in a document fails silently. \usemodule[simplefonts] \setmainfont[Delicious] \starttext sş \stoptext Is it possible to fake that character? The font is available here: http://www.josbuivenga.demon.nl/delicious.html Thanks, 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] subfootnote
Am 07.10.2010 um 10:36 schrieb Hans Hagen: \definestructureseparatorset [footnote][][] \definestructureconversionset[footnote][number,characters][numbers] \setupenumerations[footnote][numberconversionset=footnote,numberseparatorset=footnote] \setupfootnotes[way=bytext]%- here is the problem!! \starttext test \footnote{} text test \startfootnote note \stopfootnote test \startsubfootnote subnote \stopsubfootnote test \startfootnote note \stopfootnote \stoptext fixed in next beta Yes, this was fixed. But in todays beta (20110211) suddenly there appears number in front of the actual footnote number. Please run example below: \definestructureseparatorset [footnote][][] \definestructureconversionset[footnote][number,characters][numbers] \setupenumerations[footnote][numberconversionset=footnote,numberseparatorset=footnote] \setupfootnotes[way=bytext] \starttext test \footnote{} text test \startfootnote note \stopfootnote test \startsubfootnote subnote \stopsubfootnote test \startfootnote note \stopfootnote \stoptext Steffen ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] references
fyi: you can say autocase=yes so that e.g. page becomes Page when it ends up at the beginning of a line. Hans, thanks for the new functionality. How would I use autocase? This does not seem to work: \definereferenceformat [aPage] [label=page, autocase=yes] See \aPage[one]. \aPage[one] is important. % Page is always capitalised 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] running headers on postponed makeup
Am 22.12.2010 um 16:35 schrieb Hans Hagen: On 22-12-2010 4:14, Steffen Wolfrum wrote: wow, isn't this even worse?! depends on the view: consistency comes first, reasons why come next Please look at your example (page 7) attached: Now you have Header = 1.1 A Section = 1.2 B Before it was Header = 1.2 A Section = 1.2 B And up to version 2010.09.29 the result was nicely Header = 1.2 B Section = 1.2 B and isn't this the way it should be? I'll have a look at it, it relates to some new features like strict testing (the biggest problem of marks is resetting them without interference and the old code by tex-design has more side effects than you can imagine (or maybe noticed). The new code is supposed to have no side effects but might take time to get right in all aspects. Today I was contacted by our publisher as the printer found wrong header in the proof! So there are still cases where it doesn't work reliable :o( Even though in the original pages also footnotes and stuff are involved I managed to cook down a minimal that shows the mistake: please run attached example. On page 3 it is header = 1.2 One section = 1.1 One (On page 4 starts a new section 1.2 Two!) Thanks, Steffen --- \showframe \setupbodyfont[postscript, 10pt]\setupinterlinespace[line=12pt] \definepapersize[Pape][width=14.7cm,height=22.3cm] \setuppapersize[Pape][Pape] \setuplayout [width=113mm,height=572pt\relax, backspace=17mm,topspace=17mm, header=12pt,headerdistance=6pt, footer=36pt,footerdistance=0pt, location=middle,marking=off] \setupwhitespace[halfline] \setuppagenumbering [alternative=doublesided,location=] \setupheader[align=middle] \setupheadertexts [\vtop{\startalignment[center]\KolumneR\stopalignment}] [pagenumber] [pagenumber] [\vtop{\startalignment[center]\KolumneL\stopalignment}] \def\KolumneL{{\convertnumber{Numbers}{\namedheadnumber{chapter}}.\,Teil:}\enskip\getmarking[EbeneEins]} \def\KolumneR{\headnumber[section]\enskip\getmarking[section]} \starttext \chapter{X} \section{One} \page x \page \dorecurse{5}{\input ward \par} \dorecurse{2}{\input tufte \par} \section{Two} \input tufte \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] Glyph fallbacks
On Tue, 15 Feb 2011, Mojca Miklavec wrote: There's a virtual feature compose=yes. If it doesn't work for you in the first try, I will search my source code to find a working example. Thanks. Adding compose=yes works perfectly. 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] [OS X TeX] \ne in a definetyping environment in context
Am 14.02.2011 um 01:37 schrieb David Arnold: All, I have the following in a Context file: \definetyping[XXX] \startXXX If int(N/2) \ne N/2 Then Disp N MUST BE EVEN Stop End \stopXXX Is there an easy way to replace the \ne with code that will produce the normal not equals symbol produced by amsmath? Use the \startlines environment. MkII: \startlines\tt If int(N/2) $\ne$ N/2 Then Disp N MUST BE EVEN Stop End \stoplines MkIV: \definelines[XXX][style=mono] \startXXX If int(N/2) $\ne$ N/2 Then Disp N MUST BE EVEN Stop End \stopXXX or \startlines[style=mono] If int(N/2) $\ne$ N/2 Then Disp N MUST BE EVEN Stop End \stoplines 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] curly bracket different values (entries)
Hi, Sorry for stealing the tread, but what mathcases do and how it is different from mathalign? Sometimes, I need to typeset multiline equations, and have to admit that this an obscure subject. Regards, Vyatcheslav ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] conditional evaluation and section names
Am 15.02.2011 um 09:11 schrieb Daniel Lyons: Hi again, I have this in my environment \startsetups[sectioninfo] \ss \rlap{\userpagenumber} \hfill § \getmarking[sectionnumber][current] \emspace \bf \getmarking[section][current] \hfill \llap{} \stopsetups \setupheadertexts[\setups{chapterinfo}][] [][\setups{sectioninfo}] This seems to be working, but there are a couple improvements I'd like to make and I'm not quite sure where to start: 1. If I'm in a later chapter than the current section is defined in, it shows up anyway. I'd like to prevent that. 2. If I'm in a chapter that doesn't have sections, I'd like the chapter name to show up instead (without the §). I'm not sure at all how to go about doing this. I suspect the answer is to use plain TeX but I don't understand TeX's conditional system well enough to figure out how to make it work (nor ConTeXt's marking system). If anyone can help, I'd greatly appreciate it! Make a *complete* minimal example! Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] Stretching chapter titles - MKII
Am 15.02.2011 um 01:45 schrieb Tom: Follows is some code that executes. The lines immediately following \starttext create a sample of the desired output format. However, I want to accomplish similar results for chapter titles via the passing of arguments containing the chapter title and number. Numerous attempts at that have resulted in abject failure. I am clearly missing something. Can’t you use MkIV, it has better support for tracking? 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] Chapters not sowing up in ToC
Am 14.02.2011 um 21:05 schrieb Tom: When attempting to place only the chapter number on the first page of a chapter, the chapters do not appear in the ToC the ToC does not display. Inserting #2 just before the last } in the definition for MyChapterCommand causes the ToC to appear with chapter names although it and the chapters are ugly. Is it necessary to include chapter names at the beginning of chapters? Perhaps this is intended because leaving chapter names off the beginning of chapters would reduce the value of the ToC. Maybe ToCs are not desired in such situations. %insert #2 before last } to cause ToC to appear although %very ugly \def\MyChapterCommand#1#2% #1 is number, #2 is text {\framed[frame=off] {\vbox{\centerline{\headtext{chapter} #1 Replace this with: \setuplabeltext[en][chapter=Chapter ] \define[2]\MyChapterCommand % #1 is number, #2 is text {\framed[frame=off,align=middle,width=broad]{#1#2}} \setuphead [chapter] [command=\MyChapterCommand, deeptextcommand=\gobbleoneargument, header=empty, footer=chapter, page=mychapterpagebreak, before={\blank[force,1.0in]}, after={\blank[0.5in]}] 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] conditional evaluation and section names
On Tue, Feb 15, 2011 at 07:12:51PM +0100, Wolfgang Schuster wrote: 2. If I'm in a chapter that doesn't have sections, I'd like the chapter name to show up instead (without the §). I'm not sure at all how to go about doing this. I suspect the answer is to use plain TeX but I don't understand TeX's conditional system well enough to figure out how to make it work (nor ConTeXt's marking system). If anyone can help, I'd greatly appreciate it! Make a *complete* minimal example! OK, for #2: \startsetups[sectioninfo] § \getmarking[sectionnumber] \stopsetups \setupheadertexts[\setups{sectioninfo}] \starttext \chapter{One} \input knuth \stoptext This will give me a § in the header even on the first page. I'd like to conditionally not show the § if there's no content in \getmarking[sectionnumber]. I realize this is probably a basic TeX programming thing, but I haven't yet found a resource that explains TeX as a programming language. If you know of one, please refer me to it; I'm not trying to waste anyone's time. I'll cook up a minimal example of the other thing later today. It's probably a mistake in my environment, since using the code above does not have the problem. Thanks again, -- Daniel ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] conditional evaluation and section names
Am 15.02.2011 um 19:53 schrieb Daniel Lyons: On Tue, Feb 15, 2011 at 07:12:51PM +0100, Wolfgang Schuster wrote: 2. If I'm in a chapter that doesn't have sections, I'd like the chapter name to show up instead (without the §). I'm not sure at all how to go about doing this. I suspect the answer is to use plain TeX but I don't understand TeX's conditional system well enough to figure out how to make it work (nor ConTeXt's marking system). If anyone can help, I'd greatly appreciate it! Make a *complete* minimal example! OK, for #2: \startsetups[sectioninfo] § \getmarking[sectionnumber] \stopsetups \startsetups[sectioninfo] \doiftextelse{\getmarking[sectionnumber]} {§ \getmarking[sectionnumber]} {\unknown} \stopsetups 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] references
On 15-2-2011 12:00, Florian Wobbe wrote: \definereferenceformat [aPage] [label=page, autocase=yes] See \aPage[one]. \aPage[one] is important. % Page is always capitalised fixed in next beta -- - 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] conditional evaluation and section names
On Feb 15, 2011, at 11:12 AM, Wolfgang Schuster wrote: Make a *complete* minimal example! 1. If I'm in a later chapter than the current section is defined in, it shows up anyway. I'd like to prevent that. I've fixed the symptom by adding this code: \setuphead[chapter][after={\marking[section][]}] I still haven't found a minimal example of the behavior, so later on I'll see if I can distill my error. Thanks, — Daniel Lyons ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] conditional evaluation and section names
On Feb 15, 2011, at 12:55 PM, Daniel Lyons wrote: On Feb 15, 2011, at 11:12 AM, Wolfgang Schuster wrote: Make a *complete* minimal example! 1. If I'm in a later chapter than the current section is defined in, it shows up anyway. I'd like to prevent that. I still haven't found a minimal example of the behavior, so later on I'll see if I can distill my error. The problem happens reliably in my big project, but I can't seem to boil it down without getting rid of it. If I discover what it is, I'll report back, but in the meantime I've worked around it, and it seems to be a configuration issue on my end. Sorry about the trouble. — Daniel Lyons ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] conditional evaluation and section names
On Feb 15, 2011, at 12:05 PM, Wolfgang Schuster wrote: \doiftextelse{\getmarking[sectionnumber]} {§ \getmarking[sectionnumber]} {\unknown} I assume there are other helpful functions like this that aren't documented on the wiki (such as \DropCap). Is there a place where these things are documented that I should be looking? Or a particular piece of source code I should read to get acquainted with these sorts of library functions? Thanks again, — Daniel Lyons ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] conditional evaluation and section names
On Wed, Feb 16, 2011 at 05:52, Daniel Lyons fus...@storytotell.org wrote: On Feb 15, 2011, at 12:05 PM, Wolfgang Schuster wrote: \doiftextelse{\getmarking[sectionnumber]} {§ \getmarking[sectionnumber]} {\unknown} I assume there are other helpful functions like this that aren't documented on the wiki (such as \DropCap). Is there a place where these things are documented that I should be looking? Or a particular piece of source code I should read to get acquainted with these sorts of library functions? You definitely need to check syst-aux.mkiv. Regards. -- Cédric Thanks again, — Daniel Lyons ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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 ___