![](https://secure.gravatar.com/avatar/e56cf5f94ac2efea0fd8b30f8313b4a8.jpg?s=120&d=mm&r=g)
Dear all, I am thinking about moving from LaTeX to ConTeXt. But there is one thing make this particularly difficult. That is the microtype LaTeX package. More specifically I have the following questions (assuming I will use MKIV and luatex) 1. I understand that ConTeXt can do margin kerning and font expansion, but is there a way to setup a configuration file for each font set. Like the mt-foo.cfg file for font family foo when using microtype in latex. 2. Is there a way to do letterspace in ConTeXt. I understand there is a command called \stretched. But what I want is the feature like the tracking option in microtype package, which can automatically letterspace all small caps. Moreover is there a way to define new sets of fonts for letterspace. For example I defined a new font shape called \capshape, which use case tags of OpenType, and I want to use letterspace this shape with certain amount all the time because I am not satisfied with the space provided by the cpsp tag of OpenType. I am sorry for using and LaTeX terminology. I haven't start learning ConTeXt at all at this stage. I want to first know if it provide all the features I need before I spend my time on learning a new language.
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 25-3-2010 2:55, Yan Zhou wrote:
Dear all,
I am thinking about moving from LaTeX to ConTeXt. But there is one thing make this particularly difficult. That is the microtype LaTeX package. More specifically I have the following questions (assuming I will use MKIV and luatex)
1. I understand that ConTeXt can do margin kerning and font expansion, but is there a way to setup a configuration file for each font set. Like the mt-foo.cfg file for font family foo when using microtype in latex.
you can define additional sets indeed an dpass the defined set as value to the protrusion and expansion features
2. Is there a way to do letterspace in ConTeXt. I understand there is a command called \stretched. But what I want is the feature like the tracking option in microtype package, which can automatically letterspace all small caps. Moreover is there a way to define new sets of fonts for letterspace. For example I defined a new font shape called \capshape, which use case tags of OpenType, and I want to use letterspace this shape with certain amount all the time because I am not satisfied with the space provided by the cpsp tag of OpenType.
i have no clue what microtype does (nor time to look into it) but you can just define a command that switches the font and enables intercharacter spacing, something \definecharacterkerning[mykerning] \setupcharacterkerning[mykerning][\c!factor=.125] \def\MySc {\groupedcommand {\sc\setcharacterkerning[mykerning]} {}} Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 25.03.10 15:09, schrieb Hans Hagen:
1. I understand that ConTeXt can do margin kerning and font expansion, but is there a way to setup a configuration file for each font set. Like the mt-foo.cfg file for font family foo when using microtype in latex. you can define additional sets indeed an dpass the defined set as value to the protrusion and expansion features The MKIV interface (Lua only) is not very user friendly but since Steffen Wolfrum is the only one who use his own verctors this hadn't been a problem in the past. 2. Is there a way to do letterspace in ConTeXt. I understand there is a command called \stretched. But what I want is the feature like the tracking option in microtype package, which can automatically letterspace all small caps. Moreover is there a way to define new sets of fonts for letterspace. For example I defined a new font shape called \capshape, which use case tags of OpenType, and I want to use letterspace this shape with certain amount all the time because I am not satisfied with the space provided by the cpsp tag of OpenType. i have no clue what microtype does (nor time to look into it) but you can just define a command that switches the font and enables intercharacter spacing, something
\definecharacterkerning[mykerning]
\setupcharacterkerning[mykerning][\c!factor=.125]
\def\MySc {\groupedcommand {\sc\setcharacterkerning[mykerning]} {}} Who about something like (pseudocode)
\definecharacterkerning[letterspace] \def\letterspace {\bgroup \dosingleempty\doletterspace} \def\doletterspace[#1]#2% use \groupedcommand? {\iffirstargument \setupcharacterkerning[letterspace][factor=\ctxlua{tex.sprint(#1/1000)}]}% \fi \setcharacterkerning[letterspace]#2% \egroup} \starttext text \letterspace{text} text \letterspace[200]{text} text \stoptext Wolfgang
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 25-3-2010 15:28, Wolfgang Schuster wrote:
Am 25.03.10 15:09, schrieb Hans Hagen:
1. I understand that ConTeXt can do margin kerning and font expansion, but is there a way to setup a configuration file for each font set. Like the mt-foo.cfg file for font family foo when using microtype in latex. you can define additional sets indeed an dpass the defined set as value to the protrusion and expansion features The MKIV interface (Lua only) is not very user friendly but since Steffen Wolfrum is the only one who use his own verctors this hadn't been a problem in the past. 2. Is there a way to do letterspace in ConTeXt. I understand there is a command called \stretched. But what I want is the feature like the tracking option in microtype package, which can automatically letterspace all small caps. Moreover is there a way to define new sets of fonts for letterspace. For example I defined a new font shape called \capshape, which use case tags of OpenType, and I want to use letterspace this shape with certain amount all the time because I am not satisfied with the space provided by the cpsp tag of OpenType. i have no clue what microtype does (nor time to look into it) but you can just define a command that switches the font and enables intercharacter spacing, something
\definecharacterkerning[mykerning]
\setupcharacterkerning[mykerning][\c!factor=.125]
\def\MySc {\groupedcommand {\sc\setcharacterkerning[mykerning]} {}} Who about something like (pseudocode)
\definecharacterkerning[letterspace]
\def\letterspace {\bgroup \dosingleempty\doletterspace}
\def\doletterspace[#1]#2% use \groupedcommand? {\iffirstargument \setupcharacterkerning[letterspace][factor=\ctxlua{tex.sprint(#1/1000)}]}% \fi \setcharacterkerning[letterspace]#2% \egroup}
\starttext
text \letterspace{text} text \letterspace[200]{text} text
looks ok, apart from the name ... we don't space letters but characters (or glyphs) so maybe \kerncharacters or so Hans -- ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 25.03.10 16:21, schrieb Hans Hagen:
looks ok, apart from the name ... we don't space letters but characters (or glyphs) so maybe \kerncharacters or so Is it also possible to use this with fontfeatures?
\definefontfeature[kerning][kern=.125] \starttext {\definedfont[SerifCaps*kerning]kerned characters} \stoptext Wolfgang
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 25-3-2010 16:34, Wolfgang Schuster wrote:
Am 25.03.10 16:21, schrieb Hans Hagen:
looks ok, apart from the name ... we don't space letters but characters (or glyphs) so maybe \kerncharacters or so Is it also possible to use this with fontfeatures?
\definefontfeature[kerning][kern=.125]
\starttext {\definedfont[SerifCaps*kerning]kerned characters} \stoptext
hm, not now but it's no big deal to implement it ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Who about something like (pseudocode)
\definecharacterkerning[letterspace]
\def\letterspace {\bgroup \dosingleempty\doletterspace}
\def\doletterspace[#1]#2% use \groupedcommand? {\iffirstargument \setupcharacterkerning[letterspace][factor=\ctxlua{tex.sprint(#1/1000)}]}%
\fi \setcharacterkerning[letterspace]#2% \egroup}
\starttext
text \letterspace{text} text \letterspace[200]{text} text looks ok, apart from the name ... we don't space letters but characters (or glyphs) so maybe \kerncharacters or so to be more concrete i think about this (why is the last value taken for
Am 25.03.10 16:21, schrieb Hans Hagen: the complete paragraph?) \definecharacterkerning[kerncharacters] \unexpanded\def\kerncharacters {\dosingleempty\dokerncharacters} \def\dokerncharacters[#1]% {\groupedcommand {\iffirstargument \setupcharacterkerning[kerncharacters][factor=\ctxlua{tex.write(#1/1000)}]% \fi \setcharacterkerning[kerncharacters]} {}} \setuphead[section][style=\sca,textstyle={\kerncharacters[250]}] \starttext \section{Section} text \kerncharacters{text} text \kerncharacters[200]{text} text \kerncharacters[2000]{text} text text {\kerncharacters text} text {\kerncharacters[200] text} text {\kerncharacters[2000] text} text text \kerncharacters[200]{text} text \kerncharacters[1000]{text} text text \kerncharacters[1000]{text} text \kerncharacters[200]{text} text \stoptext Wolfgang
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 25-3-2010 19:14, Wolfgang Schuster wrote:
\setupcharacterkerning[kerncharacters][factor=\ctxlua{tex.write(#1/1000)}]%
i'll add it but simply with \setupcharacterkerning[kerncharacters][factor=#1]% there is no reason to use a different model than we have now (also, these 1000 based values are old fashioned tex approaches that don't make much sense nowadays) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/e56cf5f94ac2efea0fd8b30f8313b4a8.jpg?s=120&d=mm&r=g)
Thanks for all your replies. They helps a lot. As I can see now ConTeXt is indeed a far more advanced system than LaTeX. But I have one more query. Where can I find the documents. When following these replies and some other messages in the list, I find some commands not documented in the Manual or Reference Manual. In LaTeX, all commands are detailed documented in source2e.tex, in TeX, The TeXBook explains everything. So in ConTeXt, where can I find such detailed documents. I tried the documented source, but it is more like a PDF version or source with only a little documentation. On Mar 25, 2010, at 10:42 PM, Hans Hagen wrote:
On 25-3-2010 19:14, Wolfgang Schuster wrote:
\setupcharacterkerning[kerncharacters][factor=\ctxlua{tex.write(#1/1000)}]%
i'll add it but simply with
\setupcharacterkerning[kerncharacters][factor=#1]%
there is no reason to use a different model than we have now (also, these 1000 based values are old fashioned tex approaches that don't make much sense nowadays)
Hans
----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 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 ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 27-3-2010 1:15, Yan Zhou wrote:
As I can see now ConTeXt is indeed a far more advanced system than LaTeX. But I have one more query. Where can I find the documents. When following these replies and some other messages in the list, I find some commands not documented in the Manual or Reference Manual. In LaTeX, all commands are detailed documented in source2e.tex, in TeX, The TeXBook explains everything. So in ConTeXt, where can I find such detailed documents. I tried the documented source, but it is more like a PDF version or source with only a little documentation.
as most of the functrionality does not change you can use older docs (website, wiki etc) for most cases newer things i.e. introduced in mkiv using luatex are described in for instance mk.pdf and articles of course the wiki is a good source as well Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 25.03.10 23:42, schrieb Hans Hagen:
there is no reason to use a different model than we have now (also, these 1000 based values are old fashioned tex approaches that don't make much sense nowadays) ok, makes sense
when i set different values for certain words the last setting in a paragraph is used for each word, is this intended? \starttext text \kerncharacters[.2]{text} text \kerncharacters[1]{text} text text \kerncharacters[1]{text} text \kerncharacters[.2]{text} text \stoptext Wolfgang
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
On 27-3-2010 6:28, Wolfgang Schuster wrote:
Am 25.03.10 23:42, schrieb Hans Hagen:
there is no reason to use a different model than we have now (also, these 1000 based values are old fashioned tex approaches that don't make much sense nowadays) ok, makes sense
when i set different values for certain words the last setting in a paragraph is used for each word, is this intended?
\starttext
text \kerncharacters[.2]{text} text \kerncharacters[1]{text} text
text \kerncharacters[1]{text} text \kerncharacters[.2]{text} text
\stoptext
you can test the beta on the ftp ... i reimplemented the interface ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 27.03.10 12:21, schrieb Hans Hagen:
when i set different values for certain words the last setting in a paragraph is used for each word, is this intended?
\starttext
text \kerncharacters[.2]{text} text \kerncharacters[1]{text} text
text \kerncharacters[1]{text} text \kerncharacters[.2]{text} text
\stoptext you can test the beta on the ftp ... i reimplemented the interface Works.
Wolfgang
participants (3)
-
Hans Hagen
-
Wolfgang Schuster
-
Yan Zhou