Re: [NTG-context] Support for Bold Small Caps font alternative
On 2013-11-17 Wolfgang Schuster wrote: > Am 17.11.2013 um 13:23 schrieb honyk: > > On 2013-11-17 Wolfgang Schuster wrote: > >> Am 17.11.2013 um 11:04 schrieb honyk: > >>> > >>> in my document I combine both regular and bold small caps. > >>> As there is no predefined alternative for bold small caps variant, > >>> moreover, combining bold style and small caps has no effect, I've > >>> had to override an unused one: > >>> > >>> \definefontsynonym[SerifCaps][file:pala.ttf][features=small-caps] > >>> > >>> \definefontsynonym[SerifBoldSlanted][file:palab.ttf] > >>> [features=small-caps] % bold caps > >>> > >>> Now I can switch styles using \sc and \bs. > >>> > >>> It would be nice to have a dedicated alternative for this. Or am I > >>> missing something? > >> > >> When you use a opentype font you can enable the small caps feature > >> with the \feature command, there is no need for an additional font > >> synonym. > >> > >> \setupbodyfont[pagella] > >> > >> \starttext > >> > >> Text {\feature[+][f:smallcaps]Text} {\bf Text > >> {\feature[+][f:smallcaps]Text}} > >> > >> Text \smallcaps{Text} \bold{Text \smallcaps{Text}} > >> > >> \stoptext > > > > Thanks for pointing me to this nice feature! This is even more > > robust. > > > > All my font definitions are based on this example > > http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV > > You can save a few lines in the font setup when you the new simplefonts > code (works only with a recent beta). > > \definefontfamily[mainface][rm][Palatino > Linotype][features={default,quality}] > > \setupbodyfont[mainface] > What a great improvement! In sum 4 basic + 2 complementary (smallcaps, oldstyle) styles out-of-the-box thanks to this simple definition! Moreover, these basic and complementary ones can be combined easily. Other OTF features needs to be declared though: \definefontfeature[f:superscript][sups=yes] and then used as written above: 25 m{\feature[+][f:superscript]2} But it is not so big deal. I suggest removing all font styles related descriptions in manuals, wiki pages to some special place marked as obsolete and replace it with this simple approach ending with a small note that if this is not applicable, there are other, but deprecated, ways - with the appropriate hyperlink.. Jan ___ 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] Support for Bold Small Caps font alternative
On 2013-11-17 Wolfgang Schuster wrote: > Am 17.11.2013 um 11:04 schrieb honyk : > > > > in my document I combine both regular and bold small caps. > > As there is no predefined alternative for bold small caps variant, > > moreover, combining bold style and small caps has no effect, I've > > had to override an unused one: > > > > \definefontsynonym[SerifCaps][file:pala.ttf][features=small-caps] > > \definefontsynonym[SerifBoldSlanted][file:palab.ttf][features=small- > > caps] % bold caps > > > > Now I can switch styles using \sc and \bs. > > > > It would be nice to have a dedicated alternative for this. Or am I > > missing something? > > When you use a opentype font you can enable the small caps feature > with the \feature command, there is no need for an additional font > synonym. > > \setupbodyfont[pagella] > > \starttext > > Text {\feature[+][f:smallcaps]Text} {\bf Text > {\feature[+][f:smallcaps]Text}} > > Text \smallcaps{Text} \bold{Text \smallcaps{Text}} > > \stoptext Thanks for pointing me to this nice feature! This is even more robust. All my font definitions are based on this example http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV (with the help of ConTeXt Reference Manual where I didn't notice something like this before). In the light of this all examples on that page could be switched rather to 'feature' based styling to emphasise the power of this feature :-) Jan ___ 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] Palatino patch for the current ConTeXt version
Hello Everyone, I am trying to fix a Palatino small caps issue using the procedure explained here: http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV That fix seems to be obsolete nowadays and returning errors. I've changed fonts.otf.enhancers.patches["^pala"] to fonts.handlers.otf.enhancers.patches["^pala"] which compiles, but it does nothing. I've also tried this variant, but that 'patch' function is never called even though I clear my font cache every run: \startluacode local fonts= fonts local otf = fonts.handlers.otf local patches = otf.enhancers.patches local register = patches.register local report = patches.report function patch (data,filename) report("I am here") report("processing data %s", table.serialize(data)) end register("after","prepare glyphs","^pala", patch) \stopluacode Any idea? Thanks, Jan ___ 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] Support for Bold Small Caps font alternative
Dear All, in my document I combine both regular and bold small caps. As there is no predefined alternative for bold small caps variant, moreover, combining bold style and small caps has no effect, I've had to override an unused one: \definefontsynonym[SerifCaps][file:pala.ttf][features=small-caps] \definefontsynonym[SerifBoldSlanted][file:palab.ttf][features=small-caps] % bold caps Now I can switch styles using \sc and \bs. It would be nice to have a dedicated alternative for this. Or am I missing something? Regards, Jan ___ 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] Index entries - custom font size
Hello Everyone, there are lot of index entries in my document and with the standard body font size they occupy too much space. I've tried to decrease the size by the textstyle parameter. It works, but it is applied recursively to every nested level: secondary items are smaller twice and tertiary items three times... \setupregister[index][command=\Word, textstyle=small] \starttext \index{primary}\index{primary+secondary}\index{primary+secondary+tertiary}Te xt \completeindex \stoptext How can I set the same value to all the levels? Thanks, Jan ___ 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] PDF bookmarks - missing interactivity of some items
Dear All, when bookmarks are placed to my file, only several of them are interactive. I cannot find any rule for this behaviour nor to reproduce it on a simplified example. \setupinteraction[state=start] \placebookmarks[chapter] \setupinteractionscreen[option=bookmark] ... \chapter{Chapter A} ... \chapter{Chapter B} ... Is there any known issue related to this? ConTeXt 2013.11.14 (Mark IV), Windows 7 64-bit. I can provide my file for testing (off the list). Thanks, Jan ___ 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] Index - ranges
On 2013-11-15 honyk wrote: > On 2013-11-12 honyk wrote: > > On 2013-11-07 honyk wrote: > > > > > > 1) when a range for my subject index entry is specified and the > > > text between doesn't overflow to the next page, even in this case > > > the range of pages 1-1 is created. Is there any option to normalize > > > it to a single page number? > > > > > > \startregister[index][range_01]{primary} > > > Dummy text. > > > \stopregister[index][range_01] I've finally found it is caused by this logic: if first == last then if first.references.lastrealpage then -- IMHO this could be optional pagerange(first,first,true,prefixspec,pagespec) else pagenumber(first,prefixspec,pagespec) end elseif last.references.lastrealpage then pagerange(first,last,true,prefixspec,pagespec) else pagerange(first,last,false,prefixspec,pagespec) end Even after normalization, if there is a range, it is preserved regardless it spans multiple pages or not. The fix is quite easy. But whether to convert these single page ranges into a single value or not could be optional, or applied according to the compress parameter (both 'yes' and 'all' would collapse the range). Jan ___ 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] Handling index entries with many references
On 2013-06-09 honyk wrote: > > in my book I want to place the index (aka register) of places. > Some of them are mentioned very often (>10). > > In one old book I've found the following solution for this: > in the index there are first three page references listed for > that index entry followed by 'and many' phrase. > > Can something like this be done in the ConTeXt (MkIV)? I found an elegant way for this: \defineprocessor[many][right= and many] This processor is then applied just for the last index entry page reference: \index[many->]{primary} This can be automated in my system. Wow, great! Jan ___ 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] Index - ranges
On 2013-11-12 honyk wrote: > On 2013-11-07 honyk wrote: > > > > 1) when a range for my subject index entry is specified and the text > > between doesn't overflow to the next page, even in this case > > the range of pages 1-1 is created. Is there any option to normalize > > it to a single page number? > > > > \startregister[index][range_01]{primary} > > Dummy text. > > \stopregister[index][range_01] > > > I've found a promising option compress=no|yes|all in an experimental > test case located in the strc-reg.mkiv file. The corresponding lua > code seems to be performing some cleanup of page ranges, but when > I define it same way, there is no difference in my output (still 1-1). Looking into the lua code this one is an edge case as normalization is performed if #pages > 1 which is not achieved here. No problem. But I've encountered more serious issue now: When original pages are 'compressed' for the index 114, 117, 119, 122, 130-132, 135, 135-139, 188-204, 321-321 The incorrect result is returned: 114, 117, 119, 122, 130-135, 135-321 I'd expect: 114, 117, 119, 122, 130-132, 135-139, 188-204, 321 Debugging it roughly I've noticed unsorted page numbers before compressing (in collapsedpage function in strc-reg.lua), which leads to unexpected result from first/second comparison. Some kind of page entries sorting might help here. Regards, Jan ___ 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] Index - ranges
On 2013-11-07 honyk wrote: > > 1) when a range for my subject index entry is specified and the text > between doesn't overflow to the next page, even in this case > the range of pages 1-1 is created. Is there any option to normalize > it to a single page number? > > \startregister[index][range_01]{primary} > Dummy text. > \stopregister[index][range_01] > > ... > 3) when several single index entries are used on consecutive pages, the > result 1,2,3,4,5 is produced. Is there any option to create a range > from this? (A) I've found a promising option compress=no|yes|all in an experimental test case located in the strc-reg.mkiv file. The corresponding lua code seems to be performing some cleanup of page ranges, but when I define it same way, there is no difference in my output (still 1-1): \startregister[index][range_01]{primary} Dummy text. \stopregister[index][range_01] \placeregister[index][compress=yes] Is it necessary to switch it on somehow? (B) I've also found a special syntax for collapsing pages in http://wiki.contextgarden.net/Registers [[Command/{{{1}}}|\{{{1}}}]] - but I have no idea how to appply it. I already use the 'command' parameter to switch the index group letter to upper case: \setupregister[index][n=2,command=\Word,style=normal] Can these commands be combined together somehow? Or is it obsolete in favor of (A)? Thanks, Jan ___ 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] Index - custom sorting
On 2013-11-07 Wolfgang Schuster wrote: > Am 07.11.2013 um 23:11 schrieb honyk : > > > > czech sorting has a quite complex logic. How can a default index > > entries sorting be overridden? > > > > Using a macro or somewhere under the hood via a lua code? > > When you have \mainlanguage[cz] in your document context should use > the czech sorting mechanism, when you english as main language you > can use them in the register > with \placeregister[index][language=cz]. > > You can also influence the sorting with the method key for > \placeregister: http://www.ntg.nl/pipermail/ntg- > context/2010/052950.html That main language is set correctly. While the current implementation supports a single character order, in czech at least two are required - the primary one for the first pass and the secondary for the second pass. It ensures the correct order of accented characters. Anyway, I dive into the code and found an entry point in the sort-ini.lua file. In the comparers.basic(a,b) function I call a customized code instead of basicsort(). Thanks to my code I can produce desired outputs now ;-) But all my lua code is directly in that file, which is not ideal as it is overwritten with every ConTeXt update. Is there any general recommendation how to make these customization more flexible? Thanks, Jan ___ 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] Index - ranges
On 2013-11-07 honyk wrote: > > 1) when a range for my subject index entry is specified and the text > between doesn't overflow to the next page, even in this case > the range of pages 1-1 is created. Is there any option to normalize > it to a single page number? > > \startregister[index][range_01]{primary} > Dummy text. > \stopregister[index][range_01] It is rare, but any help to eliminate it completely is appreciated. > 2) when ranges are used heavily, confusing results are produced. In > following examples I would expect a single range 1-6: >a) 1-3, 3-6 >b) 1-6, 2-4 >c) 1-6, 5-6 This one was caused by improper Docbook => dbcontext => ConTeXt conversion. All ranges of secondaries were treated as primaries so they were collected at primaries. After fixing the XSLT such cases dissapeared completely. Great. This would be a blocker for me. > 3) when several single index entries are used on consecutive pages, the > result 1,2,3,4,5 is produced. Is there any option to create a range > from this? I'm reconsidering this now. I designed my 'subject' index to use ranges when the subject is thoroughly explained, which obviously needs to define beginning and end. On the contrary, when the subject is just mentioned (above the threshold of importance), I inserted just a single index entry instance. Collecting these single instances into the range of e.g. 1-5 would bring false expectations that the subject is thoroughly explained there... This logic goes slightly against the case (1). When the range would be collapsed into to a single value, we would loose the info that the subject is described here. But it looks weird. Jan ___ 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] Index - entries in section titles
On 2013-11-07 Wolfgang Schuster wrote: > Am 07.11.2013 um 23:43 schrieb honyk : > > > > what is the correct placing indext entries somewhere in the section > title? > > > > I use it for both ranges (when covering the whole section) and > > sometimes also for individual entries: > > > > (A) \section{\startregister[index][primary_range_01]{primary}Primary} > > (B) \section{\index{primary}Primary} > > (C) \section{Primary}\index{primary} :-) I usually place it at the beginning to ensure visibility of the title when the page in the index is clicked in a large zoom (which should be preserved) - it should be scrolled accordingly. Is that index entry on the same line as the title or the next one? I found I am not able to test it: Even with the 'focus=standard' when any page in the index is clicked, the zoom is set to FitPage :-( Preserving of zoom seems to be working for TOC only... \setupinteraction[state=start,focus=standard] \starttext \startfrontmatter \completecontent \blank \section{Primary}\index{primary} Dummy text. \stopbodymatter \startbackmatter \completeindex \stopbackmatter \stoptext Jan ___ 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] Index - 'sort as' parameter for secondary and tertiary index entries
On 2013-11-07 honyk wrote: > while there is a sorting parameter for the primary index entry: > \index[primary]{>primary<} > > I cannot find any method how to define 'sort as' parameter for next two > levels: > \index{primary+>aaa<} > \index{primary+bbb} I've tried '+' analogy and it seems to be working! \index[+aaa]{primary+>aaa<} \index{primary+bbb} \index{brimary+ccc} \index[+bbb]{brimary+>bbb<} \index[+aaa]{brimary+>aaa<} It would be nice to mention this possibility in the wiki: http://wiki.contextgarden.net/Registers Jan ___ 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] Index - entries in section titles
Dear All, what is the correct placing indext entries somewhere in the section title? I use it for both ranges (when covering the whole section) and sometimes also for individual entries: (A) \section{\startregister[index][primary_range_01]{primary}Primary} (B) \section{\index{primary}Primary} This syntax is however: (1) used 'as is' in bookmark labels (\index{primary}Primary instead of Primary) (2) producing page references also from TOC (labels are correct, but the index entry instances are kept together there internally) How can I get rid of it? Thanks, Jan ___ 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] Index - custom sorting
Dear All, czech sorting has a quite complex logic. How can a default index entries sorting be overridden? Using a macro or somewhere under the hood via a lua code? I am a total noob in this. Btw, as a Java programmer I have it implemented already in Java so I hope it won't be a huge task to convert it into something else... Any hint is appreciated. Jan ___ 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] Index - ranges
Dear All, 1) when a range for my subject index entry is specified and the text between doesn't overflow to the next page, even in this case the range of pages 1-1 is created. Is there any option to normalize it to a single page number? \startregister[index][range_01]{primary} Dummy text. \stopregister[index][range_01] 2) when ranges are used heavily, confusing results are produced. In following examples I would expect a single range 1-6: a) 1-3, 3-6 b) 1-6, 2-4 c) 1-6, 5-6 3) when several single index entries are used on consecutive pages, the result 1,2,3,4,5 is produced. Is there any option to create a range from this? Thanks, Jan ___ 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] Index - 'sort as' parameter for secondary and tertiary index entries
Dear All, while there is a sorting parameter for the primary index entry: \index[primary]{>primary<} I cannot find any method how to define 'sort as' parameter for next two levels: \index{primary+>aaa<} \index{primary+bbb} I want to have >aaa< before bbb in my index. Any idea? Thanks, Jan ___ 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] EPUB XHTML Format
On 2013-09-04 Thangalin wrote: > > What needs to happen to take a minimal ConTeXt file (such as the > attached) to produce a minimum viable EPUB that: > It is always difficult to parse and further process not well structured plain text without advanced semantics. Garbage in, garbage out. If you need both EPUB and PDF, start with a semantically rich XML vocabulary, e.g. DocBook. In this case you can relatively easy transfrom (XSLT) input data into almost any format. These basic outputs like EPUB or PDF (via XSL-FO) you can get out-of-the-box. The Context output can be generated using dbcontext: http://dblatex.sourceforge.net/ In sum, use XML as your primary source and from it derive everything else. Jan ___ 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] Handling index entries with many references
On 2013-06-09 Wolfgang Schuster wrote: > > Am 09.06.2013 um 21:49 schrieb honyk : > > > Dear All, > > > > in my book I want to place the index (aka register) of places. Some > of them > > are mentioned very often (>10). I want to keep that location in the > index, > > but not to create references to all occurrences. > > > > In one old book I've found the following solution for this: in the > index > > there are first three page references listed for that index entry > followed > > by 'and many' phrase. > > > > Can something like this be done in the ConTeXt (MkIV)? No > interactivity is > > needed. The PDF output will be used just for printing. > > > > \setupregister[index][coupling=yes] is not exactly what I want. > > Do you have a example what you did in MkII? I hadn't typeset anything like this before. When mentioning the old book, I mean manually typeset book (not digital one) produced by the letterpress technology. Jan ___ 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] Handling index entries with many references
Dear All, in my book I want to place the index (aka register) of places. Some of them are mentioned very often (>10). I want to keep that location in the index, but not to create references to all occurrences. In one old book I've found the following solution for this: in the index there are first three page references listed for that index entry followed by 'and many' phrase. Can something like this be done in the ConTeXt (MkIV)? No interactivity is needed. The PDF output will be used just for printing. \setupregister[index][coupling=yes] is not exactly what I want. Thanks, Jan ___ 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] Side-by-side framed text blocks
> On 2013-06-07 Marco wrote: >> On 2013–06–07 honyk wrote: >> >> > thanks for this. I removed that framed=off option and it turned out >> to be sligthly different from what I'd like to achieve. >> > >> > My goal is to have two blocks with a vertical gap between them and to >> have these blocks framed (or with the colored background) at the text >> area - without the cell spans - to show differences between the >> standard and 'hanging' alignments (that right border should cross the >> punctuation in the hanging mode). >> > >> > Below each 'column' I'd like to place a short description (centered) >> - exactly as on the referenced examples. >> >> Use a combination for that: >> >> \setuptolerance >> [verytolerant] >> >> \setupframed >> [offset=none, >>width=8cm, >>frame=off, >>background=screen] >> >> \definefontfeature >> [default] >> [default] >> [protrusion=pure] >> >> \starttext >> >> \startcombination >> \startcontent >> \startframed [align=normal] >> \input knuth >> \stopframed >> \stopcontent >> \startcaption >> Some description >> \stopcaption >> \startcontent >> \startframed [align={normal,hanging}] >> \input knuth >> \stopframed >> \stopcontent >> \startcaption >> Some description >> \stopcaption >> \stopcombination >> >> \stoptext Thanks, it helped a lot! I've added this to control the gap (width) between text blocks: \startcombination[distance=2cm] And placed following commands inline to suppress the first whitespace character. I like your indentation, but on my Windows (CR+LF) it is suboptimal. Or is there any option for this? \startframed [align=normal]\input knuth Thanks, Jan ___ 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] Side-by-side framed text blocks
Dear Marco, > > I'd like to type two blocks of text with different 'align' settings > side by > > side. > > Here's one way to do it: > > \setupframed > [offset=1ex, >width=8cm, >frame=off] > > \starttext > \placesidebyside > {\startframed[align={normal,left}] \input knuth\par\stopframed} > {\startframed[align={normal,right}] \input knuth\par\stopframed} > \stoptext > > Marco thanks for this. I removed that framed=off option and it turned out to be sligthly different from what I'd like to achieve. My goal is to have two blocks with a vertical gap between them and to have these blocks framed (or with the colored background) at the text area - without the cell spans - to show differences between the standard and 'hanging' alignments (that right border should cross the punctuation in the hanging mode). Below each 'column' I'd like to place a short description (centered) - exactly as on the referenced examples. Jan ___ 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] Side-by-side framed text blocks
Dear All, I'd like to type two blocks of text with different 'align' settings side by side. A desired output can be found e.g. in examples 1.9-1.10 in http://www.pragma-ade.com/general/manuals/style.pdf Here blocks have a background instead of frames though. Both variants are acceptable for me. I am lost in various text box, framing or columns switches and unable to create something similar. Thanks, Jan ___ 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] [***SPAM***] Source files for ConTeXt manuals
Dear All, as a newbie I am investigating various ConTeXt (MkIV) concepts and I feel that any direct comparison of the source and the final output would help me a lot. While in the ConTeXt reference manual I can see e.g. nice side-by-side framed text blocks, I am lost in various text box, framing or columns switches and unable to create something similar. While in this guide http://www.pragma-ade.com/general/manuals/style.pdf I can see many options for font expansion, something like this is not applicable to MkIV: \setupfonthandling [hz] [min=30,max=30,step=5] I've search for doc source in the source browser http://source.contextgarden.net/ but I still haven't found anything promising. Any idea? I just try to avoid spamming the list with most likely obvious and silly questions :-) Regards, Jan ___ 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] Centered title with numeration on the same line
Luigi, >> The problematic part is that section title. The chapter title formatting is >> Ok (but thanks >> for showing the way how to deal with these cases for future uses). >> Applying deepnumbercommand to section didn't help to me... > I've used align=middle instead of alternative=middle > in \setuphead[section] (in the first example I've used it for chapter) sorry for that, I overlooked this change completely. Your solution works as well and it is even much simpler. Thanks, Jan ___ 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] Centered title with numeration on the same line
Dear Luigi, > > On Mon, Jun 3, 2013 at 7:08 PM, honyk wrote: > > Dear All, > > > > in MkIV when any title is centered, its numeration is placed on a separate > > line above the title itself. > > > > I'd expect inline formatting which could be overridden as described here > > http://wiki.contextgarden.net/Titles > > > > My code: > > > > \setuplabeltext[en][chapter=Chapter~] > > > > % while for chapter title this line break is handy (in my use case) > > \setuphead[chapter][ > > alternative=middle, > > style=\bfc, > > conversion=Romannumerals, > > numbercommand=\groupedcommand{\cap}{\blank[0.5cm]}, > > after={\blank[1cm]}, > > ] > > > > % for section it is inappropriate > > \setuphead[section][ > > alternative=middle, > > style=\bfa, > > sectionsegments=section, % ignore component label > > ] > > > > \starttext > > \chapter{Foo} > > \section{The First Section} > > Text. > > \stoptext > > > > How can I keep numeration and title together? > > > > Thanks, > > Jan > > \setuplabeltext[en][chapter=Chapter~] > > % while for chapter title this line break is handy (in my use case) > \setuphead[chapter][ > align=middle, > style=\bfc, > conversion=Romannumerals, > deepnumbercommand=\cap,% \groupedcommand{\cap}{\blank[0.5cm]}, > after={\blank[1cm]}, > ] > > % for section it is inappropriate > \setuphead[section][ > alternative=middle, > style=\bfa, > sectionsegments=section, % ignore component label > ] > > \starttext > \chapter{Foo} > \section{The First Section} > Text. > \stoptext > > Maybe do you want deepnumbercommand ? > (see the links for the difference numbercommand vs deepnumbercommand) The problematic part is that section title. The chapter title formatting is Ok (but thanks for showing the way how to deal with these cases for future uses). Applying deepnumbercommand to section didn't help to me... Regards, Jan ___ 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 - right-alignment of roman numerals
This is great! Thanks > On 2013–06–03 honyk wrote: > > > in fresh MkIV I use the following commands for building ToC, but I > have no > > idea how to align the label (roman numeral) to the right. > > \setuphead[chapter][conversion=Romannumerals] > \setupheadnumber[chapter][48] > > \setupcombinedlist > [content] > [alternative=c] > > \setupcombinedlist > [chapter] > [distance=1em, >width=1cm, > > numbercommand={\simplealignedbox{\listparameter{width}}{flushright}}] > > \starttext > \completecontent > \chapter{Foo} > \chapter{Bar} > \stoptext > > > In addition, the specified width and distance seem to be somehow > > ignored so that label interferes with the title. > > The width setting needs to be applied to the chapter list, not the > content list, see example above. > > Marco ___ 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] Centered title with numeration on the same line
Marco, thanks a lot, it gives me exactly what I wanted! But to be honest, I expected a single option for this :-) Jan > On 2013–06–03 honyk wrote: > > > How can I keep numeration and title together? > > You can create a custom head alternative. The following code is > copied from the source, I only replace the \par with > \kern\headnumberdistance. Have a look at strc-ren.mkiv for other > layouts. > > \setuphead > [section] > [alternative=middle_nolinebreak] > > \defineheadalternative > [middle_nolinebreak] > [alternative=vertical, >renderingsetup=headrenderings:middle_nolinebreak] > > \startsetups[headrenderings:middle_nolinebreak] > \vbox { > \headsetupspacing > \veryraggedcenter > \let\\\endgraf > \let\crlf\endgraf > \ifconditional\headshownumber > \strut > \headnumbercontent > \kern\headnumberdistance > \fi > \begstrut > \headtextcontent > \endstrut > } > \stopsetups > > \starttext > \section{The First Section} > \stoptext > > Marco ___ 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 - right-alignment of roman numerals
Dear All, in fresh MkIV I use the following commands for building ToC, but I have no idea how to align the label (roman numeral) to the right. In addition, the specified width and distance seem to be somehow ignored so that label interferes with the title. \setuphead[chapter][conversion=Romannumerals] \setupheadnumber[chapter][48] \setupcombinedlist[content][ alternative=c, distance=1em, width=3cm, ] \starttext \completecontent \chapter{Foo} \chapter{Bar} \stoptext Here is the link with several screenshots of desired formatting: http://tex.stackexchange.com/questions/69559/align-the-roman-numbers-of-the- parts-in-toc Any hint is appreciated. Thanks, Jan ___ 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] Centered title with numeration on the same line
Dear All, in MkIV when any title is centered, its numeration is placed on a separate line above the title itself. I'd expect inline formatting which could be overridden as described here http://wiki.contextgarden.net/Titles My code: \setuplabeltext[en][chapter=Chapter~] % while for chapter title this line break is handy (in my use case) \setuphead[chapter][ alternative=middle, style=\bfc, conversion=Romannumerals, numbercommand=\groupedcommand{\cap}{\blank[0.5cm]}, after={\blank[1cm]}, ] % for section it is inappropriate \setuphead[section][ alternative=middle, style=\bfa, sectionsegments=section, % ignore component label ] \starttext \chapter{Foo} \section{The First Section} Text. \stoptext How can I keep numeration and title together? Thanks, Jan ___ 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] Including a large SVG image
> Sander Maijers wrote: > >> I have a few SVG graphics of multiple megabytes. They contain a lot > >> of objects (text/shapes). All graphics except for one gets properly > >> included in my ConTeXt document. > > Marco Patzer wrote: > > Maybe inkscape failed to convert the file. Is a corresponding > > m_k_i_v_filename.svg.pdf file generated? > > It might be informative to try running the Inkscape conversion > manually. This is the command line ConTeXT uses: > > inkscape "%oldname%" --export-dpi=600 -A "%newname%" > > (The quotation marks are literal: they are there in case the filename > has spaces, e.g.) If processing in Inkscape fails, you can try another tool: http://xmlgraphics.apache.org/batik/tools/rasterizer.html It can (despite its name) transcode SVG to vector PDF: java -Xmx2G -jar batik-rasterizer.jar -m application/pdf image.svg In that case you have to transcode your files first and reference PDF variants in your input. Jan ___ 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 ___