[NTG-context] Opentype features

2009-05-11 Thread Arun Dev
Hello,

   I am using Context Mark II + XeTeX. I would like to know the
following things.

1. How to use opentype font features. I tried the following code but it is
not working.
  \definefontfeature[myfontfea][+onum]
  \definetypeface[Libertine][rm][Xserif][Linux Libertine
O][default][features=myfontfea]
  \setupbodyfont[Libertine,12pt]

2. Is there an eqivalent code to the following XeLaTeX code.
  \defaultfontfeatures{Scale=MatchLowercase}

3. How to use Cambria Math font to typeset math.
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Capital number when onum=yes?

2009-05-11 Thread Thomas A. Schmitz


On May 11, 2009, at 4:05 AM, Corsair wrote:


Ok.  Sorry for the vagueness.  I use Adobe Caslon Pro as my body font,
with XeTeX.  And I enable the `onum' feature so that all numbers in my
document appear as old-style numbers, which is good.  But I also
prefer some of them use the normal capital number glyphs, for example,
in page numbers.  How can I do that?


Not sure if this is the canonical way, but here's how I do it: If I  
have onum=yes enabled for my normal Roman font, I disable it for my  
smallcaps variant and set page numbers etc as \sc. Or am I  
misunderstanding something?


Thomas
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Opentype features

2009-05-11 Thread Wolfgang Schuster


Am 10.05.2009 um 14:52 schrieb Arun Dev:


Hello,

I am using Context Mark II + XeTeX. I would like to know the  
following things.


1. How to use opentype font features. I tried the following code but  
it is not working.


  \definefontfeature[myfontfea][+onum]
  \definetypeface[Libertine][rm][Xserif][Linux Libertine O][default] 
[features=myfontfea]

   \setupbodyfont[Libertine,12pt]


\definefontfeature[default][default][onum=yes]
\definetypeface[Libertine][rm][Xserif][Linux Libertine O][default]
\setupbodyfont[Libertine]


2. Is there an eqivalent code to the following XeLaTeX code.

  \defaultfontfeatures{Scale=MatchLowercase}


Only when you port the fontspec package to ConTeXt.


3. How to use Cambria Math font to typeset math.


MkII (XeTeX): Write the code to use OpenType math fonts and send it to  
Hans.


MkIV (LuaTeX): \definetypeface[Libertine][mm][math][cambria][default]

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] texts in \component files are not present

2009-05-11 Thread Henning Hraban Ramm

Am 2009-05-11 um 02:32 schrieb Wei-Wei Guo:

1. Don't use project files as top level file for your document, use  
product and
  components (which can be nested) files only, projects are meta  
file when you

  have many document with the same topic (e.g. a magazine etc.)


A magazine is really one of my purposes. :)


Then the magazine is your project, one issue is a product, one  
article is a component.


For something similar I use a directory for the magazine and  
subdirectories per product; i.e. project and environment file reside  
in the main directory, product and component files in subdirs.


ConTeXt looks for files always in parent directories, so the  
environment is always found, but the same component file names can  
occurr in several product dirs.



Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Capital number when onum=yes?

2009-05-11 Thread Wolfgang Schuster


Am 10.05.2009 um 18:25 schrieb Corsair:


Hi all,

I have `onum=yes' in my font features and it works great.  But how can
I type a capital number in this case?  I want to use capital numbers
in pagenumbers.


Something like (untested):

\definefontfeature[header][default][lnum=yes]

\definefont[HeaderStyle][Serif][features=header]

\setupheader[style=HeaderStyle]

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Capital number when onum=yes?

2009-05-11 Thread Henning Hraban Ramm

Am 2009-05-11 um 08:13 schrieb Thomas A. Schmitz:

Ok.  Sorry for the vagueness.  I use Adobe Caslon Pro as my body  
font,
with XeTeX.  And I enable the `onum' feature so that all numbers in  
my

document appear as old-style numbers, which is good.  But I also
prefer some of them use the normal capital number glyphs, for  
example,

in page numbers.  How can I do that?


Not sure if this is the canonical way, but here's how I do it: If I  
have onum=yes enabled for my normal Roman font, I disable it for my  
smallcaps variant and set page numbers etc as \sc. Or am I  
misunderstanding something?


Similarly you could define an additional variant, like noos.
http://wiki.contextgarden.net/Font_Variants

(Didn't check if font variants work ok in MkIV; I used them only for  
light and medium weights before.)


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Capital number when onum=yes?

2009-05-11 Thread Corsair
On Mon, May 11, 2009 at 08:13:59AM +0200, Thomas A. Schmitz wrote:
 Not sure if this is the canonical way, but here's how I do it: If I  
 have onum=yes enabled for my normal Roman font, I disable it for my  
 smallcaps variant and set page numbers etc as \sc. Or am I  
 misunderstanding something?

Thanks you for the reply!  But it doesn't work for me, because small
cap numbers in Adobe Caslon Pro are themselves old-style...

-- 
There is no emotion; there is peace.
There is no ignorance; there is knowledge.
There is no passion; there is serenity.
There is no death; there is the Force.


pgpUFSMTu0X9O.pgp
Description: PGP signature
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Capital number when onum=yes?

2009-05-11 Thread Thomas A. Schmitz


On May 11, 2009, at 8:39 AM, Corsair wrote:


Thanks you for the reply!  But it doesn't work for me, because small
cap numbers in Adobe Caslon Pro are themselves old-style...


I don't use XeTeX, but this works in mkiv:

\definefontfeature
  [mydefault]
   
[mode 
= 
node 
,script=latn,language=dflt,liga=yes,onum=yes,kern=yes,tlig=yes,trep=yes]


\definefontfeature
  [mycaps]
   
[mode 
=node,script=latn,language=dflt,liga=yes,lnum=yes,kern=yes,smcp=yes]


\starttypescript [serif] [caslon]
  \definefontsynonym [Caslon-Roman]   
[name:acaslonproregular]  [features=mydefault]
  \definefontsynonym [Caslon-Bold]   [name:acaslonprobold]   
[features=mydefault]
  \definefontsynonym [Caslon-Italic] [name:acaslonproitalic]   
[features=mydefault]
  \definefontsynonym [Caslon-Bold-Italic] 
[name:acaslonprobolditalic] [features=mydefault]
  \definefontsynonym [Caslon-SmallCaps]   
[name:acaslonproregular]  [features=mycaps]

 \stoptypescript

\starttypescript [serif] [caslon]
  \definefontsynonym [Serif]   [Caslon-Roman]  
[features=mydefault]
  \definefontsynonym [SerifItalic] [Caslon-Italic]  
[features=mydefault]
  \definefontsynonym [SerifBold]   [Caslon-Bold]  
[features=mydefault]
  \definefontsynonym [SerifBoldItalic] [Caslon-Bold-Italic]  
[features=mydefault]
  \definefontsynonym [SerifCaps]   [Caslon-SmallCaps]  
[features=mycaps]

\stoptypescript

\starttypescript [Caslon]
  \definetypeface [Caslon] [rm] [serif] [caslon] [default]
\stoptypescript

\usetypescript[Caslon]
\setupbodyfont[Caslon,12pt]

\starttext

These are oldstyle: 1 2 3 4 5 6 7 8 9 0

{\sc These are not: 1 2 3 4 5 6 7 8 9 0}

\stoptext

HTH

Thomas
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Capital number when onum=yes?

2009-05-11 Thread Corsair
On Mon, May 11, 2009 at 08:35:12AM +0200, Wolfgang Schuster wrote:
 
 Am 10.05.2009 um 18:25 schrieb Corsair:
 
  Hi all,
 
  I have `onum=yes' in my font features and it works great.  But how can
  I type a capital number in this case?  I want to use capital numbers
  in pagenumbers.
 
 Something like (untested):
 
 \definefontfeature[header][default][lnum=yes]
 
 \definefont[HeaderStyle][Serif][features=header]
 
 \setupheader[style=HeaderStyle]

This works great!  Thanks!

-- 
There is no emotion; there is peace.
There is no ignorance; there is knowledge.
There is no passion; there is serenity.
There is no death; there is the Force.


pgptTK0UoFvWr.pgp
Description: PGP signature
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Capital number when onum=yes?

2009-05-11 Thread Corsair
On Mon, May 11, 2009 at 08:37:46AM +0200, Henning Hraban Ramm wrote:
 Am 2009-05-11 um 08:13 schrieb Thomas A. Schmitz:
 
  Ok.  Sorry for the vagueness.  I use Adobe Caslon Pro as my body  
  font,
  with XeTeX.  And I enable the `onum' feature so that all numbers in  
  my
  document appear as old-style numbers, which is good.  But I also
  prefer some of them use the normal capital number glyphs, for  
  example,
  in page numbers.  How can I do that?
 
  Not sure if this is the canonical way, but here's how I do it: If I  
  have onum=yes enabled for my normal Roman font, I disable it for my  
  smallcaps variant and set page numbers etc as \sc. Or am I  
  misunderstanding something?
 
 Similarly you could define an additional variant, like noos.
 http://wiki.contextgarden.net/Font_Variants
 
 (Didn't check if font variants work ok in MkIV; I used them only for  
 light and medium weights before.)
 
Wow, I didn't know about this one.  I'll see what I can do with it.

Thank you!

-- 
There is no emotion; there is peace.
There is no ignorance; there is knowledge.
There is no passion; there is serenity.
There is no death; there is the Force.


pgpXYyrAnk6Da.pgp
Description: PGP signature
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Capital number when onum=yes?

2009-05-11 Thread Hans Hagen

Corsair wrote:

On Sun, May 10, 2009 at 09:44:58PM +0200, Hans Hagen wrote:

Corsair wrote:

Hi all,

I have `onum=yes' in my font features and it works great.  But how can
I type a capital number in this case?  I want to use capital numbers
in pagenumbers.

can you be a bit more explicit?

to what extend smallcaps are implemented is font dependent


Ok.  Sorry for the vagueness.  I use Adobe Caslon Pro as my body font,
with XeTeX.  And I enable the `onum' feature so that all numbers in my
document appear as old-style numbers, which is good.  But I also
prefer some of them use the normal capital number glyphs, for example,
in page numbers.  How can I do that?


you can try {\subff{oldstyle} 123} (this is kind of experimental and in 
testing by idris)


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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Capital number when onum=yes?

2009-05-11 Thread Corsair
On Mon, May 11, 2009 at 08:37:46AM +0200, Henning Hraban Ramm wrote:
 Similarly you could define an additional variant, like noos.
 http://wiki.contextgarden.net/Font_Variants
 
 (Didn't check if font variants work ok in MkIV; I used them only for  
 light and medium weights before.)

I tried this approach and failed.  I compiled the following code with
texexec --xtx, and the resulting PDF contained nothing except an
old-style page number...  Any idea?

# --- ConTeXt code ---
\definefontfeature [old] [onum=yes]
\definefontfeature [noos] [onum=no]
\definefontfeature [smcap] [smcp=yes]

\starttypescript [serif] [caslon]
   \definefontsynonym [Caslon-Roman][file:ACaslonPro-Regular]  
[features=old]
   \definefontsynonym [Caslon-Roman-NoOs]  [file:ACaslonPro-Regular]  
[features=noos]
   \definefontsynonym [Caslon-Bold]   [file:ACaslonPro-Bold]   
[features=old]
   \definefontsynonym [Caslon-Italic] [file:ACaslonPro-Italic]  
[features=old]
   \definefontsynonym [Caslon-Bold-Italic][file:ACaslonPro-BoldItalic] 
[features=old]
   \definefontsynonym [Caslon-SmallCaps]  [file:ACaslonPro-Regular]  
[features=smcap]
  \stoptypescript

\starttypescript [serif] [caslon] [name]
   \definefontsynonym [Serif]   [Caslon-Roman]
   \definefontsynonym [SerifItalic] [Caslon-Italic]  
   \definefontsynonym [SerifBold]   [Caslon-Bold]
   \definefontsynonym [SerifBoldItalic] [Caslon-Bold-Italic]  
   \definefontsynonym [SerifCaps]   [Caslon-SmallCaps]

   \definefontvariant [Serif][noos][NoOs]

   \definefontsynonym [SerifRegular]   [Serif]
   \definefontsynonym [SerifRegularNoOs]   [Caslon-Roman-NoOs]  
   \definefontsynonym [SerifItalicNoOs] [Caslon-Italic]  
   \definefontsynonym [SerifBoldNoOs]   [Caslon-Bold]
   \definefontsynonym [SerifBoldItalicNoOs] [Caslon-Bold-Italic]  
\stoptypescript

\usetypescript[caslon]

\starttypescript [prof]
  \definetypeface [prof] [rm] [serif] [caslon] [default]
\stoptypescript

\usetypescript[prof]
\setupbodyfont[prof, 12pt]

\starttext
{\Var[noos] 1234567890}
\stoptext

# --- End of ConTeXt code---

%%% Local Variables: 
%%% mode: context
%%% TeX-PDF-mode: t
%%% End: 


-- 
There is no emotion; there is peace.
There is no ignorance; there is knowledge.
There is no passion; there is serenity.
There is no death; there is the Force.


pgpIhVDZK9yUP.pgp
Description: PGP signature
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Opentype features

2009-05-11 Thread Hans Hagen

Wolfgang Schuster wrote:


2. Is there an eqivalent code to the following XeLaTeX code.

  \defaultfontfeatures{Scale=MatchLowercase}


Only when you port the fontspec package to ConTeXt.


i can not even imagine what it is supposed to mean -)


3. How to use Cambria Math font to typeset math.


MkII (XeTeX): Write the code to use OpenType math fonts and send it to 
Hans.


open type math in mkii is unlikely to happen soon (ok, at some point i 
can just generate the symbol etc initializations from the mkiv lua 
tables but it has a very low priority)


in mkiv there is some trickery that cannot be ported and i'm not going 
to cripple new (otf math related code) by fuzzy sharing with mkii



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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Capital number when onum=yes?

2009-05-11 Thread Corsair
On Mon, May 11, 2009 at 09:28:27AM +0200, Hans Hagen wrote:
 you can try {\subff{oldstyle} 123} (this is kind of experimental and in 
 testing by idris)

Oops...  Doesn't work.  It just produces the word oldstyle followed
by 123.  Maybe my ConTeXt is too old?

ConTeXt  ver: 2008.05.21 15:21 MKII  fmt: 2008.10.29

-- 
There is no emotion; there is peace.
There is no ignorance; there is knowledge.
There is no passion; there is serenity.
There is no death; there is the Force.


pgp5OYVPzp7ug.pgp
Description: PGP signature
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Opentype features

2009-05-11 Thread Wolfgang Schuster


Am 11.05.2009 um 09:37 schrieb Hans Hagen:


Wolfgang Schuster wrote:


2. Is there an eqivalent code to the following XeLaTeX code.

 \defaultfontfeatures{Scale=MatchLowercase}


Only when you port the fontspec package to ConTeXt.


i can not even imagine what it is supposed to mean -)


Write a module which has the same functionality as the fontspec  
package for XeLaTeX.


http://www.ctan.org/get/macros/xetex/latex/fontspec/fontspec.pdf

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Capital number when onum=yes?

2009-05-11 Thread Hans Hagen

Corsair wrote:

On Mon, May 11, 2009 at 09:28:27AM +0200, Hans Hagen wrote:
you can try {\subff{oldstyle} 123} (this is kind of experimental and in 
testing by idris)


Oops...  Doesn't work.  It just produces the word oldstyle followed
by 123.  Maybe my ConTeXt is too old?

ConTeXt  ver: 2008.05.21 15:21 MKII  fmt: 2008.10.29


indeed ... very ancient esp with respect to otf (also, \setff only work 
in mkiv)


-
  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Capital number when onum=yes?

2009-05-11 Thread Wolfgang Schuster


Am 11.05.2009 um 09:40 schrieb Corsair:


On Mon, May 11, 2009 at 09:28:27AM +0200, Hans Hagen wrote:
you can try {\subff{oldstyle} 123} (this is kind of experimental  
and in

testing by idris)


Oops...  Doesn't work.  It just produces the word oldstyle followed
by 123.  Maybe my ConTeXt is too old?


No, it works only in MkIV.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] loading bib module breaks colors in tikz figures (mkiv)

2009-05-11 Thread Taco Hoekwater


Taco Hoekwater wrote:
 
 I can't upload right now, but you can verify that that fixes
 it by adding \protect right after the \usemodule[bib]

New bib module here:

 http://modules.contextgarden.net/module/detail?name=bib

Best wishes,
Taco

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] beta

2009-05-11 Thread Hans Hagen

Hi,

i uploaded a beta with some fixes

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta

2009-05-11 Thread Henning Hraban Ramm

Am 2009-05-11 um 11:14 schrieb Hans Hagen:


i uploaded a beta with some fixes


Minimals have version 2009.05.11 10:51, is that the one?

The footnote bugs still remain in that (no marks, no bypage).


Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] beta (2009-05-11)

2009-05-11 Thread Peter Rolf

Hi,

there are still some problems with footnotes and overprinting. I have 
reactivated the old (sorry, non minimal) example for that. But for three 
problems it is pretty short :)


1. the footnote uses '1' instead of the chosen '*' (set 1)
2. the footnote marker is not bound to the footnote text (only the text 
is moved right)
3. the problem with the undefined \PDFobjectreferenceB occurs again, if 
overprinting is used (see different versions of \NoteNumber and \MyFootnote)


One additional note to 3.)
I have to enable overprinting for both the marker and the text to get 
the desired result (all should be overprinted). Is this intended?



Peter
%\def\NoteNumber#1{\hbox to 15pt{\hfill\black 
\dostartoverprint#1\dostopoverprint}}
\def\NoteNumber#1{\hbox to 15pt{\hfill\black #1}}
\setupfootnotes
  [bodyfont=6pt,
   textcolor=black,
   before=,after=,
   rule=off,
   conversion={set 1},
%   distance=-2em,
   margindistance=-2em,
   numbercommand=\NoteNumber]

%\def\MyFootnote#1{\footnote{\hskip3em \dostartoverprint#1\dostopoverprint}}
\def\MyFootnote#1{\footnote{\hskip3em #1}}


\starttext

 \startlocalfootnotes
 \vbox\bgroup\hsize=78mm\dontcomplain
 \startitemize[4]
 \item die Ausgabe erfolgt als PDF/X-4p\MyFootnote{ISO 15930-7:2008}
 \stopitemize
 \egroup
 \stoplocalfootnotes

 \moveright70mm\hbox{\placelocalfootnotes}


\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta (2009-05-11)

2009-05-11 Thread Hans Hagen

Peter Rolf wrote:

Hi,

there are still some problems with footnotes and overprinting. I have 
reactivated the old (sorry, non minimal) example for that. But for three 
problems it is pretty short :)


1. the footnote uses '1' instead of the chosen '*' (set 1)
2. the footnote marker is not bound to the footnote text (only the text 
is moved right)
3. the problem with the undefined \PDFobjectreferenceB occurs again, if 
overprinting is used (see different versions of \NoteNumber and 
\MyFootnote)


test file needed


One additional note to 3.)
I have to enable overprinting for both the marker and the text to get 
the desired result (all should be overprinted). Is this intended?


dunno, as i never use overprint myself

-
  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta (2009-05-11)

2009-05-11 Thread Peter Rolf

Hans Hagen schrieb:

Peter Rolf wrote:

Hi,

there are still some problems with footnotes and overprinting. I have 
reactivated the old (sorry, non minimal) example for that. But for 
three problems it is pretty short :)


1. the footnote uses '1' instead of the chosen '*' (set 1)
2. the footnote marker is not bound to the footnote text (only the 
text is moved right)
3. the problem with the undefined \PDFobjectreferenceB occurs again, 
if overprinting is used (see different versions of \NoteNumber and 
\MyFootnote)


test file needed


sure. the test is attached to the prior mail (footnote.tex).


One additional note to 3.)
I have to enable overprinting for both the marker and the text to get 
the desired result (all should be overprinted). Is this intended?


dunno, as i never use overprint myself


-
  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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta

2009-05-11 Thread Wei-Wei Guo

Hans Hagen 写道:



i uploaded a beta with some fixes



The following bug is still there.


! Argument of \dotripletestemptyx has an extra }.
inserted text
\par
to be read again
   }
\doif #1#2-\edef \!!stringa {#1}
 \edef \!!stringb {#2}\ifx \!!stringa \!!str...
\dostructurecountercomponent ...\c!title }\v!none
  {\setfalse \hasstructureco...
\docompletefloat ...c!title ={#4},\c!bookmark =][]
  \globallet \currentfloatnu...
argument ...\footnote {Test footnote.}}\nextbox
  \else \docompletefloat {ta...
...
l.12 {\placelocalfootnotes}


Example:


\starttext

\startlocalfootnotes
\placetable{Test table\footnote{Test footnote.}}
\placelegend{
\starttable[|l|l|]
  \HL
  \NC East \NC North \NC \FR
  \NC West \NC South \NC  \LR
  \HL
\stoptable}
{\placelocalfootnotes}
\stoplocalfootnotes

\stoptext


Best wishes,
Wei-Wei
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta (2009-05-11)

2009-05-11 Thread Henning Hraban Ramm

Am 2009-05-11 um 13:05 schrieb Peter Rolf:

there are still some problems with footnotes and overprinting. I  
have reactivated the old (sorry, non minimal) example for that. But  
for three problems it is pretty short :)


1. the footnote uses '1' instead of the chosen '*' (set 1)


That's only a setup change:

\setupnote[footnote]numberconversion=set 2]

(* is set 2, 1 is set 1)


2. the footnote marker is not bound to the footnote text (only the  
text is moved right)


Oh, you get footnote markers at all? I don't.



Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Chapter number in right margin?

2009-05-11 Thread Corsair
Hi all,

I'm typesetting a double-sided document.  And I want the chapter
numbers to be in the right margin, while the chapter titles remain in
the main text area.  So I write

\def\MyChapter#1#2
{\inright{#1} #2}

\setuphead
  [chapter]
  [command=\MyChapter]

But it renders such that all the chapter numbers disappear while
chapter titles seem normal.  Any idea?

Corsair Sun

-- 
There is no emotion; there is peace.
There is no ignorance; there is knowledge.
There is no passion; there is serenity.
There is no death; there is the Force.


pgp9XezukTQbR.pgp
Description: PGP signature
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Font switching question

2009-05-11 Thread Yue Wang
Hi, Hans:

I am working on Chinese support on XeTeX/ConTeXt and I almost finished
that. I will later upload a module called t-zhspacing to the garden
(or CTAN?). But there is one last problem. Let me explain like this.

Suppost I have two typescripts (typeA and typeB) and both with
complete typeface defined (rm/ss/tt, bf/it/bfit/smcp)

Now I want to do something like this:

\usetypescript[typeA]
\usetypescript[typeB]
\setupbodyfont[typeA]
This should be typeA/rm/normal \it and this should be typeA/rm/it \ss
and this should be typeA/ss/it %here everything is ok in context
\typeB this should be typeB/ss/it %(but context gives me
typeB/rm/normal. How can I automatically get what I want?)

Yue Wang
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta (2009-05-11)

2009-05-11 Thread Otared Kavian

Hi Hans,

Indeed there is something going wrong with footnotes, and maybe the  
following remark may help fix the issue.
It works (for me…) in the following example (note the \sction command  
commented out):


%%% begin basic-test.tex
\starttext

This file has been typeset
on \currentdate{}
at \currenttime,
with
\doifmodeelse{mkiv}
{mkiv,
LuaTeX version \the\luatexversion,
LuaTeX revision \luatexrevision,
(LuaTeX date stamp \luatexdatestamp),
using the command: \par
\type{context basic-test.tex}\par}
{mkii,
using the command: \par
\type{texexec basic-test.tex}\par}
ConTeXt version \contextversion.

%\section{Testing a section} -- Here is the issue

\startitemize

\item test\footnote{This is a silly remark…}

\item test\footnote{This is a silly remark, inside an item…}

\stopitemize

test\footnote{This is another silly remark but outside items…}
\stoptext
%%%

On my machine running
mkiv, LuaTeX version 40,
LuaTeX revision 1, (LuaTeX date stamp 2009050813),
ConTeXt version 2009.05.11 12:48.
the markers are correctly shown as well as the numbered notes.

However if I uncomment the \section command the problem appears.

Best regards: OK

On 11 mai 09, at 14:00, Henning Hraban Ramm wrote:


Am 2009-05-11 um 13:05 schrieb Peter Rolf:

there are still some problems with footnotes and overprinting. I  
have reactivated the old (sorry, non minimal) example for that. But  
for three problems it is pretty short :)


1. the footnote uses '1' instead of the chosen '*' (set 1)


That's only a setup change:

\setupnote[footnote]numberconversion=set 2]

(* is set 2, 1 is set 1)


2. the footnote marker is not bound to the footnote text (only the  
text is moved right)


Oh, you get footnote markers at all? I don't.



Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


%%
Otared Kavian
Département de Mathématiques
Université de Versailles Saint-Quentin
Bâtiment Fermat
45 aveue des Etats Unis
78035 Versailles cedex

Téléphone: +33 1 39 25 46 42
Secrétariat: +33 1 39 25 46 44
Secrétariat: +33 1 39 25 46 46

e-mail: otared.kav...@math.uvsq.fr



___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] New module - mkiv font loading

2009-05-11 Thread Wolfgang Schuster

Hi all,

I wrote a new module to load fonts without the need to write typescripts
for them - http://bitbucket.org/wolfs/simplefonts/

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] New module - mkiv font loading

2009-05-11 Thread Yue Wang
Hi Wolfgang:

nice script.

Can the module meet my needs discussed in
http://www.ntg.nl/pipermail/ntg-context/2009/040831.html ?
or is it possible to extend the support to xetex?

Yue Wang

On Mon, May 11, 2009 at 8:23 PM, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:
 Hi all,

 I wrote a new module to load fonts without the need to write typescripts
 for them - http://bitbucket.org/wolfs/simplefonts/

 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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chapter number in right margin?

2009-05-11 Thread Yanrui Li
On Mon, May 11, 2009 at 8:06 PM, Corsair chris.cors...@gmail.com wrote:
 Hi all,

 I'm typesetting a double-sided document.  And I want the chapter
 numbers to be in the right margin, while the chapter titles remain in
 the main text area.  So I write

    \def\MyChapter#1#2
    {\inright{#1} #2}

    \setuphead
      [chapter]
      [command=\MyChapter]

 But it renders such that all the chapter numbers disappear while
 chapter titles seem normal.  Any idea?


I extract the following fragment from my document and I wish it can help you :)

\def\PlaceChapter#1#2{%
  \vbox{%
\inoutermargin{%
  \hbox to .6\rightmarginwidth{%
\hfil\switchtobodyfont[32pt,myfont,rm]{#1}\hss}%
}\tfc #2%
  }%
}
\setuphead
  [chapter]
  [command=\PlaceChapter,header=empty,footer=empty]

\starttext

\chapter{Test}
This is only a test!

\stoptext

-- 
Best wishes,
Li Yanrui
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta (2009-05-11)

2009-05-11 Thread Hans Hagen

Peter Rolf wrote:

Hi,

there are still some problems with footnotes and overprinting. I have 
reactivated the old (sorry, non minimal) example for that. But for three 
problems it is pretty short :)


1. the footnote uses '1' instead of the chosen '*' (set 1)


in mkiv conversion has become numberconversion

2. the footnote marker is not bound to the footnote text (only the text 
is moved right)
3. the problem with the undefined \PDFobjectreferenceB occurs again, if 
overprinting is used (see different versions of \NoteNumber and 
\MyFootnote)


One additional note to 3.)
I have to enable overprinting for both the marker and the text to get 
the desired result (all should be overprinted). Is this intended?



Peter




___
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  : https://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 | 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chapter number in right margin?

2009-05-11 Thread Wolfgang Schuster


Am 11.05.2009 um 14:59 schrieb Yanrui Li:

On Mon, May 11, 2009 at 8:06 PM, Corsair chris.cors...@gmail.com  
wrote:

Hi all,

I'm typesetting a double-sided document.  And I want the chapter
numbers to be in the right margin, while the chapter titles remain in
the main text area.  So I write

   \def\MyChapter#1#2
   {\inright{#1} #2}

   \setuphead
 [chapter]
 [command=\MyChapter]

But it renders such that all the chapter numbers disappear while
chapter titles seem normal.  Any idea?



I extract the following fragment from my document and I wish it can  
help you :)


\def\PlaceChapter#1#2{%
 \vbox{%
   \inoutermargin{%
 \hbox to .6\rightmarginwidth{%
   \hfil\switchtobodyfont[32pt,myfont,rm]{#1}\hss}%
   }\tfc #2%
 }%
}
\setuphead
 [chapter]
 [command=\PlaceChapter,header=empty,footer=empty]


As alternative:

\define[2]\PlaceChapter
  {\hbox{\vtop{#2}\rlap{\hskip\rightmargindistance#1}}}

\definefont[ChapterNumber][Serif at 32pt]

\setuphead
  [chapter]
  [command=\PlaceChapter,numberstyle=ChapterNumber,textstyle= 
\tfc,header=empty,footer=empty]


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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] New module - mkiv font loading

2009-05-11 Thread Mohamed Bana

great!  thanks Wolfgang.

is this working with the latest minimals?  Hopefully I'll get to try it 
later.


Wolfgang Schuster wrote:

Hi all,

I wrote a new module to load fonts without the need to write typescripts
for them - http://bitbucket.org/wolfs/simplefonts/

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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Chapter number in right margin?

2009-05-11 Thread Yanrui Li
On Mon, May 11, 2009 at 9:09 PM, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:

 Am 11.05.2009 um 14:59 schrieb Yanrui Li:

 On Mon, May 11, 2009 at 8:06 PM, Corsair chris.cors...@gmail.com wrote:

 Hi all,

 I'm typesetting a double-sided document.  And I want the chapter
 numbers to be in the right margin, while the chapter titles remain in
 the main text area.  So I write

   \def\MyChapter#1#2
   {\inright{#1} #2}

   \setuphead
     [chapter]
     [command=\MyChapter]

 But it renders such that all the chapter numbers disappear while
 chapter titles seem normal.  Any idea?


 I extract the following fragment from my document and I wish it can help
 you :)

 \def\PlaceChapter#1#2{%
  \vbox{%
   \inoutermargin{%
     \hbox to .6\rightmarginwidth{%
       \hfil\switchtobodyfont[32pt,myfont,rm]{#1}\hss}%
   }\tfc #2%
  }%
 }
 \setuphead
  [chapter]
  [command=\PlaceChapter,header=empty,footer=empty]

 As alternative:

 \define[2]\PlaceChapter
  {\hbox{\vtop{#2}\rlap{\hskip\rightmargindistance#1}}}

 \definefont[ChapterNumber][Serif at 32pt]

 \setuphead
  [chapter]
  [command=\PlaceChapter,numberstyle=ChapterNumber,textstyle=\tfc,header=empty,footer=empty]


Your code looks like more ConTeXt than mine and I'll benefit a lot from it.

-- 
Best wishes,
Li Yanrui
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] New module - mkiv font loading

2009-05-11 Thread Yanrui Li
On Mon, May 11, 2009 at 9:18 PM, Mohamed Bana
mbana.li...@googlemail.com wrote:
 great!  thanks Wolfgang.

 is this working with the latest minimals?  Hopefully I'll get to try it
 later.


Yes, I used it with latest beta for a whole afternoon.

-- 
Best wishes,
Li Yanrui
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] mframed, setupinteractions

2009-05-11 Thread Hans Hagen

Alan BRASLAU wrote:

Thanks (\setupinteractions[option=max], \mframed[background=color])!

Please note that the vertical spacing seems to be off (raised) for \mframed...
minimal example:

\starttext
\startformula
 A = B + \mframed[frame=off,background=color,backgroundcolor=gray]{C}
\stopformula
\stoptext


the question is ... what are reasonable defaults ... maybe set offset to 
0 or use \inframed in display as well ... needs some testing and discussion


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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta (11.05.2009): hex colors in mkii

2009-05-11 Thread Hans Hagen

Peter Rolf wrote:

Hi,

hex colors don't work anymore in mkii (no problems in mkiv). All I get 
is black (reminds me of a song by the Rolling Stones)...


 I see a red door and I want it painted black
 No colors anymore I want them to turn black
  ...

Minimal example:


\setupcolors[state=start]
\setupcolor[hex] % load hex color module

\definecolor[hextest][h=00FF00]

\starttext
\startMPcode
   fill unitsquare xyscaled(5cm,5cm) withcolor \MPcolor{hextest};
\stopMPcode
\stoptext


hm so it's actually used ... make a file colo-hex.tex:

% this is just a stub

\loadmarkfile{colo-hex}


-
  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] New module - mkiv font loading

2009-05-11 Thread Hans Hagen

Wolfgang Schuster wrote:


possible yes but it's a lot of work because the complete fallback mechanism
needs to be written for XeTeX which is available for MkIV since a while.


this is unlikely to happen (unless we add lots of optional code to mkii 
to deal with xetex which then probably results in a lot of other code 
hooked into other mechanisms as well) as mkii is kind of frozen


if we have to port all sophisticated (upcoming) mkiv features back to 
mkiv we might wonder why we started with mkiv in the first place; the 
whole idea is to have less (complex) code


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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] New module - mkiv font loading

2009-05-11 Thread Yue Wang
On Mon, May 11, 2009 at 9:48 PM, Hans Hagen pra...@wxs.nl wrote:
 Wolfgang Schuster wrote:

 possible yes but it's a lot of work because the complete fallback
 mechanism
 needs to be written for XeTeX which is available for MkIV since a while.

 this is unlikely to happen (unless we add lots of optional code to mkii to
 deal with xetex which then probably results in a lot of other code hooked
 into other mechanisms as well) as mkii is kind of frozen

 if we have to port all sophisticated (upcoming) mkiv features back to mkiv
 we might wonder why we started with mkiv in the first place; the whole idea
 is to have less (complex) code


not like that complicated (we do not need font fallback).

it is only something about:

save the current font style (like \ss, \it ,10pt) to a macro . then
apply the macro to a group.
for example

aa { \anotherfont bb}
we should save the style for aa when \anotherfont is called, and apply
that style to bb.

that should be enough. but we don't know how to get the font style.



 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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta (11.05.2009): hex colors in mkii

2009-05-11 Thread Peter Rolf

Hans Hagen schrieb:

Peter Rolf wrote:

Hi,

hex colors don't work anymore in mkii (no problems in mkiv). All I 
get is black (reminds me of a song by the Rolling Stones)...


 I see a red door and I want it painted black
 No colors anymore I want them to turn black
  ...

Minimal example:


\setupcolors[state=start]
\setupcolor[hex] % load hex color module

\definecolor[hextest][h=00FF00]

\starttext
\startMPcode
   fill unitsquare xyscaled(5cm,5cm) withcolor \MPcolor{hextest};
\stopMPcode
\stoptext


hm so it's actually used ... make a file colo-hex.tex:

yep. not useful if you define the colors by hand, but perfect (very 
small size) for automated rgb color palette conversions (xml colors - 
tex colors).


thx.


% this is just a stub

\loadmarkfile{colo-hex}


-
  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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] mframed, setupinteractions

2009-05-11 Thread Alan BRASLAU
On Monday 11 May 2009 15:40:04 Hans Hagen wrote:
 Alan BRASLAU wrote:
  Thanks (\setupinteractions[option=max], \mframed[background=color])!
 
  Please note that the vertical spacing seems to be off (raised) for
  \mframed... minimal example:
 
  \starttext
  \startformula
   A = B + \mframed[frame=off,background=color,backgroundcolor=gray]{C}
  \stopformula
  \stoptext

 the question is ... what are reasonable defaults ... maybe set offset to
 0 or use \inframed in display as well ... needs some testing and discussion

 Hans

discussion:

I understand the difference between \framed{} and \inframed{}
\mframed{} is another flavor. Try the following test:

\starttext
$A = B + C$
$A = B + \framed{C}$
$A = B + \mframed{C}$
$A = B + \inframed{C}$
$A = B + \inframed{$C$}$
\stoptext

Maybe the last case could equivalently be written:
$A = B + \imframed{C}$
or
$A = B + \minframed{C}$ (see core-rul.mki[iv])

Of course, one can also play around between \startformula \stopformula 
pairs...

Why all of these different macros? Why not only one \framed{} with options 
inline=yes and math=yes, for example? (Or are there related programming 
complications?).

Alan

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] New module - mkiv font loading

2009-05-11 Thread Hans Hagen

Yue Wang wrote:

On Mon, May 11, 2009 at 9:48 PM, Hans Hagen pra...@wxs.nl wrote:

Wolfgang Schuster wrote:


possible yes but it's a lot of work because the complete fallback
mechanism
needs to be written for XeTeX which is available for MkIV since a while.

this is unlikely to happen (unless we add lots of optional code to mkii to
deal with xetex which then probably results in a lot of other code hooked
into other mechanisms as well) as mkii is kind of frozen

if we have to port all sophisticated (upcoming) mkiv features back to mkiv
we might wonder why we started with mkiv in the first place; the whole idea
is to have less (complex) code



not like that complicated (we do not need font fallback).

it is only something about:

save the current font style (like \ss, \it ,10pt) to a macro . then
apply the macro to a group.
for example

aa { \anotherfont bb}
we should save the style for aa when \anotherfont is called, and apply
that style to bb.

that should be enough. but we don't know how to get the font style.


see \pushcurrentfont

-
  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Font switching question

2009-05-11 Thread Yue Wang
Hi Hans:

let me give a better explanation.

we define a typescript foobar. so we can call  \foobar to load the
foobar typeface.
then we should define a macro like this:
\def\switchtofoobar{\savecurrentstyle\foobar\getcurrentstyle}
and call it like that:

text 1 {\swichtofoobar text2} text 3
when \savecurrentstyle is called, it define a macro named
\getcurrentstyle in order to save the style of text 1 (like \ss\it,
10pt) into that. that's all we want.

So it's not complicated to do so as font fallback.
(we already done that in latex, but don't know how to do that in
ConTeXt due to lack of knowledge of font mechanism)

Yue Wang

On Mon, May 11, 2009 at 8:08 PM, Yue Wang yuleo...@gmail.com wrote:
 Hi, Hans:

 I am working on Chinese support on XeTeX/ConTeXt and I almost finished
 that. I will later upload a module called t-zhspacing to the garden
 (or CTAN?). But there is one last problem. Let me explain like this.

 Suppost I have two typescripts (typeA and typeB) and both with
 complete typeface defined (rm/ss/tt, bf/it/bfit/smcp)

 Now I want to do something like this:

 \usetypescript[typeA]
 \usetypescript[typeB]
 \setupbodyfont[typeA]
 This should be typeA/rm/normal \it and this should be typeA/rm/it \ss
 and this should be typeA/ss/it %here everything is ok in context
 \typeB this should be typeB/ss/it %(but context gives me
 typeB/rm/normal. How can I automatically get what I want?)

 Yue Wang

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] New module - mkiv font loading

2009-05-11 Thread Yue Wang
On Mon, May 11, 2009 at 10:33 PM, Hans Hagen pra...@wxs.nl wrote:
 Yue Wang wrote:

 On Mon, May 11, 2009 at 9:48 PM, Hans Hagen pra...@wxs.nl wrote:

 Wolfgang Schuster wrote:

 possible yes but it's a lot of work because the complete fallback
 mechanism
 needs to be written for XeTeX which is available for MkIV since a while.

 this is unlikely to happen (unless we add lots of optional code to mkii
 to
 deal with xetex which then probably results in a lot of other code hooked
 into other mechanisms as well) as mkii is kind of frozen

 if we have to port all sophisticated (upcoming) mkiv features back to
 mkiv
 we might wonder why we started with mkiv in the first place; the whole
 idea
 is to have less (complex) code


 not like that complicated (we do not need font fallback).

 it is only something about:

 save the current font style (like \ss, \it ,10pt) to a macro . then
 apply the macro to a group.
 for example

 aa { \anotherfont bb}
 we should save the style for aa when \anotherfont is called, and apply
 that style to bb.

 that should be enough. but we don't know how to get the font style.

 see \pushcurrentfont

Thank you, I will look into that.

Many thanks:)


 -
                                          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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] texts in \component files are not present

2009-05-11 Thread Wei-Wei Guo

Henning Hraban Ramm 写道:

Am 2009-05-11 um 02:32 schrieb Wei-Wei Guo:

1. Don't use project files as top level file for your document, use 
product and
  components (which can be nested) files only, projects are meta file 
when you

  have many document with the same topic (e.g. a magazine etc.)


A magazine is really one of my purposes. :)


Then the magazine is your project, one issue is a product, one article 
is a component.


For something similar I use a directory for the magazine and 
subdirectories per product; i.e. project and environment file reside in 
the main directory, product and component files in subdirs.


ConTeXt looks for files always in parent directories, so the environment 
is always found, but the same component file names can occurr in several 
product dirs.




Thanks. That's what I'm trying to do, but texts in \component files is not 
included.
Should I run the product file instead of project file?


Best wishes,
Wei-Wei

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta (11.05.2009): hex colors in mkii

2009-05-11 Thread Aditya Mahajan

On Mon, 11 May 2009, Hans Hagen wrote:


Peter Rolf wrote:

Hi,

hex colors don't work anymore in mkii (no problems in mkiv). All I get is 
black (reminds me of a song by the Rolling Stones)...


 I see a red door and I want it painted black
 No colors anymore I want them to turn black
  ...

Minimal example:


\setupcolors[state=start]
\setupcolor[hex] % load hex color module

\definecolor[hextest][h=00FF00]

\starttext
\startMPcode
   fill unitsquare xyscaled(5cm,5cm) withcolor \MPcolor{hextest};
\stopMPcode
\stoptext


hm so it's actually used ... make a file colo-hex.tex:


I also use hex colors in the vim module (I personally haven't used the 
vim module in some time, but there are users who use it).


Aditya
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] texts in \component files are not present

2009-05-11 Thread Henning Hraban Ramm

Am 2009-05-11 um 16:53 schrieb Wei-Wei Guo:

Then the magazine is your project, one issue is a product, one  
article is a component.
For something similar I use a directory for the magazine and  
subdirectories per product; i.e. project and environment file  
reside in the main directory, product and component files in subdirs.
ConTeXt looks for files always in parent directories, so the  
environment is always found, but the same component file names can  
occurr in several product dirs.


Thanks. That's what I'm trying to do, but texts in \component files  
is not included.

Should I run the product file instead of project file?



Did you try? That should have been easier than asking...

I don't know why projects wouldn't compile, but products do, I use  
them all the time.



Greetlings from Lake Constance!
Hraban
---
http://www.fiee.net/texnique/
http://wiki.contextgarden.net
https://www.cacert.org (I'm an assurer)

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] New module t-zhspacing

2009-05-11 Thread Yue Wang
Dear list:

Chinese TeX Society is proud to announce the t-zhspacing module to the
ConTeXt society.
The module is developed by Yue Wang based on Yin Dian's zhspacing.sty
macro package and Jonathan Kew's unicode-letters.tex + xetex
interchartoks mechanism.
It is designed for the audience who interested perfect Chinese
typesetting using ConTeXt and XeTeX.
It handles Chinese font loading, switching, line breaking, and
punctuation compression rules quite well.
Moreover, since the freetype's performance is much better than
fontforge's on large cjk fonts, so the document compilation can be
much faster.
Users are free to visit http://code.google.com/p/ctex-kit/, and the
code is in svn  (the trunk/zhspacing directory) now.
Last but not least, we should thank Hans and Wolfgang since they help
us a lot to make the module possible :)

Yue Wang
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] mframed, setupinteractions

2009-05-11 Thread Aditya Mahajan

On Mon, 11 May 2009, Hans Hagen wrote:


Alan BRASLAU wrote:

Thanks (\setupinteractions[option=max], \mframed[background=color])!

Please note that the vertical spacing seems to be off (raised) for 
\mframed...

minimal example:

\starttext
\startformula
 A = B + \mframed[frame=off,background=color,backgroundcolor=gray]{C}
\stopformula
\stoptext


the question is ... what are reasonable defaults ... maybe set offset to 0 or 
use \inframed in display as well ... needs some testing and discussion


Aside for inline framed boxes for math, it will be nice to support 
display framed boxes. For example, see the attached image from the 
empheq package for latex (I know Hans doesn't like to read big pdfs from 
latex packages, hence the attached image ;-)


If framed could be incorporated into formula, we could easily create many 
fancy boxes.attachment: boxes.png___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] New module t-zhspacing

2009-05-11 Thread Yue Wang
Hi.

now the module uses \switchtobodyfont[foobar] to switch the typeface
which is not fast enough. in fact \foobar is the right way. I will
make a commit tomorrow to speed up the font switching.

By the way, After I finish the module, who should I turn to for submitting?
Hans, the garden, or CTAN? Thanks.
If Hans or the garden are the right person/place for submitting, are
there some coding/documentation rules to follow? Thanks.

Yue Wang


On Mon, May 11, 2009 at 10:55 PM, Yue Wang yuleo...@gmail.com wrote:
 Dear list:

 Chinese TeX Society is proud to announce the t-zhspacing module to the
 ConTeXt society.
 The module is developed by Yue Wang based on Yin Dian's zhspacing.sty
 macro package and Jonathan Kew's unicode-letters.tex + xetex
 interchartoks mechanism.
 It is designed for the audience who interested perfect Chinese
 typesetting using ConTeXt and XeTeX.
 It handles Chinese font loading, switching, line breaking, and
 punctuation compression rules quite well.
 Moreover, since the freetype's performance is much better than
 fontforge's on large cjk fonts, so the document compilation can be
 much faster.
 Users are free to visit http://code.google.com/p/ctex-kit/, and the
 code is in svn  (the trunk/zhspacing directory) now.
 Last but not least, we should thank Hans and Wolfgang since they help
 us a lot to make the module possible :)

 Yue Wang

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Metapost question

2009-05-11 Thread Jean Magnan de Bornier
Hi all,
Trying to use mpost with (today's) minimals, I get this answer:
...
16:55 j...@boldair /home/jean/graph % mpost ecindf

Sorry, I can't find that mem file; will try PLAIN.
I can't find the PLAIN mem file!
...

Do I have to make formats or something for mpost to work?

tia,
-- 
Jean
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] beta (11.05.2009): js interaction

2009-05-11 Thread Peter Rolf

Hi,

some problems with js interaction stuff. I get

! Undefined control sequence.
\dopresetfieldsymbol #1-\checkobjectreferences

for nearly all interaction fields in mkiv. Mkii compiles, but the pop-up 
tooltip is only a black box (not the text 'tooltip').


I also had some problems with PDF layer in mkiv (corrupt pdf with older 
betas; will investigate after this one is fixed).


*Not urgent at all.*


Minimal example:


\setupinteraction[state=start]

\starttext
Just a \tooltip{test}{tooltip}.
\stoptext


Time for some good news. There is nearly nothing left, that I have not 
tested (well, most is MP related). No further problems here 
(luatex0.40.1, mpost1.2). And hex colors in mkii work again :)



Best wishes,  Peter

___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Font switching question

2009-05-11 Thread Wolfgang Schuster


Am 11.05.2009 um 16:38 schrieb Yue Wang:


Hi Hans:

let me give a better explanation.

we define a typescript foobar. so we can call  \foobar to load the
foobar typeface.
then we should define a macro like this:
\def\switchtofoobar{\savecurrentstyle\foobar\getcurrentstyle}
and call it like that:

text 1 {\swichtofoobar text2} text 3
when \savecurrentstyle is called, it define a macro named
\getcurrentstyle in order to save the style of text 1 (like \ss\it,
10pt) into that. that's all we want.


From font-ini.mkii (\push/\popcurrentfont):

% \definetypeface[one][rm][serif][computer-roman][default]
% \definetypeface[two][rm][serif][computer-roman][default][rscale=.9]
%
% {\one \bf test \two test}
% {\one \bf test \pushcurrentfont \two \popcurrentfont test}

there are more helper macros like \savefont and \restorefont

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metapost question

2009-05-11 Thread Peter Rolf

Jean Magnan de Bornier schrieb:

Hi all,
Trying to use mpost with (today's) minimals, I get this answer:
...
16:55 j...@boldair /home/jean/graph % mpost ecindf

Sorry, I can't find that mem file; will try PLAIN.
I can't find the PLAIN mem file!
...

Do I have to make formats or something for mpost to work?

  

you have to give mpost a mem(ory dump) file. something like

mpost -mem=metafun.mem file.mp

donno if there are more elegant ways to make it run.


hope that helps, 


Peter


tia,
  


___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] New module t-zhspacing

2009-05-11 Thread Mojca Miklavec
On Mon, May 11, 2009 at 17:21, Aditya Mahajan wrote:
 On Mon, 11 May 2009, Yue Wang wrote:

 By the way, After I finish the module, who should I turn to for
 submitting?
 Hans, the garden, or CTAN? Thanks.

 Submit it to the garden. If you also want it on CTAN, you can ask Mojca or
 Patrick to sync the module with CTAN. Then whenever you make a change in the
 module, it will be automatically synced with ctan and you do not have to
 worry about submitting to multiple locations.

One question before I add further suggestions: what's your relation to
the author of zhspacing.sty?

Your module depends on it, so in a way it would make sense to package
it together on CTAN and TeX Live, but if you have no connection to the
author, one needs to make sure that the right bits and pieces end up
in the right place.

Not too related, but: do you have any idea why this file is located
under doc in TeX Live?
 texmf-doc/doc/chinese/lshort-chinese/src/zhspacing.sty

Well, OK, it's on lshort/chinese/src/ on CTAN, but I wonder if
kpathsea finds the file at all. It looks like a slightly misplaced
file to me, but I may be wrong.

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metapost question

2009-05-11 Thread Mojca Miklavec
On Mon, May 11, 2009 at 17:14, Jean Magnan de Bornier wrote:
 Hi all,
 Trying to use mpost with (today's) minimals, I get this answer:
 ...
 16:55 j...@boldair /home/jean/graph % mpost ecindf

 Sorry, I can't find that mem file; will try PLAIN.
 I can't find the PLAIN mem file!
 ...

 Do I have to make formats or something for mpost to work?

texexec --make metafun

But I should probably check what goes wrong as this format should have
been generated automatically.

Hans, in the source code there is
states.set(formats.cont-en, true)
states.set(formats.cont-nl, true)
states.set(formats.metafun, true)
Maybe mpost should be added there as well (though I didn't test yet if
that indeed helps).

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metapost question

2009-05-11 Thread Aditya Mahajan

On Mon, 11 May 2009, Jean Magnan de Bornier wrote:


Hi all,
Trying to use mpost with (today's) minimals, I get this answer:
...
16:55 j...@boldair /home/jean/graph % mpost ecindf

Sorry, I can't find that mem file; will try PLAIN.
I can't find the PLAIN mem file!
...

Do I have to make formats or something for mpost to work?


You can also use the texexec interface (which uses metafun format)

texexec --mpgraphic file.mp

Aditya
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metapost question

2009-05-11 Thread Mojca Miklavec
On Mon, May 11, 2009 at 17:42, Mojca Miklavec  wrote:
 On Mon, May 11, 2009 at 17:14, Jean Magnan de Bornier wrote:
 Hi all,
 Trying to use mpost with (today's) minimals, I get this answer:
 ...
 16:55 j...@boldair /home/jean/graph % mpost ecindf

 Sorry, I can't find that mem file; will try PLAIN.
 I can't find the PLAIN mem file!
 ...

 Do I have to make formats or something for mpost to work?

 texexec --make metafun

Sorry, I meant
   texexec --make mpost

Though it's indeed true that you can use
   mpost --mem=metafun ecindf
or the ConTeXt interface

But these formats should be made by default.

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] New module t-zhspacing

2009-05-11 Thread Yue Wang
Hi, Mojca:

On Mon, May 11, 2009 at 11:36 PM, Mojca Miklavec
mojca.miklavec.li...@gmail.com wrote:
 On Mon, May 11, 2009 at 17:21, Aditya Mahajan wrote:
 On Mon, 11 May 2009, Yue Wang wrote:

 By the way, After I finish the module, who should I turn to for
 submitting?
 Hans, the garden, or CTAN? Thanks.

 Submit it to the garden. If you also want it on CTAN, you can ask Mojca or
 Patrick to sync the module with CTAN. Then whenever you make a change in the
 module, it will be automatically synced with ctan and you do not have to
 worry about submitting to multiple locations.

 One question before I add further suggestions: what's your relation to
 the author of zhspacing.sty?

We are good friends.


 Your module depends on it, so in a way it would make sense to package
 it together on CTAN and TeX Live, but if you have no connection to the
 author, one needs to make sure that the right bits and pieces end up
 in the right place.

well, zhspacing is free software. so I am free to make any changes I
want and redistribute that as long as I leave the original license
information, not to say we (yindian and me) are good friends. (In
fact, some parts of zhspacing's initial idea was suggested by me.
since yindian is good at tex macro programming, so he developed the
whole package base on the idea all by himself)


 Not too related, but: do you have any idea why this file is located
 under doc in TeX Live?
     texmf-doc/doc/chinese/lshort-chinese/src/zhspacing.sty


yindian submitted the package to CTAN. but later some minor bugs were
found but he was quite busy and did not have time to maintain the
package. So  he asked the CTAN maintainer to remove that package. But
it is a useful package, so when the Chinese TeX Society plan to
translate lshort into Chinese, the document translator planned to use
that macro package, and that file is included in lshort-chinese
package.


 Well, OK, it's on lshort/chinese/src/ on CTAN, but I wonder if
 kpathsea finds the file at all. It looks like a slightly misplaced
 file to me, but I may be wrong.



Now Chinese TeX Society take over the development of zhspacing, xeCJK,
CJKpunct and ctex package. They are hosted on
code.google.com/p/ctex-kit. After a major release, we will submit all
the packages to CTAN. So in TeXLive 2009 you can find these packages
in texmf-dist.

 Mojca
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki!

 maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
 archive  : https://foundry.supelec.fr/projects/contextrev/
 wiki     : http://contextgarden.net
 ___


Yue Wang
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Font switching question

2009-05-11 Thread Yue Wang
On Mon, May 11, 2009 at 11:23 PM, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:

 Am 11.05.2009 um 16:38 schrieb Yue Wang:

 Hi Hans:

 let me give a better explanation.

 we define a typescript foobar. so we can call  \foobar to load the
 foobar typeface.
 then we should define a macro like this:
 \def\switchtofoobar{\savecurrentstyle\foobar\getcurrentstyle}
 and call it like that:

 text 1 {\swichtofoobar text2} text 3
 when \savecurrentstyle is called, it define a macro named
 \getcurrentstyle in order to save the style of text 1 (like \ss\it,
 10pt) into that. that's all we want.

 From font-ini.mkii (\push/\popcurrentfont):

 % \definetypeface[one][rm][serif][computer-roman][default]
 % \definetypeface[two][rm][serif][computer-roman][default][rscale=.9]
 %
 % {\one \bf test \two test}
 % {\one \bf test \pushcurrentfont \two \popcurrentfont test}

 there are more helper macros like \savefont and \restorefont


Thank you very much, Wolfgang!



 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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metapost question

2009-05-11 Thread Jean Magnan de Bornier
Le 11 mai à 17:34:42 Peter Rolf indi...@gmx.net écrit notamment:

| Jean Magnan de Bornier schrieb:
|  Hi all,
|  Trying to use mpost with (today's) minimals, I get this answer:
|  ...
|  16:55 j...@boldair /home/jean/graph % mpost ecindf
| 
|  Sorry, I can't find that mem file; will try PLAIN.
|  I can't find the PLAIN mem file!
|  ...
| 
|  Do I have to make formats or something for mpost to work?
| 
|
| you have to give mpost a mem(ory dump) file. something like

| mpost -mem=metafun.mem file.mp

| donno if there are more elegant ways to make it run.


| hope that helps, 

| Peter

|  tia,
|

Thanks to all!

Peter and Aditya's solutions work, Mokja's doesn't..

Using Aditya's, when everything is fine, it ends up with a (seemingly
infinite) series of lines:
...
metafun 2009-5-11 18:20
...

Strange and hardly nice, I had to cut it out.

Maybe there is a problem here.

Anyway why can't we compile with just 'mpost' anymore?

Cu,
-- 
Jean
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Two issues related to xetex

2009-05-11 Thread Yue Wang
Hi, Hans and Mojca:

first, (to Mojca) the first-setup.sh script still deletes fontconfig
cache when updating on windows.

second, (to Hans) unicode-letters.tex is read when we dump plain TeX
or LaTeX format in TeXLive. This file is wrote by Jonathan Kew in
order to initialize XeTeX. It defines many important unicode
properties into XeTeX. However, ConTeXt do not load that file when
dumping the xetex format. The file is not even in ConTeXt
distribution. I suggest that the file should be loaded.
You can find the file in
http://scripts.sil.org/svn-public/xetex/TRUNK/texmf/tex/generic/xetex/unicode-letters.tex
XeTeX's plain TeX ini file can be find in
http://scripts.sil.org/svn-public/xetex/TRUNK/texmf/tex/xetex/config/xetex.ini

If the file is not loaded, thousands of lines should be copied to
third party modules (like the module I announce on the mailing list
today) in order to support some language correctly. This method is
quite messy, not to say inefficient for loading.

Yue Wang
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metapost question

2009-05-11 Thread Hans Hagen

Mojca Miklavec wrote:

On Mon, May 11, 2009 at 17:14, Jean Magnan de Bornier wrote:

Hi all,
Trying to use mpost with (today's) minimals, I get this answer:
...
16:55 j...@boldair /home/jean/graph % mpost ecindf

Sorry, I can't find that mem file; will try PLAIN.
I can't find the PLAIN mem file!
...

Do I have to make formats or something for mpost to work?


texexec --make metafun

But I should probably check what goes wrong as this format should have
been generated automatically.

Hans, in the source code there is
states.set(formats.cont-en, true)
states.set(formats.cont-nl, true)
states.set(formats.metafun, true)
Maybe mpost should be added there as well (though I didn't test yet if
that indeed helps).


maybe ... if someone is using mp directly in context -)

in luatex/mkiv formats are generated on the fly


-
  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] \newcommand ala ConTeXt

2009-05-11 Thread Xan

Hi,

In latex is wonderful be able to make abreviatures like:

\newcommand{\dist}[1]{d(\sigma_g(#1), \sigma_h(#1))}

and use like $\dist{t}$, ... for not typing all the text.

What is the ConTeXt version of that? Please CC mail me.

Thanks a lot,
Xan.
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Two issues related to xetex

2009-05-11 Thread Hans Hagen

Yue Wang wrote:


second, (to Hans) unicode-letters.tex is read when we dump plain TeX
or LaTeX format in TeXLive. This file is wrote by Jonathan Kew in
order to initialize XeTeX. It defines many important unicode
properties into XeTeX. However, ConTeXt do not load that file when
dumping the xetex format. The file is not even in ConTeXt
distribution. I suggest that the file should be loaded.


i don't want dependencies on files outside the context proper; too many 
bad experiences with that as they always are made for latex and i don'w 
want to waste time on keeping track of all those things anyway


context has enco-utf which is generated from the mkiv character database 
and that's our reference definition


(although not relevant for cjk, context also ships its own pattern, 
already in utf for quite a while)


so, if some definition is missing we should first fix char-def and then 
regenerate enco-utf using mtxrun --script chars --utf


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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \newcommand ala ConTeXt

2009-05-11 Thread Yue Wang
\def\dist#1{d(\sigma_g(#1), \sigma_h(#1))}
or something more context way:
\define[1]\dist{d(\sigma_g(#1), \sigma_h(#1))}

On Tue, May 12, 2009 at 1:05 AM, Xan dxpubl...@telefonica.net wrote:
 Hi,

 In latex is wonderful be able to make abreviatures like:

 \newcommand{\dist}[1]{d(\sigma_g(#1), \sigma_h(#1))}

 and use like $\dist{t}$, ... for not typing all the text.

 What is the ConTeXt version of that? Please CC mail me.

 Thanks a lot,
 Xan.
 ___
 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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \newcommand ala ConTeXt

2009-05-11 Thread Hans Hagen

Xan wrote:

Hi,

In latex is wonderful be able to make abreviatures like:

\newcommand{\dist}[1]{d(\sigma_g(#1), \sigma_h(#1))}

and use like $\dist{t}$, ... for not typing all the text.

What is the ConTeXt version of that? Please CC mail me.


see s-abr-* for examples ... one can have several (independent) 
abbreviation lists that can be called up when needed


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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] New module t-zhspacing

2009-05-11 Thread Wolfgang Schuster


Am 11.05.2009 um 16:55 schrieb Yue Wang:


Dear list:

Chinese TeX Society is proud to announce the t-zhspacing module to the
ConTeXt society.
The module is developed by Yue Wang based on Yin Dian's zhspacing.sty
macro package and Jonathan Kew's unicode-letters.tex + xetex
interchartoks mechanism.
It is designed for the audience who interested perfect Chinese
typesetting using ConTeXt and XeTeX.
It handles Chinese font loading, switching, line breaking, and
punctuation compression rules quite well.
Moreover, since the freetype's performance is much better than
fontforge's on large cjk fonts, so the document compilation can be
much faster.
Users are free to visit http://code.google.com/p/ctex-kit/, and the
code is in svn  (the trunk/zhspacing directory) now.


After taking a closer look in zhspacing.sty I think it's better to  
include

the code in your t-zhspacing module and to replace a lot of macros with
their ConTeXT equivalent (e.g. \...@for...\do.. with \processcommalist).

The content from unicode-letters.tex should also be moved to a separate
file (e.g. t-zhspacing-unicode.tex) which can be removed when the  
information

is added to char-def.lua.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] What is equivalent of latex math aligned in ConTeXt?

2009-05-11 Thread Xan

Hi,

I read the document Using \startalign and friends of Aditya (that it's 
good) and I can't find anything under ams aligned. Is this an equivalent 
in ConText?


For example, what is the equivalent of:

\begin{equation*}
\left.\begin{aligned}
 2^2 | n_0\\
 4^2 | n_0 + 2 \Rightarrow (2^2)^2 | n_0 +2 \Rightarrow 2^2 | n_0 +2 
\text{ ya que } 2^2 | (2^2)^2

\end{aligned}\right\} \Rightarrow 2^2 | (n_0 + 2 - n_0) \Rightarrow 2^2 | 2
\end{equation*}

in ConTeXt?

I tried something like:

\startformula
\startmathalignment
\NC \startaligned
\NC \lambda_{0, \lvert k - s \rvert} (n) \NC  f(n) \NR
\NC \text{ per a $n$ suficientment gran } \NC \NR
\stopaligned \NC  \iff
\startaligned
\NC \lambda_{s, k} (n) \NC  f(n) \NR
\NC \text{ per a $n$ suficientment gran } \NC \NR
\stopaligned \NR[+]
\NC \lambda_{s, k} (n)  f(n) \text{ per a $n$ suficientment gran } \NC 
\iff  \lambda_{0, \lvert k - s \rvert} (n)  f(n) + C \text{ per a $n$ 
suficientment gran }  \NR[+]

\stopmathalignment
\stopformula

but  Undefined control sequence appears to me.

Thanks a lot,
Xan.

PS: Please CCme
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metapost question

2009-05-11 Thread Mojca Miklavec
On Mon, May 11, 2009 at 19:33, Jean Magnan de Bornier  wrote:
 Le 11 mai à 18:52:08 Mojca Miklavec écrit notamment:

 |  But then I still have unending the
 |  ...
 |  metafun 2009-5-11 18:30
 |  metafun 2009-5-11 18:30
 |  metafun 2009-5-11 18:30
 |  metafun 2009-5-11 18:30
 |  metafun 2009-5-11 18:30
 |  metafun 2009-5-11 18:30
 |  metafun 2009-5-11 18:30
 |  metafun 2009-5-11 18:30
 |  ..

 | Which command does that evil? They both seem to work here ...

 mpost, texexec --mpgraphic, mpost -mem=metafun.mem, all three of them!

I don't understand. Can you please post the whole log. You cannot get
metafun warnings when running just mpost unless something is set up
in some really weird way. I could imagine that there could be some
infinite loop in some metafun macro, but I cannot imagine why mpost
would fall into infinite loop.

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] \newcommand ala ConTeXt

2009-05-11 Thread Xan

Thanks, Yue. I suspected it should be two ways: pure TeX and ConTeXt way.

En/na Yue Wang ha escrit:

\def\dist#1{d(\sigma_g(#1), \sigma_h(#1))}
or something more context way:
\define[1]\dist{d(\sigma_g(#1), \sigma_h(#1))}

On Tue, May 12, 2009 at 1:05 AM, Xan dxpubl...@telefonica.net wrote:
  

Hi,

In latex is wonderful be able to make abreviatures like:

\newcommand{\dist}[1]{d(\sigma_g(#1), \sigma_h(#1))}

and use like $\dist{t}$, ... for not typing all the text.

What is the ConTeXt version of that? Please CC mail me.

Thanks a lot,
Xan.
___
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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] New module - mkiv font loading

2009-05-11 Thread Wolfgang Schuster


Am 11.05.2009 um 15:48 schrieb Hans Hagen:


Wolfgang Schuster wrote:

possible yes but it's a lot of work because the complete fallback  
mechanism
needs to be written for XeTeX which is available for MkIV since a  
while.


this is unlikely to happen (unless we add lots of optional code to  
mkii to deal with xetex which then probably results in a lot of  
other code hooked into other mechanisms as well) as mkii is kind of  
frozen


Sorry Hans but my answer above has nothing to do with your code, I  
provided
in my module a mechanism to set fonts in a similar way as the fontspec  
and

xeCJK/zhspacing packages for LaTeX provide but *I* won't add extra code
to use my module with XeTeX.

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metapost question

2009-05-11 Thread Mojca Miklavec
On Mon, May 11, 2009 at 19:01, Hans Hagen wrote:
 Mojca Miklavec wrote:

    states.set(formats.metafun, true)
 Maybe mpost should be added there as well (though I didn't test yet if
 that indeed helps).

 maybe ... if someone is using mp directly in context -)

 in luatex/mkiv formats are generated on the fly

I know, but metapost generates the format on the fly only in TeX Live
(with mktexfmt I think), not in minimals, so it would be really nice
of us to generate the format during installation already.

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] What is equivalent of latex math aligned in ConTeXt?

2009-05-11 Thread Aditya Mahajan

On Mon, 11 May 2009, Xan wrote:


Hi,

I read the document Using \startalign and friends of Aditya (that it's 
good) and I can't find anything under ams aligned. Is this an equivalent in 
ConText?


Strictly speaking, none. You can fake aligned and gathered with matrices.


For example, what is the equivalent of:

\begin{equation*}
\left.\begin{aligned}
 2^2 | n_0\\
 4^2 | n_0 + 2 \Rightarrow (2^2)^2 | n_0 +2 \Rightarrow 2^2 | n_0 +2 \text{ 
ya que } 2^2 | (2^2)^2

\end{aligned}\right\} \Rightarrow 2^2 | (n_0 + 2 - n_0) \Rightarrow 2^2 | 2
\end{equation*}

in ConTeXt?

I tried something like:

\startformula
\startmathalignment
\NC \startaligned
\NC \lambda_{0, \lvert k - s \rvert} (n) \NC  f(n) \NR
\NC \text{ per a $n$ suficientment gran } \NC \NR
\stopaligned \NC  \iff
\startaligned
\NC \lambda_{s, k} (n) \NC  f(n) \NR
\NC \text{ per a $n$ suficientment gran } \NC \NR
\stopaligned \NR[+]
\NC \lambda_{s, k} (n)  f(n) \text{ per a $n$ suficientment gran } \NC \iff 
\lambda_{0, \lvert k - s \rvert} (n)  f(n) + C \text{ per a $n$ 
suficientment gran }  \NR[+]

\stopmathalignment
\stopformula

but  Undefined control sequence appears to me.


Of course. The command \startaligned is not defined. Here is one way to do 
this.


\definemathmatrix[rightbrace]
[align=left,
left={\left.},
right={\right\}},
style=\displaystyle]

\starttext
\startformula
  \startrightbrace
\NC 2^2 | n_0 \NR
\NC 4^2 | n_0 + 2
\Rightarrow (2^2)^2 | n_0 +2
\Rightarrow 2^2 | n_0 +2 \text{ ya que } 2^2 | (2^2)^2
\NR
  \stoprightbrace
  \Rightarrow 2^2 | 2
\stopformula
\stoptext


I would also use \implies instead of \Rightarrow (slightly different 
spacing).


Aditya
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Two issues related to xetex

2009-05-11 Thread Mojca Miklavec
On Mon, May 11, 2009 at 18:38, Yue Wang wrote:
 Hi, Hans and Mojca:

 first, (to Mojca) the first-setup.sh script still deletes fontconfig
 cache when updating on windows.

Hmmm ... while experimenting a bit and after writing a long answer
explaining that I'll come back to it after a while ... I figured out
that I have already implemented a fix, but completely forgot about it.
Hans, does this make sense?

local normalflags = states.get(rsync.flags.normal)
local deleteflags = 
if (destination:find(texmf$) or destination:find(context$)) and
(not environment.argument(keep)) then
deleteflags = states.get(rsync.flags.delete)
end
command = format(%s %s %s %s'%s' '%s', bin, normalflags,
deleteflags, url, archives, destination)

This only adds the --delete flag to texmf-context and texmf, others
are not touched. The consequence is that this won't delete your pdftex
binary automatically if you decide that you only need LuaTeX one day,
but I think that it makes sense as a temporary fix since:
- it prevents deleting font cache
- it reduces the need to recreate the formats when nothing has been updated

Mojca
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Two issues related to xetex

2009-05-11 Thread Hans Hagen

Mojca Miklavec wrote:


Hans, does this make sense?

local normalflags = states.get(rsync.flags.normal)
local deleteflags = 
if (destination:find(texmf$) or destination:find(context$)) and
(not environment.argument(keep)) then
deleteflags = states.get(rsync.flags.delete)
end
command = format(%s %s %s %s'%s' '%s', bin, normalflags,
deleteflags, url, archives, destination)


ok, i'll change it

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] narrow space in \ldots.

2009-05-11 Thread Ryo Furue
Wolfgang,

| \unexpanded\def\fourdots{{\def\periodswidth{.3em}\periods[4]}}
| 
| \starttext
| Hello\fourdots\ World\fourdots
| 
| Hello\fourdots\ World.
| \stoptext

Thanks for the macro!  It's almost perfect. . . .  I thought I was
imagining things, but the distance between the last letter of the word
and the first dot actually seems to be dependent on the parameter
\periodswidth{.3em}.  See the attached example.

I changed it to \periodswidth{.4em} and then the distance is
larger with \fourdots than with \ldots  .  The distance \ldots
produces is the same as a raw period produces.  If possible,
I'd like the distance to be always the same as the one
a raw period produces.

By the way, I'm wondering where one should store personal macro files.
With LaTeX (texlive-latex), ~/texmf/tex/latex/ seems to be the default
place.  Is ~/texmf/tex/context/ a recommended place?

Ryo
-
%
% Use a large font to make the difference clearer.
%
\unexpanded\def\fourdots{{\def\periodswidth{.4em}\periods[4]}}
\starttext
Hello. World.

Hello\ldots.  World.

Hello\fourdots\ World.

Hello. World.
\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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] narrow space in \ldots.

2009-05-11 Thread Hans Hagen

Ryo Furue wrote:


By the way, I'm wondering where one should store personal macro files.
With LaTeX (texlive-latex), ~/texmf/tex/latex/ seems to be the default
place.  Is ~/texmf/tex/context/ a recommended place?


texmf-project/tex/context/user/

is a pretty safe place

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] beta (11.05.2009): js interaction

2009-05-11 Thread Hans Hagen

Peter Rolf wrote:

Hi,

some problems with js interaction stuff. I get

! Undefined control sequence.
\dopresetfieldsymbol #1-\checkobjectreferences

for nearly all interaction fields in mkiv. Mkii compiles, but the pop-up 
tooltip is only a black box (not the text 'tooltip').


I also had some problems with PDF layer in mkiv (corrupt pdf with older 
betas; will investigate after this one is fixed).


*Not urgent at all.*


no big deal ... just an obsolete macro (for mkiv) ... eventuall we will 
have a complete mkii/mkiv split and it takes a while to remove not 
needed code and test it


fixed

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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] narrow space in \ldots.

2009-05-11 Thread Wolfgang Schuster

\def\fourdots
  {\ldotp\ldotp\ldotp\ldotp}

Wolfgang

Am 11.05.2009 um 23:14 schrieb Ryo Furue:


Wolfgang,

| \unexpanded\def\fourdots{{\def\periodswidth{.3em}\periods[4]}}
|
| \starttext
| Hello\fourdots\ World\fourdots
|
| Hello\fourdots\ World.
| \stoptext

Thanks for the macro!  It's almost perfect. . . .  I thought I was
imagining things, but the distance between the last letter of the word
and the first dot actually seems to be dependent on the parameter
\periodswidth{.3em}.  See the attached example.

I changed it to \periodswidth{.4em} and then the distance is
larger with \fourdots than with \ldots  .  The distance \ldots
produces is the same as a raw period produces.  If possible,
I'd like the distance to be always the same as the one
a raw period produces.

By the way, I'm wondering where one should store personal macro files.
With LaTeX (texlive-latex), ~/texmf/tex/latex/ seems to be the default
place.  Is ~/texmf/tex/context/ a recommended place?

Ryo
-
%
% Use a large font to make the difference clearer.
%
\unexpanded\def\fourdots{{\def\periodswidth{.4em}\periods[4]}}
\starttext
Hello. World.

Hello\ldots.  World.

Hello\fourdots\ World.

Hello. World.
\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  : https://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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] mframed, setupinteractions

2009-05-11 Thread Hans Hagen

Aditya Mahajan wrote:

On Mon, 11 May 2009, Hans Hagen wrote:


Alan BRASLAU wrote:

Thanks (\setupinteractions[option=max], \mframed[background=color])!

Please note that the vertical spacing seems to be off (raised) for 
\mframed...

minimal example:

\starttext
\startformula
 A = B + \mframed[frame=off,background=color,backgroundcolor=gray]{C}
\stopformula
\stoptext


the question is ... what are reasonable defaults ... maybe set offset 
to 0 or use \inframed in display as well ... needs some testing and 
discussion


Aside for inline framed boxes for math, it will be nice to support 
display framed boxes. For example, see the attached image from the 
empheq package for latex (I know Hans doesn't like to read big pdfs from 
latex packages, hence the attached image ;-)


If framed could be incorporated into formula, we could easily create 
many fancy boxes.


mframed is either \framed or \inframed (currently) and there is some 
logic in it


\mframed
\inmframed

\starttext
\startformula
 \mframed[offset=3pt,background=color,backgroundcolor=red]{A = B + 
\inmframed[frame=off,background=color,backgroundcolor=gray]{C}}

\stopformula
\stoptext



-
  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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] in luatex/mkiv formats are generated on the fly

2009-05-11 Thread Vyatcheslav Yatskovsky

Hello, Hans

in luatex/mkiv formats are generated on the fly

What do you mean? That one does NOT need context --make at all?

Best,
Vaytcheslav
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] in luatex/mkiv formats are generated on the fly

2009-05-11 Thread Aditya Mahajan

On Tue, 12 May 2009, Vyatcheslav Yatskovsky wrote:


Hello, Hans

in luatex/mkiv formats are generated on the fly

What do you mean? That one does NOT need context --make at all?


Yes. Just clear your texmf-cache and see what happens :-)

Aditya
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Metapost question

2009-05-11 Thread Jean Magnan de Bornier
Le 11 mai à 20:02:36 Mojca Miklavec mojca.miklavec.li...@gmail.com écrit 
notamment:

|  | Which command does that evil? They both seem to work here ...
| 
|  mpost, texexec --mpgraphic, mpost -mem=metafun.mem, all three of them!

| I don't understand. Can you please post the whole log. You cannot get
| metafun warnings when running just mpost unless something is set up
| in some really weird way. I could imagine that there could be some
| infinite loop in some metafun macro, but I cannot imagine why mpost
| would fall into infinite loop.

I have stopped compilation after no more than 30 seconds, the log is 14MB
large with many lines:

06:25 j...@boldair /home/jean/graph % wc -l ecindf.log
644385 ecindf.log


After eliminating duplicates, here it is:

..
This is MetaPost, version 1.200 (kpathsea version 3.5.7dev) (mem=metafun 
2009.05.11)  11 MAY 2009 19:56
**cindf
 (/home/jean/context/tex/texmf-context/metapost/context/base/metafun.mp 
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-tool.mp) 
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-spec.mp)
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-core.mp) 
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-page.mp) 
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-text.mp)
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-txts.mp) 
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-shap.mp) 
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-butt.mp)
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-char.mp) 
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-step.mp) 
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-grph.mp)
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-figs.mp) 
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-mlib.mp) 
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-grid.mp)
(/home/jean/context/tex/texmf-context/metapost/context/base/mp-func.mp)) 
(/home/jean/context/tex/texmf/metapost/base/graph.mp) [1
Warning: cannot open font map file psfonts.map
] [2] [3
Warning: cannot open font map file psfonts.map
] [4] [5] [6] [7
Warning: cannot open font map file psfonts.map
] [8] [9] [10
Warning: cannot open font map file psfonts.map
] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25]
metafun 2009-5-11 19:56
metafun 2009-


I had noticed the warning but have no idea what it leads to...

tia
-- 
Jean
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] XeConTeXt bug report III: Wrong hyperlink

2009-05-11 Thread Yue Wang
Hi, Hans and Jin-Hwan:

When using ConTeXt to produce my documents, I found that all
hyperlinks are wrong. And here is a simple test.

The tex and pdf files are attached in the mail. The problem will happen when:
1) using pdftex to produce the dvi, and use dvipdfmx to convert the dvi to pdf.
2) using xetex to produce xdv, and xdvipdfmx that xdv to pdf.

Open the file in Acrobat Reader, Go to page three, and you can see a
hyperlink text Equation 1, it links to page 2. however, the equation
is in page1.

The section 1 or  page 4 should point to page 4, but it point to page 5 now.

So my question:
- As far as I know, dvipdfmx's ConTeXt support was written by
Jin-Hwan. and the hyperlink code is written by Hans. Surely at least
one of the two source code files has a cross-ref bug. But I don't know
which. Can the bug be fixed?

Thanks

Yue Wang


test-hyperlink.pdf
Description: Adobe PDF document


test-hyperlink.tex
Description: TeX 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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] XeConTeXt bug report I: strange benchmark

2009-05-11 Thread Yue Wang
Hi, Hans and Jonathan:

I made some testing samples in ConTeXt to test XeTeX. but the result
is quite strange. All benchmark are get from the second run:

Sample 1:

\definefont[a][file:SimSun]
\starttext
\dorecurse{1}{ hello {\a 你好}}
\stoptext

And here is the result:

XeTeX: TeXExec | runtime: 7.25
LuaTeX: MTXrun | total runtime: 6.719

This is considerablly ok. So we can say that the font switching is pretty fast.

Sample 2:

\definefont[a][file:AdobeSongStd-Light.otf]
\starttext
\dorecurse{1}{ hello {\a 你好}}
\stoptext

XeTeX: TeXExec | runtime: 63.65
LuaTeX: MTXrun | total runtime: 8.156

Here I only change the font from SimSun to Adobe Song (the two fonts
are almost at the same sice [~10M]).
But the xetex result is very differt from the previous run. it
consumes one minute to compile the file.


Sample 3:


\starttypescript[serif] [myzhfont]
  \definefontsynonym [Serif]   [file:SimSun]
  \definefontsynonym [SerifBold]   [file:SimSun]
  \definefontsynonym [SerifItalic] [file:SimSun]
  \definefontsynonym [SerifBoldItalic] [file:SimSun]
\stoptypescript

\starttypescript[sans] [myzhfont]
  \definefontsynonym [Sans]   [file:SimSun]
  \definefontsynonym [SansBold]   [file:SimSun]
  \definefontsynonym [SansItalic] [file:SimSun]
  \definefontsynonym [SansBoldItalic] [file:SimSun]
\stoptypescript

\starttypescript[mono] [myzhfont]
  \definefontsynonym [Mono]   [file:SimSun]
  \definefontsynonym [MonoBold]   [file:SimSun]
  \definefontsynonym [MonoItalic] [file:SimSun]
  \definefontsynonym [MonoBoldItalic] [file:SimSun]
\stoptypescript

\definetypeface [myzhfont] [rm] [serif][myzhfont]   [default]
\definetypeface [myzhfont] [ss] [sans] [myzhfont]   [default]
\definetypeface [myzhfont] [tt] [mono] [myzhfont]   [default]

\def\a{\myzhfont}
\starttext
\dorecurse{1}{ hello {\a 你好}}
\stoptext

XeTeX: TeXExec | runtime: 64.797
LuaTeX: MTXrun | total runtime: 10.797

Here we use SimSun since in the first sample xetex can load simsun quite fast.
However, in this time we define a typescript, and make all the styles
fall into SimSun.
Now xetex behaves quite strangely: it uses one minutes to compile this
single document...


So my question is
- why loading otf is so slow?
- is this a bug in context or in xetex? can it be fixed?
- how can we make sample 3  (using typescript) run faster?


Thanks.

Yue Wang
___
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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] XeConTeXt bug report II: MetaPost Graphics

2009-05-11 Thread Yue Wang
Hi, Hans and Jin-Hwan:

Here is a simple ConTeXt metafun demo file:

\starttext
\setupcolors[state=start]
\startMPpage
  path p ; color c[] ;
  p := fullsquare scaled 4cm ;
  c[0] := transparent(1,.5,red) ;
  c[1] := transparent(1,.5,green) ;
  c[2] := transparent(1,.5,blue) ;
  for i = 0 upto 2 :
fill p rotated (i*30) withcolor white ;
  endfor ;
  for i = 0 upto 2 :
fill p rotated (i*30) withcolor c[i] ;
  endfor ;
  addbackground withcolor transparent(1,.5,cmyk(0,0,1,0)) ;
\stopMPpage
\stoptext

When process the file using luatex or pdftex, we can see a nice picture there.
However, when
1) using pdftex to produce the dvi, and convert the dvi using dvipdfmx
2) using xetex to produce the pdf using xdvipdfmx
the figure is placed at the wrong place. there will be a displacement
for all the metapost figures when xetex is used to produce the
graphics. I attach the wrong result in the mail.

So my question is :
- is this a bug in ConTeXt, or in (x)dvipdfmx. can the bug be fixed?

Thanks

Yue Wang


test-metafun.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  : https://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___