Re: [NTG-context] Microtype in ConTeXt

2010-03-27 Thread Hans Hagen

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
-
___
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] Microtype in ConTeXt

2010-03-27 Thread Hans Hagen

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
-
___
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] Microtype in ConTeXt

2010-03-27 Thread Wolfgang Schuster

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

___
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] Microtype in ConTeXt

2010-03-27 Thread Michael Saunders
 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


Notice that Yan Zhou isn't complaining that the docs are old.   Our
problem is that they are sketchy and rambling, bits and pieces of this
and that without any systematic explanations.  Often they are just
some unexplained code samples that communicate nothing (unless you
happen to be the guy who invented the language).   I can't think of
one command that is fully explained along with all its possible
parameters.   The wiki is better written, but even less complete.   It
might not be possible to do better, but this is a huge obstacle to
anyone who actually wants to use ConTeXt.  The docs hint at a lot of
features that sound better than LaTeX, but actually getting them to
work is a different story.
___
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] Microtype in ConTeXt

2010-03-26 Thread Yan Zhou
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
 ___

___
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] Microtype in ConTeXt

2010-03-26 Thread Wolfgang Schuster

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



kerncharacters.pdf
Description: Adobe PDF document
___
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] Microtype in ConTeXt

2010-03-25 Thread Yan Zhou
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.
___
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] Microtype in ConTeXt

2010-03-25 Thread Hans Hagen

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
-
___
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] Microtype in ConTeXt

2010-03-25 Thread Wolfgang Schuster

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

___
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] Microtype in ConTeXt

2010-03-25 Thread Hans Hagen

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
-
___
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] Microtype in ConTeXt

2010-03-25 Thread Wolfgang Schuster

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

___
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] Microtype in ConTeXt

2010-03-25 Thread Hans Hagen

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
-
___
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] Microtype in ConTeXt

2010-03-25 Thread Wolfgang Schuster

Am 25.03.10 16:21, schrieb Hans Hagen:

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 
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

___
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] Microtype in ConTeXt

2010-03-25 Thread Hans Hagen

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
___