[NTG-context] Some problems with a new style for the sections
Hi, I encounter two problems : - Section numbers are not red ; - Calling the second section does not cause the creation of a new paragraph. Regards, Fabrice \setupcolors[state=start] \def\MySectionCommand#1#2% {\framed [frame=off, width=\textwidth, align={right}, background=color, backgroundcolor=lightgray] {#1\quad#2}} \setuphead[section][command=\MySectionCommand,numbercolor=red] \setupbodyfont[palatino,12pt] \starttext \MySectionCommand{A.}{Définitions} \input knuth \MySectionCommand{1.}{Propriétés} \input knuth ___ 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] linebreaks and cell width in xtables
Dear list, I have the following sample: \starttext \startxtable[option=stretch] \startxrow \startxcell One line And another \stopxcell \startxcell This breaks the following cell. \stopxcell \stopxrow \startxrow \startxcell This cell has multiple lines. Vertical spacing is wrong. \stopxcell \startxcell What am I missing? \stopxcell \stopxrow \stopxtable \stoptext I don’t know whether this is a bug. My question is the following: how can I get a new line inside a cell? I have another question: how can I force that both rows (in this case two) have the same width? 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 ___
Re: [NTG-context] Some problems with a new style for the sections
Am 04.05.2014 um 13:21 schrieb Fabrice Couvreur fabrice1.couvr...@gmail.com: Hi, I encounter two problems : - Section numbers are not red ; - Calling the second section does not cause the creation of a new paragraph. You have to use the \section command in your text. 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] Proper setting of font features for protrusion/expansion
Dear All, e.g. in the last example at http://wiki.contextgarden.net/Protrusion there is the following definition: \definefontfeature[default][default][expansion=quality,protrusion=quality] I understand it overrides default settings and adds these two features. In my code I use the following shortcut found somewhere: \definefontfamily[palatino][rm][Palatino Linotype][features={default, quality}] Both features works, but I am not sure if I am getting the best quality. Is there any description what that '[features={default, quality}]' option really does? 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] Some problems with a new style for the sections
You need to use \section to type a section head. Also I think you are better off with \define[2]\MySectionCommand. Using \def issues some errors. On Sun, May 04, 2014 at 01:21:16PM +0200, Fabrice Couvreur wrote: Hi, I encounter two problems : - Section numbers are not red ; - Calling the second section does not cause the creation of a new paragraph. Regards, Fabrice \setupcolors[state=start] \def\MySectionCommand#1#2% {\framed [frame=off, width=\textwidth, align={right}, background=color, backgroundcolor=lightgray] {#1\quad#2}} \setuphead[section][command=\MySectionCommand,numbercolor=red] \setupbodyfont[palatino,12pt] \starttext \MySectionCommand{A.}{Définitions} \input knuth \MySectionCommand{1.}{Propriétés} \input knuth ___ 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 ___ -- Darksair http://darksair.org/ http://twitter.com/#!/MetroWind | http://about.me/darksair http://www.last.fm/user/Darksair ___ 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] linebreaks and cell width in xtables
On 2014-05-04 12:30, Pablo Rodriguez wrote: Dear list, I have the following sample: \starttext \startxtable[option=stretch] \startxrow \startxcell One line And another \stopxcell \startxcell This breaks the following cell. \stopxcell \stopxrow \startxrow \startxcell This cell has multiple lines. Vertical spacing is wrong. \stopxcell \startxcell What am I missing? \stopxcell \stopxrow \stopxtable \stoptext I don’t know whether this is a bug. My question is the following: how can I get a new line inside a cell? I have another question: how can I force that both rows (in this case two) have the same width? Many thanks for your help, Pablo Any of the following will work here. Which is or are idiomatic I will leave for others to say. This cell has multiple lines.\\ This cell has multiple lines.\par This cell has multiple lines.\blank[none] -- Rik Kabel ___ 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] Some problems with a new style for the sections
On 2014-05-04 07:21, Fabrice Couvreur wrote: Hi, I encounter two problems: - Section numbers are not red ; - Calling the second section does not cause the creation of a new paragraph. Regards, Fabrice \setupcolors[state=start] \def\MySectionCommand#1#2% {\framed [frame=off, width=\textwidth, align={right}, background=color, backgroundcolor=lightgray] {#1\quad#2}} \setuphead[section][command=\MySectionCommand,numbercolor=red] \setupbodyfont[palatino,12pt] \starttext \MySectionCommand{A.}{Définitions} \input knuth \MySectionCommand{1.}{Propriétés} \input knuth I think you want ownnumber (in addition to the previously mentioned \section). \setupcolors[state=start] \define[2]\MySectionCommand {\framed [frame=off, width=\textwidth, align={right}, background=color, backgroundcolor=lightgray] {#1.\quad#2}} \setuphead[section][command=\MySectionCommand,ownnumber=yes,numbercolor=red] \setupbodyfont[palatino,12pt] \starttext \placecontent \section{A}{Définitions} \input knuth \section{1}{Propriétés} \input knuth \section{2}{Propriétés} \input knuth \section{3}{Propriétés} \input knuth \section{B}{Définitions} \input knuth \section{1}{Propriétés} \input knuth \section{2}{Propriétés} \input knuth \stoptext -- Rik Kabel ___ 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] Proper setting of font features for protrusion/expansion
Am 04.05.2014 um 19:34 schrieb Jan Tosovsky j.tosov...@email.cz: Dear All, e.g. in the last example at http://wiki.contextgarden.net/Protrusion there is the following definition: \definefontfeature[default][default][expansion=quality,protrusion=quality] I understand it overrides default settings and adds these two features. In my code I use the following shortcut found somewhere: \definefontfamily[palatino][rm][Palatino Linotype][features={default, quality}] Both features works, but I am not sure if I am getting the best quality. Is there any description what that '[features={default, quality}]' option really does? When you apply features to a font you can set a list of features and all of them will be applied. In the example below you can see both methods, the first text uses the new featurelist “testfeature” which uses “default” and extends it with “protrusion=quality”. The second text applies the two predefined lists “default” and “quality” (which sets “protrusion=quality” and “expansion=quality”). \setupalign[hanging] \definefontfeature[testfeature][default][protrusion=quality] \showframe[text][text] \starttext \startfont[Serif*testfeature] \input knuth \stopfont \startfont[Serif*default,quality] \input knuth \stopfont \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] linebreaks and cell width in xtables
On 05/04/2014 08:27 PM, Rik Kabel wrote: Any of the following will work here. Which is or are idiomatic I will leave for others to say. This cell has multiple lines.\\ This cell has multiple lines.\par This cell has multiple lines.\blank[none] Many thanks for your reply, Rik. I’m afraid none of them works. Here is my sample: \starttext \startxtable[option=stretch] \startxrow \startxcell aaa\blank[none]aaa \stopxcell \startxcell \ConTeXt\ \contextversion \stopxcell \stopxrow \startxrow \startxcell This cell has multiple lines. Vertical spacing is wrong. \stopxcell \startxcell What am I missing? \stopxcell \stopxrow \stopxtable \stoptext I’m using latest beta (2014.04.28 23:24) and the issue happens when there is text before and after the break. 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 ___
Re: [NTG-context] Proper setting of font features for protrusion/expansion
On 2014-05-04 Wolfgang Schuster wrote: Am 04.05.2014 um 19:34 schrieb Jan Tosovsky: In my code I use the following shortcut found somewhere: \definefontfamily[palatino][rm][Palatino Linotype][features={default, quality}] Is there any description what that '[features={default, quality}]' option really does? When you apply features to a font you can set a list of features and all of them will be applied. In the example below you can see both methods, the first text uses the new featurelist testfeature which uses default and extends it with protrusion=quality. The second text applies the two predefined lists default and quality (which sets protrusion=quality and expansion=quality). \definefontfeature[testfeature][default][protrusion=quality] ... \startfont[Serif*testfeature] ... \startfont[Serif*default,quality] Aahh, thanks. So it is the preset name what confused me here... From my POV the 'quality' should be replaced with the more specific label. I believe it will enhance readability the code. I can imagine even 'microtypography' for this kind of preset. 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] linebreaks and cell width in xtables
On 2014-05-04 15:46, Pablo Rodriguez wrote: On 05/04/2014 08:27 PM, Rik Kabel wrote: Any of the following will work here. Which is or are idiomatic I will leave for others to say. This cell has multiple lines.\\ This cell has multiple lines.\par This cell has multiple lines.\blank[none] Many thanks for your reply, Rik. I’m afraid none of them works. Here is my sample: \starttext \startxtable[option=stretch] \startxrow \startxcell aaa\blank[none]aaa \stopxcell \startxcell \ConTeXt\ \contextversion \stopxcell \stopxrow \startxrow \startxcell This cell has multiple lines. Vertical spacing is wrong. \stopxcell \startxcell What am I missing? \stopxcell \stopxrow \stopxtable \stoptext I’m using latest beta (2014.04.28 23:24) and the issue happens when there is text before and after the break. Pablo Pablo, With your example, I get which shows a problem in row 2. When I add \\ to the first line of text in row 2 column 1, as shown here \starttext \startxtable[option=stretch] \startxrow \startxcell aaa\blank[none]aaa \stopxcell \startxcell \ConTeXt\ \contextversion \stopxcell \stopxrow \startxrow \startxcell This cell has multiple lines.\\ Vertical spacing is wrong. \stopxcell \startxcell What am I missing? \stopxcell \stopxrow \stopxtable \stoptext I get which perhaps has some faults in the vertical spacing, but is much better than the original. The spacing can be improved by specifying [align=lohi] for that cell. I get the same result with the other two methods I suggested. Is there a reason that you cannot use one of these methods in row 2 as you do in row 1? Perhaps we would all benefit from an obeylines alignment option? -- Rik Kabel ___ 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] linebreaks and cell width in xtables
On 2014-05-04 15:46, Pablo Rodriguez wrote: On 05/04/2014 08:27 PM, Rik Kabel wrote: Any of the following will work here. Which is or are idiomatic I will leave for others to say. This cell has multiple lines.\\ This cell has multiple lines.\par This cell has multiple lines.\blank[none] Many thanks for your reply, Rik. I’m afraid none of them works. Here is my sample: \starttext \startxtable[option=stretch] \startxrow \startxcell aaa\blank[none]aaa \stopxcell \startxcell \ConTeXt\ \contextversion \stopxcell \stopxrow \startxrow \startxcell This cell has multiple lines. Vertical spacing is wrong. \stopxcell \startxcell What am I missing? \stopxcell \stopxrow \stopxtable \stoptext I’m using latest beta (2014.04.28 23:24) and the issue happens when there is text before and after the break. Pablo Pablo, With your example, I get which shows a problem in row 2. When I add \\ to the first line of text in row 2 column 1, as shown here \starttext \startxtable[option=stretch] \startxrow \startxcell aaa\blank[none]aaa \stopxcell \startxcell \ConTeXt\ \contextversion \stopxcell \stopxrow \startxrow \startxcell This cell has multiple lines.\\ Vertical spacing is wrong. \stopxcell \startxcell What am I missing? \stopxcell \stopxrow \stopxtable \stoptext I get which perhaps has some faults in the vertical spacing, but is much better than the original. The spacing can be improved by specifying [align=lohi] for that cell. I get the same result with the other two methods I suggested. Is there a reason that you cannot use one of these methods in row 2 as you do in row 1? Perhaps we would all benefit from an obeylines alignment option? -- Rik Kabel (resent from list address, please excuse duplicates) ___ 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] Proper setting of font features for protrusion/expansion
On 5/4/2014 10:41 PM, Jan Tosovsky wrote: On 2014-05-04 Wolfgang Schuster wrote: Am 04.05.2014 um 19:34 schrieb Jan Tosovsky: In my code I use the following shortcut found somewhere: \definefontfamily[palatino][rm][Palatino Linotype][features={default, quality}] Is there any description what that '[features={default, quality}]' option really does? When you apply features to a font you can set a list of features and all of them will be applied. In the example below you can see both methods, the first text uses the new featurelist testfeature which uses default and extends it with protrusion=quality. The second text applies the two predefined lists default and quality (which sets protrusion=quality and expansion=quality). \definefontfeature[testfeature][default][protrusion=quality] ... \startfont[Serif*testfeature] ... \startfont[Serif*default,quality] Aahh, thanks. So it is the preset name what confused me here... From my POV the 'quality' should be replaced with the more specific label. I believe it will enhance readability the code. I can imagine even 'microtypography' for this kind of preset. quality is just a tag for a preset ... on can add his/her own btw, i have no clue what micro or typography is involved (esp when excessive values are used) ,,, using that term for a preset would be rather confusing 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 ___ -- - 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] Empty heads after leading whitespace
For those who are interested, I've finally solved my problem (the vertical space before a subsection which was not automatically swallowed at the top of a page when the page started with an empty section) by using the pair 'after={\vskip 0em\blank[disable]}' for sections: \setuphead [section] [placehead=empty, page=yes, after={\vskip 0em\blank[disable]}] \setuphead [subsection] [placehead=yes, before={\blank[line]}, after={\blank[line]}] \setupheadertexts[section] \showframe \starttext \completecontent \dorecurse{2} {\section{My section} \dorecurse{2} {\subsection{My subsection} \input knuth}} \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 ___