[NTG-context] need defaults for \definehighlight
Dear gang, Thinking of present and future documents (maximum flexibility in converting from format to format), I'm moving from the standard {\em text} to something like \definehighlight[emph][style=italic]. Here's the question: Does ConTeXt contain some default highlights that need not be defined by the user? It seems that some of the basic ones should have presets. This helps with at least two things: 1. Document portability (independent of a given style or env file); 2. Editor setups. As an example of the latter: If I select text in Notepad++ I can do Right-Click -> ConTeXt Typography -> Emphasize where Emphasize is defined as {\em } Right now, whenever I release an update to the N++ editor package (now years overdue, I know) any user can depend upon this right-click feature. But if I define \definehighlight[emph][style=italic] and set up the editor to implement it; then there is no guarantee that other users will use the same definition. As issues of conversion from one format to another become ever more urgent and common, it makes more sense to use tagged and exportable versions of the common typographical functions and to standardize a few. So my suggestion is that we develop a set of default or "official" highlights for commonly used cases, with a list made available somewhere such as the wiki. Perhaps redefine some existing 1-parameter typography commands (\emph, \bold, \scap, etc.) as highlights. Some of these should be kept short (such as \emph, \bold) given their very frequent use. Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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] Setup for appendices: a bunch of questions
> Am 06.02.2015 um 08:59 schrieb Mojca Miklavec > : > > On Thu, Feb 5, 2015 at 12:42 PM, Wolfgang Schuster wrote: >>> Am 04.02.2015 um 22:06 schrieb Mojca Miklavec: >>> >>> Hello, >>> >>> I need a tiny bit of help with properly setting up the appendices. >>> >>> 1.) I would like to include both chapters and titles. Is this the >>> proper way to go? (It took me a while to figure out how to include the >>> titles at all.) >>> >>> \setuphead >>> [title] >>> [incrementnumber=list] >>> \placelist >>> [title,chapter,section] >>> [criterium=all,alternative=c] >>> >>> But why is there less space in front of a \title{...} in TOC than in >>> front of a \chapter{…}? >> >> You can use the “margin” key to indent the title entries but unnumbered >> chapter are still wrong aligned. > > I'm sorry, that was a misunderstanding. I was referring to the > vertical alignment, not to the horizontal one. It's perfectly OK if > the title is aligned "flushleft", but there's less vertical space in > front of it. Because title uses the global values for the space before the entries unlike chapters which use a customised value, you can change this by adding \setuplist[title][before={\blank[preference,big]}] to your document. > Now a couple of follow-up questions. The tables are now numbered in a > very weird way. It's now "Table 1.VI" instead of "Table E.1" for the > first table in Appendix E. Which keys control numbering of tables? (Or > better yet: what's the reference for MKIV to find that out, if any?) You can change the counter and prefix conversion of floats with the prefiixconverionset and numberconversionset key for \setupcaption. > If I use "sectionstopper=:" and then try to reference it with > \in[appendix:label-for-this-appendix], I get the colon there as well > which is not desired, so I probably need to use another trick to get > the colon. Should I change the numbercommand in \setuphead and > \setuplist or is there a different trick? Use \setuphead[section][numbercommand=\groupedcommand{}{:}] instead of \setuphead[section][sectionstopper=:] 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] How to use \setuplist for formatting a chapter entry?
> >> Am 04.02.2015 um 15:33 schrieb Rob Heusdens : >> >> >>> You have to write a working minimal example for further help. >>> >>> Wolfgang >>> >> >> So this is the example: >> >> [â¦] > > You can remove the following lines: > >> \definefiller[ChapterFiller] >> >> \define[1]\ChapterNumberToc% >> {Hoofdstuk #1 -- } >> >> \define[3]\ChapterToc% >> {\vbox{\bf Hoofdstuk #1 -- #2 \filler[ChapterFiller] #3}} >> >> \define[1]\AppendixToc% >> {Bijlage -- #1} >> >> \define[1]\BackToc% >>{Noten -- #1} >> >> [â¦] > > and replace these list setups > >> \setuplist[chapter][headnumber=yes,style=bold,width=17ex,numbercommand=\ChapterNumberToc] >> %\setuplist[chapter][headnumber=yes,style=bold,alternative=command,command=\ChapterToc] >> \setuplist[appendix][headnumber=no,style=bold,textcommand=\AppendixToc] >> \setuplist[back][headnumber=no,style=bold,textcommand=\BackToc] > > with the following definitions: > > \setuplist [chapter] > [width=fit,style=bold,numbercommand=\groupedcommand{Hoofdstuk }{ â }] > \setuplist [appendix] [style=bold,textcommand=\groupedcommand{Bijlage â > }{}] > \setuplist [back] [style=bold,textcommand=\groupedcommand{Noten â > }{}] > > Wolfgang > This works! Thank you Wolfgang. I finally completed my document now! Rob ___ 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] Setup for appendices: a bunch of questions
On 2/6/2015 9:20 AM, Mojca Miklavec wrote: Back on topic. If I move a figure to Appendices, the figure now gets numbered as "1.V" (I would want to see "B.1" if it's the first figure in Appendix B). But when I reference that figure in main text, it becomes "Figure 1.5" which is indistinguishable from another figure "1.5" in the first chapter. Interesting is that this got unnoticed (here it's no surprise as in nearly most docs we produce for others have unnumbered figures). The problem, is that numbered items use the 'default' conversionset and that one has an appendices setting. So, what is needed is this: \defineconversionset [number] [] [numbers] \setupcounters [numberconversionset=number] (math for instance already has its own conversionset) Hans ps. Each counter can have a dedicated conversion set and these travel around the system so that when referred they are also used - but they can also be overloaded then - which makes it possible to render numbers (prefix+number+suffix) independently. (In mkii we'd have to disassemble these 1.2.3.4 numbers in order to mess with separators in different colors in different places etc., not that i ran into a project that demanded this recently.) - 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] Setup for appendices: a bunch of questions
On Fri, Feb 6, 2015 at 10:12 AM, Hans Hagen wrote: > On 2/6/2015 9:20 AM, Mojca Miklavec wrote: >> >> Back on topic. If I move a figure to Appendices, the figure now gets >> numbered as "1.V" (I would want to see "B.1" if it's the first figure >> in Appendix B). But when I reference that figure in main text, it >> becomes "Figure 1.5" which is indistinguishable from another figure >> "1.5" in the first chapter. > > > weird indeed as it should default to numbers at that that level cf. > > \defineconversionset > [appendix:default] > [Romannumerals,Characters] > [numbers] > > so for the moment use > > \defineconversionset > [appendix:default] > [Numbers,Characters] > [numbers] > > (as the first level, part is not used by you anyway) I get "Figure 1.5" now which is way better than "Figure 1.V", but I would like to get "Figure B.2" when in "Chapter 1", "Section B" (= Appendix B). So I would need to convince the counter to use the section number rather than the chapter number. Is that possible? (I can also switch and make each appendix a chapter rather than a section, but then I wouldn't want every appendix to stand out in TOC in the same way as a chapter does.) 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] Setup for appendices: a bunch of questions
On 2/6/2015 9:20 AM, Mojca Miklavec wrote: On Fri, Feb 6, 2015 at 9:09 AM, luigi scarso wrote: On Fri, Feb 6, 2015 at 8:59 AM, Mojca Miklavecwrote: (Well, my computer hoplessly crashed when I first tried it, but I hope it's not your code to be blamed ;) A crash (ie a seg. fault, or an infinite loop) with context ? It's way too off-topic, but first my pdf viewer crashed while context was still compiling the document, luatex was stuck in the middle of compiling. I used Ctrl+C to break the compilation, but there was a ghost process still there. I tried to remove the new code, then start context again. It was stuck again, I had to use Ctrl+C to stop compilation and there was again a new ghost luatex process in the background. I tried "kill -9 ", but it didn't help. I tried to force kill it in the GUI, no success either. Then I tried "rm filename.pdf" and the "rm" process was stuck as well, forever. Finally I tried to reboot the machine, but it refused to reboot, so I had to shut it down the hard way (press the switch-off button for a long time, an equivalent of removing the battery). I don't think that any of that had anything to do with ConTeXt or luatex. It sounds like a hardware issue to me (despite my first thought that I ended up in an infinite loop). -- Back on topic. If I move a figure to Appendices, the figure now gets numbered as "1.V" (I would want to see "B.1" if it's the first figure in Appendix B). But when I reference that figure in main text, it becomes "Figure 1.5" which is indistinguishable from another figure "1.5" in the first chapter. weird indeed as it should default to numbers at that that level cf. \defineconversionset [appendix:default] [Romannumerals,Characters] [numbers] so for the moment use \defineconversionset [appendix:default] [Numbers,Characters] [numbers] (as the first level, part is not used by you anyway) 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] Setup for appendices: a bunch of questions
On 2/6/2015 9:37 AM, Alan BRASLAU wrote: On Fri, 6 Feb 2015 09:20:41 +0100 Mojca Miklavec wrote: luatex was stuck in the middle of compiling. I used Ctrl+C to break the compilation, but there was a ghost process still there. I noticed that Taco always uses SIGQUIT (ctrl+\) rather than SIGINT (ctrl+c) with luatex. SIGQUIT usually results in a core dump but does not leave a ghost process. Perhaps Luigi (or Taco) can explain why luatex does not handle SIGINT as we might expect? on windows one can also end up with an aborted ghost process but not always so it probably has to to do with the place where luatex is aborted or crashes (if one aborts a tex loop it's often ok, but in something lua it can be worse) 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] intermezzo/sidebarswith rounded corners.
On 2/5/2015 11:31 PM, John Culleton wrote: On Thu, 05 Feb 2015 22:54:11 +0100 Hans Hagen wrote: On 2/5/2015 9:38 PM, John Culleton wrote: Client has an existing book that I am redoing with many inserted square boxes of text slightly protruding in the margin. Main text wraps around each box. The line around each such box has rounded corners. Is there an example somewhere in the manuals or elsewhere? \starttext \defineframed [whatever] [width=1cm, height=1cm, background=color, backgroundcolor=darkblue, foregroundcolor=white, forgroundstyle=bold] \dorecurse {100} { \starthanging{\whatever{#1}} \input tufte \stophanging } \stoptext And rounded corners? you can either configure framed to do that or hook in some mp (see wiki) - 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] Setup for appendices: a bunch of questions
On Fri, 6 Feb 2015 09:20:41 +0100 Mojca Miklavec wrote: > luatex was stuck in the middle of > compiling. I used Ctrl+C to break the compilation, but there was a > ghost process still there. I noticed that Taco always uses SIGQUIT (ctrl+\) rather than SIGINT (ctrl+c) with luatex. SIGQUIT usually results in a core dump but does not leave a ghost process. Perhaps Luigi (or Taco) can explain why luatex does not handle SIGINT as we might expect? 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] Setup for appendices: a bunch of questions
On Fri, Feb 6, 2015 at 9:20 AM, Mojca Miklavec < mojca.miklavec.li...@gmail.com> wrote: > On Fri, Feb 6, 2015 at 9:09 AM, luigi scarso wrote: > > On Fri, Feb 6, 2015 at 8:59 AM, Mojca Miklavecwrote: > >> > >> (Well, my computer hoplessly crashed when I first tried it, but I hope > >> it's not your code to be blamed ;) > >> > > A crash (ie a seg. fault, or an infinite loop) > > with context ? > > It's way too off-topic, but first my pdf viewer crashed while context > was still compiling the document, luatex was stuck in the middle of > compiling. I used Ctrl+C to break the compilation, but there was a > ghost process still there. I tried to remove the new code, then start > context again. It was stuck again, I had to use Ctrl+C to stop > compilation and there was again a new ghost luatex process in the > background. I tried "kill -9 ", but it didn't help. I tried to > force kill it in the GUI, no success either. Then I tried "rm > filename.pdf" and the "rm" process was stuck as well, forever. Finally > I tried to reboot the machine, but it refused to reboot, so I had to > shut it down the hard way (press the switch-off button for a long > time, an equivalent of removing the battery). > > I don't think that any of that had anything to do with ConTeXt or > luatex. It sounds like a hardware issue to me (despite my first > thought that I ended up in an infinite loop). > > to me it sounds as mtxrun/luatex problem instead. I will try to reproduce it. -- 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] Setup for appendices: a bunch of questions
On Fri, Feb 6, 2015 at 9:09 AM, luigi scarso wrote: > On Fri, Feb 6, 2015 at 8:59 AM, Mojca Miklavecwrote: >> >> (Well, my computer hoplessly crashed when I first tried it, but I hope >> it's not your code to be blamed ;) >> > A crash (ie a seg. fault, or an infinite loop) > with context ? It's way too off-topic, but first my pdf viewer crashed while context was still compiling the document, luatex was stuck in the middle of compiling. I used Ctrl+C to break the compilation, but there was a ghost process still there. I tried to remove the new code, then start context again. It was stuck again, I had to use Ctrl+C to stop compilation and there was again a new ghost luatex process in the background. I tried "kill -9 ", but it didn't help. I tried to force kill it in the GUI, no success either. Then I tried "rm filename.pdf" and the "rm" process was stuck as well, forever. Finally I tried to reboot the machine, but it refused to reboot, so I had to shut it down the hard way (press the switch-off button for a long time, an equivalent of removing the battery). I don't think that any of that had anything to do with ConTeXt or luatex. It sounds like a hardware issue to me (despite my first thought that I ended up in an infinite loop). -- Back on topic. If I move a figure to Appendices, the figure now gets numbered as "1.V" (I would want to see "B.1" if it's the first figure in Appendix B). But when I reference that figure in main text, it becomes "Figure 1.5" which is indistinguishable from another figure "1.5" in the first chapter. 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] Setup for appendices: a bunch of questions
On Fri, Feb 6, 2015 at 8:59 AM, Mojca Miklavec < mojca.miklavec.li...@gmail.com> wrote: > > (Well, my computer hoplessly crashed when I first tried it, but I hope > it's not your code to be blamed ;) > > A crash (ie a seg. fault, or an infinite loop) with context ? -- 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] Setup for appendices: a bunch of questions
On Thu, Feb 5, 2015 at 12:42 PM, Wolfgang Schuster wrote: >> Am 04.02.2015 um 22:06 schrieb Mojca Miklavec: >> >> Hello, >> >> I need a tiny bit of help with properly setting up the appendices. >> >> 1.) I would like to include both chapters and titles. Is this the >> proper way to go? (It took me a while to figure out how to include the >> titles at all.) >> >>\setuphead >>[title] >>[incrementnumber=list] >>\placelist >>[title,chapter,section] >>[criterium=all,alternative=c] >> >> But why is there less space in front of a \title{...} in TOC than in >> front of a \chapter{…}? > > You can use the “margin” key to indent the title entries but unnumbered > chapter are still wrong aligned. I'm sorry, that was a misunderstanding. I was referring to the vertical alignment, not to the horizontal one. It's perfectly OK if the title is aligned "flushleft", but there's less vertical space in front of it. >> 2.) How can I define a different width for appendices in TOC (to >> reserve enough space for the word "Appendix")? >> >> I use >> >> \setuplist >>[section] >>[width=10mm,numberstyle=\os\bf,pagestyle=\os,label=yes] >> >> but I would like to use "width=27mm" for sections inside >> \startappendices ... \stopappendices than for regular sections. Is >> there any workaround? > > Use the “numbercommand” key to measure the width of the number > and apply different widths for narrow and wide entries. Perfect, thank you. (Well, my computer hoplessly crashed when I first tried it, but I hope it's not your code to be blamed ;) >> 3.) For appendices I want to set >> >> \setuphead >>[chapter] >>[number=no] >> \setuphead >>[section] >>[page=yes,sectionsegments=section,conversion=Character,sectionstopper=:] >> >> without affecting regular sections and chapters. >> >> Is it possible to do this on top of the document (or in the layout) as >> opposed to changing the settings just before appendices start? I would >> like to avoid messing up with such settings in the middle of the >> document. > > Use \startsectionblockenvironment to set the setups at the begin of the > document. Thank you. >> I tried to play with >>\defineconversionset >> and >>\setupsectionblock >>[appendix] >>[sectionconversionset=...] >> but I'm unable to understand how these commands work exactly. > > Take a look at the example below how this can be achieved. Thank you. Now a couple of follow-up questions. The tables are now numbered in a very weird way. It's now "Table 1.VI" instead of "Table E.1" for the first table in Appendix E. Which keys control numbering of tables? (Or better yet: what's the reference for MKIV to find that out, if any?) If I use "sectionstopper=:" and then try to reference it with \in[appendix:label-for-this-appendix], I get the colon there as well which is not desired, so I probably need to use another trick to get the colon. Should I change the numbercommand in \setuphead and \setuplist or is there a different trick? Thanks again, 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 ___