Re: [NTG-context] Percent in mkii mathmode is rendering wrongly using lucida.

2012-12-31 Thread Yue Wang
When will the team push the fixed code to the mainstream? I think users
need both \delta and percent.


On Thu, Dec 27, 2012 at 7:18 PM, Mojca Miklavec 
mojca.miklavec.li...@gmail.com wrote:

 On Fri, Dec 28, 2012 at 1:21 AM, Yue Wang wrote:
  Hi Hans,
 
  can you fix the problem? thanks a lot.
 
  test document:
  %mkii
  \usetypescript[lucida][texnansi]
  \setupbodyfont[lucida,12pt]
  \starttext
  5\%  $5\%$
  \stoptext

 Citing myself:

 On Sat, Feb 20, 2010 at 6:22 AM, Mojca Miklavec wrote:
  On Tue, Dec 1, 2009 at 10:16, Hans Hagen wrote:
  Yue Wang wrote:
 
  I am writing my journal article using Lucida. The following code didn't
  work:
 
  \usetypescriptfile[type-buy]
  \usetypescript[lucida][texnansi]
  \setupbodyfont[lucida,12pt]
  \starttext $\Delta$\stoptext
 
  If I change
  \definefontsynonym [MathRoman] [LucidaBright]
  into
  \definefontsynonym [MathRoman] [LucidaNewMath-Roman] %
 LucidaBright
 
  it starts working, but probably break other things (would need a bit
  more extensive tests).
 
  Mojca

 and it seems that *exactly that* change breaks it.

 To start with, it's not only percentage sign. There are more. You
 could start with constructions like
 \definemathsymbol [percent]  [nothing] [tf] [37]
 in math-lbr.mkii. That works, but I'm not yet sure how to redefine the
 character itself since the following doesn't work:
 \definemathcharacter [37]  [nothing] [tf] [37]

 One needs to test

 \usetypescript[lucida][ec]
 \usetypescript[modern][ec]
 \showfont[hlcrm]
 \showfont[rm-lmr12]

 and redefine/reassign all characters that are different than in LM.
 An alternative is to change the font back to LucidaBright and redefine
 all characters that are different there.

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

[NTG-context] Percent in mkii mathmode is rendering wrongly using lucida.

2012-12-27 Thread Yue Wang
Hi Hans,

can you fix the problem? thanks a lot.

test document:
%mkii
\usetypescript[lucida][texnansi]
\setupbodyfont[lucida,12pt]
\starttext
5\%  $5\%$
\stoptext


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

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

[NTG-context] Is there some easy way to do tufte-style side note?

2012-04-22 Thread Yue Wang
Dear powerful ConTeXt users:

Is there some way to do tufte style side notes? I googled and did
found Wolfgang's solution
(http://archive.contextgarden.net/message/20110906.202722.f501f115.en.html)
but it's just too simple and cannot be used for production. Side notes
will cluttered or fall out of pages.

LaTeX does provide a good solution for this style. I am wondering if
this is possible to do in context.

I am also curious to know simple way to do multiple float style in
ConTeXt (like graphics spanning text and margin and many others).

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


Re: [NTG-context] Is there some easy way to do tufte-style side note?

2012-04-22 Thread Yue Wang
There are many styles available on the context-garden site
(http://wiki.contextgarden.net/Sample_documents) which are really
helpful to help newcomers to learn how to define styles in context.
Wouldn't it be great to add tufte's and bringhurst's as extra
examples?

On Sun, Apr 22, 2012 at 4:17 AM, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:

 Am 22.04.2012 um 09:33 schrieb S Barmeier:

 On 04/22/2012 04:16 PM, Yue Wang wrote:
 Dear powerful ConTeXt users:

 Is there some way to do tufte style side notes? I googled and did
 found Wolfgang's solution

 (http://archive.contextgarden.net/message/20110906.202722.f501f115.en.html)
 but it's just too simple and cannot be used for production. Side notes
 will cluttered or fall out of pages.

 LaTeX does provide a good solution for this style. I am wondering if
 this is possible to do in context.

 I am also curious to know simple way to do multiple float style in
 ConTeXt (like graphics spanning text and margin and many others).

 Yue Wang

 Well, I am no powerful ConTeXt user, but \inmargin and derivatives
 (\inouter \ininner \inright \inleft) have an option stack=yes to avoid
 overlapping and stack=continue to avoid ... overlapping. As I understand
 it, the former is for shorter margin notes, the latter for use with
 paragraph-sized notes.

 There is also \startmarginblock ... \stopmarginblock and it exceed my
 ConTeXt user powers to be able to tell you the difference. My guess is,
 that this type of margin note is a block, which maybe enjoys features of
 textblocks...? But I, too, would be interested to understand the
 difference in any detail.

 I also use margin notes extensively (or at least hope the final version
 of my document will be able to), but as of now, there seems to be no way
 to float margin notes to the top/bottom of the page and no way to
 prevent longer notes, attached to a line near the bottom of a page, to
 exceed the margin and be typeset even beyond the page boundaries...
 (Forgive me, if I'm wrong).

 All of the mechanisms are added at different times in the process to make 
 from text a page.

 Margindata (\inmargin etc.) is added to the line where you have it in your
 and doesn’t move from this position but you prevent overlapping of two
 different texts in the line with “stack=yes”.

 Marginblocks are added after ConTeXt has finished the entire page.

 As you can see in the example below it’s possible to have text
 at different levels on the same position.

 \setupmarginblock[color=green]

 \setupnote    [footnote][location=none]
 \setupnotation[footnote][color=blue]

 \setuptexttexts
  [margin]
  []
  [{\framed[frame=off,height=\textheight,width=broad,offset=none,align=high]{\placenotes[footnote][before=]}}]

 \starttext

 \inright[color=red]{Paragraph 1}

 \input knuth\footnote{Footnote 1}

 \startmarginblock
 \input ward
 \stopmarginblock

 \inright[color=red]{Paragraph 2}

 \input knuth

 \stoptext

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

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


Re: [NTG-context] texnansi.enc

2011-11-15 Thread Yue Wang
tried


\usetypescript[serif,sans,mono][handling,hanging][highquality]
\usetypescriptfile[type-buy]
\definetypeface[officina][rm][serif][officina][default][encoding=texnansi]
\definetypeface[officina][ss][sans] [officina][default][encoding=texnansi]

\setupbodyfont[officina,ss]
\setupalign[hz,hanging]

\starttext

\dorecurse{30}{\input zapf}

\stoptext


just don't work


On Tue, Nov 15, 2011 at 3:58 AM, Hans Hagen pra...@wxs.nl wrote:
 On 15-11-2011 04:32, Yue Wang wrote:

 Still not fixed!


 btw, Hans, how to enable hz in MKII for officina?

 \usetypescriptfile[type-buy]
 \definetypeface[officina][rm][serif][officina][default][encoding=texnansi]
 \definetypeface[officina][ss][sans] [officina][default][encoding=texnansi]
 \usetypescript[serif,sans,mono][handling,hanging][highquality]

 move that last line up .. in traditional tex these features are global and
 cannot be enabled for a font afterwards

 \setupbodyfont[officina,ss]
 \setupalign[hz,hanging]


 just don't work at all.


 On Thu, Nov 10, 2011 at 9:18 AM, Yue Wangyuleo...@gmail.com  wrote:

 still not fixed

 On Wed, Nov 9, 2011 at 2:31 PM, Hans Hagenpra...@wxs.nl  wrote:

 On 9-11-2011 18:02, Yue Wang wrote:

 Hi, Mojca:

 just updated context and mkii told me

 !pdfTeX error: pdftex (file texnansi.enc): cannot open encoding file
 for
 reading

 is this file removed?

 not on purpose .. it should be there

 -
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
 -




 --

 -
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
 -

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

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


Re: [NTG-context] texnansi.enc

2011-11-15 Thread Yue Wang
see the attachment

On Tue, Nov 15, 2011 at 6:59 AM, Yue Wang yuleo...@gmail.com wrote:
 tried


 \usetypescript[serif,sans,mono][handling,hanging][highquality]
 \usetypescriptfile[type-buy]
 \definetypeface[officina][rm][serif][officina][default][encoding=texnansi]
 \definetypeface[officina][ss][sans] [officina][default][encoding=texnansi]

 \setupbodyfont[officina,ss]
 \setupalign[hz,hanging]

 \starttext

 \dorecurse{30}{\input zapf}

 \stoptext


 just don't work


 On Tue, Nov 15, 2011 at 3:58 AM, Hans Hagen pra...@wxs.nl wrote:
 On 15-11-2011 04:32, Yue Wang wrote:

 Still not fixed!


 btw, Hans, how to enable hz in MKII for officina?

 \usetypescriptfile[type-buy]
 \definetypeface[officina][rm][serif][officina][default][encoding=texnansi]
 \definetypeface[officina][ss][sans] [officina][default][encoding=texnansi]
 \usetypescript[serif,sans,mono][handling,hanging][highquality]

 move that last line up .. in traditional tex these features are global and
 cannot be enabled for a font afterwards

 \setupbodyfont[officina,ss]
 \setupalign[hz,hanging]


 just don't work at all.


 On Thu, Nov 10, 2011 at 9:18 AM, Yue Wangyuleo...@gmail.com  wrote:

 still not fixed

 On Wed, Nov 9, 2011 at 2:31 PM, Hans Hagenpra...@wxs.nl  wrote:

 On 9-11-2011 18:02, Yue Wang wrote:

 Hi, Mojca:

 just updated context and mkii told me

 !pdfTeX error: pdftex (file texnansi.enc): cannot open encoding file
 for
 reading

 is this file removed?

 not on purpose .. it should be there

 -
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
 -




 --

 -
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
 -




Untitled.tex
Description: TeX document


Untitled.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] texnansi.enc

2011-11-14 Thread Yue Wang
Still not fixed!


btw, Hans, how to enable hz in MKII for officina?

\usetypescriptfile[type-buy]
\definetypeface[officina][rm][serif][officina][default][encoding=texnansi]
\definetypeface[officina][ss][sans] [officina][default][encoding=texnansi]
\usetypescript[serif,sans,mono][handling,hanging][highquality]

\setupbodyfont[officina,ss]
\setupalign[hz,hanging]


just don't work at all.


On Thu, Nov 10, 2011 at 9:18 AM, Yue Wang yuleo...@gmail.com wrote:
 still not fixed

 On Wed, Nov 9, 2011 at 2:31 PM, Hans Hagen pra...@wxs.nl wrote:
 On 9-11-2011 18:02, Yue Wang wrote:

 Hi, Mojca:

 just updated context and mkii told me

 !pdfTeX error: pdftex (file texnansi.enc): cannot open encoding file for
 reading

 is this file removed?

 not on purpose .. it should be there

 -
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
 -


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

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


Re: [NTG-context] texnansi.enc

2011-11-10 Thread Yue Wang
still not fixed

On Wed, Nov 9, 2011 at 2:31 PM, Hans Hagen pra...@wxs.nl wrote:
 On 9-11-2011 18:02, Yue Wang wrote:

 Hi, Mojca:

 just updated context and mkii told me

 !pdfTeX error: pdftex (file texnansi.enc): cannot open encoding file for
 reading

 is this file removed?

 not on purpose .. it should be there

 -
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
 -

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

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


[NTG-context] texnansi.enc

2011-11-09 Thread Yue Wang
Hi, Mojca:

just updated context and mkii told me

!pdfTeX error: pdftex (file texnansi.enc): cannot open encoding file for reading

is this file removed?

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


Re: [NTG-context] bug in \setuparranging

2011-10-03 Thread Yue Wang
btw, is there some way to rotate all the glyphs in a given range (like
the xetex's font:vertical feature)
vrt2 doesn't seems to work in this way.

On Sat, Oct 1, 2011 at 10:10 PM, Yue Wang yuleo...@gmail.com wrote:
 Hi, Hans:

 this bug is still not solved.

 Yue Wang

 On Thu, Sep 22, 2011 at 5:04 PM, Aditya Mahajan adit...@umich.edu wrote:
 On Thu, 22 Sep 2011, Yue Wang wrote:

 Hi, Aditya and Hans:

 On Thu, Sep 22, 2011 at 4:46 PM, Aditya Mahajan adit...@umich.edu wrote:

 I haven't investigated what is going wrong, but a quick fix is

 \setuppapersize[A4,landscape][A4,landscape]

 I don't understand the arranging code, but doesn't the following also do
 what you want (without the arranging)

 \setuppapersize[A4,landscape,rotated,270][A4]


 Yes, I know these tricks. A quick workaround to this problem is to use the

 \setuppapersize[A4,landscape][A4,landscape]

 and then add either

 %\pdfpagesattr{/Rotate 90} --pdftex, luatex
 %\special{pdf:put @pages /Rotate 90}  --xetex, dvipdfmx

 or the more generic way:

 \doPDFpagesattribute{/Rotate 90}

 And that did fix my problem temporary.

 But things are not going as expected, and it's better to fix these
 bugs, isn't it?

 Sure.

 But I was also answering you second question about rotating a page without
 using arranging.

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


Re: [NTG-context] bug in \setuparranging

2011-10-03 Thread Yue Wang
Hi, Hans

Here's an example of vertical typesetting in XeTeX.

%tex=xetex
\setuppapersize[A4,landscape,rotated, 270]
\definefontsynonym [song][name:AdobeSongStd-Light\xetexcolon vertical]
\definefont[Song][song at 14pt]
\starttext
\Song 你好
\stoptext

In this case all glyphs in AdobeSongStd-Light are rotated 90 degrees
via xetex vertical, and rotated back via paper definition.

I'm wondering how to do that in LuaTeX. Also, in vertical typesetting,
latin glyphs do not need to be rotated.

I'm doing this since omega multi-dir is not quite working at least for
the moment.

Yue

On Mon, Oct 3, 2011 at 1:49 PM, Hans Hagen pra...@wxs.nl wrote:
 On 3-10-2011 19:15, Yue Wang wrote:

 btw, is there some way to rotate all the glyphs in a given range (like
 the xetex's font:vertical feature)
 vrt2 doesn't seems to work in this way.

 I never looked into that (so an example text + font is needed).

 Hans


 -
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
 -

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

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

Re: [NTG-context] bug in \setuparranging

2011-10-01 Thread Yue Wang
Hi, Hans:

this bug is still not solved.

Yue Wang

On Thu, Sep 22, 2011 at 5:04 PM, Aditya Mahajan adit...@umich.edu wrote:
 On Thu, 22 Sep 2011, Yue Wang wrote:

 Hi, Aditya and Hans:

 On Thu, Sep 22, 2011 at 4:46 PM, Aditya Mahajan adit...@umich.edu wrote:

 I haven't investigated what is going wrong, but a quick fix is

 \setuppapersize[A4,landscape][A4,landscape]

 I don't understand the arranging code, but doesn't the following also do
 what you want (without the arranging)

 \setuppapersize[A4,landscape,rotated,270][A4]


 Yes, I know these tricks. A quick workaround to this problem is to use the

 \setuppapersize[A4,landscape][A4,landscape]

 and then add either

 %\pdfpagesattr{/Rotate 90} --pdftex, luatex
 %\special{pdf:put @pages /Rotate 90}  --xetex, dvipdfmx

 or the more generic way:

 \doPDFpagesattribute{/Rotate 90}

 And that did fix my problem temporary.

 But things are not going as expected, and it's better to fix these
 bugs, isn't it?

 Sure.

 But I was also answering you second question about rotating a page without
 using arranging.

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


[NTG-context] bug in \setuparranging

2011-09-22 Thread Yue Wang
Hi, Hans:

There's a bug in \setuparranging.

The following case is easy to be understood:

- I try to typeset zapf into a A4 landscape paper
- For the final output pdf, I want to rotate all the pages by 270 degrees.

This sounds strange. But it is useful in vertical typesetting of CJK
language. (for example, use xetex font definition's  :vertical feature
to rotate all the fonts used, typeset on normal paper, and rotate the
page back. I certainly hope someday I can use MKIV's muti-dir omega
features, but now it's broken so this is the best way I can find)

The code is listed below:

\setuppapersize[A4,landscape][A4]
\setuppaper [nx=1,ny=1]
\setuparranging [XY, rotated, 270]
\setupcolors[state=start]
\setupbackgrounds   [page][page][background=screen]
\setuppagenumbering [state=stop]

\starttext
\input zapf
\stoptext


The bug:

- in MKIV, it output no pages at all
- in MKII (both xetex and pdftex), the output page is not, however,
A4. but rather a square page with width=height=A4 height.

I hope this bug can be fixed soon.

By the way, are there other ways to rotate pages other than
setuparranging? From my daily use I found setup arranging is pretty
buggy. sometimes it even affects the layout of the contents. So most
time I have to compile a pdf, and than use setup arranging to
rearrange the pdf again to make the contents safe.

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


Re: [NTG-context] bug in \setuparranging

2011-09-22 Thread Yue Wang
Hi,

I think the bug appears in setup paper size as well:

\setuppapersize[A4,landscape]
\input zapf
\bye


produces the wrong result.

Yue Wang

On Thu, Sep 22, 2011 at 2:07 AM, Yue Wang yuleo...@gmail.com wrote:
 Hi, Hans:

 There's a bug in \setuparranging.

 The following case is easy to be understood:

 - I try to typeset zapf into a A4 landscape paper
 - For the final output pdf, I want to rotate all the pages by 270 degrees.

 This sounds strange. But it is useful in vertical typesetting of CJK
 language. (for example, use xetex font definition's  :vertical feature
 to rotate all the fonts used, typeset on normal paper, and rotate the
 page back. I certainly hope someday I can use MKIV's muti-dir omega
 features, but now it's broken so this is the best way I can find)

 The code is listed below:

 \setuppapersize[A4,landscape][A4]
 \setuppaper     [nx=1,ny=1]
 \setuparranging     [XY, rotated, 270]
 \setupcolors        [state=start]
 \setupbackgrounds   [page][page][background=screen]
 \setuppagenumbering [state=stop]

 \starttext
 \input zapf
 \stoptext


 The bug:

 - in MKIV, it output no pages at all
 - in MKII (both xetex and pdftex), the output page is not, however,
 A4. but rather a square page with width=height=A4 height.

 I hope this bug can be fixed soon.

 By the way, are there other ways to rotate pages other than
 setuparranging? From my daily use I found setup arranging is pretty
 buggy. sometimes it even affects the layout of the contents. So most
 time I have to compile a pdf, and than use setup arranging to
 rearrange the pdf again to make the contents safe.

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


Re: [NTG-context] bug in \setuparranging

2011-09-22 Thread Yue Wang
Hi, Aditya:

What do you mean by wrong result.

\setuppapersize[A4,landscape]

\starttext
\input zapf
\stoptext

works fine (ver: 2011.09.20). See attached pdf.

I know. MKIV works in this short sample.

but XeTeX and pdfTeX don't, as my first mail indicated.

See attached pdf


And, MKIV is buggy too. try the first mail's example (after upgrading
to the latest version it does not blank page anymore. but it's still
wrong).


Yue Wang


Untitled-2.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] bug in \setuparranging

2011-09-22 Thread Yue Wang
Hi, Aditya and Hans:

On Thu, Sep 22, 2011 at 4:46 PM, Aditya Mahajan adit...@umich.edu wrote:
 I haven't investigated what is going wrong, but a quick fix is

 \setuppapersize[A4,landscape][A4,landscape]

 I don't understand the arranging code, but doesn't the following also do
 what you want (without the arranging)

 \setuppapersize[A4,landscape,rotated,270][A4]


Yes, I know these tricks. A quick workaround to this problem is to use the

\setuppapersize[A4,landscape][A4,landscape]

and then add either

%\pdfpagesattr{/Rotate 90} --pdftex, luatex
%\special{pdf:put @pages /Rotate 90}  --xetex, dvipdfmx

or the more generic way:

\doPDFpagesattribute{/Rotate 90}

And that did fix my problem temporary.

But things are not going as expected, and it's better to fix these
bugs, isn't it?

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


[NTG-context] crop PDF pages

2011-09-19 Thread Yue Wang
Hi, powerful context users:

I'm wondering why there is no crop setting for \externalfigure or \insertpages.
I have a lot of scanned books in PDF format, most of them are double sided.
I want to read them on kindle but the huge margins take too much space
and as a result the texts are too small.
I want to use commands like \insertpages to crop all the pages with
different bounding box settings for odd/even pages.
there's a scale option for \copypages but it's somewhat naive to use
in such practical cases...


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


Re: [NTG-context] Questions related to margin/dynamic layout

2011-08-29 Thread Yue Wang
Many thanks! Wolfgang!

it seems that this is a mkiv only command.

what about the second and third question?

On Mon, Aug 29, 2011 at 12:41 PM, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:

 Am 27.08.2011 um 05:40 schrieb Yue Wang:

 Hi,

 I have two questions related to margin:

 - is it possible to move footnotes to margin?

 \setupnote          [footnote][location=none]
 \setupnotedefinition[footnote][location=serried,width=broad]

 \setuptexttexts
  [margin]
  []
  [{\framed[align=right,frame=off,height=\textheight,width=\rightmarginwidth]{\placenotes[footnote]}}]

 \starttext
 \dorecurse{20}{\input knuth\reference[foo:#1]{#1}\footnote{Knuth #1}}
 \stoptext

 - similar question: I want to have a list in the margin with all the
 indexes in the given page.

 How to make these possible?

 Third question is related to layout.

 I know how to change page layout for a particular page. but how to
 change layout for a page whose number is unknown?

 for example, I am writing a book that has several large pictures
 (imagine a portfolio, or a book introducing photography).

 in order to fit the pictures I plan to set each pictures as page
 background or layers, that spans 3/2 pages, while leaving the
 remaining span (1/2 page) for text.

 however, I don't know which page number the picture should be reside,
 but I know it should be put near some given text content.

 it's not possible to manually give the page number according to the
 content because usually document context/formatting change all the
 time.

 how to do that?

 You can fix a float to a certain position with \placeFLOAT[force]{…}{…}.

 TO shorten/enlarge a page you can put \adaptlayout in your document
 and context change the layout of the page where the command is seen.

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

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


Re: [NTG-context] Questions related to margin/dynamic layout

2011-08-29 Thread Yue Wang
On Mon, Aug 29, 2011 at 1:45 PM, Wolfgang Schuster
schuster.wolfg...@googlemail.com wrote:

 Am 29.08.2011 um 19:00 schrieb Yue Wang:

 Many thanks! Wolfgang!

 it seems that this is a mkiv only command.

 No, all commands are also available with mkii but the note mechanism has some 
 limitations.

 what about the second and third question?

 Dunno about the second question, maybe there is a tracker option you can use.

 For the third a few more infos can be useful. When you want to keep the 
 picture and the text together you can try to place the text for the picture 
 with layers too, there are examples for this in the “details” and the “style” 
 manuals.


the text main text (just normal text in between the start text and
stop text). so details and style might not suffice.

Since if I put it within a layer, the text will not flow correctly.

for example:

\starttext

(a lot of paragraphs)

surrounding paragraphs

\some_command_to_include_the_picture

surrounding paragraphs

(a lot of paragraphs)

\stoptext

here, the paragraphs should run as normal paragraphs, with these requirement:

1. the paragraphs runs continuously
2. when the picture occurs, the layout of that span changes
3. the paragraphs still runs without (page) breaks through surrounding
pages including the picture span page.
4. the surrounding paragraphs before and after, should appear near the picture.


take an example:

\starttext
paragraphs A-P
\include picture
paragraph Q-Z
\stoptext

the final result should be:

page1: para A,B,C
page2: para D,E

page 13: para M, N
page 14: 2/3 picture
page 15: 1/3 picture + text flow (para O,P,Q)
page 16: paraR, S,


when the user include the picture, he will have no idea where the
picture might appear.
So is there a way to automatically change the page layout at a
specific page (at this example, page 14,15).





 Wolfgang


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

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


Re: [NTG-context] Questions related to margin/dynamic layout

2011-08-28 Thread Yue Wang
Hi,


anyone can give me a hint?

Yue Wang

On Fri, Aug 26, 2011 at 11:40 PM, Yue Wang yuleo...@gmail.com wrote:
 Hi,

 I have two questions related to margin:

 - is it possible to move footnotes to margin?
 - similar question: I want to have a list in the margin with all the
 indexes in the given page.

 How to make these possible?

 Third question is related to layout.

 I know how to change page layout for a particular page. but how to
 change layout for a page whose number is unknown?

 for example, I am writing a book that has several large pictures
 (imagine a portfolio, or a book introducing photography).

 in order to fit the pictures I plan to set each pictures as page
 background or layers, that spans 3/2 pages, while leaving the
 remaining span (1/2 page) for text.

 however, I don't know which page number the picture should be reside,
 but I know it should be put near some given text content.

 it's not possible to manually give the page number according to the
 content because usually document context/formatting change all the
 time.

 how to do that?



 Thanks.

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

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


[NTG-context] Questions related to margin/dynamic layout

2011-08-26 Thread Yue Wang
Hi,

I have two questions related to margin:

- is it possible to move footnotes to margin?
- similar question: I want to have a list in the margin with all the
indexes in the given page.

How to make these possible?

Third question is related to layout.

I know how to change page layout for a particular page. but how to
change layout for a page whose number is unknown?

for example, I am writing a book that has several large pictures
(imagine a portfolio, or a book introducing photography).

in order to fit the pictures I plan to set each pictures as page
background or layers, that spans 3/2 pages, while leaving the
remaining span (1/2 page) for text.

however, I don't know which page number the picture should be reside,
but I know it should be put near some given text content.

it's not possible to manually give the page number according to the
content because usually document context/formatting change all the
time.

how to do that?



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

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


[NTG-context] Math delimiters too big in lucida in MKII

2011-01-09 Thread Yue Wang
Hi, Hans:

I dont know why you do this in math-lbr.mkii:

\def\LBRbig  {\@@dobig{8.20}}
\def\LBRBig  {\@@dobig{10.80}}
\def\LBRbigg {\@@dobig{13.42}}
\def\LBRBigg {\@@dobig{16.03}}
\def\LBRbiggg{\@@dobig{17.72}}
\def\LBRBiggg{\@@dobig{21.25}}

% \def\LBRbig  {\@@dobig{0.820}}
% \def\LBRBig  {\@@dobig{1.080}}
% \def\LBRbigg {\@@dobig{1.342}}
% \def\LBRBigg {\@@dobig{1.603}}
% \def\LBRbiggg{\@@dobig{1.772}}
% \def\LBRBiggg{\@@dobig{2.125}}

I think the second set of parameters( the commented one) is correct.
or \big,\bigg, etc will produce huge delimiters...

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


Re: [NTG-context] proportional oldstyle figure not working in MKIV

2011-01-01 Thread Yue Wang
Thanks. got it.

BTW, what are the conditions that mode != node are used?

On Sat, Jan 1, 2011 at 7:01 AM, Hans Hagen pra...@wxs.nl wrote:
 On 1-1-2011 7:11, Yue Wang wrote:

 Hi, Hans:

 I think there are problems with the current MKIV font loading code.

 sample code:


 \definefontfeature[minion][language=dflt, script=latn, onum=yes,
 kern=yes, pnum=yes]
 \definefontsynonym[Minion][MinionPro-Regular][features=minion]
 \definefont[Minion][Minion at 34pt]
 \starttext
 \Minion
 1234567890
 \stoptext


 This works in MKII (XeTeX). Please fix that. Thanks

 add mode=node

 -
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
                                             | www.pragma-pod.nl
 -

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

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


Re: [NTG-context] mkii bug in lucida, again.

2010-12-31 Thread Yue Wang
updated to the latest context.

still not fixed

On Sun, Dec 19, 2010 at 12:26 PM, Yue Wang yuleo...@gmail.com wrote:
 This bug only exist in mkii.

 it appeared some time ago, but was fixed later, and reappeared again
 sometime later this year.

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

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


[NTG-context] proportional oldstyle figure not working in MKIV

2010-12-31 Thread Yue Wang
Hi, Hans:

I think there are problems with the current MKIV font loading code.

sample code:


\definefontfeature[minion][language=dflt, script=latn, onum=yes,
kern=yes, pnum=yes]
\definefontsynonym[Minion][MinionPro-Regular][features=minion]
\definefont[Minion][Minion at 34pt]
\starttext
\Minion
1234567890
\stoptext


This works in MKII (XeTeX). Please fix that. 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] mkii bug in lucida, again.

2010-12-19 Thread Yue Wang
This bug only exist in mkii.

it appeared some time ago, but was fixed later, and reappeared again
sometime later this year.

Hans, I will zip my lucida font and send to you in a private mail.

Yue Wang


a.pdf
Description: Adobe PDF document


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


Re: [NTG-context] mkii bug in lucida, again.

2010-12-19 Thread Yue Wang
BTW, there is also something strange with lucida support in context recently.
if I use
\usetypescriptfile[type-buy]
\usetypescript[lucida][texnansi]
\setupbodyfont[lucida,14pt]


I suppose it should load texnansi-xxx.tfm

but it reports

! Font \*lucida12ptrmtfrm*:=hlhr8y at 12.0pt not loadable: Metric (TFM) file no
t found.
to be read again
   \relax
\definefontglobal ...dcsname \lastfontname \relax
  \expandafter \let \expanda...

\xxdododefinefont ...tspec {#4}\newfontidentifier
  \let \localrelativefontsiz...

\fontstrategy ...me \fontclass #2#3#4#5\endcsname
  \tryingfontfalse \fi
inserted text ...yle \fontalternative \fontsize
  \fi \iftryingfont \fontstr...

\synchronizefont ...strategy \the \fontstrategies
  \relax \fi \iftryingfont \...
...
l.3 \setupbodyfont[lucida,14pt]


I think this is not correct.

Yue Wang
On Sun, Dec 19, 2010 at 12:26 PM, Yue Wang yuleo...@gmail.com wrote:
 This bug only exist in mkii.

 it appeared some time ago, but was fixed later, and reappeared again
 sometime later this year.

 Hans, I will zip my lucida font and send to you in a private mail.

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


[NTG-context] color all the formulae?

2010-12-15 Thread Yue Wang
Hi, Hans:

Is there some way to color all the formulae braced in $$ and
\start|stopformula?

I search setupcolors, only textcolor is available.

there are also no color key in setupformulae.

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


[NTG-context] How can I input Join?

2009-09-22 Thread Yue Wang
Hi,

I am doing my logic homework using ConTeXt.  the command \Join (ref.
http://w2.syronex.com/jmr/tex/texsym.old.html) seems to be missing in
ConTeXt.  (I searched showmathcharacters in context)
How can I input that?

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
___


Re: [NTG-context] How can I input Join?

2009-09-22 Thread Yue Wang
Hi,

Sorry for my stupid question... The command does exist in ConTeXt.
It's name is \Join.
I wonder it should be added to \showmathcharacters output.

Thanks

Yue Wang

On Tue, Sep 22, 2009 at 8:53 PM, Yue Wang yuleo...@gmail.com wrote:
 Hi,

 I am doing my logic homework using ConTeXt.  the command \Join (ref.
 http://w2.syronex.com/jmr/tex/texsym.old.html) seems to be missing in
 ConTeXt.  (I searched showmathcharacters in context)
 How can I input that?

 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
___


Re: [NTG-context] [OT] mupdf

2009-07-24 Thread Yue Wang
well, so maybe there can be a luatex binding to replace original xpdf?
and  we can remove cpp code completely in LuaTeX...
(and that enable the plan 9 guys to compile luatex on those exotic systems.)
On Fri, Jul 24, 2009 at 6:08 PM, luigi scarsoluigi.sca...@gmail.com wrote:


 On Fri, Jul 24, 2009 at 11:53 AM, Taco Hoekwater t...@elvenkind.com wrote:


 Taco Hoekwater wrote:
 
  The more serious problem is that it does not interaction objects
  at all, not even bookmarks or hyperlinks.

 Oops sorry, it does indeed do in-document hyperlinks.

 ==
  ABOUT

 MuPDF is a lightweight PDF viewer and toolkit written in portable C.

 The renderer in MuPDF is tailored for high quality anti-aliased graphics.
 MuPDF renders text with metrics and spacing accurate to within fractions of
 a pixel for the highest fidelity in reproducing the look of a printed page
 on screen.

 MuPDF has a small footprint. A binary that includes the standard Roman fonts
 is only one megabyte. A build with full CJK support (including an Asian
 font) is approximately five megabytes.

 MuPDF has support for all non-interactive PDF 1.7 features, and the toolkit
 provides a simple API for accessing the internal structures of the PDF
 document. Example code for navigating interactive links and bookmarks,
 encrypting PDF files, extracting fonts, images, and searchable text, and
 rendering pages to image files is provided.
 

 I haven't  find an example for bookmarks .

 --
 luigi


 ___
 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] mupdf

2009-07-24 Thread Yue Wang
I am able to compile one for Mac OS X 10.5 half an year ago.
Works flawlessly.

On Fri, Jul 24, 2009 at 8:15 PM, Patrick Gundlachpatr...@gundla.ch wrote:

 http://ccxvii.net/mupdf/
 It seems a valid alternative to xpdf

 anybody got a mac binary?


 Patrick
 --
 ConTeXt wiki and more: 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
 ___

___
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] off topic: math symbols for latex

2009-07-18 Thread Yue Wang
you definitely want to try the equation editor distributed in Windows 7!

http://att.newsmth.net/att.php?p.460.288125.214.png

On Sat, Jul 18, 2009 at 5:07 AM, Mojca
Miklavecmojca.miklavec.li...@gmail.com wrote:
 On Fri, Jul 17, 2009 at 21:02, Patrick Gundlach wrote:
 Hi,

 this is a nice website where you can draw a symbol with your mouse and
 the site will tell you how you get the symbol in LaTeX. Again, LaTeX tries to
 be one step ahead... :)

 http://detexify.kirelabs.org/classify.html

 (found on the Mac OS X TeX mailing list)

 This tool is a few days (ok, maybe weeks) old. Most symbols are equal
 anyway, but I'm sure that you can convince the author to add ConTeXt
 commands as well. (He claims to be LaTeX beginner, so handling ConTeXt
 should be equally trivial for him :)

 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
 ___

___
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] context mkiv bug + related feature request + related question

2009-07-18 Thread Yue Wang
This bug is still not solved in the current context mkiv version.

On Mon, Jun 22, 2009 at 11:36 AM, Yue Wangyuleo...@gmail.com wrote:
 Hi, Hans:


 bug report :
 here is the test file. (old version of mkiv produce right result.
 current mkii result is also right)
 It is a bug introduced in this/last month.
 The code is a stripped down version of
 http://wiki.contextgarden.net/Horizontal_Table_of_Contents (altough it
 doesn't show toc horizontally)

 \newcount\chapcounter \chapcounter=0
 \def\tocchap#1#2#3{\advance\chapcounter by 1 #1 #2%
        \placelist[section][criterium=chapter,number=\chapcounter]}
 \starttext
 \placelist[chapter][alternative=command,command=\tocchap]
 \chapter{hello} \section{hello} \section{hello}
 \chapter{good} \section{good} \section{good}
 \chapter{bad} \section{bad} \section{bad}
 \stoptext

 feature request:

 btw, Hans, context should give an option to iterate through all the
 chapters/sections to do something tricky.
 using \chaptercounter is a really bad idea (the materials should
 follow strict rules, like cannot jump from chap 1 to chap 3).
 I think with mkiv it is able to achieve that.

 question:

 I want to show toc before each chapter, and the toc only shows the
 following chapter name in red.
 How can I do that?
 e.g. show the following before chapter 3

 % A Page
 Chap1
 sec 1 sec 2 sec 3
 Chap2
 sec 1 sec 2 sec 3
 Chap 3  %in red
 sec 1 sec 2 sec 3 %in Red
 Chap4
 sec 1 sec 2 sec 3
 % Next Page
 Chapter 3 % title
 a lot of materials


 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] CTAN has a new package: ConTeXt Notes

2009-07-07 Thread Yue Wang
in fact we also submit another document yesterday:
http://www.ctan.org/tex-archive/info/context-top-ten/
but I don't know why there is no announcement on the ctan mailing list.

On Tue, Jul 7, 2009 at 3:11 PM, luigi scarsoluigi.sca...@gmail.com wrote:
 http://www.mail-archive.com/ctan-...@dante.de/msg02315.html

 --
 luigi


 ___
 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] context mkiv bug + related feature request + related question

2009-06-25 Thread Yue Wang
any help?

On Mon, Jun 22, 2009 at 11:36 AM, Yue Wangyuleo...@gmail.com wrote:
 Hi, Hans:


 bug report :
 here is the test file. (old version of mkiv produce right result.
 current mkii result is also right)
 It is a bug introduced in this/last month.
 The code is a stripped down version of
 http://wiki.contextgarden.net/Horizontal_Table_of_Contents (altough it
 doesn't show toc horizontally)

 \newcount\chapcounter \chapcounter=0
 \def\tocchap#1#2#3{\advance\chapcounter by 1 #1 #2%
        \placelist[section][criterium=chapter,number=\chapcounter]}
 \starttext
 \placelist[chapter][alternative=command,command=\tocchap]
 \chapter{hello} \section{hello} \section{hello}
 \chapter{good} \section{good} \section{good}
 \chapter{bad} \section{bad} \section{bad}
 \stoptext

 feature request:

 btw, Hans, context should give an option to iterate through all the
 chapters/sections to do something tricky.
 using \chaptercounter is a really bad idea (the materials should
 follow strict rules, like cannot jump from chap 1 to chap 3).
 I think with mkiv it is able to achieve that.

 question:

 I want to show toc before each chapter, and the toc only shows the
 following chapter name in red.
 How can I do that?
 e.g. show the following before chapter 3

 % A Page
 Chap1
 sec 1 sec 2 sec 3
 Chap2
 sec 1 sec 2 sec 3
 Chap 3  %in red
 sec 1 sec 2 sec 3 %in Red
 Chap4
 sec 1 sec 2 sec 3
 % Next Page
 Chapter 3 % title
 a lot of materials


 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] context mkiv bug + related feature request + related question

2009-06-21 Thread Yue Wang
Hi, Hans:


bug report :
here is the test file. (old version of mkiv produce right result.
current mkii result is also right)
It is a bug introduced in this/last month.
The code is a stripped down version of
http://wiki.contextgarden.net/Horizontal_Table_of_Contents (altough it
doesn't show toc horizontally)

\newcount\chapcounter \chapcounter=0
\def\tocchap#1#2#3{\advance\chapcounter by 1 #1 #2%
\placelist[section][criterium=chapter,number=\chapcounter]}
\starttext
\placelist[chapter][alternative=command,command=\tocchap]
\chapter{hello} \section{hello} \section{hello}
\chapter{good} \section{good} \section{good}
\chapter{bad} \section{bad} \section{bad}
\stoptext

feature request:

btw, Hans, context should give an option to iterate through all the
chapters/sections to do something tricky.
using \chaptercounter is a really bad idea (the materials should
follow strict rules, like cannot jump from chap 1 to chap 3).
I think with mkiv it is able to achieve that.

question:

I want to show toc before each chapter, and the toc only shows the
following chapter name in red.
How can I do that?
e.g. show the following before chapter 3

% A Page
Chap1
sec 1 sec 2 sec 3
Chap2
sec 1 sec 2 sec 3
Chap 3  %in red
sec 1 sec 2 sec 3 %in Red
Chap4
sec 1 sec 2 sec 3
% Next Page
Chapter 3 % title
a lot of materials


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

2009-06-19 Thread Yue Wang
On Fri, Jun 19, 2009 at 2:29 PM, luigi scarsoluigi.sca...@gmail.com wrote:

 Anyway, I highly respect the ConTeXt and LuaTeX's work.
 But if Taco and Hans can :

 - use a proper regexp library (like lrexlib?), not the silly lpeg

 PEG are not silly at all. PEG *include* regex, but not viceversa,
 and it seems to have the same power of  CFG, so you can build a parser for
 pratically anything
 (and you can not do this with regex) .
 Perhaps the reverse sentence has more sense: drop the silly (?) regex, use
 the new peg.
 For what I know the reverse side of lpeg is that a file must be loaded in
 memory completly.

Well, I don't like to know what kind of thing is superior ... micro
kernel is superior than monolithic kernel, but...

The key reason for this is, more people are familiar with regexp. so
if you can build a 100% compatible regexp module on top of lpeg in
ConTeXt, it will be ok, or even better...


 - more powerful multi columns (maybe not through gird typesetting?)

 Maybe columnset can do  more, or we need more examples from hans .


yes. but columnset requires more strict rules (e.g., grid stuffs)
why not build a version of columnset on top of normal TeX page building?
(grid can be a option, should not be a requirement)


 - full support of xslt:)

 why not xquery too? Are mkiv  supposed to be a full  xml processor ?


No. I mean the user can have an option to convert an xml (that is, a
context document) using (maybe external) xslt tool.
This won't be too difficult to implement ...

 A bit of xslt can be done with lpeg (and not regex),

a bit == far from all

 but usually  it's better to prepare a xml to typeset before processing with
 mkiv
 (use the right tool for the right task).


 Things might be a lot better...

 and worse too .
 Things are now a lot better than before ,IMMO .


it should be.


 --
 luigi


 ___
 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] Suggestion

2009-06-18 Thread Yue Wang
On Mon, Jun 15, 2009 at 7:55 PM, Arun Devarundv...@gmail.com wrote:

 Hi,

     You can increase the popularity of ConTeXt by eliminating the need
 to install Perl and Ruby.


MKIV does not dependent on Perl and Ruby.
I think Hans has plan to convert the MKII scripts to Lua language.


Anyway, I highly respect the ConTeXt and LuaTeX's work.
But if Taco and Hans can :

- use a proper regexp library (like lrexlib?), not the silly lpeg
- make font loading faster (by massive fontforge change or replace it
with ft2+libotf. we need more efficient solution esp for big fonts)
- support TeX line-break-like page break
- support arbitrary text-flow maybe via mplib (example: The ultimate
(?) float problem + How could a typesetting system be today? on
mailing list )
- make processing conditional-aware (see two newbie questions about
conditional processing on the mailing list)
- fix the bug of focus=standard
- more powerful multi columns (maybe not through gird typesetting?)
- full support of xslt:)

Things might be a lot better...


 ___
 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] stand-alone ConTeXt

2009-06-15 Thread Yue Wang
 the mswincontext zip always provided ruby and gs and as well as xmlproc and
 xsltproc

 it's just that now that we have the garden minimals i no longer make my own
 so making mswincontex makes less sense too


What about make a mswinbonus.zip for the user who need them,
like MacTeX shipped its gs/imagemagick...


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] stand-alone ConTeXt

2009-06-15 Thread Yue Wang
 It depends if the Minimals are intended to be a complete TeX system or
 if they are meant to be a minimal system for ConTeXt, possibly
 complementing the utility programs from TeX Live.


it is just context minimals' extra...
minimals can still be a minimal system for ConTeXt.

 —Joel Salomon
 ___
 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] stand-alone ConTeXt

2009-06-14 Thread Yue Wang
 btw, if one uses mkiv, ruby is no longer needed unless one wants to run
 specific scripts that are not yet luafied; but then, installing ruby is no
 big deal anyway

How about process the mkii document using lua script too? So
eventually we can get rid of ruby and perl.

now context script supports --pdftex and --xetex switch, but it still
fall back to texexec and texutils ruby scripts.



 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] stand-alone ConTeXt

2009-06-12 Thread Yue Wang
right now the most important thing missing in the distribution is:
gs, ruby, xml stuffs, gzip, zip, and tidy.

On Fri, Jun 12, 2009 at 3:44 PM, Hans Hagenpra...@wxs.nl wrote:
 Kevin D. Robbins wrote:

 Thanks! I'll play around a bit with TeXWorks and Notepad++.

 i have texworks kind of working (stripped and patched set of configuration
 files) and at some point i will add them to the distribution

 -
                                          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] nice link

2009-06-02 Thread Yue Wang
too simple, too naive... one can not even find Psychrometric chart there...

On Tue, Jun 2, 2009 at 8:16 PM, Hans Hagen pra...@wxs.nl wrote:
 handy for info about languages and so ...

 http://www.wolframalpha.com/

 you can also key in formulas


 -
                                          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] two newbie questions (about conditional processing)

2009-05-23 Thread Yue Wang
anyone can help? thanks.

On Thu, May 21, 2009 at 9:25 AM, Yue Wang yuleo...@gmail.com wrote:
 Hi,

 I have a new book to design, but I don't know how to do page/content
 conditional processing). Please help me:)

 - I want my chapter page (first page of each chapter) to be really
 distinctive. that is, I define a dark color background, and want all
 the text on the first page set in white. how can I do that? for
 example
 \chapter{hello}
 \dorecurse{10}{\input zapf } % all the characters in the first page
 should white, others should set in black.

 - I want to insert graphics and images. all the graphics are inserted
 using \placeexternalfigures. I want all the pages where the insertion
 happens to be quite distictive (that is, have a very narrow text
 layout, and leave the large margin for the figures. However, when a
 page starts, TeX does not know wheter or not an external figure will
 be placed on this page, so it really has no idea whether this page
 should be set narrower or not. how can I do that?

 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
___


Re: [NTG-context] two newbie questions (about conditional processing)

2009-05-23 Thread Yue Wang
On Sun, May 24, 2009 at 12:49 AM, Zhichu Chen zhichu.c...@gmail.com wrote:
 On Thu, May 21, 2009 at 9:25 AM, Yue Wang yuleo...@gmail.com wrote:
 Hi,

 I have a new book to design, but I don't know how to do page/content
 conditional processing). Please help me:)

 - I want my chapter page (first page of each chapter) to be really
 distinctive. that is, I define a dark color background, and want all
 the text on the first page set in white. how can I do that? for
 example
 \chapter{hello}
 \dorecurse{10}{\input zapf } % all the characters in the first page
 should white, others should set in black.
 This must have something to do with the OTR, I'm really not good
 at that.

 By \definecolor[black][r=1, g=1, b=1] you can get white texts which
 maybe useful for you.

confused. can you give me an example?



 - I want to insert graphics and images. all the graphics are inserted
 using \placeexternalfigures. I want all the pages where the insertion
 happens to be quite distictive (that is, have a very narrow text
 layout, and leave the large margin for the figures. However, when a
 page starts, TeX does not know wheter or not an external figure will
 be placed on this page, so it really has no idea whether this page
 should be set narrower or not. how can I do that?
 Sounds like an \insert like footnote. Good luck.


Yes. but a footnote on margin...


 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
 ___




 --
 Best Regards
 Chen
 

          Zhi-chu Chen | Shanghai Synchrotron Radiation Facility
         No. 2019 | Jialuo Rd. | Jiading | Shanghai | P.R. China
             tel: 086 21 5955 3405 | zhichu.chen.googlepages.com
                                               | www.sinap.ac.cn
 
 ___
 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] MkIV italic correction?

2009-05-20 Thread Yue Wang
it supports italic correction by default.

On Wed, May 20, 2009 at 2:25 PM, Corsair chris.cors...@gmail.com wrote:
 Hi all,

 Does MkIV support italic correction?  Because the following code
 produces two identical f)s

 \starttext
 {\it f})
 {\it f\/})
 \stoptext

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

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


[NTG-context] two newbie questions (about conditional processing)

2009-05-20 Thread Yue Wang
Hi,

I have a new book to design, but I don't know how to do page/content
conditional processing). Please help me:)

- I want my chapter page (first page of each chapter) to be really
distinctive. that is, I define a dark color background, and want all
the text on the first page set in white. how can I do that? for
example
\chapter{hello}
\dorecurse{10}{\input zapf } % all the characters in the first page
should white, others should set in black.

- I want to insert graphics and images. all the graphics are inserted
using \placeexternalfigures. I want all the pages where the insertion
happens to be quite distictive (that is, have a very narrow text
layout, and leave the large margin for the figures. However, when a
page starts, TeX does not know wheter or not an external figure will
be placed on this page, so it really has no idea whether this page
should be set narrower or not. how can I do that?

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
___


Re: [NTG-context] Fonts in minimal

2009-05-20 Thread Yue Wang
On Thu, May 21, 2009 at 8:49 AM, Maurí­cio briqueabra...@yahoo.com wrote:
 Hi,

 The minimal Context distributions comes with
 many fonts. Are there predefined (using mfonts.pdf
 terminology) simple, body or typeface definitions
 available for those fonts, or a subset of them?


Yes. see showfonts.pdf



 Thanks,
 Maurício

 ___
 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] XeConTeXt bug report I: strange benchmark

2009-05-13 Thread Yue Wang
I can confirm that I am wrong.

2009/5/13 Yue Wang yuleo...@gmail.com:
 Hi, Hans:

 On Tue, May 12, 2009 at 11:22 PM, Hans Hagen pra...@wxs.nl wrote:
 \setupbodyfont[myzhfont] \dorecurse{1}{{hello
 {\switchtobodyfont[myzhfont] 你好}}\par}
 so it's probably also an operating system issue (caching files in mem, disk 
 access etc)

 After debugging for half an hour in the morning, finally I know why
 this is so slow on both XeTeX and pdfTeX.
 This problem is not an operating system issue, But a ConTeXt feature.

 in font-mkii, you use the following to define a actual font
 (\definefontlocal and \definefontglobal):
  {\expandafter\xdef\csname#1\endcsname  % ! ! ! ! not needed in luatex ! ! ! !
 {\noexpand\csname#1:\endcsname
  \noexpand\reactivatefont{\somefontname}{\fontfile}}%

 For example, in the previous example, it will define a lot of fonts,
 like \*myzhfont12ptmmexrm*: , is defined as
 \reactivatefont{cmex10}{lmex10}. When define that font, a macro
 \*myzhfont12ptmmexrm* is defined to select the \*myzhfont12ptmmexrm* :
 font.
 \*myzhfont12ptmmexrm* =\csname *myzhfont12ptmmexrm* :\endcsname
 \reactivefont{cmex10}{lmex10}
 TeX then expand your reactivatefont macros to lmex10 at 12.0pt. So the
 \*myzhfont12ptmmexrm*: font will assigned to lmex10 at 12.0pt. This is
 quite right for definition.

 However, after switching the font, the problems occurs:
 it tries to call \*myzhfont12ptmmexrm* macro. the macro then expands to
 \csname *myzhfont12ptmmexrm* :\endcsname \reactivefont{cmex10}{lmex10}
 then to
 \*myzhfont12ptmmexrm* :\reactivefont{cmex10}{lmex10}
 and here TeX tries to do the following thing:
 TeX select the font \*myzhfont12ptmmexrm*:, which is lmex10 at 12pt,
 then *changing* into that font environment in order to *typeset*
 \reactivefont.  it then expand the macro of reacitve font, but found
 nothing to typeset...

 what's worse, this will occur on every real fonts in the definition.
 So in fact TeX will switching dozens of fonts into the *current* font
 for a \switchtobodyfont call, in order to typeset nothing. And
 that's why ConTeXt is so slow on typeface changing.

 The solution to this bug (or feature?) is quite easy, just use \font
 to define the \*myzhfont12ptmmexrm*: font, but pay attention not to
 switch the current font to \*myzhfont12ptmmexrm*: . Since it is quite
 slow to switch to dozens of font for one \switchtobodyfont call even
 in Knuth TeX.




 Yue Wang









 so it's probably also an operating system issue (caching files in mem, disk
 access etc)

 -
  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] XeConTeXt bug report I: strange benchmark

2009-05-13 Thread Yue Wang
On Wed, May 13, 2009 at 7:12 PM, Mojca Miklavec
mojca.miklavec.li...@gmail.com wrote:
 On Wed, May 13, 2009 at 12:41, Wolfgang Schuster wrote:

 Am 13.05.2009 um 12:17 schrieb Mojca Miklavec:

 Or do you want to suggest that one would possibly need both serif
 and sans variants of some Chinese font, often switching between
 families inside a document?

 That's what I mean, also in chinese you use different fonts for
 serif, sans and mono.

 Wait a minute ... why do they need mono/typewriter? Aren't all the
 Chinese glyphs fixed width anyway?


We do not need mono. We do not even need italic, bold italic, and small caps.
ConTeXt/LaTeX's naming scheme just follow traditional latin way, and
that's pretty different compared to Asian scripts.
(of course, some of them are similar. for example,  Song is like roman
regular, CuSong is like roman bold. LiShu is like calligraphy,
Dengxian is like Sans. CuDengXian (Hei) is like Sans bold).
But why do we define them all as latin typefaces? that's just because
we should follow traditional ConTeXt or LaTeX way, since the whole
ConTeXt or LaTeX system is heavily based on their own font naming
mechanism. You can grep the ConTeXt source code, and find font
switching like \it, \rm, \ss appears on almost every file. If we
insist on our own naming mechanism (like \song, \hei, \cusong), then
ConTeXt will become unusable in the end.
Moreover, the only way to write consist document in both latin and cjk
language is to fall cjk fonts into latin system. Suppose you want to
define a document chapter title font, neither \heid  nor \bfd  will
suffice. The only way is to map all chinese font names (hei, song, for
example) to latin names(bold italic, for example) [since latin names
can be treat as a super set of asian names], or design a more
comprehensive naming system, and later mapping both into that.
Then return to your question. what happens if mono is not defined?
well. when you want to write a web link or source code that contains
Chinese like
\type{http://zh.wikipedia.org/wiki/字体}
or
\starttyping
if (filename == NIL){
   printf(文件%s未找到\n, filename);
   return -1;
}
\stoptyping
you will run into problems since mono for Chinese are not defined.


 Also, if one has a well-designed font that includes all the latin
 glyphs and all the bold/italic variants then one should in principle
 not need an extra latin family, but those are probably just nice
 dreams ... I always had the impression that there are not many
 high-quality Chinese fonts and that having bold and italic alone is a
 problem, not to speak about frequent mixing of several different
 families.


Chinese fonts released in recent years have better latin glyphs
design. But as I said before, the Chinese script system is quite
different from the Latin one. Chinese companies are not obliged to
include italic or small caps glyphs in their Chinese fonts, just
like we cannot ask Adobe to include kai and song styles in their
Minion Pro fonts.

 (Just thinking alound: aren't there plenty of books around that also
 mix lots of greek and latin, possibly using different fonts for them?
 How do they deal with the problem, or is the problem just
 neglectable?)



Compound typeface is a very basic feature required for all typesetting
software.
Quark and InDesign have options to enable this feature.
This is even possible in no-production-purpose software like Microsoft Word.

But as far as I know, most typographic software programs are WYSIWYG
systems, and rendering a page in computer is much faster than typing a
word by human beings. So we will not notice the performance problem in
these systems. But for TeX this is different, in order to see the
result after positioning something to the right place, or changing a
few words, several compile-view-adjust-compile-view-adjust
procedures will be involved. So the long compilation time will make
the software unusable (Imagine that you want to correct a minor error
in a document and see the result, you press the typeset button in
TeXWorks, leave the lualatex program running, and during the 5 minutes
compilation time, you can have a cup of tea and enjoy the sunshine...
Anyway, t-zhspacing is much faster than lualatex. but 1 minutes to
compile a 100 pages document is still too long)

But one thing is always puzzling me: When open MS Word, it consumes
16MB memory, then I typeset Chinese text in 10 different Chinese fonts
(all are 10M+ each), word only consumes 30MB memory. If I do that in
LuaTeX it will consume almost 1G memory... why MS Word parses fonts
and renders text so fast while consumes such less memory? Can TeX do
that too?


 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  : 

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

2009-05-13 Thread Yue Wang
oh, no. better change that to this:
/XYZ @xpos @ypos 0
so xetex and pdftex/luatex will share the same behavior. (it point to
the place a little bit lower, so the behavior is much better than fit)
as to the wrong destination.. I highly suspect that the PDF /Dests is
written right after the box, not before the box.


On Wed, May 13, 2009 at 1:37 AM, Hans Hagen pra...@wxs.nl wrote:
 Yue Wang wrote:

 On Tue, May 12, 2009 at 8:49 PM, Hans Hagen pra...@wxs.nl wrote:

 Jin-Hwan Cho wrote:


 I think that the value of the paperheight is better than 0 for top
 value.

 thanks for figuring it out ... i now just fall back to fit


 then focus=standard wont make the link point to the right place...

 well, so be it .. i have no time now to look into xyz placement

 btw, in ConTeXt's pdftex or luatex mode, it also point to the wrong place.
 but Eplain and LaTeX hyperref handle that right...

 as Chof pointed out, it also relates a bit to how the viewer shows the page

 i tested the fixes for pdftex/xetex and it seems to work ok now

 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] replacement of \...@. ?

2009-05-13 Thread Yue Wang
On Thu, May 14, 2009 at 9:51 AM, Ryo Furue fu...@hawaii.edu wrote:
 Hi ConTeXt users,

 I'm wondering what's the ConTeXt version
 of LaTeX's \...@.  (which indicates an end-of-sentence
 period).  I can define

  \d...@{\spacefactor1000}

 and use it, but if there is an official version
 I'd like to know.


I think in Professional typesetting, the same amount of space should
be left for all full stop/comma/whaever.
You'd better change TeX's default behavior.

 Regards,
 Ryo
 ___
 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
___


[NTG-context] enco-xtx.tex is still wrong

2009-05-12 Thread Yue Wang
Hi, Hans,


The enco-xtx.tex defination is still wrong...
it behaves very differently compared to unicode-letters.tex


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] XeConTeXt bug report I: strange benchmark

2009-05-12 Thread Yue Wang
Hi:

update: change the second example, remove the .otf suffix , and
texexec --xtx gives:
TeXExec | runtime: 5.766
Obviously, this is a parsing bug in ConTeXt.

I doubt the reason to the third one is the same.

Yue Wang



2009/5/12 Yue Wang yuleo...@gmail.com:
 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
___


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

2009-05-12 Thread Yue Wang
Hi,

Sum up:
define a font usng typescripts takes 64.797 seconds.
define a font like \definefont[a][file:SimSun.ttf] takes 55.548 seconds
define a font like \definefont[a][file:SimSun] takes 4.329 seconds
define a font like \font\a=[simsun] takes 1.812 seconds

Jonathan and Jin-Hwan, sorry for the noise. I am now sure that it is a
context bug, not xetex's.

Yue Wang

2009/5/12 Yue Wang yuleo...@gmail.com:
 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
___


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

2009-05-12 Thread Yue Wang
here is the xelatex result given by a chinese user:

\documentclass{minimal}
\usepackage{xeCJK}
\setCJKfamilyfont{song}{SimSun}
\begin{document}
{hello {\CJKfamily{song}你好}}\par % 1 lines
\end{document}

got 209 pages, three seconds to run.
note he is switching  families 2 times. (\family{foo} in latex ==
\switchbodyfont[foo] in context)

On Tue, May 12, 2009 at 5:30 PM, Hans Hagen pra...@wxs.nl wrote:
 Yue Wang wrote:
 Hi,

 Sum up:
 define a font usng typescripts takes 64.797 seconds.
 define a font like \definefont[a][file:SimSun.ttf] takes 55.548 seconds
 define a font like \definefont[a][file:SimSun] takes 4.329 seconds
 define a font like \font\a=[simsun] takes 1.812 seconds

 Jonathan and Jin-Hwan, sorry for the noise. I am now sure that it is a
 context bug, not xetex's.

 and

 update: change the second example, remove the .otf suffix , and
 texexec --xtx gives:
 TeXExec | runtime: 5.766
 Obviously, this is a parsing bug in ConTeXt.

 context is not parsing for .otf or .ttf and has no reason for it either

 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] XeConTeXt bug report I: strange benchmark

2009-05-12 Thread Yue Wang
sorry the the context sample and latex sample are not equivalent
(note the \par).

So I test again:
\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}

\dorecurse{1}{{hello {\a 你好}}\par}

\bye


XeConTeXt uses 45.502 seconds, while XeLaTeX uses 3 seconds.

2009/5/12 Yue Wang yuleo...@gmail.com:
 here is the xelatex result given by a chinese user:

 \documentclass{minimal}
 \usepackage{xeCJK}
 \setCJKfamilyfont{song}{SimSun}
 \begin{document}
 {hello {\CJKfamily{song}你好}}\par % 1 lines
 \end{document}

 got 209 pages, three seconds to run.
 note he is switching  families 2 times. (\family{foo} in latex ==
 \switchbodyfont[foo] in context)

 On Tue, May 12, 2009 at 5:30 PM, Hans Hagen pra...@wxs.nl wrote:
 Yue Wang wrote:
 Hi,

 Sum up:
 define a font usng typescripts takes 64.797 seconds.
 define a font like \definefont[a][file:SimSun.ttf] takes 55.548 seconds
 define a font like \definefont[a][file:SimSun] takes 4.329 seconds
 define a font like \font\a=[simsun] takes 1.812 seconds

 Jonathan and Jin-Hwan, sorry for the noise. I am now sure that it is a
 context bug, not xetex's.

 and

 update: change the second example, remove the .otf suffix , and
 texexec --xtx gives:
 TeXExec | runtime: 5.766
 Obviously, this is a parsing bug in ConTeXt.

 context is not parsing for .otf or .ttf and has no reason for it either

 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] XeConTeXt bug report I: strange benchmark

2009-05-12 Thread Yue Wang
Thank you, Taco.

currently I found one way to speed up font loading:

\synchronizemathfontsfalse
\let\synchronizetext\relax
\starttypescript[serif] [myzhfont]
 \definefontsynonym [Serif]   [file:SimSun]
\stoptypescript
\definetypeface [myzhfont] [rm] [serif][myzhfont]   [default]
\def\a{\myzhfont}
\dorecurse{1}{{hello {\a 你好}}\par}
\bye

TeXExec | runtime: 10.172
much faster, but still far slower than \definefont.

this reminds me another possible bug in ConTeXt:



Test1:

\definetypeface[iwona][ss][sans] [iwona] [default]
\definetypeface[iwona][mm][math] [iwona] [default][text=ss]
\setupbodyfont[iwona]
\starttext
foobar
\stoptext

runtime= 6.625. There is a 5 seconds pause after loading
(c:/context/tex/texmf-context/tex/context/base/spec-xet.tex)

But I don't know what xetex is loading.




Test 2:

\definetypeface[iwona][ss][sans] [iwona] [default]
%\definetypeface[iwona][mm][math] [iwona] [default][text=ss]
\setupbodyfont[iwona]
\starttext
foobar
\stoptext

I only comment the math defination line. now
runetime = 0.969




Test 3:

move the three lines to context.rme,
\definetypeface[iwona][ss][sans] [iwona] [default]
\definetypeface[iwona][mm][math] [iwona] [default][text=ss]
\setupbodyfont[iwona]
then rebuild the format.
note we also load the math font. but one thing is clear: Hans said
unlike plain TeX and LaTeX, font tfm is not dumped into ConTeXt
format.
However, at this time we compile
\starttext
foobar
\stoptext

runtime =0.875

I don't know the reason for this problem too
I think XeTeX load math tfms quite fast. (it should be even faster
than otf loading, but in xecontext, this is not true).


Yue Wang

On Tue, May 12, 2009 at 6:16 PM, Taco Hoekwater t...@elvenkind.com wrote:


 Hans Hagen wrote:
 anyway .. i cannot comment on runtimes as xetex on my windows box runs
 too slow (caching issue) and all examples are slow, no matter how i
 specify fonts so i will not look into the code till that gets fixed first

 The example with the typescript seems logical to me: a typescript does
 much work beforehand, so I assume SimSum is loaded multiple times.

 I am trying the AdobeSong example as we speak, there surely seems
 something wrong there.

 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
 ___

___
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] XeConTeXt bug report II: MetaPost Graphics

2009-05-12 Thread Yue Wang
Hi, Hans

Prof. Cho asked you to comment the line after the {
i.e.:

- {\scratchdimen\wd#2\scratchdimen.5\scratchdimen\hskip-\the\scratchdimen
+{%

Yue Wang

On Tue, May 12, 2009 at 7:05 PM, Hans Hagen pra...@wxs.nl wrote:
 Yue Wang wrote:

 736 on current version

 but that line already looks that way ... so what needs to be patched


 -
                                          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] XeConTeXt bug report I: strange benchmark

2009-05-12 Thread Yue Wang
On Tue, May 12, 2009 at 7:26 PM, Taco Hoekwater t...@elvenkind.com wrote:
 Hans Hagen wrote:

   Taco Hoekwater wrote:

 Hans Hagen wrote:

 anyway .. i cannot comment on runtimes as xetex on my windows box runs
 too slow (caching issue) and all examples are slow, no matter how i
 specify fonts so i will not look into the code till that gets fixed
 first

 The example with the typescript seems logical to me: a typescript does
 much work beforehand, so I assume SimSum is loaded multiple times.

 I am trying the AdobeSong example as we speak, there surely seems
 something wrong there.

 let's start with saying that I have no intention to optimize mkii for
 xetex as we decided some time ago (at the context meeting) that we would

 For educational purposes: whether you have

  \definefont[a][file:AdobeSongLight-Std]
 or
  \definefont[a][file:AdobeSongLight-Std.otf]

 makes no difference to context at all.

 The first makes \a expand into (simplified)

  \font\internala=[AdobeSongLight-Std] at 12pt\internala

 the second into

  \font\internala=[AdobeSongLight-Std.otf] at 12pt\internala

 but there are no other macro expansion changes at all. You can test
 this yourself by making two alternative files an adding \loggingall
 to them, then compare the two logs using diff.

 As to the reason why one of the two is much slower than the other:
 I do not know for sure, but I suspect that XeTeX does not cache
 the (some of) the internals results of font file assignments with
 explicit extensions. The speed difference is most certainly *not*
 caused by anything the context macros do.


disagreed: you can test by yourself that

\font\a=[simsun]
\starttext
\dorecurse{1}{ hello {\a 你好}\par}
\stoptext

runtime: TeXExec | runtime: 2.922

\font\a=[simsun.ttf]
\starttext
\dorecurse{1}{ hello {\a 你好}\par}
\stoptext

runtime: TeXExec | runtime: 2.938




 Best wishes,
 Taco

 PS As to why \definefont is itself slower than \font: it does not
 actually define a font \a at a specific size. Instead it defines a
 macro \a that defines and then selects a font with an internal,
 temporary name, using the local font size etc.









 ___
 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] XeConTeXt bug report I: strange benchmark

2009-05-12 Thread Yue Wang
Hi,

 \font\a=[AdobeSongStd-Light.otf]
 \starttext
 \dorecurse{1}{ hello {\a 你好}\par}
 \stoptext
runtime = 3.25

 \font\a=[AdobeSongStd-Light]
 \starttext
 \dorecurse{1}{ hello {\a 你好}\par}
 \stoptext
runtime=3.234

Yue Wang

2009/5/12 Taco Hoekwater t...@elvenkind.com:


 Yue Wang wrote:

 \font\a=[simsun]
 \starttext
 \dorecurse{1}{ hello {\a 你好}\par}
 \stoptext

 runtime: TeXExec | runtime: 2.922

 \font\a=[simsun.ttf]
 \starttext
 \dorecurse{1}{ hello {\a 你好}\par}
 \stoptext

 runtime: TeXExec | runtime: 2.938

 Please try an otf font and/or actually compare the log files,
 as I said.

 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
 ___

___
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] XeConTeXt bug report I: strange benchmark

2009-05-12 Thread Yue Wang
2009/5/12 Hans Hagen pra...@wxs.nl:
 Yue Wang wrote:
 Thank you, Taco.

 currently I found one way to speed up font loading:

 \synchronizemathfontsfalse
 \let\synchronizetext\relax
 \starttypescript[serif] [myzhfont]
  \definefontsynonym [Serif]   [file:SimSun]
 \stoptypescript
 \definetypeface [myzhfont] [rm] [serif][myzhfont]   [default]
 \def\a{\myzhfont}
 \dorecurse{1}{{hello {\a 你好}}\par}
 \bye

 as wolfgang already pointed out, if you want fast fonts you should
 define them directly using \definefont


I have no speed gain while testing his example.


 if you disable bits and pieces of the setupbodyfont mechanism you will
 eventually run into problems, for instance because \tfd etc are not
 defined and your chapter titles etc will behave unexpected (sizes as
 well as when mixed with math)


You are right.

 in a regular document you only set up the bodyfont once (not 1
 times) and then use \bf, \sl, \itc etc which are pretty fast


for multilingual typesetting this is different.
different fonts will be used for full-width punctuations,
cjk-characters (maybe also splict to ruby, kanji, hangul and hanzi),
cjk-exta, cjk-extb, and latin. for a not-so-long document (100 pages),
switching more than 100times/page is ordinary case.
Especially for educational documents (For example, English text book
for Chinese students)


 TeXExec | runtime: 10.172
 much faster, but still far slower than \definefont.

 this reminds me another possible bug in ConTeXt:

 as mentioned ... we're no talking bugs here but 'features' and side
 effects of them

ok. this is a feature that I don't like so much...



 Test1:

 \definetypeface[iwona][ss][sans] [iwona] [default]
 \definetypeface[iwona][mm][math] [iwona] [default][text=ss]
 \setupbodyfont[iwona]
 \starttext
 foobar
 \stoptext

 runtime= 6.625. There is a 5 seconds pause after loading
 (c:/context/tex/texmf-context/tex/context/base/spec-xet.tex)

 But I don't know what xetex is loading.

 fonts (like the sans and more noticeably math (6 families * 3 sizes = 18
 fonts at least)


but it's pretty fast on mac (only 1 second delay) on the same machine.
[mac do not use fontconfig for searching system fonts]
Strange uh? Well, I call it Windows features:)

moreover, can you tell me why pdftex load these fonts so fast? (also 6
families * 3 sizes)

 Test 2:

 \definetypeface[iwona][ss][sans] [iwona] [default]
 %\definetypeface[iwona][mm][math] [iwona] [default][text=ss]
 \setupbodyfont[iwona]
 \starttext
 foobar
 \stoptext

 I only comment the math defination line. now
 runetime = 0.969

 right .. and as context is supposed to do math (keep in mind that some
 symbols come from math anyway) this is expected


ok.

 Test 3:

 move the three lines to context.rme,
 \definetypeface[iwona][ss][sans] [iwona] [default]
 \definetypeface[iwona][mm][math] [iwona] [default][text=ss]
 \setupbodyfont[iwona]
 then rebuild the format.
 note we also load the math font. but one thing is clear: Hans said
 unlike plain TeX and LaTeX, font tfm is not dumped into ConTeXt
 format.

 well, in this case you probably *did* force them in format; the normal
 default font (lm) is not in the format and loading is delayed


no. I did exactly the same as the default settings do.
you also use :
\setupencoding[default=ec]
\usetypescript[fallback][\defaultencoding] \setupbodyfont[rm,12pt]
in cont-en.tex. also in context.tex:
\setupencoding[default=ec]
\usetypescript[fallback][\defaultencoding]
\setupbodyfont[rm,12pt]

So I am not forcing them into the format. actually the loading of
iwona is delayed to runtime.


 However, at this time we compile
 \starttext
 foobar
 \stoptext

 runtime =0.875

 I don't know the reason for this problem too
 I think XeTeX load math tfms quite fast. (it should be even faster
 than otf loading, but in xecontext, this is not true).

 more needs to be set up ... not only fonts, + some testing + ...

 just do a \tracingall before setupbodyfont and you will see

 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

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

2009-05-12 Thread Yue Wang
Hi,


On Tue, May 12, 2009 at 8:26 PM, Taco Hoekwater t...@elvenkind.com wrote:


 Yue Wang wrote:

  \font\a=[AdobeSongStd-Light]

 Why? I asked to use \definefont.

After reading Hans' explanation, I understand what you said now.
\dorecurse{1}{ hello {\font\a=[AdobeSongStd-Light]\a 你好}\par}
is fast while
\dorecurse{1}{ hello {\font\a=[AdobeSongStd-Light.otf]\a 你好}\par}
is slow

Thank you. Will report that to Jonathan Kew.


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
 ___

___
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] enco-xtx.tex is still wrong

2009-05-12 Thread Yue Wang
On Tue, May 12, 2009 at 5:27 PM, Hans Hagen pra...@wxs.nl wrote:
 Mojca Miklavec wrote:

 wrong:
   f:write(format(\\XeTeXcharclass\%04X
 \\XeTeXcharclass%s\n,i,upper(lbc)))
 better:
   f:write(format(\\XeTeXcharclass\%04X
 \\XeTeXcharclass%s\n,code,upper(lbc)))

 But I didn't test anything at all.

 ok, i'll fix that




Hi

The current version is still not right.
in unicode-letters.tex, three ranges are defined to id:

\ID 3400 4DB5
\ID 4E00 9FC3
\ID 2 2A6D6

So in fact all the codes from 3400-4DB5, 4E00-9FC3, 2-2A6D6 are
assigned to \ID.

these ranges are missing in xetx-cls.tex:

...
\setXTXcharacterclass 3400 lb:id
\setXTXcharacterclass 4DB5 lb:id
...
\setXTXcharacterclass 4E00 lb:id
\setXTXcharacterclass 9FBB lb:id
...
\setXTXcharacterclass 2 lb:id
\setXTXcharacterclass 2A6D6 lb:id
...

so in xetx.cls, the boundaries are roughly there, but all the numbers
in the range are missing.


Yue Wang
 -
                                          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] XeConTeXt bug report I: strange benchmark

2009-05-12 Thread Yue Wang
On Tue, May 12, 2009 at 8:54 PM, Hans Hagen pra...@wxs.nl wrote:
 Yue Wang wrote:


 moreover, can you tell me why pdftex load these fonts so fast? (also 6
 families * 3 sizes)

 i don't know; as the same code is used so it must be xetex itself then

Then let me tell you why: ConTeXt tries to load lmmono10-regular at
least 6 times, failed after two testing, then succeed in the end.
However, try to testing whether a loaded font is \nullfont or not is
quite slow in XeTeX (Jonathan already mentioned that in
\testFontIsAvailable). we should definately avoid that.
But why pdftex is so fast? because it does not involve font testing.

So why XeTeX is spending 6 seconds aimlessly? since ConTeXt asked it
to search for a non-existed font.

Yue Wang






 -
                                          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] XeConTeXt bug report I: strange benchmark

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

here is the solution to your great feature:

change
 \def\defaultfontfile{lmmono10-regular}
in font-ini.mkii to
\def\defaultfontfile{[lmmono10-regular]}
to disable that feature.

Yue Wang

On Tue, May 12, 2009 at 9:59 PM, Yue Wang yuleo...@gmail.com wrote:
 On Tue, May 12, 2009 at 8:54 PM, Hans Hagen pra...@wxs.nl wrote:
 Yue Wang wrote:


 moreover, can you tell me why pdftex load these fonts so fast? (also 6
 families * 3 sizes)

 i don't know; as the same code is used so it must be xetex itself then

 Then let me tell you why: ConTeXt tries to load lmmono10-regular at
 least 6 times, failed after two testing, then succeed in the end.
 However, try to testing whether a loaded font is \nullfont or not is
 quite slow in XeTeX (Jonathan already mentioned that in
 \testFontIsAvailable). we should definately avoid that.
 But why pdftex is so fast? because it does not involve font testing.

 So why XeTeX is spending 6 seconds aimlessly? since ConTeXt asked it
 to search for a non-existed font.

 Yue Wang






 -
                                          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] XeConTeXt bug report I: strange benchmark

2009-05-12 Thread Yue Wang
On Tue, May 12, 2009 at 10:50 PM, Hans Hagen pra...@wxs.nl wrote:
 Yue Wang wrote:

 On Tue, May 12, 2009 at 8:54 PM, Hans Hagen pra...@wxs.nl wrote:

 Yue Wang wrote:


 moreover, can you tell me why pdftex load these fonts so fast? (also 6
 families * 3 sizes)

 i don't know; as the same code is used so it must be xetex itself then

 Then let me tell you why: ConTeXt tries to load lmmono10-regular at
 least 6 times, failed after two testing, then succeed in the end.
 However, try to testing whether a loaded font is \nullfont or not is
 quite slow in XeTeX (Jonathan already mentioned that in
 \testFontIsAvailable). we should definately avoid that.
 But why pdftex is so fast? because it does not involve font testing.

 So why XeTeX is spending 6 seconds aimlessly? since ConTeXt asked it
 to search for a non-existed font.

 well, even locating a font 6 times should be no big deal



loading 6 fonts, each fonts will be scanned for 3 times. so there are
18 searching. 12 of them are fc searches, and these are quite slow.

 btw, you can try to change the following into

 \def\defaultfontfile{file:lmmono10-regular}


After changing like this, XeTeX runs like a blink. (It wasted 6
seconds for each compile. now it won't)

 but even then ... if that one is used then there is something else going on
 so best find out what happens ... in context we can have 4 extra math
 families and in most cases only two are used (MathAlpha and MathBeta) while
 (just in onder to catch errors) MathGamma etc then automatically will
 trigger the default font to be used (other approached would demand more
 definitions at the user end and/or a more low level implementation); the
 only optimization i can imagine is more clever sharing of the default font
 but as in other cases one expects the default to be properly scaled it not
 that simple; after all, users also expect proper error recovery (and in many
 cases missing some specific fonts is no real problem until it's used); so,
 you can hardly blame context for the fact that xetex has a certain logix on
 locating fonts that happens to be not that good a match for context

 The fact that xetex uses this mixture of  en [] does not help either as
 context uses [] itself so parsing is somewhat complicated (the file/name
 prefix was introduced to circumvent this problem);

 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] XeConTeXt bug report I: strange benchmark

2009-05-12 Thread Yue Wang
On Tue, May 12, 2009 at 11:02 PM, Hans Hagen pra...@wxs.nl wrote:
 Yue Wang wrote:

 Hi, Hans:

 here is the solution to your great feature:

 huh? what great features? what's wrong with the features anyway? you want a
 special version that instead prints hundreds of error messages each and
 every run because some font is missing which in practice is harmless?

 change
  \def\defaultfontfile{lmmono10-regular}
 in font-ini.mkii to
 \def\defaultfontfile{[lmmono10-regular]}
 to disable that feature.

 it should be \defaultfontfile{file:lmmono10-regular} (when i  played with
 that this morning it made not much difference on the test runs here but the
 file: prefix does not hurt)


There is great difference here (8 sec compare to 1.2 seconds per run)


 don't use the [ ] syntax which is rather engine specific

But that line is enclosed in
\ifXeTeX and \endif...
So it will be fine.


 i moved all xetex code to a separate file font-xtx now (not sure if that
  has side effects due to definition order but don't want to mess up the mkii
 code)


I see.

 but it cannot solve the suffix problem nor the name lookup problems due to
 caching

I already reported that feature/bug to Jonathan Kew



 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] XeConTeXt bug report I: strange benchmark

2009-05-12 Thread Yue Wang
On Tue, May 12, 2009 at 11:22 PM, Hans Hagen pra...@wxs.nl wrote:
 Yue Wang wrote:

 On Tue, May 12, 2009 at 11:02 PM, Hans Hagen pra...@wxs.nl wrote:

 Yue Wang wrote:

 Hi, Hans:

 here is the solution to your great feature:

 huh? what great features? what's wrong with the features anyway? you want
 a
 special version that instead prints hundreds of error messages each and
 every run because some font is missing which in practice is harmless?

 change
  \def\defaultfontfile{lmmono10-regular}
 in font-ini.mkii to
 \def\defaultfontfile{[lmmono10-regular]}
 to disable that feature.

 it should be \defaultfontfile{file:lmmono10-regular} (when i  played with
 that this morning it made not much difference on the test runs here but
 the
 file: prefix does not hurt)


 There is great difference here (8 sec compare to 1.2 seconds per run)

 makes no difference here for the big test


Well, I always split my projects into small pieces so... it really counts.


 \setupbodyfont[myzhfont] \dorecurse{1}{{hello
 {\switchtobodyfont[myzhfont] 你好}}\par}

 so it's probably also an operating system issue (caching files in mem, disk
 access etc)


Well, that is possible. But in fact no new font is defined during the
font switching, which is paradoxical.
I will look into that tomorrow.

Please fix the
- lmmono defination
- unicode-letters charclass definations
- mpgraphics displacement bug (or feature...)
- dvipdfmx focus=standard feature
that I reported today.

Thank you. Good night and good luck!

Yue Wang

 -
  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] XeConTeXt bug report I: strange benchmark

2009-05-12 Thread Yue Wang
On Tue, May 12, 2009 at 11:41 PM, Hans Hagen pra...@wxs.nl wrote:
 Taco Hoekwater wrote:

 Yue Wang wrote:

 \def\defaultfontfile{file:lmmono10-regular}

 After changing like this, XeTeX runs like a blink. (It wasted 6
 seconds for each compile. now it won't)

 Does that mean that the near-endless font issues with xetex are
 now finally fixed?

 no ... suffix and name lookup remain (but the file: before the fallback font
 saves such name lookups so we disguised the problem)


no.  \definetypeface[foobar][blablabla] \dorecurse{1}{{hello
{\foobar 你好}}\par}
is still very slow. I will look into that tomorrow.

Other problems are solved (why \setupbodyfont[iwona] is slow, why
\definefont[simsun.ttf] is slow, etc.)

Concerning the suffix problem, I already reported that to Jonathan
Kew. I think he will fix that very soon.

Yue Wang
 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] Chinese opentype fonts can not be loaded in luatex-plain

2009-05-12 Thread Yue Wang
On Tue, May 12, 2009 at 11:47 PM, Hans Hagen pra...@wxs.nl wrote:
 Yanrui Li wrote:

 I need to load it only for the experiments of Chinese punctuation
 compression in the bbox way.

 i played with that and discarded the code (in mkiv) for the moment because
 first i want more info about fonts and their quality ... one easily spends
 days on solving 'bugs' that are actually bugs in fonts instead

 i will look again into these issues when

 - i get precise rules for spacing (or multiple rule sets)

No one have the epxerience of using the bbox information to typeset
Chinese before --- that information was not availble to the user until
LuaTeX came into being.
So even experienced Chinese typesetting artist don't know the spacing rules.
We have to play/experiment that in LuaTeX in order to find the best
possible parameters for typesetting.
Then we can report to you what should ConTeXt do in order to type
Chinese perfectly.

 - we have a set of default cjk fonts in tex live that can serve as reference

Adobe set will be good enough for reference.


 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] XeConTeXt bug report III: Wrong hyperlink

2009-05-12 Thread Yue Wang
On Tue, May 12, 2009 at 8:49 PM, Hans Hagen pra...@wxs.nl wrote:
 Jin-Hwan Cho wrote:


 I think that the value of the paperheight is better than 0 for top
 value.

 thanks for figuring it out ... i now just fall back to fit


then focus=standard wont make the link point to the right place...
btw, in ConTeXt's pdftex or luatex mode, it also point to the wrong place.
but Eplain and LaTeX hyperref handle that right...



 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] XeConTeXt bug report I: strange benchmark

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

On Tue, May 12, 2009 at 11:22 PM, Hans Hagen pra...@wxs.nl wrote:
 \setupbodyfont[myzhfont] \dorecurse{1}{{hello
 {\switchtobodyfont[myzhfont] 你好}}\par}
 so it's probably also an operating system issue (caching files in mem, disk 
 access etc)

After debugging for half an hour in the morning, finally I know why
this is so slow on both XeTeX and pdfTeX.
This problem is not an operating system issue, But a ConTeXt feature.

in font-mkii, you use the following to define a actual font
(\definefontlocal and \definefontglobal):
  {\expandafter\xdef\csname#1\endcsname  % ! ! ! ! not needed in luatex ! ! ! !
 {\noexpand\csname#1:\endcsname
  \noexpand\reactivatefont{\somefontname}{\fontfile}}%

For example, in the previous example, it will define a lot of fonts,
like \*myzhfont12ptmmexrm*: , is defined as
\reactivatefont{cmex10}{lmex10}. When define that font, a macro
\*myzhfont12ptmmexrm* is defined to select the \*myzhfont12ptmmexrm* :
font.
\*myzhfont12ptmmexrm* =\csname *myzhfont12ptmmexrm* :\endcsname
\reactivefont{cmex10}{lmex10}
TeX then expand your reactivatefont macros to lmex10 at 12.0pt. So the
\*myzhfont12ptmmexrm*: font will assigned to lmex10 at 12.0pt. This is
quite right for definition.

However, after switching the font, the problems occurs:
it tries to call \*myzhfont12ptmmexrm* macro. the macro then expands to
\csname *myzhfont12ptmmexrm* :\endcsname \reactivefont{cmex10}{lmex10}
then to
\*myzhfont12ptmmexrm* :\reactivefont{cmex10}{lmex10}
and here TeX tries to do the following thing:
TeX select the font \*myzhfont12ptmmexrm*:, which is lmex10 at 12pt,
then *changing* into that font environment in order to *typeset*
\reactivefont.  it then expand the macro of reacitve font, but found
nothing to typeset...

what's worse, this will occur on every real fonts in the definition.
So in fact TeX will switching dozens of fonts into the *current* font
for a \switchtobodyfont call, in order to typeset nothing. And
that's why ConTeXt is so slow on typeface changing.

The solution to this bug (or feature?) is quite easy, just use \font
to define the \*myzhfont12ptmmexrm*: font, but pay attention not to
switch the current font to \*myzhfont12ptmmexrm*: . Since it is quite
slow to switch to dozens of font for one \switchtobodyfont call even
in Knuth TeX.




Yue Wang









 so it's probably also an operating system issue (caching files in mem, disk
 access etc)

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


[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] 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] 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] 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
___


[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] 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
___


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
___


[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] \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
___


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


Re: [NTG-context] setuptex changes in minimals

2009-05-09 Thread Yue Wang
Hi, list:

Well, TeX is evolving rapidly these years (especially in the LuaTeX world).
So there are many things that Chinese typographers never imagine about
in the past can now be solved thanks to LuaTeX's development.

For example:
- Now we can use Lua to detect the character code. so it is possible
to assign different fonts for latin, CJK, CJK-ext A, CJK-extB. font
switching is easy and elegent. This is not possible in tex82.
- It is ugly to produce a paragraph whose last line only consists one
Chinese character. In order to avoid that, tex82 programmers should
write very complicated macros. So many developers here tend to ignore
this problem. However, in LuaTeX, this is quite easy. It is simple to
scan the position before the punctuation and \par in lua, and insert a
line break penalty there.
- Punctuation compression. In the past this is not easy to do (a lot
of macros should be defined), and because each Chinese fonts are so
distinctly designed, their punctuations' positions in the character
box are different. So different parameters should be applied when
different fonts are involved in typesetting. However, LuaTeX make it
possible to calculate character bounding box information, so
punctuation compression is as easy as re-setting the punctuation
width.

There are many more examples, and these are just three. But we can see
that with the development of TeX engine (especially the open-up of TeX
engine), users might consider better ways for old solutions, and even
request for possibilities they never thought about before. So it is
possible for different users to provide different specifications.

But we (me, Li Yanrui, Chen Zhichu) as the board members of the
Chinese TeX Society, will try our best to organized the typesetting
discussion on local forums, taking different opinions into
consideration, and later provide a complete specification as long as
we can.

Chinese support in ConTeXt is not easy, we should thank all the
developers who contribute to our language (esp, Hans, Taco and
Wolfgang), their innovation and hardworking make Chinese typesetting
in ConTeXt possible, and drastically improve the performance of font
loading. Though the current solution is not perfect (eg. there are
many more things we should fix and implement, and the current font
loading time is still a bit too long), I think with the current fast
pace, we will have a very prospective solution near luatex 1.0:)

Yue Wang


On 5/9/09, Yanrui Li liyanrui...@gmail.com wrote:
 On Sat, May 9, 2009 at 4:02 PM, Hans Hagen pra...@wxs.nl wrote:
  Yue Wang wrote:
 
  On Sat, May 9, 2009 at 2:20 AM, Yanrui Li liyanrui...@gmail.com wrote:
 
  Sorry!
 
  s/MkIV have not support Chinese typesetting now / MkIV have not
  support Chinese typesetting well now/g
 
 
  We can start a fork of scrp-* on code.google.com/p/ctex-kit,
  making a usable version, and later ask Hans to merge back into ConTeXt.
 
  it all depends how scrp evolves as it has to deal with more issues too; i
  will not merge code that i don't fully understand but experimenting does not
  hurt; one problem with script stuff is that (in the future) it might be
  closely cooperate with other mechanisms of context (it used to be part of
  the font analyser, now it's plugged in elsewhere but even that might change,
  for instance when in upcoming versions of luatex we have a bit more control)
 

 What I have done is only experiment. I will try my best to follow the
 evolves of the
  scrp-* files until that day, when MkIV support Chinese typesetting well, 
 comes.
 I have to introduce MkIV to Chinese users and make them paying close attention
 to it in this way.

  also, some issues will be dealt with in other code in the future (i simply
  cannot touch all code at the same time) so don't expect mkiv to be finished
  before 2012 (when luatex 1 is ready); it's a stepwise process and it's only
  driven by context (i.e. generic code only shows up when context code works
  okay);
 
  anyhow, as long as nobody tells me what the expected behaviour is, with test
  code etc i can;t fix anything; one complication (e.g. with chinese) is that
  over the last few year is got conflicting requests; now, if there are
  multiple ways to deal with it, then i can implement variants but only if i
  know the exact conventions (with proper names for them)
 

 Yes. It is a key reson that we are still not familiar with MkIV well
 now. But with
 in-depth understanding of MkIV, maybe many suggestions will be post to you.
 Of course these suggestions should be collected according actual demands by
 Chinese TeX users group.

  for instance when i found out that cjk-korean is not the same as cjk-chinese
  (one of them) i split the machinery so we're not talking cjk here, but very
  specific needs; after the split i never tested chinese (no samples) and no
  one else propbably did that either
 
  keep in mind that context is not meant for one language but for many and
  that when possible mechanisms need

Re: [NTG-context] setuptex changes in minimals (was: bugs in beta)

2009-05-08 Thread Yue Wang
On Sat, May 9, 2009 at 2:20 AM, Yanrui Li liyanrui...@gmail.com wrote:
 Sorry!

 s/MkIV have not support Chinese typesetting now / MkIV have not
 support Chinese typesetting well now/g


We can start a fork of scrp-* on code.google.com/p/ctex-kit,
making a usable version, and later ask Hans to merge back into ConTeXt.

Yue Wang



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

___
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] Updating bug

2009-05-03 Thread Yue Wang
when will the bug be fixed? I waited for a week, and I still cannot
update context today:(

On Tue, Apr 28, 2009 at 8:54 AM, Yue Wang yuleo...@gmail.com wrote:
 receiving incremental file list

 sent 91 bytes  received 205 bytes  53.82 bytes/sec
 total size is 4983273  speedup is 16835.38
 MTXrun | fileio: variable SELFAUTOLOC set to C:/context/bin
 MTXrun | fileio: variable SELFAUTODIR set to C:/context
 MTXrun | fileio: variable SELFAUTOPARENT set to C:
 MTXrun | fileio: variable TEXMFCNF set to 
 {$SELFAUTODIR,$SELFAUTOPARENT}{,{/shar
 e,}/texmf{-local,.local,}/web2c}
 MTXrun | fileio: no cnf files found (TEXMFCNF may not be set/known)
 MTXrun | using script: ./bin/mtx-update.lua

 'uname' is not recognized as an internal or external command,
 operable program or batch file.
 C:\context\bin\mtxrun.lua:1611: attempt to call field 'env' (a table value)

 When you want to use context, you need to initialize the tree with:

  C:\context\tex\setuptex.bat C:\context\tex

 You can associate this command with a shortcut to the cmd prompt.

 C:\context

___
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] Updating bug

2009-05-03 Thread Yue Wang
Hi ,

On Mon, May 4, 2009 at 12:50 AM, Mojca Miklavec
mojca.miklavec.li...@gmail.com wrote:
 On Sun, May 3, 2009 at 14:40, Yue Wang wrote:
 when will the bug be fixed? I waited for a week, and I still cannot
 update context today:(

 Can you please try if it works now? (Though the situation is soon
 going to change anyway.)


fixed, thanks a lot, Mojca!


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] URL \href ... ?

2009-05-03 Thread Yue Wang
useURL can do the first, and hyphenatedurl can do the second.

On Mon, May 4, 2009 at 6:06 AM, Mohamed Bana mbana.li...@googlemail.com wrote:
 Hi,

 Is there macro for typesetting a URL without defining it before hand?  E.g.,
 something as simple as, \href{www.google.com}, it'd also be great if

 \setupalign[hyphenated]
 \setupurl[space=yes,style=\ss,urlalternative=]

 also determined the way they are typeset.

 Mohamed
 ___
 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] bug in mkii

2009-05-03 Thread Yue Wang
Hi, Hans,

The problem still remains in the latest beta's MKII.

Yue Wang

On Thu, Apr 23, 2009 at 10:18 PM, Aditya Mahajan adit...@umich.edu wrote:
 On Thu, 23 Apr 2009, Yue Wang wrote:

 hi, hans,

 this bug was introduced this year (last year's beta compiles fine).
 mkiv can produce the right result. mkii can't.

 \definemathcommand[Prob][nolop]{\mfunction{Prob}}
 \def\Pt{P_{\rm T}}
 \def\Timp{\tau_{\rm imp}}
 \def\Tp{\tau_{\rm p}}
 \def\Wt{w_{\rm T}}
 \def\Vp{V_{\rm p}^\prime}

 \starttext
 \placeformula
 \startformula
 \eqalign{
 \Pt = \Prob \left( {\Timp\over\Tp}1 \right)\cr
 =\Prob \bigg({\Wt\over\Vp}  \Tp  \bigg)\cr}
 \stopformula
 \stoptext

 Minimal example: In MkII 2009.04.17

 \starttext
 $\bigg($
 \stoptext

 gives

 ! Missing number, treated as zero.
 to be read again
                   $
 \@@dobig ...o #1\bodyfontsize {}\right @space $
                                                  }}
 l.2 $\bigg(
           $


 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
 ___

___
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] bug in mkii

2009-05-03 Thread Yue Wang
Hi, Aditya:

Yes, now my documents compile smoothly. Thanks a lot.

Yue Wang

On Mon, May 4, 2009 at 10:23 AM, Aditya Mahajan adit...@umich.edu wrote:
 On Mon, 4 May 2009, Yue Wang wrote:

 Hi, Hans,

 The problem still remains in the latest beta's MKII.

 Does the following fix work for you?

 \unprotect
 \de...@space
  {\nulldelimiterspace\zeropoint\relax \mathsurround\zeropoint}
 \protect


 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
 ___

___
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] presentation module

2009-04-30 Thread Yue Wang
 Could you please take this discussion somewhere else? This is neither of
 interest for a ConTeXt mailing list, nor is the tone appropriate for this
 list. Thank you.

I don't think this topic is unrelated to ConTeXt (or TeX).
For a long time TeX macro packages has been focused on structured
documents (and it is obviously not WYSIWYG).
If someone can develop a GUI frontend (even a simple one to set
figure/textblock position) for TeX,
it will be as meaningful as what the TeX community is doing now (like
developing TeX engines, formats, source editors, fonts, etc.)
Obviously, all recent GUI frontends (texmacs, texword, etc.) are not
meant to do so, they only help the beginners to structure their
documents, not truly for document design purpose.

As to the tone, i admit it is unappropriate, sorry about that.



 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
 ___

___
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] presentation module

2009-04-30 Thread Yue Wang
On Thu, Apr 30, 2009 at 2:01 PM, Marcin Borkowski
mb...@atos.wmid.amu.edu.pl wrote:
 Dnia Thu, Apr 30, 2009 at 10:21:30AM +0800, Yue Wang napisa#322;(a):
 On Thu, Apr 30, 2009 at 12:56 AM, Aditya Mahajan adit...@umich.edu wrote:
  On Thu, 30 Apr 2009, Yue Wang wrote:
 
  Hi,
 
  you can find that on http://modules.contextgarden.net/
 
  but anyway, you won't know how easy it is to place figure/text
  wherever you want in Keynote.
  In ConTeXt, you cannot achieve that.
 
  Sure you can. Use a background layer, and then you can place the text
  whereever you want. Not as easy as in Keynote or powerpoint, but it can be
  done.


 achieve the easiness I mean.
 positioning/adjusting graphics/text using a mouse is much easier than
 do that with keyboard,
 and one should compile/adjust xs and ys many times in order to get the
 right result.

 Well, using the keyboard and not the mouse is IMHO one of the TeX (and
 LateX, and ConTeXt, and METAPOST, and METAFUN, and tikz) advantages: I
 may have repeatable (and uniform throughout the document) results
 without having to put a (physical) ruler onto my monitor;)...

 My experience shows that the best way to prepare a complicated document,
 and especially one containing complicated mathematics/graphics/tables,
 is to:
 1. think about it
 2. sketch it on a piece of paper
 3. think a bit more
 4. write down the important coordinates etc.
 5. type into the computer what I have done in part 4.

 This way you don't really have to adjust it too many times (maybe twice
 or thrice).



Please design a few fancy slides in both Powerpoint/Keynote and TeX,
and compare the efforts you should take.
Good exercises to follow are Steve Jobs' WWDC presentations and Al
Gore's An Inconvenient Truth.
After doing so, you can come back and tell us that only twice
re-compilation are needed to design a good presentation.


 not to say how to create beautiful 2d/3d charts and tables,
 make simple drawings,

 metafun or tikz


there is an old saying in China: 站着说话不腰疼.
(you won't hurt your hip when you stand still while speaking)


 get fancy templates,
 apply some advanced features to graphics/texts (like mirror, or
 believable shade)
 Well, I know in theory everything above is doable using TeX,
 but extra amount of work should be done, and the ConTeXt approach
 (using metafun?) quite unproductive.

 As I said: the bulk of the work when preparing a good document is
 *thinking* (and writing the *text*).  Even two or three hours of typing
 don't really make a difference, especially if you get nicer results than
 when using mouse (each picture etc. in slightly different position
 and/or size...)

It is funny to say ConTeXt results will be better... Please try the
grid positioning feature in Keynote or InDesign CS4.
but even the picture are in slightly different position/size, the
viewer wont notice that.

As a contrast, trying again and again for tuning/positioning/compiling
TeX document (and lookup TeX commands on manual) will distract me from
real thinking


 So unless someone develop a good GUI frontend for TeX,
 using TeX for unstructured documents (like presentation slides) is
 always not a good idea.

 This might be debatable, but I would risk a following statement: if you
 consider your presentation slides unstructured, maybe it's time to
 devote more thinking to it...




I admit it is easy to create bulletpoint presentations in ConTeXt
(even easier than Keynote and PowerPoint, \item will do all the
stuffs)
But bear in mind structured presentation handout \neq structured
presentation slides
As far as I know, for most time, the presentation handout should be
structured (point 1, point 2, point3.1, point 3.2 ...) so the speaker
can cover the topic throughly.
However, a structured presentation slide (e.g., bulletpoint) is too
monotonous-dull to put the audience to sleep easily.
Only by careful reorganization of materials can the speaker makes an
awesome presentation.
That's why Steve Job's presentations are all unstructured, but the
audience know clearly what the key points are, and excited-scream
when watching his presentation.
TeX and XML are good for creating structured stuffs (books, journal
papers) where only item point/chapter/float/ref are needed, but
concerning unstructured stuffs like presentation slides, it will be
difficult to do that in just a few \items or \sections.


 But a GUI would be nice in fact, especially for tikz.  I agree that
 in some cases it would be faster to use it than to type everything.

 Regards

 --
 Marcin Borkowski (http://mbork.pl)

 - Why vim users don't use the ESC key?
 - It's too far on the keyboard.  It's faster to type ctrl-[.
 ___
 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

Re: [NTG-context] presentation module

2009-04-29 Thread Yue Wang
Hi,

you'd better switch to powerpoint or keynote, as they're more powerful
(easy to build fancy slides, and better transitions).

Yue Wang

On Wed, Apr 29, 2009 at 5:59 PM, Vyatcheslav Yatskovsky
yatskov...@gmail.com wrote:
 Hello everybody,

 What module can you suggest to create promo presentation?

 Best,
 Vyatcheslav
 ___
 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] presentation module

2009-04-29 Thread Yue Wang
Hi,

On Wed, Apr 29, 2009 at 7:32 PM, luigi scarso luigi.sca...@gmail.com wrote:

 well, at this point why not beamer of latex ?


Umm... You are good at telling jokes:)

why not try slideshow of PLT Scheme?

#lang slideshow

(slide
 #:title How to Say Hello
 (t Hello World!))



 --
 luigi


 ___
 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] presentation module

2009-04-29 Thread Yue Wang
Hi,

you can find that on http://modules.contextgarden.net/

but anyway, you won't know how easy it is to place figure/text
wherever you want in Keynote.
In ConTeXt, you cannot achieve that.

Yue Wang

On Thu, Apr 30, 2009 at 12:08 AM, Vyatcheslav Yatskovsky
yatskov...@gmail.com wrote:
 Let me start with a quote:
 After using ConTeXt for a while, many users begin to think about producing
 their presentations with it, too. ConTeXt is ideally suited for this task. 

 In fact, I hate transitions :) And I don't need any animations. I just want
 professionally-looking pdf pages with rich image stuff to assist the
 speaker, and I believe  that Context is well suitable for this.

 Where I can get simpleslides? I want to give them a try, and see what can be
 improved.

 I did not find simpleslides on the wiki, but instead found
 http://wiki.contextgarden.net/Presentations . Is it up-to date?

 http://wiki.contextgarden.net/Sample_documents contains good example of
 presentation by Brooks. IMHO, it beats any static PowerPoint presentation.

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


  1   2   3   4   >