[NTG-context] Define a new command that inherits from multiple other command options

2024-04-25 Thread ai2472206007
hi!

I'm new to ConTeXt. I want to define a command with sidenote function. This 
[setupsidenote] command inherits the options of [setupmargindata], 
[setupcounter] and [setupframed]. just like [setupenumeration] inherits the 
option of [setupcounter].

I've defined the following sidenote command by searching, and I know how to 
define a new option for it. But what I don't know is how to get it to inherit 
the options of other commands and perform these features correctly.

Any clue is warmly welcome.

```
% macros=mkvi
\unprotect
\installnamespace  {sidenote}
\installcommandhandler \sidenote  {sidenote}  \sidenote
\setupsidenote[
   align=,
   conversion=n,
   way=bytext,
   style=,
]

\definecounter[SidenoteMarkNumber] [prefix=no]
\definemargindata [SidenoteContent][outer]
  [margin=margin,width=\outermarginwidth]
\setupmargindata  [SidenoteContent][stack=yes,style=\it]
\def\sidenotemark{\rawcountervalue[SidenoteMarkNumber]}
\def\convertsidenotemark#1{\high{\convertnumber{#1}{\sidenotemark}}}
\def\sidenote{\dosingleempty\dosidenote}
\def\dosidenote[#1]#2{%
\getparameters[SMsidenote]
  [align=\sidenoteparameter{align},
  conversion=\sidenoteparameter{conversion},
  way=\sidenoteparameter{way},
   #1]%
 \setupcounter[SidenoteMarkNumber] [#1]
 \incrementcounter[SidenoteMarkNumber]
 \convertsidenotemark{\SMsidenoteconversion}% mark in text
 \SidenoteContent[#1]{\setscript[hanzi]\setup[\SMsidenotealign]%
  \convertsidenotemark{\SMsidenoteconversion}% mark with 
note
  #2
}}
\protect
\starttext
天地玄黄,宇宙洪荒。日月盈昃,辰宿列张。寒来暑往,秋收冬\sidenote[align=flushleft] {天地玄黄,宇宙洪荒。}
\stoptext
```
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


Re: [NTG-context] horizontal space in CJK document

2023-02-22 Thread 李延瑞
Sylvain Hubert via ntg-context  于2023年2月21日周二 03:43写道:
>
> Dear list,
>
> Does anyone know how to insert a horizontal space in a CJK document with 
> \setscript[hanzi]?
>
> \setscript[hanzi]
> \definefontfamily[mainface][rm][notoserifcjkhk][]
> \setupbodyfont[mainface]
> \starttext
> 口口\hspace[big]口口   % with \setscript[hanzi], the \hspace is ignored
>
> \dorecurse{100}{口}  % without \setscript[hanzi], the line is not properly 
> wrapped
> \stoptext
>
> Many thanks,
> Sylvain

测\kern 1em 试。

-- 
Best regards,

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] horizontal space in CJK document

2023-02-21 Thread Sylvain Hubert via ntg-context
Thanks, but I guess the space width would be fixed.

I just found a hack: 口口\hspace[big]\hbox{}口口 does the trick.

On Tue, 21 Feb 2023 at 06:46, fv leung via ntg-context 
wrote:

> Maybe the ideographic space U+3000 works.
>
> 在 2023年2月21日週二 03:42,Sylvain Hubert via ntg-context 
> 寫道:
>
>> Dear list,
>>
>> Does anyone know how to insert a horizontal space in a CJK document with
>> \setscript[hanzi]?
>>
>> \setscript[hanzi]
>> \definefontfamily[mainface][rm][notoserifcjkhk][]
>> \setupbodyfont[mainface]
>> \starttext
>> 口口\hspace[big]口口   % with \setscript[hanzi], the \hspace is ignored
>>
>> \dorecurse{100}{口}  % without \setscript[hanzi], the line is not properly
>> wrapped
>> \stoptext
>>
>> Many thanks,
>> Sylvain
>>
>> ___
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> https://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : https://contextgarden.net
>>
>> ___
>>
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] horizontal space in CJK document

2023-02-20 Thread fv leung via ntg-context
Maybe the ideographic space U+3000 works.

在 2023年2月21日週二 03:42,Sylvain Hubert via ntg-context  寫道:

> Dear list,
>
> Does anyone know how to insert a horizontal space in a CJK document with
> \setscript[hanzi]?
>
> \setscript[hanzi]
> \definefontfamily[mainface][rm][notoserifcjkhk][]
> \setupbodyfont[mainface]
> \starttext
> 口口\hspace[big]口口   % with \setscript[hanzi], the \hspace is ignored
>
> \dorecurse{100}{口}  % without \setscript[hanzi], the line is not properly
> wrapped
> \stoptext
>
> Many thanks,
> Sylvain
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] horizontal space in CJK document

2023-02-20 Thread Sylvain Hubert via ntg-context
Dear list,

Does anyone know how to insert a horizontal space in a CJK document with
\setscript[hanzi]?

\setscript[hanzi]
\definefontfamily[mainface][rm][notoserifcjkhk][]
\setupbodyfont[mainface]
\starttext
口口\hspace[big]口口   % with \setscript[hanzi], the \hspace is ignored

\dorecurse{100}{口}  % without \setscript[hanzi], the line is not properly
wrapped
\stoptext

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

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?

2022-09-03 Thread 黄复雄 via ntg-context
> I noticed an issue with multiple glyphs but am not sure why ... (so we
> need very small examples to figure it out).

I have observed a phenomenon that
when the base text contains glues/spaces, an error occurs,
as in the following example. Coincidentally, when using \setscript[hanzi],
the macro will inject glue between Chinese, and I will get the same error.

%%%begin example
\starttext
\ruby{a a}{b}
\stoptext
%%%end example

Best Regards,
  黄复雄(Huang Fuysong)
 
___
 If your question is of interest to others as well, please add an
entry to the Wiki!

 maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
 archive  : https://bitbucket.org/phg/context-mirror/commits/
 wiki : https://contextgarden.net
 
___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Can't no break between a close punctuation and a open punctuation

2022-09-02 Thread 黄复雄 via ntg-context
> > doc for example:
> >
> > ```lmtx
> > \setscript[hanzi]
> > \usetypescriptfile[mscore]
> > \usebodyfont   [mschinese,20pt]
>
> can you upgrade the chiese section in that file for windows 10+ as the
> old fonts are gone
>
> (i tested with \definedfont[file:mingliu.ttc*chinese @ 10pt])

I adapted type-imp-mscore.mkiv to the situation of the fonts in Win10,
and made type-imp-notocjksc.mkiv  according to the Notocjksc fonts.

I refer to type-imp-ipaex.mkiv, and I don't know if the method in it
is outdated. At least, the test results are fine,
though the resulting PDF is a bit too large to be included in this email.
 
___
 If your question is of interest to others as well, please add an
entry to the Wiki!

 maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
 webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
 archive  : https://bitbucket.org/phg/context-mirror/commits/
 wiki : https://contextgarden.net
 
___


font_testing.lmtx
Description: Binary data


type-imp-notocjksc.mkiv
Description: Binary data


type-imp-mscore.mkiv
Description: Binary data
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?

2022-08-22 Thread Hans Hagen via ntg-context

On 8/22/2022 7:21 AM, 黄复雄 via ntg-context wrote:

Dear Hans.
Thank you very much for so many examples and guidance.

In fact, I have read one of the examples in the followingup.pdf,
and the https://github.com/Fusyong/vertical-typesetting module I made
is based on the example.

The examples all worked after I changed the font settings according to
my Win10 OS;
and surprisingly, the ruby module also worked with \setscript[hanzi]
  (they don't work together in the example Mr. Wolfgang provided).


I noticed an issu ewith multiple glyphs but am not sure why ... (so we 
need very small examples to figure it out).



The only problem is that the offsets of glyphs are a bit inaccurate,
which may be related to the font,
and I will look into it further.


in the vertical feature one can tune a bit.


The examples I have adjusted are attached,
and the output PDF of them is not attached for being too big to the
limit of 100 KB.
(Just now I received a reply from the mailing list system asking to
adjust a over-length email,
I mistakenly thought it was about the one to Mr. Wolfgang, so that one
was duplicated and submitted,
please deal with it.)


there are indeed limits


By the way, I've finished checking and adjusting type-imp-mscore.mkiv,
scrp-cjk.lua, and char-scr.lua so far,
but the changes are a bit much (or maybe you can say a bit reckless),
so I'm hesitant to get back to you in order to minimize your troubles.
And as mentioned partly in an earlier email, I've made 3 modules that
support Chinese
(about vertical-typesetting,  Jiazhu or inline cutting note and punctuation)
and I'd be happy to contribute them to the ConTeXt project repository
when they're ripe,
if that's in line with the project policy. Your comments and guidance
are very welcome.


hm, i can have a look at it but we shouldn't break japanese and korean

once you finished all we can see how it can either be integrated or 
become some third party module (has to do with maintainance)


can you also make a noto typescript for the different chinese setups 
(for some reason the CJK noto's failed so i used the non CJK ones as i 
couldn't locate the right files; one cannot longher download al-of-noto 
in one zip )


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?

2022-08-21 Thread 黄复雄 via ntg-context
Dear Hans.
Thank you very much for so many examples and guidance.

In fact, I have read one of the examples in the followingup.pdf,
and the https://github.com/Fusyong/vertical-typesetting module I made
is based on the example.

The examples all worked after I changed the font settings according to
my Win10 OS;
and surprisingly, the ruby module also worked with \setscript[hanzi]
 (they don't work together in the example Mr. Wolfgang provided).
The only problem is that the offsets of glyphs are a bit inaccurate,
which may be related to the font,
and I will look into it further.
The examples I have adjusted are attached,
and the output PDF of them is not attached for being too big to the
limit of 100 KB.
(Just now I received a reply from the mailing list system asking to
adjust a over-length email,
I mistakenly thought it was about the one to Mr. Wolfgang, so that one
was duplicated and submitted,
please deal with it.)

By the way, I've finished checking and adjusting type-imp-mscore.mkiv,
scrp-cjk.lua, and char-scr.lua so far,
but the changes are a bit much (or maybe you can say a bit reckless),
so I'm hesitant to get back to you in order to minimize your troubles.
And as mentioned partly in an earlier email, I've made 3 modules that
support Chinese
(about vertical-typesetting,  Jiazhu or inline cutting note and punctuation)
and I'd be happy to contribute them to the ConTeXt project repository
when they're ripe,
if that's in line with the project policy. Your comments and guidance
are very welcome.

Best regards,
 Huang Fusyong(黄复雄)

Hans Hagen via ntg-context  于2022年8月22日周一 00:20写道:
>
> On 8/21/2022 12:10 PM, Wolfgang Schuster via ntg-context wrote:
> > 黄复雄 via ntg-context schrieb am 21.08.2022 um 10:24:
> >> Currently, the ruby module does not seem to support cjk fonts? I have
> >> a preliminary implementation of furigana(pinyin in Chinese) as:
> attached a variant (no pdf attached) using wolfgangs font definition
> plus some more
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | 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 / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___


test-directions-006.lmtx
Description: Binary data


test-directions-005.lmtx
Description: Binary data


test-directions-008.lmtx
Description: Binary data
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?

2022-08-21 Thread 黄复雄 via ntg-context
Dear Wolfgang,
thank you very much for your guidance.
After changing the font settings according to my computer Win10 OS,
the ruby module worked.
But there is another problem, when I use `\setscript[hanzi]`, as follows

%%%begin example
\setscript[hanzi]

\usetypescriptfile[mscore]
\usebodyfont   [mschinese,20pt]
\definefont[pinyinfont][name:ahpinying*default at 9pt]
\setupruby[color=darkgray, style=\pinyinfont]

\starttext
\ruby{寖備}{jìn bèi} \ss \ruby{寖備}{jìn bèi} % \tt \ruby{寖備}{jìn bèi}
\stoptext
%%%end example

ruby errors out as follows(that's why I didn't succeed with ruby before):

%%%begin error
……
tex error   > tex error on line 1 in file
d:/ah21/TEX/vertical-and-ruby-examples/ruby.lmtx:

lua error:

registered function call [209]:
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:268:
attempt to index a nil value (local 'ruby')
stack traceback:
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:268:
in upvalue 'whatever'
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370:
in upvalue 'attach'
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363:
in upvalue 'whatever'
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370:
in upvalue 'attach'
... (skipping 27 levels)
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363:
in upvalue 'whatever'
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370:
in upvalue 'typesetters_rubies_attach'
[string "local tonut  = nodes.tonut..."]:20: in function
<[string "local tonut  = nodes.tonut..."]:11>
(...tail calls...)
[string
"D:/venvs/context-win64/tex/texmf-context/tex/..."]:38: in function
<[string "D:/venvs/context-win64/tex/texmf-context/tex/..."]:37>
(...tail calls...)

 1 >>  \setscript[hanzi]
……
%%%end error

Best regards,
 Huang Fusyong(黄复雄)

Wolfgang Schuster via ntg-context  于2022年8月21日周日 18:11写道:
>
> 黄复雄 via ntg-context schrieb am 21.08.2022 um 10:24:
> > Currently, the ruby module does not seem to support cjk fonts? I have
> > a preliminary implementation of furigana(pinyin in Chinese) as:
> >
> > ```lmtx
> > % define the pinyin font
> > \definefont[pinyinfont][name:ahpinying*default at 9pt]
> > % define the pinyin command
> > \define[2]\pinyin{%
> >  \setbox1 = \hbox{#1}%
> >  \setbox2 = \hbox{\darkgray \pinyinfont #2}%
> >  \newdimen\maxwd%
> >  \ifdim \wd1>\wd2 \maxwd=\wd1 \else \maxwd=\wd2 \fi%
> >  \setbox1 = \hbox to \maxwd{\hfill \box1 \hfill}%
> >  \setbox2 = \hbox to \maxwd{\hfill \box2 \hfill}%
> >  \hskip0pt plus5pt\vbox{\setupinterlinespace[line=0.5em]\box2\box1}%
> > above line
> >  % \hskip0pt
> > plus5pt\vtop{\setupinterlinespace[line=0.5em]\box1\box2}% under line
> > }
> > ```
> > usage as follows:
> >
> > ```lmtx
> > \pinyin{寖備}{jìn bèi}
> > ```
>
> The ruby command has no problem with chinese but you need a font which
> has support for it.
> As can be seen in my previous example you can use the style-key to
> switch to a different font
> for the annotation (e.g. \setupruby[style=\pinyinfont]).
>
>  begin example
> \definefallbackfamily [documentfont] [rm] [Noto Serif CJK SC]
> [preset=range:chinese]
> \definefallbackfamily [documentfont] [ss] [Noto Sans CJK SC]
> [preset=range:chinese]
> \definefallbackfamily [documentfont] [tt] [Noto Sans Mono CJK SC]
> [preset=range:chinese]
>
> \definefontfamily [documentfont] [rm] [Noto Serif]
> \definefontfamily [documentfont] [ss] [Noto Sans]
> \definefontfamily [documentfont] [tt] [Noto Sans Mono]
>
> \setupbodyfont [documentfont]
>
> \setupruby[color=darkgray]
>
> \starttext
> \ruby{寖備}{jìn bèi} \ss \ruby{寖備}{jìn bèi} \tt \ruby{寖備}{jìn bèi}
> \stoptext
>  end example
>
> Wolfgang
>
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / 
> https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Is rendering furigana over horizontal or vertical japanese text doable in ConTeXt?

2022-08-21 Thread 黄复雄 via ntg-context
Dear Wolfgang,
thank you very much for your guidance.
After changing the font settings according to my computer Win10 OS,
the ruby module worked.
But there is another problem, when I use `\setscript[hanzi]`, as follows

%%%begin example
\setscript[hanzi]

\usetypescriptfile[mscore]
\usebodyfont   [mschinese,20pt]
\definefont[pinyinfont][name:ahpinying*default at 9pt]
\setupruby[color=darkgray, style=\pinyinfont]

\starttext
\ruby{寖備}{jìn bèi} \ss \ruby{寖備}{jìn bèi} % \tt \ruby{寖備}{jìn bèi}
\stoptext
%%%end example

ruby errors out as follows(that's why I didn't succeed with ruby before):

%%%begin error
resolvers   | formats | executing runner 'run luametatex format':
D:/venvs/context-win64/tex/texmf-win64/bin/luametatex
--jobname="d:/ah21/TEX/vertical-and-ruby-examples/ruby.lmtx"
--fmt=D:/venvs/context-win64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.fmt
--lua=D:/venvs/context-win64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/luametatex/cont-en.lui
 --c:currentrun=1
--c:fulljobname="d:/ah21/TEX/vertical-and-ruby-examples/ruby.lmtx"
--c:input="d:/ah21/TEX/vertical-and-ruby-examples/ruby.lmtx"
--c:kindofrun=1 --c:maxnofruns=9
--c:texmfbinpath="D:/venvs/context-win64/tex/texmf-win64/bin"
system  >
system  > ConTeXt  ver: 2022.07.27 17:56 LMTX  fmt: 2022.8.22
int: english/english
system  >
system  > 'cont-new.mkxl' loaded
open source > level 1, order 1, name
'D:/venvs/context-win64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 1, order 1, name
'D:/venvs/context-win64/tex/texmf-context/tex/context/base/mkxl/cont-new.mkxl'
system  > files > jobname
'd:/ah21/TEX/vertical-and-ruby-examples/ruby', input
'd:/ah21/TEX/vertical-and-ruby-examples/ruby.lmtx', result
'd:/ah21/TEX/vertical-and-ruby-examples/ruby'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 1, order 2, name
'd:/ah21/TEX/vertical-and-ruby-examples/ruby.lmtx'
fonts   > bodyfont '20pt' is defined (can better be done global)
fonts   > bodyfont '24pt' is defined (can better be done global)
fonts   > bodyfont '16pt' is defined (can better be done global)
open source > level 2, order 3, name
'D:/venvs/context-win64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-mscore.mkiv'
close source> level 2, order 3, name
'D:/venvs/context-win64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-mscore.mkiv'
open source > level 2, order 4, name
'D:/venvs/context-win64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-cambria.mkiv'
open source > level 3, order 5, name
'D:/venvs/context-win64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-dejavu.mkiv'
close source> level 3, order 5, name
'D:/venvs/context-win64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-dejavu.mkiv'
close source> level 2, order 5, name
'D:/venvs/context-win64/tex/texmf-context/tex/context/fonts/mkiv/type-imp-cambria.mkiv'
tex error   > tex error on line 1 in file
d:/ah21/TEX/vertical-and-ruby-examples/ruby.lmtx:

lua error:

registered function call [209]:
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:268:
attempt to index a nil value (local 'ruby')
stack traceback:
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:268:
in upvalue 'whatever'
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370:
in upvalue 'attach'
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363:
in upvalue 'whatever'
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370:
in upvalue 'attach'
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363:
in upvalue 'whatever'
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370:
in upvalue 'attach'
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363:
in upvalue 'whatever'
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370:
in upvalue 'attach'
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363:
in upvalue 'whatever'
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370:
in upvalue 'attach'
... (skipping 14 levels)
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:370:
in upvalue 'attach'
...n64/tex/texmf-context/tex/context/base/mkxl/typo-rub.lmt:363:
in upvalue &#x

Re: [NTG-context] Can't no break between a close punctuation and a open punctuation

2022-08-02 Thread 黄复雄 via ntg-context
>
> > Dear Hans,
> >
> > I found that ConTeXt injected two infinity penalties between a close
> > punctuation and a open punctuation, for example between `”` and `“`, or
> > between `:` and `“`, so can not break at these places, as showed in
> > following doc. But actually, we may sometimes need to do so. Please note
> > that there is no space around full width punctuations in Chinese
> document.
>
> you can try this in scrp-cjk.lua (remake the format)
>
> local chinese_8 = {
>  jami_initial = nobreak_shrink_break_stretch,
>  korean   = nobreak_autoshrink_break_stretch,
>  chinese  = stretch_break, -- nobreak_autoshrink_break_stretch,
>  hiragana = stretch_break, -- nobreak_autoshrink_break_stretch,
>  katakana = stretch_break, -- nobreak_autoshrink_break_stretch,
>  half_width_open  =
> nobreak_autoshrink_break_stretch_nobreak_autoshrink,
> half_width_open  = stretch_break,
>  half_width_close = nobreak_autoshrink_nobreak_stretch,
>  full_width_open  = nobreak_autoshrink_break_stretch_nobreak_shrink,
>  full_width_close = nobreak_autoshrink_nobreak_stretch,
>  full_width_punct = nobreak_autoshrink_nobreak_stretch,
>  hyphen   = nobreak_autoshrink_break_stretch,
>  non_starter  = nobreak_autoshrink_break_stretch,
>  other= nobreak_autoshrink_break_stretch,
> }
>
>
Thanks to your guidance, I solved the problem. And I would like to look
into some other related issues that I have doubts about and get back to you
together. So I need some more time.


> > doc for example:
> >
> > ```lmtx
> > \setscript[hanzi]
> > \usetypescriptfile[mscore]
> > \usebodyfont   [mschinese,20pt]
>
> can you upgrade the chiese section in that file for windows 10+ as the
> old fonts are gone
>
> (i tested with \definedfont[file:mingliu.ttc*chinese @ 10pt])
>

Sorry, when you say ` that file for windows 10+`, which one are you
referring to? to scrp-cjk.lua?( yes, I will upgrade it.) or to my lmtx doc
for testing?(It work fine in my Windows 10.) or to type-imp-mscore.mkiv?
(It work fine in my Windows 10, and no mingliu.ttc in it.)

Thanks.

  Huang Fusyong(黄复雄)
---
If your question is of interest to others as well, please add an entry to
the Wiki!

maillist : ntg-context@ntg.nl /
https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
---
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] Can't no break between a close punctuation and a open punctuation

2022-08-02 Thread Hans Hagen via ntg-context

On 8/2/2022 9:06 AM, 黄复雄 via ntg-context wrote:

I sent this email four days ago and it may not have been delivered?
---

Dear Hans,

I found that ConTeXt injected two infinity penalties between a close 
punctuation and a open punctuation, for example between `”` and `“`, or 
between `:` and `“`, so can not break at these places, as showed in 
following doc. But actually, we may sometimes need to do so. Please note 
that there is no space around full width punctuations in Chinese document.


you can try this in scrp-cjk.lua (remake the format)

local chinese_8 = {
jami_initial = nobreak_shrink_break_stretch,
korean   = nobreak_autoshrink_break_stretch,
chinese  = stretch_break, -- nobreak_autoshrink_break_stretch,
hiragana = stretch_break, -- nobreak_autoshrink_break_stretch,
katakana = stretch_break, -- nobreak_autoshrink_break_stretch,
half_width_open  = nobreak_autoshrink_break_stretch_nobreak_autoshrink,
half_width_open  = stretch_break,
half_width_close = nobreak_autoshrink_nobreak_stretch,
full_width_open  = nobreak_autoshrink_break_stretch_nobreak_shrink,
full_width_close = nobreak_autoshrink_nobreak_stretch,
full_width_punct = nobreak_autoshrink_nobreak_stretch,
hyphen   = nobreak_autoshrink_break_stretch,
non_starter  = nobreak_autoshrink_break_stretch,
other= nobreak_autoshrink_break_stretch,
}


doc for example:

```lmtx
\setscript[hanzi]
\usetypescriptfile[mscore]
\usebodyfont   [mschinese,20pt]


can you upgrade the chiese section in that file for windows 10+ as the 
old fonts are gone


(i tested with \definedfont[file:mingliu.ttc*chinese @ 10pt])

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Can't no break between a close punctuation and a open punctuation

2022-08-02 Thread 黄复雄 via ntg-context
I sent this email four days ago and it may not have been delivered?
---

Dear Hans,

I found that ConTeXt injected two infinity penalties between a close
punctuation and a open punctuation, for example between `”` and `“`, or
between `:` and `“`, so can not break at these places, as showed in
following doc. But actually, we may sometimes need to do so. Please note
that there is no space around full width punctuations in Chinese document.

doc for example:

```lmtx
\setscript[hanzi]
\usetypescriptfile[mscore]
\usebodyfont   [mschinese,20pt]

\showframe

\starttext

\dorecurse{5}{“好?!;”“:,。”} % linebreak sutck

\dorecurse{30}{“我”} % linebreak sutck

\dorecurse{30}{我} % linebreak work

\dorecurse{30}{我。} % linebreak work

\stoptext
```

What I see between any two consecutive punctuations are

   1
 0   0   655500
   1
 0   655500  0

so nowhere to linebreak.

Thanks.

  Huang Fusyong(黄复雄)

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

maillist : ntg-context@ntg.nl /
https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
__
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Can't no break between a close punctuation and a open punctuation

2022-07-29 Thread 黄复雄 via ntg-context
Dear Hans,
I found that ConTeXt injected two infinity penalties between
a close punctuation and a open punctuation, for example
between `”“`, or `:“`, as showed in the following Chinese
document. But actually, we need to break between them sometime.
Please note that there is no space around full width
punctuations in Chinese document.
```lmtx
\setscript[hanzi]
\usetypescriptfile[mscore]
\usebodyfont   [mschinese,20pt]

\showframe

% just for watching node list
% \startluacode
% local watch = require("watch_sys_actions.lua")
% watch.register()
% \stopluacode

\starttext

\dorecurse{5}{“好?!;”“:,。”} % linebreak sutck

\dorecurse{30}{“我”} % linebreak sutck

\dorecurse{30}{我} % linebreak work

\dorecurse{30}{我。} % linebreak work

\stoptext
```

What I see between any two consecutive punctuations is

   1
 0   0   655500
   1
 0   655500  0

so nowhere to linebreak.


Huang Fusyong(黄复雄)


watch_sys_actions.lua
Description: Binary data
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


ntg-context@ntg.nl

2021-06-15 Thread Wolfgang Schuster

Richard Mahoney schrieb am 13.06.2021 um 21:42:

I'm wondering if there has been a regression in the rendering of
CJK recently? I'm attaching two screenshots from the same code:
one with lmtx-20210509 (correct); and the other lmtx-20210613
(incomplete).

This is what I have in the setups:

% Support for Japanese

\setscript[hanzi]

\starttypescript[serif][sourcehanserifregular]

\definefontsynonym[Serif][name:sourcehanserifregular][features={aalt,hist,kern,liga}]

\stoptypescript

\definetypeface[sourcehanserifregular][rm][serif][sourcehanserifregular]

\define[1]\JA{\language[ja]{{\setscript[hanzi]\sourcehanserifregular #1}}}



You can try to play with this font setup, all settings within the 
setups-block are applied when you change the language.



% font setup for english ...

\definefontfamily [source] [rm] [Source Serif]

\switchtobodyfont [source]

% font setup for japanese

\definefontfamily [source-han] [rm] [Source Han Serif]

\startsetups [japanese]
  \switchtobodyfont [source-han]
  \setscript [hanzi]
\stopsetups

\setuplanguage
  [ja]
  [setups=japanese]

\starttext
English {\ja 日本語}
\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


ntg-context@ntg.nl

2021-06-13 Thread Richard Mahoney
I'm wondering if there has been a regression in the rendering of 
CJK recently? I'm attaching two screenshots from the same code:
one with lmtx-20210509 (correct); and the other lmtx-20210613
(incomplete).

This is what I have in the setups:

% Support for Japanese

\setscript[hanzi]

\starttypescript[serif][sourcehanserifregular]

\definefontsynonym[Serif][name:sourcehanserifregular][features={aalt,h
ist,kern,liga}]

\stoptypescript

\definetypeface[sourcehanserifregular][rm][serif][sourcehanserifregula
r]

\define[1]\JA{\language[ja]{{\setscript[hanzi]\sourcehanserifregular
#1}}}


And this is the code behind the screenshots:

{\tfx

\everypar{\hangafter=1\hangindent=3em\relax}

Karashima, N.~(1977) {\it Indo nyūmon} = \JA{\tfx インド入門} = {\it
Introducing India}. Tōkyō: Tōkyō Daigaku Shuppankai.
\useURL[url1][https://ci.nii.ac.jp/ncid/BN00345890][][\hyphenatedurl{https://ci.nii.ac.jp/ncid/BN00345890}]\from[url1
]

\hl[2.5] (1980) {\it Indasu bunmei: indo bunka no genryū o nasumono} =
\JA{\tfx インダス文明 : インド文化の源流をなすもの} = {\it The Indus
Civilization}. NHK bukkusu, 375. Tōkyō: NHK bukkusu.
\useURL[url2][https://ci.nii.ac.jp/ncid/BN00354483][][\hyphenatedurl{https://ci.nii.ac.jp/ncid/BN00354483}]\from[url2
]

\hl[2.5] (1985) {\it Indo sekai no rekishizō} = \JA{\tfx
インド世界の歴史像} = {\it Historical Image of the Indian
World}. Minzoku no sekaishi, 7. Tōkyō: Yamakawa Shuppansha.
\useURL[url3][https://ci.nii.ac.jp/ncid/BN00332312][][\hyphenatedurl{https://ci.nii.ac.jp/ncid/BN00332312}]\from[url3
]

\hl[2.5] (1992) {\it Minamiajia o shiru jiten} = \JA{\tfx
南アジアを知る事典} = {\it Cyclopedia of South Asia: indo
suriranka nepāru pakisutan banguradishu būtan morudibu}. \JA{\tfx
東京 : 平凡社}.
\useURL[url4][https://ci.nii.ac.jp/ncid/BN08142729][][\hyphenatedurl{https://ci.nii.ac.jp/ncid/BN08142729}]\from[url4
]

...

}



Best, Richard



-- 
T +6433121699  M +64210640216  E rmaho...@indica-et-buddhica.org
IM https://t.me/rmahoney  W https://indica-et-buddhica.org/

Indica et Buddhica  Littledene  Bay Road  Oxford  NZ

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] \setscript[hanzi] seems broken.

2021-05-20 Thread 李延瑞
Li Yanrui  于2021年5月20日周四 下午3:15写道:
>
> Hi,
>
> After updating ConTeXt lmtx 2021.05.19 18:22, the line breaking with chinese 
> characters does not work.
>
> The following is a simple example:
>
> ```
> % This font can be downloaded from
> % 
> https://github.com/adobe-fonts/source-han-serif/raw/release/OTF/SourceHanSerifSC_EL-M.zip
> \definefontfamily[myfont][serif][sourcehanserifcn]
> \setscript[hanzi]
> \setupbodyfont[myfont,11pt]
> \setuppapersize[A6][A6]
> \starttext
> 北冥有鱼,其名为鲲。鲲之大,不知其几千里也;化而为鸟,其名为鹏。鹏之背,不知其几千里也;怒而飞,其翼若垂天之云。是鸟也,海运则将徙于南冥。南冥者,天池也。
> \stoptext
> ```
>
> The command `context` gives the following output:
>
> Overfull \hbox (633.72849pt too wide) in paragraph at lines 7--1
> <2: SourceHanSerifCN-Regular @ 11.0pt> 
> 北冥有鱼,其名为鲲。鲲之大,不知其几千里也;化而为鸟,其名为鹏。鹏之背,不知其几千里也;怒而飞,其翼若垂天之云。是鸟也,海运则将徙于南冥。南冥者,天池也。
>

Works fine with the latest version 2021.05.20 11:08.

-- 
Best regards,

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] \setscript[hanzi] seems broken.

2021-05-20 Thread Li Yanrui
Hi,

After updating ConTeXt lmtx 2021.05.19 18:22, the line breaking with chinese 
characters does not work.

The following is a simple example:

```
% This font can be downloaded from
% 
https://github.com/adobe-fonts/source-han-serif/raw/release/OTF/SourceHanSerifSC_EL-M.zip
\definefontfamily[myfont][serif][sourcehanserifcn]
\setscript[hanzi]
\setupbodyfont[myfont,11pt]
\setuppapersize[A6][A6]
\starttext
北冥有鱼,其名为鲲。鲲之大,不知其几千里也;化而为鸟,其名为鹏。鹏之背,不知其几千里也;怒而飞,其翼若垂天之云。是鸟也,海运则将徙于南冥。南冥者,天池也。
\stoptext
```

The command `context` gives the following output:

Overfull \hbox (633.72849pt too wide) in paragraph at lines 7--1
<2: SourceHanSerifCN-Regular @ 11.0pt> 
北冥有鱼,其名为鲲。鲲之大,不知其几千里也;化而为鸟,其名为鹏。鹏之背,不知其几千里也;怒而飞,其翼若垂天之云。是鸟也,海运则将徙于南冥。南冥者,天池也。

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Character rotation font feature available?

2016-02-14 Thread Zhichu Chen

Dear list,

I have some special needs that requires all the characters be rotated by 
90 degrees. I've searched around the web and maybe adding

/FontMatrix [0 1 -1 0 0 0]
to the font descriptor dictionary is helpful. But I can't find a \pdf??? 
primitive that can achieve this. (Am I wrong about this?)


Another solution might be the "vrt2" font feature. There's no difference 
between the results with or without enabling the feature. But

I do see the font has the feature by using the shell command:
otfinfo -f 


May I put my temporary unsatisfying code here and ask for optimization?

Thanks in advance.









===
\startluacode


pdf.setcompresslevel(0)
pdf.setobjcompresslevel(0)

local registerotffeature = fonts.handlers.otf.features.register
--local registerafmfeature = fonts.handlers.afm.features.register

local setmetatableindex  = table.setmetatableindex



local function jian(tfmdata,value)
if value then
local characters = tfmdata.characters
local resources  = tfmdata.resources
local additions  = { }
local private= resources.private
for unicode, old_c in next, characters do
private = private + 1
local width  = old_c.width  or 0
local height = old_c.height or 0
local depth  = old_c.depth  or 0
local htsp,wdsp,dpsp = 
(height/65536)*(72.0/72.27),(width/65536)*(72.0/72.27),(depth/65536)*(72.0/72.27)

local bboxrulewd = 0.5
local baserulewd = 0.9
local new_c
new_c = {
width= width,
height   = height,
depth= depth,
commands = {
{ "push" },
{ "right", width },
{ "special", "pdf: q 0 0 1 RG 0 0 1 rg " .. 
bboxrulewd .. " w 0 " .. -dpsp .. " m 0 " .. htsp .. " l " .. -wdsp .. " 
" .. htsp .. " l " .. -wdsp .. " " .. -dpsp .. " l s 1 0 1 RG 1 0 1 rg " 
.. baserulewd .. " w [2 1] 0 d 0 0 m " .. -wdsp .. " 0 l S Q" },

{ "pop" },
{"special", "pdf: q 0 1 -1 0 0 0 cm"},
{ "down", 0.9*width },
{ "right", -0.1*width },
{ "slot", 1, private },
{ "down", -0.9*width },
{ "right", -0.9*width },
{"special", "pdf: 1 0 0 1 0 0 cm Q"},
}
}
setmetatableindex(new_c,old_c)
characters[unicode] = new_c
additions[private]  = old_c
end
for k, v in next, additions do
characters[k] = v
end
resources.private = private
end
end

registerotffeature {
name= "jian",
description = "rotate glyphs",
manipulators = {
base = jian,
node = jian,
}
}

\stopluacode

\definefontfeature
  [vertical]
  [default]
  [jian=yes]


\definefallbackfamily [mainface] [serif] [Adobe Ming Std]
  [range={0x00400-0x2FA1F}%
  ,force=yes%
  ,features=vertical%
  ]
\definefallbackfamily [mainface] [sans] [Adobe Heiti Std]
  [range={0x00400-0x2FA1F}%
  ,force=yes%
  ,features=vertical%
  ]
\definefallbackfamily [mainface] [mono] [Adobe Fangsong Std]
  [range={0x00400-0x2FA1F}%
  ,force=yes%
  ,features=vertical%
  ]


\definefontfamily
  [mainface]
  [serif]
  [TeX Gyre Termes]
  [features=vertical]
\definefontfamily
  [mainface]
  [sans]
  [TeX Gyre Heros]
  [features=vertical]
\definefontfamily
  [mainface]
  [mono]
  [TeX Gyre Cursor]
  [features=vertical]
\definefontfamily
  [mainface]
  [math]
  [TeX Gyre Termes Math]
  [features=vertical]


\setscript
  [hanzi]

\startsetups footnote:hanzi
  \setscript[hanzi]
\stopsetups

\setupnote[footnote][setups={footnote:hanzi}]

\setupalign[hz,hanging]
\setupbodyfont[mainface,20pt]


\showframe

\starttext



裴駰曰凡是徐氏義稱徐姓名以別之餘者悉是駰%
注解并集衆家義。司馬貞索隱曰紀者記也本其%
%
事而記之故曰本紀又紀理也絲縷有紀而帝王書%
稱紀者言爲後代綱紀也。正義曰鄭玄注中候勅%
%
省圖云德合五帝坐星者稱帝又坤靈圖云德配天%
地在正不在私曰帝按太史公依世本大戴禮以黃%
%
帝顓頊帝嚳唐堯虞舜爲五帝譙周應劭宋均皆同%
而孔安國尚書序皇甫謐帝王世紀孫氏注世本並%
%
以伏犧神農黃帝爲三皇少昊顓頊高辛唐虞爲五%
帝裴松之史目云天子稱本紀諸侯曰世家本者繫%
%
其本系故曰本紀者理也統理衆事繫之年月名之%
曰紀第者次序之目一者舉數之由故曰五帝本紀%
%
第一。又曰禮云動則左史書之言則右史書之正%
義云左陽故記動右隂故記言言爲尚書事爲春秋%
%
按春秋時置左右%
史故云史記也%
%
%
裴駰曰凡是徐氏義稱徐姓名以別之餘者悉是駰%
注解并集衆家義。司馬貞索隱曰紀者記也本其%
%
事而記之故曰本紀又紀理也絲縷有紀而帝王書%
稱紀者言爲後代綱紀也。正義曰鄭玄注中候勅%
%
省圖云德合五帝坐星者稱帝又坤靈圖云德配天%
地在正不在私曰帝按太史公依世本大戴禮以黃%
%
帝顓頊帝嚳唐堯虞舜爲五帝譙周應劭宋均皆同%
而孔安國尚書序皇甫謐帝王世紀孫氏注世本並%
%
以伏犧神農黃帝爲三皇少昊顓頊高辛唐虞爲五%
帝裴松之史目云天子稱本紀諸侯曰世家本者繫%
%
其本系故曰本紀者理也統理衆事繫之年月名之%
曰紀第者次序之目一者舉數之由故曰五帝本紀%
%
第一。又曰禮云動則左史書之言則右史書之正%
義云左陽故記動右隂故記言言爲尚書事爲春秋%
%
按春秋時置左右%
史故云史記也%


\stoptext

--
Best regards,
ℤhichu ℂhen

Shanghai Institute of Applied Physics
No. 

[NTG-context] [***SPAM***] Re: [***SPAM***] How to reduce vertical spacing after this table

2013-07-08 Thread d.henman

Wolfgang,
   thank you very much, for the solution to the problem I was having.  
   I am surprised tha placelegend was necessary. I thought that simiply
   putting the placefootnotes inside the caption would be sufficient.  

   The solution you provided works well.  Much appreciated.

   

Wolfgang Schuster  wrote:
> 
> Am 06.07.2013 um 11:09 schrieb hwit...@gmail.com:
> 
> > 
> > I'Ve been trying dozens of combinations to try to reduce the vertical space 
> > between the a table and the local footer to some items in the table, but 
> > have just been running into a wall.
> > 
> > Here is a minimal example.   For my application there is just too much 
> > space between the bottom of the table and the footnote.   That is the 
> > problem.  Also is there a more elegant way to get the footnote aligned 
> > under the table to the left side.  I am using narrower to force it to 
> > postion.  This doesn't show up right in the minimal, but it works.
> > 
> > Help in solving this would be greatly appreciated.
> > 
> > %
> > 
> > \defineconversion[fnsym][\m{\dagger},\m{*},\m{**},\m{***}]  % footnote 
> > header symbols
> > 
> > \starttext
> > \subject{Subject Name}
> >\blank
> >  \startlocalfootnotes   % [conversion=set fnsym]
> >  \setupnotation[footnote][numberconversion=fnsym,rule=off] % change 
> > footnote symbols
> > \midaligned 
> >  {
> >  \placetable[here,none][]{}
> >{
> >\setuptables[bodyfont=10pt,after=\nowhitespace,spaceafter=none]
> > \starttable[|c|c|c|c|c|c|c|c|c|]
> > \HL
> > \VL X-ITEM \VL  \VL$\oplus$ \footnote[hanzi]{Traditional Characters} \VL
> >  \VL$\oplus$ \note[hanzi]\VL\VL$\oplus$ \VL 
> > \VL$\oplus$  \VL\MR
> > \VL Y-ITEM\VL  \VL$\oplus$ \VL  \VL$\oplus$ \VL 
> > \VL$\oplus$ \VL \VL$\oplus$  \VL\MR
> > \HL
> > \stoptable 
> >}
> >  }
> > \setupnarrower[left=2.5cm]  % to align footnote under the table
> > \startnarrower[left]
> >   \placelocalfootnotes[here]
> > \stopnarrower
> > 
> >   \stoplocalfootnotes
> > \setupnotation[footnote][numberconversion=n,rule=on]  % restore footnotes 
> > to global 
> > 
> > \stoptext
> 
> Slightly modified solution I already wrote three hours ago for another thread 
> regarding a similar question:
> 
> \defineconversion[fnsym][\m{\dagger},\m{*},\m{**},\m{***}]
> 
> \starttext
> 
> \subject{Subject Name}
> 
> \startplacetable[location={force,none}]
>   \startlocalfootnotes \setupnotation[footnote][numberconversion=fnsym]
>   \startplacelegend
>   \startcontent
>   \starttable[|c|c|c|c|c|c|c|c|c|][bodyfont=10pt]
>   \HL
>   \VL X-ITEM
>   \VL
>   \VL $\oplus$\footnote[hanzi]{Traditional 
> Characters}
>   \VL
>   \VL $\oplus$\note[hanzi]
>   \VL
>   \VL $\oplus$
>   \VL
>   \VL $\oplus$
>   \VL\MR
>   \VL Y-ITEM
>   \VL
>   \VL $\oplus$
>   \VL
>   \VL$\oplus$
>   \VL 
>   \VL $\oplus$
>   \VL
>   \VL $\oplus$
>   \VL\MR
>   \HL
>   \stoptable 
>   \stopcontent
>   \startcaption
>   \placelocalfootnotes
>   \stopcaption
>   \stopplacelegend
>   \stoplocalfootnotes
> \stopplacetable
> 
> \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
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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] [***SPAM***] How to reduce vertical spacing after this table

2013-07-06 Thread Wolfgang Schuster

Am 06.07.2013 um 11:09 schrieb hwit...@gmail.com:

> 
> I'Ve been trying dozens of combinations to try to reduce the vertical space 
> between the a table and the local footer to some items in the table, but have 
> just been running into a wall.
> 
> Here is a minimal example.   For my application there is just too much space 
> between the bottom of the table and the footnote.   That is the problem.  
> Also is there a more elegant way to get the footnote aligned under the table 
> to the left side.  I am using narrower to force it to postion.  This doesn't 
> show up right in the minimal, but it works.
> 
> Help in solving this would be greatly appreciated.
> 
> %
> 
> \defineconversion[fnsym][\m{\dagger},\m{*},\m{**},\m{***}]  % footnote header 
> symbols
> 
> \starttext
> \subject{Subject Name}
>\blank
>  \startlocalfootnotes   % [conversion=set fnsym]
>  \setupnotation[footnote][numberconversion=fnsym,rule=off] % change footnote 
> symbols
> \midaligned 
>  {
>  \placetable[here,none][]{}
>{
>\setuptables[bodyfont=10pt,after=\nowhitespace,spaceafter=none]
> \starttable[|c|c|c|c|c|c|c|c|c|]
> \HL
> \VL X-ITEM \VL  \VL$\oplus$ \footnote[hanzi]{Traditional Characters} \VL
>  \VL$\oplus$ \note[hanzi]\VL\VL$\oplus$ \VL 
> \VL$\oplus$  \VL\MR
> \VL Y-ITEM\VL  \VL$\oplus$ \VL  \VL$\oplus$ \VL 
> \VL$\oplus$ \VL \VL$\oplus$  \VL\MR
> \HL
> \stoptable 
>}
>  }
> \setupnarrower[left=2.5cm]% to align footnote under the table
> \startnarrower[left]
>   \placelocalfootnotes[here]
> \stopnarrower
> 
>   \stoplocalfootnotes
> \setupnotation[footnote][numberconversion=n,rule=on]  % restore footnotes to 
> global 
> 
> \stoptext

Slightly modified solution I already wrote three hours ago for another thread 
regarding a similar question:

\defineconversion[fnsym][\m{\dagger},\m{*},\m{**},\m{***}]

\starttext

\subject{Subject Name}

\startplacetable[location={force,none}]
\startlocalfootnotes \setupnotation[footnote][numberconversion=fnsym]
\startplacelegend
\startcontent
\starttable[|c|c|c|c|c|c|c|c|c|][bodyfont=10pt]
    \HL
\VL X-ITEM
\VL
    \VL $\oplus$\footnote[hanzi]{Traditional 
Characters}
\VL
\VL $\oplus$\note[hanzi]
\VL
\VL $\oplus$
\VL
\VL $\oplus$
\VL\MR
\VL Y-ITEM
\VL
\VL $\oplus$
\VL
\VL$\oplus$
\VL 
\VL $\oplus$
\VL
\VL $\oplus$
\VL\MR
\HL
\stoptable 
\stopcontent
\startcaption
\placelocalfootnotes
\stopcaption
\stopplacelegend
\stoplocalfootnotes
\stopplacetable

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


[NTG-context] [***SPAM***] How to reduce vertical spacing after this table

2013-07-06 Thread hwitloc

I'Ve been trying dozens of combinations to try to reduce the vertical space 
between the a table and the local footer to some items in the table, but have 
just been running into a wall.

Here is a minimal example.   For my application there is just too much space 
between the bottom of the table and the footnote.   That is the problem.  Also 
is there a more elegant way to get the footnote aligned under the table to the 
left side.  I am using narrower to force it to postion.  This doesn't show up 
right in the minimal, but it works.

Help in solving this would be greatly appreciated.

%

\defineconversion[fnsym][\m{\dagger},\m{*},\m{**},\m{***}]  % footnote header 
symbols

\starttext
\subject{Subject Name}
\blank
  \startlocalfootnotes   % [conversion=set fnsym]
  \setupnotation[footnote][numberconversion=fnsym,rule=off] % change footnote 
symbols
\midaligned 
  {
  \placetable[here,none][]{}
{
\setuptables[bodyfont=10pt,after=\nowhitespace,spaceafter=none]
 \starttable[|c|c|c|c|c|c|c|c|c|]
 \HL
 \VL X-ITEM \VL  \VL$\oplus$ \footnote[hanzi]{Traditional Characters} \VL
  \VL$\oplus$ \note[hanzi]\VL\VL$\oplus$ \VL 
\VL$\oplus$  \VL\MR
 \VL Y-ITEM\VL  \VL$\oplus$ \VL  \VL$\oplus$ \VL 
 \VL$\oplus$ \VL \VL$\oplus$  \VL\MR
 \HL
 \stoptable 
}
  }
\setupnarrower[left=2.5cm]  % to align footnote under the table
\startnarrower[left]
   \placelocalfootnotes[here]
\stopnarrower

   \stoplocalfootnotes
 \setupnotation[footnote][numberconversion=n,rule=on]  % restore footnotes to 
global 

\stoptext

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

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


Re: [NTG-context] how to change the distance between two words?

2013-01-19 Thread 土卜皿
hi, wolfgang.schuster
  Thank you!
   I wanted to try Adobe Song Std, but when executing the command:
mtxrun --script fonts --reload

I got the error:
fonts   | names | adding path from OSFONTDIR: /study/context/fonts
fonts   | names | globbing path /study/context/fonts/**.otftexlua:
../../../source/texk/kpathsea/cnf.c:255:
kpathsea_cnf_get: Assertion `kpse->program_name' failed.

my versions are:
context  2013.01.08 01:19
luatex: beta-0.74.0-2012122510

your versions are different?

Thank you!

BEST REGARDS\
PengCZ


2013/1/19 Wolfgang Schuster 

>
> Am 19.01.2013 um 15:56 schrieb 土卜皿 :
>
> > hi, Wolfgang
> >thank you!
> >The source in attachment!
>
> I would try to avoid mixing simplefonts and zhfonts because it could lead
> to problems.
>
> You can now try a simplefonts only solution and look if the weird spacing
> disappears,
> when the problem remains you should change the font because when I use
> your example
> with “MS Mincho” or “Adobe Song Std” the spacing is better.
>
> \usemodule[simplefonts]
>
> %\definefontfeature[default][default][onum=yes,pnum=yes]
>
> \setmainfont[TeX Gyre Pagella] % Monaco
> \setsansfont[TeX Gyre Heros]
> \setmonofont[TeX Gyre Cursor]  % Monaco
>
> \setcjkmainfont[Fang Song]
> \setcjkmonofont[Fang Song]
>
> \setupbodyfont[9pt]
>
> \setscript[hanzi]
>
> \starttext
> 无线传感网络存在分布的跨区域性,随着无线传。
>
> English font is no problem!
> \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
>
> ___
>
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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] how to change the distance between two words?

2013-01-19 Thread Wolfgang Schuster

Am 19.01.2013 um 15:56 schrieb 土卜皿 :

> hi, Wolfgang
>thank you!
>The source in attachment!

I would try to avoid mixing simplefonts and zhfonts because it could lead to 
problems.

You can now try a simplefonts only solution and look if the weird spacing 
disappears,
when the problem remains you should change the font because when I use your 
example
with “MS Mincho” or “Adobe Song Std” the spacing is better.

\usemodule[simplefonts]

%\definefontfeature[default][default][onum=yes,pnum=yes]

\setmainfont[TeX Gyre Pagella] % Monaco
\setsansfont[TeX Gyre Heros]
\setmonofont[TeX Gyre Cursor]  % Monaco

\setcjkmainfont[Fang Song]
\setcjkmonofont[Fang Song]

\setupbodyfont[9pt]

\setscript[hanzi]

\starttext
无线传感网络存在分布的跨区域性,随着无线传。

English font is no problem!
\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] Chinese footnotes too wide

2012-10-30 Thread John Devereux
Wolfgang Schuster  writes:

> Am 30.10.2012 um 13:25 schrieb John Devereux :
>
>> Wolfgang Schuster  writes:
>> 
>>> Am 30.10.2012 um 10:12 schrieb John Devereux :
>>> 
>>>> Wolfgang Schuster  writes:
>>>> 
>>>>> Am 29.10.2012 um 20:20 schrieb John Devereux :
>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> There do not seem to be translations for the labels for Chinese, is that
>>>>>> correct? Is "zh" the correct language code?
>>>>> 
>>>>> No, you need “cn” for chinese.
>>>> 
>>>> Oh yes that works a lot better! :) 
>>>> 
>>>> Thanks Wolfgang.
>>>> 
>>>> Another issue I have is footnotes. Chinese footnotes extend past the
>>>> right hand edge of the page.
>>> 
>>> By default context breaks lines only at spaces or between word which are in 
>>> the hyphenations
>>> patterns but none of this applies for chinese, to enable line breaks you 
>>> have to add
>>> \setscript[hanzi] to your document. With this commands context checks the 
>>> input for chinese
>>> and breaks lines at valid points.
>> 
>> Hi Wolfgang,
>> 
>> I did actually try this too but the problem remains in the footnotes (it
>> fixes it for text in the main body). See:
>> 
>> \usemodule[simplefonts]
>> \setmainfont[Microsoft YaHei]
>> \mainlanguage[cn]
>> \language[cn]
>> \setscript[hanzi]
>> \setupfootnotes[split=tolerant]
>
>
> Add this the following code to your document, context resets a few settings 
> for footnotes to prevent
> unwanted side effects from a few commands and I guess this disables also the 
> chinese line break mechanism.
>
> \startsetups footnote:hanzi
>   \setscript[hanzi]
> \stopsetups
>
> \setupnote[footnote][setups={footnote:hanzi}]
>
> Wolfgang

Beautiful, that did it, thank you very much.

-- 

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

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] Chinese footnotes too wide

2012-10-30 Thread Wolfgang Schuster

Am 30.10.2012 um 13:25 schrieb John Devereux :

> Wolfgang Schuster  writes:
> 
>> Am 30.10.2012 um 10:12 schrieb John Devereux :
>> 
>>> Wolfgang Schuster  writes:
>>> 
>>>> Am 29.10.2012 um 20:20 schrieb John Devereux :
>>>> 
>>>>> Hi,
>>>>> 
>>>>> There do not seem to be translations for the labels for Chinese, is that
>>>>> correct? Is "zh" the correct language code?
>>>> 
>>>> No, you need “cn” for chinese.
>>> 
>>> Oh yes that works a lot better! :) 
>>> 
>>> Thanks Wolfgang.
>>> 
>>> Another issue I have is footnotes. Chinese footnotes extend past the
>>> right hand edge of the page.
>> 
>> By default context breaks lines only at spaces or between word which are in 
>> the hyphenations
>> patterns but none of this applies for chinese, to enable line breaks you 
>> have to add
>> \setscript[hanzi] to your document. With this commands context checks the 
>> input for chinese
>> and breaks lines at valid points.
> 
> Hi Wolfgang,
> 
> I did actually try this too but the problem remains in the footnotes (it
> fixes it for text in the main body). See:
> 
> \usemodule[simplefonts]
> \setmainfont[Microsoft YaHei]
> \mainlanguage[cn]
> \language[cn]
> \setscript[hanzi]
> \setupfootnotes[split=tolerant]


Add this the following code to your document, context resets a few settings for 
footnotes to prevent
unwanted side effects from a few commands and I guess this disables also the 
chinese line break mechanism.

\startsetups footnote:hanzi
  \setscript[hanzi]
\stopsetups

\setupnote[footnote][setups={footnote:hanzi}]

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] Chinese footnotes too wide

2012-10-30 Thread John Devereux
Wolfgang Schuster  writes:

> Am 30.10.2012 um 10:12 schrieb John Devereux :
>
>> Wolfgang Schuster  writes:
>> 
>>> Am 29.10.2012 um 20:20 schrieb John Devereux :
>>> 
>>>> Hi,
>>>> 
>>>> There do not seem to be translations for the labels for Chinese, is that
>>>> correct? Is "zh" the correct language code?
>>> 
>>> No, you need “cn” for chinese.
>> 
>> Oh yes that works a lot better! :) 
>> 
>> Thanks Wolfgang.
>> 
>> Another issue I have is footnotes. Chinese footnotes extend past the
>> right hand edge of the page.
>
> By default context breaks lines only at spaces or between word which are in 
> the hyphenations
> patterns but none of this applies for chinese, to enable line breaks you have 
> to add
> \setscript[hanzi] to your document. With this commands context checks the 
> input for chinese
> and breaks lines at valid points.

Hi Wolfgang,

I did actually try this too but the problem remains in the footnotes (it
fixes it for text in the main body). See:

\usemodule[simplefonts]
\setmainfont[Microsoft YaHei]
\mainlanguage[cn]
\language[cn]
\setscript[hanzi]
\setupfootnotes[split=tolerant]

\starttext

话说林黛玉正自悲泣,忽听院门响处,只见宝钗出来了,宝玉袭人一群人送了出
来。待要上去问着宝玉,又恐当着众人问羞了宝玉不便,因而闪过一旁,让宝钗
去了,宝玉等进去关了门,方转过来,犹望着门洒了几点泪。自觉无味,方转身
回来,无精打彩的卸了残妆。\footnote{话说林黛玉正自悲泣,忽听院门响
  处,只见宝钗出来了,宝玉袭人一群人送了出来。待要上去问着宝玉,又恐当
  着众人问羞了宝玉不便,因而闪过一旁,让宝钗去了,宝玉等进去关了门,方
  转过来,犹望着门洒了几点泪。自觉无味,方转身回来,无精打彩的卸了残妆。}

\blank

There were a king with a large jaw and a queen with a plain face, on
the throne of England; there were a king with a large jaw and a queen
with a fair face, on the throne of France. In both countries it was
clearer than crystal to the lords of the State preserves of loaves and
fishes, that things in general were settled for ever. \footnote{There
  were a king with a large jaw and a queen with a plain face, on the
  throne of England; there were a king with a large jaw and a queen
  with a fair face, on the throne of France. In both countries it was
  clearer than crystal to the lords of the State preserves of loaves
  and fishes, that things in general were settled for ever.}

\stoptext


-- 

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

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] Chinese footnotes too wide

2012-10-30 Thread Wolfgang Schuster

Am 30.10.2012 um 10:12 schrieb John Devereux :

> Wolfgang Schuster  writes:
> 
>> Am 29.10.2012 um 20:20 schrieb John Devereux :
>> 
>>> Hi,
>>> 
>>> There do not seem to be translations for the labels for Chinese, is that
>>> correct? Is "zh" the correct language code?
>> 
>> No, you need “cn” for chinese.
> 
> Oh yes that works a lot better! :) 
> 
> Thanks Wolfgang.
> 
> Another issue I have is footnotes. Chinese footnotes extend past the
> right hand edge of the page.

By default context breaks lines only at spaces or between word which are in the 
hyphenations
patterns but none of this applies for chinese, to enable line breaks you have 
to add
\setscript[hanzi] to your document. With this commands context checks the input 
for chinese
and breaks lines at valid points.

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

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


[NTG-context] WG: Problem with simplefonts, placing of period

2012-07-31 Thread Martin Althoff
I just realized my mail was marked as spam..., not sure what impact that has.

Might be worth mentioning the Context version:
ConTeXt  ver: 2012.07.21 16:50 MKIV  fmt: 2012.7.21


Looking through the generated PDF the placement of other interpunctuation is 
also off and the text is running rather "tight" when \setscript[hanzi] is used. 

Thanks for any replies!
Martin


> I am experiencing a problem with the placement of the period "." after 
> a sentence. In the example below it's the one after "(Englisch)." 
> Once the line \setscript[hanzi] is uncommented, the period sits under, 
> before or far after the closing bracket depending on borders or text 
> before/after.
> 
> The question is: Is that a bug or feature? The key impact of setscript I see 
> is 
> on spacing/flow of text. A small amount of Chinese text in the complete 
> document 
> appears the same.
> 
> Thanks,
> Martin
> 
> 
> \usemodule[simplefonts]
> 
> \mainlanguage[de]
> 
> \setupsimplefonts[size=11pt]
> \setmainfont[TeX Gyre Pagella]
> \setcjkmainfont[AdobeSongStd][regular={* Light},italic={AdobeKaitiStd 
> Regular},bold={AdobeHeitiStd Regular},bolditalic={AdobeHeitiStd Regular}]
> \setcjksansfont[AdobeKaitiStd][bold={AdobeHeitiStd 
> Regular},bolditalic={AdobeHeitiStd Regular}]
> \setcjkmonofont[AdobeFangsongStd][bold={AdobeHeitiStd 
> Regular},bolditalic={AdobeHeitiStd Regular}]
> 
> 
> %\setscript[hanzi]
> 
> 
> \setuppapersize[A4][A4]
> 
> \setuplayout
> [
> backspace=45mm,
> height=fit,
> width=fit,
> rightmargin=10mm,
> leftmargin=30mm,
> ]
> 
> \starttext
> 
> auf der Stufe von A1-C1 (Deutsch) bzw. \quotation{Beginner} bis 
> \quotation{Upper Intermediate} (Englisch). \input{lorem}
> 
> \stoptext
> 
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] [***SPAM***] Problem with simplefonts, placing of period

2012-07-30 Thread Martin

Hi All,

I am experiencing a problem with the placement of the period "." after a 
sentence. In the example below it's the one after "(Englisch)." Once the 
line \setscript[hanzi] is uncommented, the period sits under, before or 
far after the closing bracket depending on borders or text before/after.


The question is: Is that a bug or feature? The key impact of setscript I 
see is on spacing/flow of text. A small amount of Chinese text in the 
complete document appears the same.


Thanks,
Martin


\usemodule[simplefonts]

\mainlanguage[de]

\setupsimplefonts[size=11pt]
\setmainfont[TeX Gyre Pagella]
\setcjkmainfont[AdobeSongStd][regular={* Light},italic={AdobeKaitiStd 
Regular},bold={AdobeHeitiStd Regular},bolditalic={AdobeHeitiStd Regular}]
\setcjksansfont[AdobeKaitiStd][bold={AdobeHeitiStd 
Regular},bolditalic={AdobeHeitiStd Regular}]
\setcjkmonofont[AdobeFangsongStd][bold={AdobeHeitiStd 
Regular},bolditalic={AdobeHeitiStd Regular}]



%\setscript[hanzi]


\setuppapersize[A4][A4]

\setuplayout
[
backspace=45mm,
height=fit,
width=fit,
rightmargin=10mm,
leftmargin=30mm,
]

\starttext

auf der Stufe von A1-C1 (Deutsch) bzw. \quotation{Beginner} bis 
\quotation{Upper Intermediate} (Englisch). \input{lorem}


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

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


Re: [NTG-context] Asian Language Support

2012-05-09 Thread KUROKI Yusuke
I have realized a slight typo was included in Fig3_5.txt.
The corrected one is attached to this mail.

Hans,
Japanese opening “ should be treated as opening 「, and
closing ” should be treated as closing 」, in the meaning of
spacing and line-breaking.

Thanks,
-- Yusuke.

2012/5/8 KUROKI Yusuke :
> I am attaching five test files including Fig. 3.1, 3.2, 3.3
> in http://www.w3.org/TR/jlreq/ .  All files but
> Fig3_1-different-linebreaks.txt, the positions of linebreaks
> are the same as the examples.  In writing a manuscript,
> we will make linebreaks depending on its context, then
> the same results are required from the different sources,
> Fig3_1.txt and Fig3_1-different-linebreaks.txt  .
>
> Yusuke.
>
>
> (2012/05/08 0:54), Hans Hagen wrote:
>>
>> On 7-5-2012 15:17, KUROKI Yusuke wrote:
>>
>>> What the timing you choose to post this message!
>>> Several days ago, I, Japanese, firstly met Hans and had
>>> a lecture about Japanese typography and typesetting.
>>> Now it is the duration to prepare to think about Japanese
>>> typesetting in ConTeXt. It is note that hanzi option of
>>> ConTeXt is ugly for Japanese typesetting, it must come from
>>> some Chinese typesetting custom.
>>
>>
>> We need to define a handler similar to chinese and korean, but with
>> japanese rules etc. I will make a basic setup so that we have a starting
>> point.
>>
>> It would be handy to have some test files. For instance, in
>> http://www.w3.org/TR/jlreq/ the text in fig 3.1, 3.2, 3.3 which has mixed
>> punctuation etc.
>>
>> 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
>> -
>
>
>
> --
> 黒木 裕介 (KUROKI Yusuke)
> kuroky(at)users.sourceforge.jp
> http://ptetexwin.sourceforge.jp/



-- 
黒木 裕介 (KUROKI Yusuke)
日本語の表記では“漢字”や“仮名”だけで
なく,“ローマ字”や“アラビア数字”,さら
に“句読点”や“括弧類”などの記述記号を
用いる.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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] Asian Language Support

2012-05-08 Thread Hans Hagen

Hi Yusuke


 > A question for Yusuke: what script name should we use?

It is a difficult question. In Chinese or Korean case,
what they have chosen? In Japanese, we need to prepare a
lot of characters for font set if they complete Adobe-Japan-1.5
or something. So, some font vendors publish the font sets
including only kana-region and latin/number-region (and
elementary school level kanjis). In this case, script=kana
might be ok, but if the font set has all the characters
of Adobe-Japan-1.5 region, then script=kana is too impolite.

Moreover, in pTeX world, we use 'kanji' for this kind, but
we need to rethink 'kanji' is most appreciate or not.


we use hangul for korean and hanzi for chinese so kanji sounds ok to me 
but in fact there a bit more to it, currently we have


\definescript[hangul]  [method=hangul]
\definescript[hanzi]   [method=hanzi]
\definescript[nihongo] [method=nihongo]

and these use default presets but as there can be be variants in spacing 
one can also define for instance


\definescript [myhangul] [hangul] [preset=mypreferences]

(not that there are such preferences defined now) and more key/values 
will be supported some day


so, shall we go for 'kanji' for the default setup? but 'japanese' could 
do as well as well because we can define synonyms


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] Asian Language Support

2012-05-08 Thread KUROKI Yusuke

Hi, Hans,

> A question for Yusuke: what script name should we use?

It is a difficult question.  In Chinese or Korean case,
what they have chosen?  In Japanese, we need to prepare a
lot of characters for font set if they complete Adobe-Japan-1.5
or something. So, some font vendors publish the font sets
including only kana-region and latin/number-region (and
elementary school level kanjis).  In this case, script=kana
might be ok, but if the font set has all the characters
of Adobe-Japan-1.5 region, then script=kana is too impolite.

Moreover, in pTeX world, we use 'kanji' for this kind, but
we need to rethink 'kanji' is most appreciate or not.

Thanks,
-- Yusuke.


(2012/05/08 7:07), Hans Hagen wrote:

On 7-5-2012 15:12, S Barmeier wrote:

I am writing documents in English/Japanese.

If you want to include English text, you probably need to define your
own typescript (or use simplefonts), because most Japanese fonts have
terrible Latin fonts...

I can probably help you, if you tell me what exactly you need.

If you're just typesetting Japanese text, you will need
\setscript[hanzi] to enable linebreaks...

And the rest is done by Unicode magic: just type away between \starttext
and \stoptext


I uploaded a beta with preliminary Japanese script support.

\enabletrackers[scripts.analyzing]
% \enabletrackers[scripts.injections]
\enabletrackers[scripts.details]

% \definefont[testfont][heiseikakugostd-w5][script=kana,language=jan]
\definefont[testfont][heiseiminstd-w3] [script=kana,language=jan]

\testfont

\starttext

\startscript[nihongo]

\startlines
国、『国』、『国』、『国』、『国』、『国』、
\hbox to 3em{国、『国』、『国』、『国』、『国』、『国』、}
国:国:国:国:国:国:国:国:国:国
\hbox to 3em{国:国:国:国:国:国:国:国:国:国}
\stoplines

\stopscript

\stoptext

A question for Yusuke: what script name should we use?

More (simple) examples are needed in order to get all relations between 
categories done (so, currently we still use a copy of chinese but with already 
a few japanese specific inter-character issues done).

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
___



--
黒木 裕介 (KUROKI Yusuke)
kuroky(at)users.sourceforge.jp
http://ptetexwin.sourceforge.jp/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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] Asian Language Support

2012-05-08 Thread KUROKI Yusuke

I am attaching five test files including Fig. 3.1, 3.2, 3.3
in http://www.w3.org/TR/jlreq/ .  All files but
Fig3_1-different-linebreaks.txt, the positions of linebreaks
are the same as the examples.  In writing a manuscript,
we will make linebreaks depending on its context, then
the same results are required from the different sources,
Fig3_1.txt and Fig3_1-different-linebreaks.txt  .

Yusuke.

(2012/05/08 0:54), Hans Hagen wrote:

On 7-5-2012 15:17, KUROKI Yusuke wrote:


What the timing you choose to post this message!
Several days ago, I, Japanese, firstly met Hans and had
a lecture about Japanese typography and typesetting.
Now it is the duration to prepare to think about Japanese
typesetting in ConTeXt. It is note that hanzi option of
ConTeXt is ugly for Japanese typesetting, it must come from
some Chinese typesetting custom.


We need to define a handler similar to chinese and korean, but with japanese 
rules etc. I will make a basic setup so that we have a starting point.

It would be handy to have some test files. For instance, in 
http://www.w3.org/TR/jlreq/ the text in fig 3.1, 3.2, 3.3 which has mixed 
punctuation etc.

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
-



--
黒木 裕介 (KUROKI Yusuke)
kuroky(at)users.sourceforge.jp
http://ptetexwin.sourceforge.jp/
日本語の表記においては,漢字や仮名だけで
なく,ローマ字やアラビア数字,さらに句読
点や括弧類などの記述記号を用いる.これら
を組み合わせて表す日本語の文章では,表記
上における種々の問題がある.
日本語の表記においては,漢字や仮名だけでなく,
ローマ字やアラビア数字,さらに句読点や括弧類などの
記述記号を用いる.
これらを組み合わせて表す日本語の文章では,表記上に
おける種々の問題がある.
日本語の表記においては,漢字や仮名だけで
なく,ローマ字やアラビア数字,さらに句読
点や括弧類などの記述記号を用いる。これら
を組み合わせて表す日本語の文章では,表記
上における種々の問題がある。
日本語の表記においては、漢字や仮名だけで
なく、ローマ字やアラビア数字、さらに句読
点や括弧類などの記述記号を用いる。これら
を組み合わせて表す日本語の文章では、表記
上における種々の問題がある。
日本語の表記では“漢字”や”仮名”だけで
なく,“ローマ字”や“アラビア数字”,さら
に“句読点”や“括弧類”などの記述記号を
用いる.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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] Asian Language Support

2012-05-07 Thread KUROKI Yusuke
Hi, Hans,

Tnank you for your quick try.
I will respond to you this evening (in your timezone, this afternoon),
because I don't have so much time to write sth in this morning.

2012/5/8 Hans Hagen :
> On 7-5-2012 15:12, S Barmeier wrote:
>>
>> I am writing documents in English/Japanese.
>>
>> If you want to include English text, you probably need to define your
>> own typescript (or use simplefonts), because most Japanese fonts have
>> terrible Latin fonts...
>>
>> I can probably help you, if you tell me what exactly you need.
>>
>> If you're just typesetting Japanese text, you will need
>> \setscript[hanzi] to enable linebreaks...
>>
>> And the rest is done by Unicode magic: just type away between \starttext
>> and \stoptext
>
>
> I uploaded a beta with preliminary Japanese script support.
>
> \enabletrackers[scripts.analyzing]
> % \enabletrackers[scripts.injections]
> \enabletrackers[scripts.details]
>
> % \definefont[testfont][heiseikakugostd-w5][script=kana,language=jan]
> \definefont[testfont][heiseiminstd-w3]   [script=kana,language=jan]
>
> \testfont
>
> \starttext
>
> \startscript[nihongo]
>
> \startlines
> 国、『国』、『国』、『国』、『国』、『国』、
> \hbox to 3em{国、『国』、『国』、『国』、『国』、『国』、}
> 国:国:国:国:国:国:国:国:国:国
> \hbox to 3em{国:国:国:国:国:国:国:国:国:国}
> \stoplines
>
> \stopscript
>
> \stoptext
>
> A question for Yusuke: what script name should we use?
>
> More (simple) examples are needed in order to get all relations between
> categories done (so, currently we still use a copy of chinese but with
> already a few japanese specific inter-character issues done).
>
>
> 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
> ___



-- 
黒木 裕介 (KUROKI Yusuke)
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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] Asian Language Support

2012-05-07 Thread Hans Hagen

On 7-5-2012 15:12, S Barmeier wrote:

I am writing documents in English/Japanese.

If you want to include English text, you probably need to define your
own typescript (or use simplefonts), because most Japanese fonts have
terrible Latin fonts...

I can probably help you, if you tell me what exactly you need.

If you're just typesetting Japanese text, you will need
\setscript[hanzi] to enable linebreaks...

And the rest is done by Unicode magic: just type away between \starttext
and \stoptext


I uploaded a beta with preliminary Japanese script support.

\enabletrackers[scripts.analyzing]
% \enabletrackers[scripts.injections]
\enabletrackers[scripts.details]

% \definefont[testfont][heiseikakugostd-w5][script=kana,language=jan]
\definefont[testfont][heiseiminstd-w3]   [script=kana,language=jan]

\testfont

\starttext

\startscript[nihongo]

\startlines
 国、『国』、『国』、『国』、『国』、『国』、
\hbox to 3em{国、『国』、『国』、『国』、『国』、『国』、}
 国:国:国:国:国:国:国:国:国:国
\hbox to 3em{国:国:国:国:国:国:国:国:国:国}
\stoplines

\stopscript

\stoptext

A question for Yusuke: what script name should we use?

More (simple) examples are needed in order to get all relations between 
categories done (so, currently we still use a copy of chinese but with 
already a few japanese specific inter-character issues done).


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] Asian Language Support

2012-05-07 Thread Hans Hagen

On 7-5-2012 15:17, KUROKI Yusuke wrote:


What the timing you choose to post this message!
Several days ago, I, Japanese, firstly met Hans and had
a lecture about Japanese typography and typesetting.
Now it is the duration to prepare to think about Japanese
typesetting in ConTeXt. It is note that hanzi option of
ConTeXt is ugly for Japanese typesetting, it must come from
some Chinese typesetting custom.


We need to define a handler similar to chinese and korean, but with 
japanese rules etc. I will make a basic setup so that we have a starting 
point.


It would be handy to have some test files. For instance, in 
http://www.w3.org/TR/jlreq/ the text in fig 3.1, 3.2, 3.3 which has 
mixed punctuation etc.


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] Asian Language Support

2012-05-07 Thread KUROKI Yusuke
Hello, Henman-san,

> Is it the font or the spacing that is bad in simplefont?

It is not the problem of simplefont itself, I think.
The problem is the rules of hanzi option does not have such
a good quality in spacing and line-breaking for Japanese typesetting.

> can ptex be used with ConTeXt? as the the engine?  Would this wowrk?

Unfortunately no.  I could not describe the reason, but everyone
gives up before trying.

Cheers,
-- Yusuke.


(2012/05/07 21:54), d.henman wrote:
> Yusuke-san,
> Thank you too for writing.  It seems like one or the other so far, platex 
> does not give good western style characters but is great for Japanese, which 
> the other option, simplefonts gives good western characters and according to 
> you bad Japanese charac
> ters.  Is it the font or the spacing that is bad in simplefont?
> 
>So a question might be can ptex be used with ConTeXt? as the the engine?  
> Would this wowrk?


-- 
黒木 裕介 (KUROKI Yusuke)
kuroky(at)users.sourceforge.jp
http://ptetexwin.sourceforge.jp/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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] Asian Language Support

2012-05-07 Thread S Barmeier
Depending on your needs, p(La)TeX may be a quicker solution, if you can
afford to miss out on the benefits of ConTeXt. But that's just my opinion...

On 05/07/2012 10:17 PM, KUROKI Yusuke wrote:
> Hello, Henman,
> 
> What the timing you choose to post this message!
> Several days ago, I, Japanese, firstly met Hans and had
> a lecture about Japanese typography and typesetting.
> Now it is the duration to prepare to think about Japanese
> typesetting in ConTeXt.  It is note that hanzi option of
> ConTeXt is ugly for Japanese typesetting, it must come from
> some Chinese typesetting custom.
> 
> In TeX world, for well-customized Japanese typesetting,
> we usually use p(La)TeX developed by ASCII MEDIA WORKS Inc.
> Since it has been already included TeX Live 2011 and now
> Cygwin distribute texlive-collection packages officially,
> you can use pTeX in Cygwin.
> 
> Another alternative is to use LuaTeX-ja package through LuaTeX.
> The package is now distributed through CTAN and also upcoming
> TeX Live.
> 
> Best,
> -- Yusuke.
> 
> 
> (2012/05/07 19:43), hwit...@gmail.com wrote:
>>
>> I live in Japan and fequently have the need to create documents in
>> Japanese.
>> I would like to stop using WYSIWYG type word processing and switch
>> over to TeX based systems.  I've been starting and am learning to use
>> ConTeXt but I've still a long way to go.
>>
>> I want to ask if anyone has already gone through this and has a "How
>> to publish a Japanese language document using  ConTeXt"  or something
>> like that, unless it is incredibly easy to do.  I've not tried it yet,
>> but will tomorrow.  I wanted to write to the
>>   group first to see if this issue has already be solved or any other
>> input.
>>
>> My current platform environment is not ideal, but using Cygwin on a
>> Japanese XP Windows box.  I've not had any problems with English
>> documents.
>>
>> Regards,
>> Henman  (hwitloc)
>> ___
>>
>> If your question is of interest to others as well, please add an entry
>> to the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>> ___
>>
> 
> 

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

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


Re: [NTG-context] Asian Language Support

2012-05-07 Thread KUROKI Yusuke

Hello, Henman,

What the timing you choose to post this message!
Several days ago, I, Japanese, firstly met Hans and had
a lecture about Japanese typography and typesetting.
Now it is the duration to prepare to think about Japanese
typesetting in ConTeXt.  It is note that hanzi option of
ConTeXt is ugly for Japanese typesetting, it must come from
some Chinese typesetting custom.

In TeX world, for well-customized Japanese typesetting,
we usually use p(La)TeX developed by ASCII MEDIA WORKS Inc.
Since it has been already included TeX Live 2011 and now
Cygwin distribute texlive-collection packages officially,
you can use pTeX in Cygwin.

Another alternative is to use LuaTeX-ja package through LuaTeX.
The package is now distributed through CTAN and also upcoming
TeX Live.

Best,
-- Yusuke.


(2012/05/07 19:43), hwit...@gmail.com wrote:


I live in Japan and fequently have the need to create documents in Japanese.
I would like to stop using WYSIWYG type word processing and switch over to TeX 
based systems.  I've been starting and am learning to use ConTeXt but I've 
still a long way to go.

I want to ask if anyone has already gone through this and has a "How to publish a 
Japanese language document using  ConTeXt"  or something like that, unless it is 
incredibly easy to do.  I've not tried it yet, but will tomorrow.  I wanted to write to 
the
  group first to see if this issue has already be solved or any other input.

My current platform environment is not ideal, but using Cygwin on a Japanese XP 
Windows box.  I've not had any problems with English documents.

Regards,
Henman  (hwitloc)
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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
___



--
黒木 裕介 (KUROKI Yusuke)
kuroky(at)users.sourceforge.jp
http://ptetexwin.sourceforge.jp/
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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] Asian Language Support

2012-05-07 Thread S Barmeier
I am writing documents in English/Japanese.

If you want to include English text, you probably need to define your
own typescript (or use simplefonts), because most Japanese fonts have
terrible Latin fonts...

I can probably help you, if you tell me what exactly you need.

If you're just typesetting Japanese text, you will need
\setscript[hanzi] to enable linebreaks...

And the rest is done by Unicode magic: just type away between \starttext
and \stoptext

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

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] Chinese hyphenation / line splitting

2012-04-16 Thread John Devereux
Wolfgang Schuster  writes:

> Am 16.04.2012 um 10:52 schrieb John Devereux:
>
>> 
>> Hi All,
>> 
>> We are having a go at typesetting one of our manuals in Chinese
>> (gulp). Is there some trick to getting hyphenation working? (Or perhaps
>> "line-splitting" is a better term, I don't even know if hyphens are used
>> in Chinese).
>> 
>> What I see in the PDF are unbroken lines running off the edge of the
>> page. If I manually insert spaces, then the lines do break but seem to
>> go slightly past the right-hand edge of the paper (so parts of the
>> characters are lost).
>> 
>> Sample text is from what I think is the Chinese section of Wikipedia,
>> hopefully is not offensive...
>> 
>> ==
>> 
>> \usemodule[simplefonts]
>> \setmainfont[Adobe Heiti Std]
>> %\setmainfont[Arial Unicode MS]
>
> Add \setscript[hanzi].

Fantastic, that worked. Thanks Wolfgang.


-- 

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

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] Chinese hyphenation / line splitting

2012-04-16 Thread Wolfgang Schuster

Am 16.04.2012 um 10:52 schrieb John Devereux:

> 
> Hi All,
> 
> We are having a go at typesetting one of our manuals in Chinese
> (gulp). Is there some trick to getting hyphenation working? (Or perhaps
> "line-splitting" is a better term, I don't even know if hyphens are used
> in Chinese).
> 
> What I see in the PDF are unbroken lines running off the edge of the
> page. If I manually insert spaces, then the lines do break but seem to
> go slightly past the right-hand edge of the paper (so parts of the
> characters are lost).
> 
> Sample text is from what I think is the Chinese section of Wikipedia,
> hopefully is not offensive...
> 
> ==
> 
> \usemodule[simplefonts]
> \setmainfont[Adobe Heiti Std]
> %\setmainfont[Arial Unicode MS]

Add \setscript[hanzi].

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

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


[NTG-context] glyph width issues with \setscript[hanzi]

2012-03-10 Thread S Barmeier
Not quite sure what causes this problem, but for particular text widths
in combination with \setscript[hanzi], the glyph width gets thrown off.

\setuplayout[width=110mm,height=200mm]
\usemodule[simplefonts]
\setscript[hanzi]
\setcjkmainfont[IPAexMincho]
\starttext
?? \input tufte
\stoptext

The question marks are too tight (almost on top of each other). This
also affects parentheses ( ) and other punctuation , . but I haven't
been able to reproduce those in a minimal example. The question marks
above should illustrate the problem, though.

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

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] CJK hyphenation/line breaking

2012-03-09 Thread Wolfgang Schuster

Am 09.03.2012 um 20:23 schrieb S Barmeier:

> Korean has spaces, so I guess I am only asking for CJ, but I was
> wondering if it is possible to enable line breaking, i.e. cheap
> hyphenation for CJ(K).
> I can only speak with certainty for Japanese, but at least here the
> rules are quite simple. There is no kerning for Japanese characters, so
> when the line is full it spaces all characters evenly (preferably as
> close together as the font allows) and dumps everything else to the next
> line, no matter if it is in the middle of a word (a concept not quite as
> well defined as in languages with spaces anyway).
> I can do this by hand if absolutely necessary, by inserting fake spaces
> "\ \!", but this gets quite tedious, and it seems line breaking for
> CJ(K) would be nice to have. I remember it working about a year and a
> half ago(?)…

\setscript[hanzi]

\starttext
…
\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] Error while compiling : ! String contains an invalid utf-8 sequence.

2011-12-07 Thread Hans Hagen

On 7-12-2011 17:37, Alexandre Krispin wrote:

Thank you for your answer !

Finally I am back to Latex until this problem is fixed. Though I have no
knowledge about it, it seemed to me that the problem I got was more related
to hanzi script than to bibtex, since the final problem of misplaced dots I
had appeared only with hanzi script.

Hans Hagen did not replied to it. That's why I suppose that one day if this
problem related to hanzi script becomes a problem of general interest,
maybe it will be fixed...


As mentioned on this list using a unicode (utf) engine with bibtex is 
somewhat tricky. Interesting is that a similar problem occurred with 
url's: bibtex has hard coded line lengths and if I'm right there has 
been a fix that made lines wrap on spaces. However that does not help 
with scripts that have no spaces. Somewhat strange is that bibtex was 
not made compliant to other tex related programs in the sense that one 
can configure the line length (which we would then set to 1000 or so).


In spite of repeated announcements of bibtex 1.0 (which would probably 
not fix this issue anyway) it looks like the program is deep frozen. 
Unfortunately it also has frozen some conventions that make it hard to 
replace it.


Fixing it is probably something that an able programmer can do while 
watching a movie at the same time were it not that touching bibtex seems 
to be some kind of sacrilege.


I can imagine that someone makes a copy of bibtex, say ctxbibtex, 
patches it to accept long lines and that we ship that one with context.


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] Error while compiling : ! String contains an invalid utf-8 sequence.

2011-12-07 Thread Alexandre Krispin
Thank you for your answer !

Finally I am back to Latex until this problem is fixed. Though I have no
knowledge about it, it seemed to me that the problem I got was more related
to hanzi script than to bibtex, since the final problem of misplaced dots I
had appeared only with hanzi script.

Hans Hagen did not replied to it. That's why I suppose that one day if this
problem related to hanzi script becomes a problem of general interest,
maybe it will be fixed...

Cheers,
Alexandre Krispin

2011/12/7 Thomas A. Schmitz 

> On 11/25/2011 09:09 PM, Hans Hagen wrote:
>
>> It makes me wonder how Thomas gets his greek etc done in bibtex.
>>
>
> To be quite honest: I rarely have more than a few words of Greek, and I
> wrap them up in \localgreek{} markup in my bibtex files, so I assume that's
> why I have never run into this problem. But it's another example to show
> that bibtex has huge problems outside of English (ASCII) range. It would be
> great if we could get rid of it ASAP...
>
> 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 <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/<http://foundry.supelec.fr/projects/contextrev/>
> wiki : http://contextgarden.net
> __**__**
> ___
>



-- 
--
Alexandre KRISPIN
41 rue Guynemer  |  93200 Saint-Denis  |  France
tél : 06 28 76 69 34  |  http://bijutsu.toile-libre.org

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

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] Error while compiling : ! String contains an invalid utf-8 sequence.

2011-11-30 Thread Alexandre Krispin
Hello,

I had no response for the problem related to the script "hanzi", and the
reason may be that I have done a mistake since I have sent a mail only to
Wolfgang Schuster and not to the mailing list.

So in case there would be a solution to solve the problem of misplaced dots
that the script "hanzi" caused, I copy-paste the mail I sent to Wolfgang
Schuster only instead of the mailing list by mistake :

The problem when I switch to the latin script for the bibliography is that
again, japanese words won't wrap, the long japanese titles will go
throughout the page, without going to the next line, as before. And if I
switch to the the hanzi script for the bibliography, japanese titles will
appear correctly, but dots will be misplaced. Some dots will be before the
parenthesis, others will be at the same after parenthesis but with a big
space between it.

Here are the tex and bib file which allow you to reproduce the problem :
%*
***

\usemodule[simplefonts]
\setmainfont[Arno Pro]
\definesimplefonttypeface[jpn][HeiseiMinStd-W3]
%
\setupbibtex[database=biblio,sort=author]
\setuppublications[alternative=apa-fr,sorttype=bbl,refcommand=authoryear]
%****
\setscript[hanzi] %if this script is turned on, japanese display is ok, but
dots won't  display correctly

\starttext
\completepublications[criterium=all]
\stoptext
%**

%**
@article{conrad1980transformation,
author = "Conrad Totman",
title = "From {S}akoku to {K}aikoku. {T}he {T}ransformation of
{F}oreign-{P}olicy
{A}ttitudes,
1853-1868",
journal = "Monumenta Nipponica",
year = 1980,
volume = 35,
number = 1,
pages = "1-19",
publisher = "Sophia University",
url = "http://www.jstor.org/stable/2384397";,
}

@article{howse2002from,
author = "Robert Howse",
title = "From Politics to Technocracy-and Back Again: The Fate of the
Multilateral Trading Regime",
journal = "The American Journal of International Law",
volume = 96,
number = 1,
month = "January",
year = 2002,
pages = "94-117",
publisher = "American Society of International Law",
url = "http://www.jstor.org/stable/2686127";,
}

@article{kato2011tpp,
author = "Katô, Fumiko {\jpn 加藤 文子}",
title = "{TPP} sanka giron wo meguru ikkôsatsu - Iryôbunya wo chûshin ni -
Ôbei no rôdô
shijô to no genjô wo fumaete {\jpn
TPP参加議論をめぐる一考察-医療分野を中心に-欧米の労働市場との現状比較をふまえて}
(Une réflexion sur les débats d'adhésion au {TPP}, centrée sur le champ
médical
-- Basée sur une comparaison du marché du travail actuel européen et
nord-américain)",
journal = "Jissen joshi daigaku ningen shakai gakubu kiyô {\jpn
実践女子大学人間社会学部紀要}",
month = "avril",
year = 2011,
pages = "77-88",
publisher = "Jissen joshi daigaku {\jpn 実践女子大学}",
url = "http://ci.nii.ac.jp/naid/110008431857/";,
}

@article{kobrain1998mai,
author = "Stephen J. Kobrin",
title = {The {MAI} and the Clash of Globalizations},
journal = "Foreign Policy",
number = 112,
month = "Autumn",
year = 1998,
pages = "97-109",
publisher = "Washington Post Newsweek Interactive LLC",
url = "http://www.jstor.org/stable/1149038";,
}

@article{ishihara2011tpp,
author = "Ishihara, Kenji {\jpn 石原健二}",
title = {{TPP} mondai to nihon
nôgyô {\jpn TPP問題と日本農業}(Le problème du {TPP} et l'agriculture
japonaise)},
journal = {Jichi sôken {\jpn 自治総研}},
volume = {392},
year = {2011},
month = {June},
pages = {38-58},
publisher = {Chihô jichi sôgô kenkyûjo {\jpn 地方自治総合研究所}},
url = {http://ci.nii.ac.jp/naid/110008454120/},
}

@article{ciccantell2001nafta,
author = "Paul Ciccantell",
title = "{NAFTA} and the Reconstruction of {U.S.} Hegemony: The Raw
Materials
Foundations of Economic Competitiveness",
publisher = "Canadian Journal of Sociology",
journal = "The Canadian Journal of Sociology",
year = 2001,
period = Winter,
volume = 26,
number = 1,
pages = "57-87",
url = "http://www.jstor.org/stable/3341511";
}

@article{robey1999civil,
author = "John S. Robey",
title = "Civil Society and {NAFTA}: Initial Results",
journal = "Annals of the American Academy of Political and Social Science",
publisher = "Sage Publications, Inc.",
year = 1999,
month = "September",
volume = 565,
pages = "113-125",
url = "http://www.jstor.org/stable/1049540";
}


@article{morales1999governance,
author = "Isidro Morales",
title = "{NAFTA}: The Governan

Re: [NTG-context] Error while compiling : ! String contains an invalid utf-8 sequence.

2011-11-28 Thread Wolfgang Schuster

Am 26.11.2011 um 00:56 schrieb Alexandre Krispin:

> Now that japanese display correctly, there is still another problem. Japanese 
> sentences (long titles in bibliography) don't break at the end of line. I 
> have tested the behavior of japanese with entire paragraphs, and I get the 
> same problem as in the bibliography, lines don't break and go "through" the 
> page.

As I already told you need “\setscript[hanzi]” to enable linbreaks for chinese 
and japanese.

Instead of a global setting you can also write

\startscript[hanzi]
…
\stopscript

to enable linebreaking for a area.

Another valid form for \setscript[hanzi] is the command \hanzi which is a 
shortcut for the longer definition.

> Though I have looked to documentation about chinese on the wiki, none helped 
> me to solve this problem. Does someone have any idea ?
> 
> Here is a minimal example with a paragraph sample in japanese :
> %beginning of file%%
> \usemodule[simplefonts]
> \setmainfont[HeiseiMinStd-W3]
> \definesimplefonttypeface[jpn][HeiseiMinStd-W3]
> \setupbodyfont[12pt]
> \setuptolerance[\v!verytolerant,\v!stretch]

Don’t use the “\v!” prefix for settings in your document, in this case it’s 
harmless but there can be cases
where you don’t get the expected result of this because in normal text “\v” is 
a command to place a accent
over the next character (here the “!”).

> \enableregime[utf]

This is not necessary because MkIV use UTF-8 by default.

> \usemodule[typearea]
> \setupTypeArea[bcor=30mm,alphabets=2.6,oneside]

You can’t mix keywords and assignments in the same argument of a setup command,
to use the onside option you have to write “oneside=yes”.

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] Error while compiling : ! String contains an invalid utf-8 sequence.

2011-11-28 Thread Alexandre Krispin
Yes for sure, thanks to the script Wolfgang Schuster pointed out to me
earlier in the discussion :
\setscript[hanzi]

2011/11/28 S Barmeier 

> On 11/27/2011 11:44 PM, ntg-context-requ...@ntg.nl wrote:
> > Send ntg-context mailing list submissions to
> >   ntg-context@ntg.nl
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> >   http://www.ntg.nl/mailman/listinfo/ntg-context
> > or, via email, send a message with subject or body 'help' to
> >   ntg-context-requ...@ntg.nl
> >
> > You can reach the person managing the list at
> >   ntg-context-ow...@ntg.nl
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of ntg-context digest..."
> >
> >
> > Today's Topics:
> >
> >1. error with \showlayout and export (Henning Hraban Ramm)
> >2. Re: error with \showlayout and export (Wolfgang Schuster)
> >3. page number in margin (Henning Hraban Ramm)
> >4. Export to epub (Keith McKay)
> >5. Re: Error while compiling : ! String contains an invalid
> >   utf-8 sequence. (Mojca Miklavec)
> >6. Re: Export to epub (Hans Hagen)
> >
> >
> > --
> >
> > Message: 1
> > Date: Sun, 27 Nov 2011 12:11:36 +0100
> > From: Henning Hraban Ramm 
> > To: mailing ConTeXt users list for 
> > Subject: [NTG-context] error with \showlayout and export
> > Message-ID: <4670b7fc-970f-4698-b676-9f8c31ae8...@fiee.net>
> > Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes
> >
> > Hi wizards,
> >
> > if I use \showlayout in a project where I setup export=yes, ConTeXt
> > stops with a fatal error.
> >
> > Minimal failing example:
> >
> > \setupbackend[export=yes]
> > \starttext
> > \showlayout
> > \stoptext
> >
> >
> > Ixchel:konzept hraban$ context --purge context_test.tex
> >
> > mtx-context | run 1: luatex --fmt="/Users/hraban/Library/texmf/tex/
> > texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/
> > formats/cont-en" --lua="/Users/hraban/Library/texmf/tex/texmf-cache/
> > luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-
> > en.lui" --backend="pdf" "./context_test.tex" \stoptext
> > This is LuaTeX, Version beta-0.70.1-2011051908 (rev 4277)
> >   \write18 enabled.
> > (context_test.tex
> >
> > ConTeXt  ver: 2011.11.24 15:52 MKIV  fmt: 2011.11.25  int: english/
> > english
> >
> > system  > cont-new.mkiv loaded
> > (/Users/hraban/Library/texmf/tex/texmf-context/tex/context/base/cont-
> > new.mkiv
> > system  > beware: some patches loaded from cont-new.mkiv
> > )
> > system  > context_test.top loaded
> > (context_test.top)
> > fonts   > latin modern fonts are not preloaded
> > languages   > language en is active
> > backend > export > enabling export to xml
> > {/Users/hraban/Library/texmf/tex/texmf-context/fonts/map/pdftex/
> > context/mkiv-base.map}
> > fonts   > preloading latin modern fonts (second stage)
> > (/Users/hraban/Library/texmf/tex/texmf-context/tex/context/base/type-
> > siz.mkiv) (/Users/hraban/Library/texmf/tex/texmf-context/tex/context/
> > base/type-otf.mkiv)
> > files   > readfile > asked name: 'loc', not found
> > {/Users/hraban/Library/texmf/tex/texmf-fonts/fonts/map/dvips/lm/lm-
> > math.map}{/Users/hraban/Library/texmf/tex/texmf-fonts/fonts/map/dvips/
> > lm/lm-rm.map}
> > fonts   > virtual math > unable to resolve name mapsfromchar
> > fonts   > fallback modern rm 12pt is loaded
> > (/Users/hraban/Library/texmf/tex/texmf-context/tex/context/base/page-
> > run.mkiv
> > loading > ConTeXt Page Macros / Runtime Macros
> > )
> > interface   > initialization > loading interface definitions from
> > 'mult-def.lua'
> > interface   > initialization > loading interface messages from
> > 'mult-mes.lua'
> > metapost> initializing instance 'metafun' using format 'metafun'
> > metapost> loading 'metafun': /Users/hraban/Library/texmf/tex/
> > texmf-context/metapost/context/base/metafun.mpiv
> > backend > xmp > using file '/Users/hraban/Library/texmf/tex/
> > texmf-context/tex/context/base/lpdf-pdx.xml'
> &

Re: [NTG-context] Error while compiling : ! String contains an invalid utf-8 sequence.

2011-11-26 Thread Alexandre Krispin
Thanks ! It worked perfectly !

Cheers,
Alexandre Krispin

2011/11/26 Wolfgang Schuster 

>
> Am 26.11.2011 um 11:44 schrieb Alexandre Krispin:
>
> > Now that japanese display correctly, there is still another problem.
> Japanese sentences (long titles in bibliography) don't break at the end of
> line. I have tested the behavior of japanese with entire paragraphs, and I
> get the same problem as in the bibliography, lines don't break and go
> "through" the page.
> >
> > Though I have looked to documentation about chinese on the wiki, none
> helped me to solve this problem. Does someone have any idea ?
>
> Add “\setscript[hanzi]” to your document.
>
> 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
>
> ___
>



-- 
--
Alexandre KRISPIN
41 rue Guynemer  |  93200 Saint-Denis  |  France
tél : 06 28 76 69 34  |  http://bijutsu.toile-libre.org

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

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] Error while compiling : ! String contains an invalid utf-8 sequence.

2011-11-26 Thread Wolfgang Schuster

Am 26.11.2011 um 11:44 schrieb Alexandre Krispin:

> Now that japanese display correctly, there is still another problem. Japanese 
> sentences (long titles in bibliography) don't break at the end of line. I 
> have tested the behavior of japanese with entire paragraphs, and I get the 
> same problem as in the bibliography, lines don't break and go "through" the 
> page.
> 
> Though I have looked to documentation about chinese on the wiki, none helped 
> me to solve this problem. Does someone have any idea ?

Add “\setscript[hanzi]” to your document.

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] \setscript[hanzi] conflicts with some symbols

2011-06-26 Thread Hans Hagen

On 26-6-2011 4:01, Li Yanrui (李延瑞) wrote:

\definefontsynonym[pagella][name:texgyrepagellar]
\definefontfallback[hanzi][name:adobesongstd][0x00400-0x2FA1F]
\definefontsynonym[myfont][pagella][fallbacks=hanzi]
\definefont[song][myfont]

\setscript[hanzi]

\starttext
\song
测试  \METAPOST

\stoptext


fixed in next beta (logo is one of the few tfm fonts still loaded, i 
must check if there's an afm)


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
___

[NTG-context] \setscript[hanzi] conflicts with some symbols

2011-06-25 Thread 李延瑞
Hi Hans,

In the beta 2011.06.25, "\setscript[hanzi]" can not coexist with the
symbols such as "\METAPOST". Please see the following example:

\definefontsynonym[pagella][name:texgyrepagellar]
\definefontfallback[hanzi][name:adobesongstd][0x00400-0x2FA1F]
\definefontsynonym[myfont][pagella][fallbacks=hanzi]
\definefont[song][myfont]

\setscript[hanzi]

\starttext
\song
测试  \METAPOST

\stoptext

I got an error:

error: ...text/tex/texmf-context/tex/context/base/scrp-ini.lua:382:
attempt to index field 'resources' (a nil value)

But if I skip this error the pdf file still can be output.

-- 
Best regards,

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

Re: [NTG-context] \setscript[hanzi] and kana

2011-06-23 Thread Hans Hagen

On 23-6-2011 5:39, Wolfgang Schuster wrote:


Am 23.06.2011 um 00:01 schrieb Hans Hagen:


japanese is not yet defined; we need entries in scrp-ini and scrp-cjk for that, 
character categories and initializations and we need japanese expertise for that


Japanese is supported (it’s only a few extra chars for the chinese code) and 
worked till February 2011 and I was no able to narrow it down.

The function scripts.preprocess in scrp-ini.lua has at line 381

 if originals then c = originals[c] or c end

which change the real character value to 65533 (REPLACEMENT CHARACTER), when i 
comment the line there is a line break (see attachment).


you can comment

 -- if not unicode then
 -- originals[index], tounicode[index] = 0xFFFD, "FFFD"
 -- end

in font-map.lua (delete the cache of jump the otf version number)

but nevertheless we probably need to add some mappings if we want to 
treat japanese, like


--  for i=0x03041,0x030FF do if not hash[i] then hash[i] = "japanese" 
  end end


etc

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] \setscript[hanzi] and kana (Wolfgang Schuster)

2011-06-23 Thread Hans Hagen

On 23-6-2011 11:23, Wolfgang Schuster wrote:


Am 23.06.2011 um 21:11 schrieb Hans Hagen:


On 23-6-2011 8:52, Wolfgang Schuster wrote:


Am 23.06.2011 um 20:23 schrieb S Barmeier:


I guess vertical typesetting is a little more involved, but as far as horizontal
typesetting goes, most of the spacing is coded into the font already 
(monospacing).


ConTeXt MkIV doesn’t support vertical writing but with a little
bit of TeX knowledge it’s possible to add it, the result is not
perfect [1] (there is no space between the characters) but it
shows it can be done.


just use columnsets with 1em width columns


This is no option when quotation marks are used and other characters
which can’t be broken at the end of line. Another advantage of LuaTeX’s
vertical mode is that you can use \underbar and other commands which
aren’t possible with columnsets.


if used at all; if I'm right vertical does not mean that all such 
properties 'rotate'



The output in my example would be nicer when the width (or height?)
of each character had been 1em (or more).


It depends on what one wants. Using the vertical (rotated) variant in 
it's simple (traditional) way proably can work at some point (but it 
needs to be properly integrated in the page builder then and we probably 
should forget about figure placement and display environments 
(starttyping etc).


If one just wants vertical stacking (with quad*quad characters) then 
columnsets are a nice way in between as then we can still use figures).


Anyway, a proper model is needed, not some ad-hoc hackery.

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] \setscript[hanzi] and kana (Wolfgang Schuster)

2011-06-23 Thread Wolfgang Schuster

Am 23.06.2011 um 21:11 schrieb Hans Hagen:

> On 23-6-2011 8:52, Wolfgang Schuster wrote:
>> 
>> Am 23.06.2011 um 20:23 schrieb S Barmeier:
>> 
>>> I guess vertical typesetting is a little more involved, but as far as 
>>> horizontal
>>> typesetting goes, most of the spacing is coded into the font already 
>>> (monospacing).
>> 
>> ConTeXt MkIV doesn’t support vertical writing but with a little
>> bit of TeX knowledge it’s possible to add it, the result is not
>> perfect [1] (there is no space between the characters) but it
>> shows it can be done.
> 
> just use columnsets with 1em width columns

This is no option when quotation marks are used and other characters
which can’t be broken at the end of line. Another advantage of LuaTeX’s
vertical mode is that you can use \underbar and other commands which
aren’t possible with columnsets.

The output in my example would be nicer when the width (or height?)
of each character had been 1em (or more).

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] \setscript[hanzi] and kana (Wolfgang Schuster)

2011-06-23 Thread Hans Hagen

On 23-6-2011 8:52, Wolfgang Schuster wrote:


Am 23.06.2011 um 20:23 schrieb S Barmeier:


Japanese was working more or less a few months ago.


It was working till February (I tested it with a old beta) and
also when i comment the mentioned but i have no clue what’s the
purpose of the line.


I guess vertical
typesetting is a little more involved, but as far as horizontal
typesetting goes, most of the spacing is coded into the font already
(monospacing).


ConTeXt MkIV doesn’t support vertical writing but with a little
bit of TeX knowledge it’s possible to add it, the result is not
perfect [1] (there is no space between the characters) but it
shows it can be done.


just use columnsets with 1em width columns

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] \setscript[hanzi] and kana (Wolfgang Schuster)

2011-06-23 Thread Wolfgang Schuster

Am 23.06.2011 um 20:23 schrieb S Barmeier:

> Japanese was working more or less a few months ago.

It was working till February (I tested it with a old beta) and
also when i comment the mentioned but i have no clue what’s the
purpose of the line.

> I guess vertical
> typesetting is a little more involved, but as far as horizontal
> typesetting goes, most of the spacing is coded into the font already
> (monospacing).

ConTeXt MkIV doesn’t support vertical writing but with a little
bit of TeX knowledge it’s possible to add it, the result is not
perfect [1] (there is no space between the characters) but it
shows it can be done.

> When the Latin alphabet enters, as is becoming more and
> more common, especially in technical literature, the monospacing breaks
> down, and common practice is to just typeset paragraphs in block form,
> adding the necessary spacing.

But it wouldn’t harm when ConTeXt would support monospaced output,
proportional spacing seems to be for the moment the only format.

[1] http://d.pr/yhvh

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] \setscript[hanzi] and kana (Wolfgang Schuster)

2011-06-23 Thread S Barmeier
On 06/24/2011 12:39 AM, ntg-context-requ...@ntg.nl wrote:
>> > japanese is not yet defined; we need entries in scrp-ini and scrp-cjk for 
>> > that, character categories and initializations and we need japanese 
>> > expertise for that
> Japanese is supported (it?s only a few extra chars for the chinese code) and 
> worked till February 2011 and I was no able to narrow it down.
> 
> The function scripts.preprocess in scrp-ini.lua has at line 381
> 
> if originals then c = originals[c] or c end
> 
> which change the real character value to 65533 (REPLACEMENT CHARACTER), when 
> i comment the line there is a line break (see attachment).
> 
> Wolfgang

Japanese was working more or less a few months ago. I guess vertical
typesetting is a little more involved, but as far as horizontal
typesetting goes, most of the spacing is coded into the font already
(monospacing). When the Latin alphabet enters, as is becoming more and
more common, especially in technical literature, the monospacing breaks
down, and common practice is to just typeset paragraphs in block form,
adding the necessary spacing.

Typescripts are already working wonderfully in ConTeXt (thank you!), so
for now it should be only a matter of supporting the characters.

I don't know what character categories and initializations are, but if I
can be of any help, please let me know.

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

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] \setscript[hanzi] and kana

2011-06-23 Thread Wolfgang Schuster

Am 23.06.2011 um 00:01 schrieb Hans Hagen:

> japanese is not yet defined; we need entries in scrp-ini and scrp-cjk for 
> that, character categories and initializations and we need japanese expertise 
> for that

Japanese is supported (it’s only a few extra chars for the chinese code) and 
worked till February 2011 and I was no able to narrow it down.

The function scripts.preprocess in scrp-ini.lua has at line 381

if originals then c = originals[c] or c end

which change the real character value to 65533 (REPLACEMENT CHARACTER), when i 
comment the line there is a line break (see attachment).

Wolfgang


test.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] \setscript[hanzi] and kana

2011-06-22 Thread Hans Hagen

On 22-6-2011 8:09, Wolfgang Schuster wrote:

Hi,

with \setscript[hanzi] kanji are broken at the end of the line but no kana.

\setuplayout[width=4cm]\showframe

\setscript[hanzi]

\enabletrackers[scripts.analyzing]

\starttext \definedfont[file:kozminpr6nregular]

にほんにほんにほんにほん

日本日本日本日本日本日本

\stoptext


japanese is not yet defined; we need entries in scrp-ini and scrp-cjk 
for that, character categories and initializations and we need japanese 
expertise for that


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
___

[NTG-context] \setscript[hanzi] and kana

2011-06-22 Thread Wolfgang Schuster
Hi,

with \setscript[hanzi] kanji are broken at the end of the line but no kana.

\setuplayout[width=4cm]\showframe

\setscript[hanzi]

\enabletrackers[scripts.analyzing]

\starttext \definedfont[file:kozminpr6nregular]

にほんにほんにほんにほん

日本日本日本日本日本日本

\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] no line break in CJK text in footnotes

2011-04-18 Thread 李延瑞
2011/4/8 Li Yanrui (李延瑞) :
> Hi Hans,
>
> At least for the beta 2011.04.03, the line break can not work for cjk
> text in footnotes. See the following example:
>
> \definefontsynonym[Serif][name:adobesongstd]
> \definetypeface[myfonts][rm][serif][myfonts][default]
> \setscript[hanzi]
> \setupbodyfont[myfonts,rm,11pt]
>
> \starttext
> \startbuffer[test-footnote]
> 所有动物都生而平等,但有些动物比其他动物更平等。所有动物都生而平等,
> 但有些动物比其他动物更平等。所有动物都生而平等,但有些动物比其他动物更平等。
> \stopbuffer
> \getbuffer[test-footnote]
> \blank
> 测试\footnote{\getbuffer[test-footnote]}
> \stoptext
>
> Just I added \setupfootnotes[style={\setscript[hanzi]}], the line
> break can work.
>

The problem is still in the beta 2011.04.13.

-- 
Best regards,

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

[NTG-context] no line break in CJK text in footnotes

2011-04-07 Thread 李延瑞
Hi Hans,

At least for the beta 2011.04.03, the line break can not work for cjk
text in footnotes. See the following example:

\definefontsynonym[Serif][name:adobesongstd]
\definetypeface[myfonts][rm][serif][myfonts][default]
\setscript[hanzi]
\setupbodyfont[myfonts,rm,11pt]

\starttext
\startbuffer[test-footnote]
所有动物都生而平等,但有些动物比其他动物更平等。所有动物都生而平等,
但有些动物比其他动物更平等。所有动物都生而平等,但有些动物比其他动物更平等。
\stopbuffer
\getbuffer[test-footnote]
\blank
测试\footnote{\getbuffer[test-footnote]}
\stoptext

Just I added \setupfootnotes[style={\setscript[hanzi]}], the line
break can work.

-- 
Best regards,

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

Re: [NTG-context] a bug in the scrp-cjk.lua

2011-02-21 Thread Hans Hagen

On 21-2-2011 2:00, Li Yanrui (李延瑞) wrote:

Hi Hans,

The 'get_attribute' function is not be replaced with 'has_attribute'
in the second 'process' function of 'hanzi' section in the
scrp-cjk.lua.


ok, adapted

-
  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] a bug in the scrp-cjk.lua

2011-02-20 Thread 李延瑞
Hi Hans,

The 'get_attribute' function is not be replaced with 'has_attribute'
in the second 'process' function of 'hanzi' section in the
scrp-cjk.lua.

-- 
Best regards,

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


Re: [NTG-context] using \definebodyfont with multiple size declarations -- Why?

2010-07-28 Thread Martin Althoff
> Can you show me a example where simplefonts is so slow.


Sure, here goes.

I should say, most of my documents are 1-5 pages and build time is usually 
under 5 seconds (2nd and higher runs). 

One (relatively) slow use of simplefonts is the Chinese example (1) below. The 
way I pasted it, it runs just under 13 seconds on 2nd and consecutive runs. Not 
using the adobe but eg the ht series is a whee faster.

It's not that I am doing huge amounts of Chinese, but jumping from, say, 3 to 
12 seconds, is considerably slower. I was hoping by creating a typescript I 
could speed things up a bit. Any suggestions welcome.

Standing corrected, the impact using eg. CharisSIL for phonetic/IPA symbols the 
impact is much less: eg. a jump from 2.8 to 4.8 seconds in Example (2) given 
below. The impact of 2 seconds is bearable!

Let me know if you want to see any output or whatever.

cheers, Martin


%Example (1)

\usemodule[simplefonts]

\setmainfont[texgyrepagella]
\setsansfont[texgyreheros]
\setmonofont[texgyrecursor]

\setcjkmainfont[adobesongstd]
\setcjksansfont[adobeheitistd]
\setcjkmonofont[adobefangsongstd]

% ttf fonts htsong, hthei, htkai, htfs from:
% http://ftp.ctex.org/pub/tex/fonts/truetype/ttf/

%\setcjkmainfont[htsong] % serif, regular
%\setcjksansfont[hthei] % sans
%\setcjkmonofont[htsong] % mono

\setscript[hanzi]

\starttext

Where there is a will, there is a way.

我命由我不由天
\blank
{\rm Serif:  兡也包因沘氓侷柵苗孫孫財 text 兡也包因沘氓侷柵苗孫孫財}
%{\ss Sans:  兡也包因沘氓侷柵苗孫孫財 text 兡也包因沘氓侷柵苗孫孫財}
%{\tt Mono:  兡也包因沘氓侷柵苗孫孫財 text 兡也包因沘氓侷柵苗孫孫財}

\stoptext



% Example (2) - Not sure if the IPA symbols post properly...

\usemodule[simplefonts]
\setmainfont[CharisSIL] 

\starttext
besser [ˈbɛsɐ], der [deːɐ] 

d͡ʒ
\stoptext




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

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


Re: [NTG-context] Problem with the 'scrp-cjk.lua'

2009-11-29 Thread Hans Hagen

Yanrui Li wrote:

Hi Hans,

In the *hanzi* part of scrp-cjk.lua, there is:

local injectors = { -- [previous] [current]
... ... ...
full_width_close = {
... ... ...
chinese  = nobreak_shrink_break_stretch,
... ... ...

This causes that lines can not be broken after some Chinese punctuations 
in 'full_width_close' category. I think it should be:


local injectors = { -- [previous] [current]
... ... ...
full_width_close = {
... ... ...
chinese  = stretch_break,
... ... ...


The same problem also arises here:

local injectors = { -- [previous] [current]
... ... ...
half_width_close = {
... ... ...
chinese  = nobreak_shrink_break_stretch,
... ... ...

It seems like it should be:

local injectors = { -- [previous] [current]
... ... ...
full_width_close = {
... ... ...
chinese  = stretch_break,
... ... ...


i have no problem patching that but can you also make a test file then 
so that we have some benchmark / 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Problem with the 'scrp-cjk.lua'

2009-11-29 Thread Yanrui Li
Hi Hans,

In the *hanzi* part of scrp-cjk.lua, there is:

local injectors = { -- [previous] [current]
... ... ...
full_width_close = {
... ... ...
chinese  = nobreak_shrink_break_stretch,
... ... ...

This causes that lines can not be broken after some Chinese punctuations in
'full_width_close' category. I think it should be:

local injectors = { -- [previous] [current]
... ... ...
full_width_close = {
... ... ...
chinese  = stretch_break,
... ... ...


The same problem also arises here:

local injectors = { -- [previous] [current]
... ... ...
half_width_close = {
... ... ...
chinese  = nobreak_shrink_break_stretch,
... ... ...

It seems like it should be:

local injectors = { -- [previous] [current]
... ... ...
full_width_close = {
... ... ...
chinese  = stretch_break,
... ... ...

-- 
Best regards,

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  : http://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 :
> 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
> 

Re: [NTG-context] new beta

2009-04-06 Thread Yanrui Li
2009/4/7 Hans Hagen :
> Yanrui Li wrote:
>>
>> 2009/4/6 Yanrui Li :
>>>
>>> 2009/4/6 Hans Hagen :
>>>>
>>>> Hi,
>>>>
>>>> I uploaded a new beta. Last week(ends) fixes are merged in.
>>>>
>>> Sorry for my noise. It seems that Chinese linebreak fails. Maybe
>>> \setscript[hanzi] doesn't work.
>>>
>
> fixed
>

Yes, it works again. Much obliged!

-- 
Best wishes,
Li Yanrui

* Gentoo Linux (~x86)
* ConTeXt Minimals Beta (2009.04.06 18:43)
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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 beta

2009-04-06 Thread Hans Hagen

Yanrui Li wrote:

2009/4/6 Yanrui Li :

2009/4/6 Hans Hagen :

Hi,

I uploaded a new beta. Last week(ends) fixes are merged in.


Sorry for my noise. It seems that Chinese linebreak fails. Maybe
\setscript[hanzi] doesn't work.



fixed

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new beta

2009-04-06 Thread Hans Hagen

Yanrui Li wrote:

2009/4/6 Yanrui Li :

2009/4/6 Hans Hagen :

Hi,

I uploaded a new beta. Last week(ends) fixes are merged in.


Sorry for my noise. It seems that Chinese linebreak fails. Maybe
\setscript[hanzi] doesn't work.


ok, i see the problem, will be solved asap

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new beta

2009-04-06 Thread Yanrui Li
2009/4/6 Yanrui Li :
> 2009/4/6 Hans Hagen :
>> Hi,
>>
>> I uploaded a new beta. Last week(ends) fixes are merged in.
>>
>
> Sorry for my noise. It seems that Chinese linebreak fails. Maybe
> \setscript[hanzi] doesn't work.
>

The attachment is my test example.

-- 
Best wishes,
Li Yanrui

* Gentoo Linux (~x86)
* ConTeXt Minimals Beta (2009.03.30 18:28)


example.tar.gz
Description: GNU Zip compressed data
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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 beta

2009-04-06 Thread Yanrui Li
2009/4/6 Hans Hagen :
> Hi,
>
> I uploaded a new beta. Last week(ends) fixes are merged in.
>

Sorry for my noise. It seems that Chinese linebreak fails. Maybe
\setscript[hanzi] doesn't work.

-- 
Best wishes,
Li Yanrui

* Gentoo Linux (~x86)
* ConTeXt Minimals Beta (2009.04.06 12:23)
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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] Why can not rm or rmtf fonts be set up by \definebodyfont macro?

2009-04-05 Thread Yanrui Li
2009/4/5 Wolfgang Schuster :
>
> Am 05.04.2009 um 15:07 schrieb Yanrui Li:
>
>> I want to know why I can not override the preloading rm font.
>
> Dunno but it works for a complete definition.
>

If I use other font size, it can work, such as:

\definebodyfont[11pt][rm]
   [tf=Song,
 bf=Hei sa 1,
 it=Kai sa 1,
 sl=FangSong sa 1]

\setscript[hanzi]
\setupbodyfont[rm,11pt]

-- 
Best wishes,
Li Yanrui

* Gentoo Linux (~x86)
* ConTeXt Minimals Beta (2009.03.29 13:28)
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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] Why can not rm or rmtf fonts be set up by \definebodyfont macro?

2009-04-05 Thread Wolfgang Schuster


Am 05.04.2009 um 15:07 schrieb Yanrui Li:


I want to know why I can not override the preloading rm font.


Dunno but it works for a complete definition.

\definefontsynonym [Song] [file:AdobeSongStd-Light]
\definefontsynonym [Hei]  [file:AdobeHeitiStd-Regular]
\definefontsynonym [FangSong] [file:AdobeFangsongStd-Regular]
\definefontsynonym [Kai]  [file:AdobeKaitiStd-Regular]

\starttypescript [serif] [default] [size]

  \definebodyfont [12pt] [rm]
[tf=Song sa 1,
 bf=Hei sa 1,
 it=Kai sa 1,
 sl=FangSong sa 1]

\stoptypescript

\starttypescript [serif] [chinese]
  \definefontsynonym [Serif] [Song]
\stoptypescript

\definetypeface [chinese] [rm] [serif] [chinese] [default]

\setscript[hanzi]
\setupbodyfont[chinese,rm,12pt]

\starttext

\startlines
\tf 今时之人不然也,以酒为浆,以妄为常,
\bf 醉以入房,以欲竭其精,以耗散其真,
\it 不知持满,不时御神,
\sl 务快其心,逆于生乐,起居无节,故半百而衰也。
\stoplines

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


[NTG-context] Why can not rm or rmtf fonts be set up by \definebodyfont macro?

2009-04-05 Thread Yanrui Li
These days I have been reading "co-fonts.pdf" because I plan to write
a document about
ConTeXt MkIV for our Chinese users. When I reached the part of
"Defining body fonts",
for testing bodyfont model, I made an example as following:


\definefontsynonym[Song][AdobeSongStd-Light]
\definefontsynonym[Hei][AdobeHeitiStd-Regular]
\definefontsynonym[FangSong][AdobeFangsongStd-Regular]
\definefontsynonym[Kai][AdobeKaitiStd-Regular]

\definebodyfont[12pt][rm]
   [tf=Song,
 bf=Hei sa 1,
 it=Kai sa 1,
 sl=FangSong sa 1]

\setscript[hanzi]
\setupbodyfont[rm,12pt]

\starttext

今时之人不然也,以酒为浆,以妄为常,
{\bf 醉以入房,以欲竭其精,以耗散其真},
{\it 不知持满,不时御神},
{\sl 务快其心,逆于生乐,起居无节,故半百而衰也}。

\stoptext


I found that "rmtf" font is not "AdobeSongStd-Light", which is always
"LMRoman12-Regular".
However, "bf", "it" and "sl" fonts all are right.

I looked over the log file and saw some messages as following:

fonts  : preloading latin modern fonts
bodyfont   : 12pt rm is loaded

I want to know why I can not override the preloading rm font.

Thanks.

-- 
Best wishes,
Li Yanrui

* Gentoo Linux (~x86)
* ConTeXt Minimals Beta (2009.03.30 18:28)
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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] Making necessary OpenType features on by default

2009-02-22 Thread Otared Kavian

Hi Hans, Khaled, and Idris,

If a humble opinion from an ordinary user may be issued, I agree with  
Khaled that it would be extremely useful to have some basic default  
settings for Arabic fonts, and even more generally for any particular  
fonts used for other languages. This would not prevent those  
specialist typesetters who want particular features to be turned on,  
to do so through appropriate mechanisms.


As a basic user I am frustrated when using mkiv, that most declaration  
of features are completely cryptic, and not being a specialist of OTF  
or other font specifications, I don't know which features are  
essential for writing and typesetting an article in Persian or any  
language using Arabic alphabet.

While the following is quite easy to understand and to use in XeConTeXt
%
%!TEX TS-program = xecontext

\TeXXeTstate=1

% defining a font for Arabic, Persian
\font\Faarsi="Scheherazade:script=arab" at 14pt
\Faarsi

% defining a font for Roman languages
\font\romfont="Times Roman" at 12pt
\def\rom#1{{\beginL\romfont #1\endL}}

\everypar={\setbox0=\lastbox \beginR \box0 }

\starttext
\rom{goedemorgen Hans}

سلام خالد، درود بر ادریس
\stoptext
%%%

it is not so easy to figure out how to typeset the same thing in mkiv:  
for instance the non specialist has to try several fonts which are  
installed on his system before getting a result…

%%%
%!TEX TS-program = mkiv

\setupdirections[bidi=global]

% defining a font for Arabic, Persian
\definefontfeature
 [CrypticFeatures]
 [analyze=yes,
 mode=node,
 language=dflt,
 script=arab,
 aalt=yes,
 init=yes,
 medi=yes,
 fina=yes,
 isol=yes,
 liga=yes,
 mset=yes]

%\font\Faarsi=Scheherazade*CrypticFeatures at 14pt  % this does not work
% after trying a few other fonts one finds that the following works:
\font\Faarsi=arabtype*CrypticFeatures at 14pt

% defining a font for Roman languages
\setupbodyfont[12pt]
\def\rom#1{{\start \textdir TLT #1 \stop}}

\pardir TRT \textdir TRT

\starttext
\rom{goedemorgen Hans}

\start
\Faarsi
سلام خالد، درود بر ادریس
\stop
\stoptext


The ideal situation would be:
• in a document, when one sets a language then a certain font, with  
certain standard features is set by default;


• when an adapted font for that language is defined by the user, then  
certain features are set by default;


• possibly a command like \setupArabic[state=start] 
[...=...,features=...] (and the analogous settings for other languages  
such as \setupHanzi[state=start][...=...,features=...], and alike),  
could be imagined;


• for instance, as we have now in ConTeXt, when one has a document  
written in English, then without even defining a font one can write

\starttext
goedmorgen Hans! This is some maths formula: $a^2+b^2 = c^2$.
\stoptext

Therefore, in the same spirit one should have some default allowing  
the user to write

\setupArabic[state=start]
\setupHanzi[state=start]
\starttext
goedmorgen Hans! This is some maths formula: $a^2+b^2 = c^2$.
And this is some Arabic text written and typeset from right to left,  
in the midst of some English text:

\startArabic
سلام خالد، درود بر ادریس
\stopArabic
and analogously this is in Hanzi
\startHanzi
大家你好
stopHanzi
\stoptext

I understand that this can be done by each user upon defining his own  
environment and installing fonts, etc. But
for the non specialist it is not that easy to understand the  
intricacies.


With my best regards: OK

On 20 févr. 09, at 19:57, Hans Hagen wrote:


Khaled Hosny wrote:

Currently, when defining a font feature one has to enable all  
features

by hand which is IMHO not very user friendly as it implies prior
knowledge about OpenType font features and the meaning of each one,  
not

every Arabic user, for example, knows what does 'init', 'medi, etc.
ligatures mean yet to know that he must enable them to get proper  
font
rendering. I think some font features should be on by default, so  
that
\definefontfeature[script=arabic] should be enough to get an Arabic  
font

rendered correctly with the default features as its designer intended
(designers assume that certain will be on while other are off by
default, like liga vs. dlig), and if some one wants to disable a  
certain

default feature he can turn it off, not the reverse.
Microsoft's OpenType features list page
(http://www.microsoft.com/typography/otspec/features_ae.htm) gives  
a "UI

suggestion" for each feature noting if it should be on by default, I
think those are what most OpenType enable by default (at least the  
ones

I tested).


i've been thinking of a features=default option (as there is already  
features=yes|no)


even then it can never be fully automatic as some usage of fonts  
(think of verbatim) demands devation from defaults


now, if we implement a default list then we first need to make a  
detailed list of what the supposed defaults are (and i'm not sure if  
ms is the only resource for

Re: [NTG-context] Making necessary OpenType features on by default

2009-02-22 Thread Otared Kavian

Hi Hans, Khaled, and Idris,

If a humble opinion from an ordinary user may be issued, I agree with  
Khaled that it would be extremely useful to have some basic default  
settings for Arabic fonts, and even more generally for any particular  
fonts used for other languages. This would not prevent those  
specialist typesetters who want particular features to be turned on,  
to do so through appropriate mechanisms.


As a basic user I am frustrated when using mkiv, that most declaration  
of features are completely cryptic, and not being a specialist of OTF  
or other font specifications, I don't know which features are  
essential for writing and typesetting an article in Persian or any  
language using Arabic alphabet.

While the following is quite easy to understand and to use in XeConTeXt
%
%!TEX TS-program = xecontext

\TeXXeTstate=1

% defining a font for Arabic, Persian
\font\Faarsi="Scheherazade:script=arab" at 14pt
\Faarsi

% defining a font for Roman languages
\font\romfont="Times Roman" at 12pt
\def\rom#1{{\beginL\romfont #1\endL}}

\everypar={\setbox0=\lastbox \beginR \box0 }

\starttext
\rom{goedemorgen Hans}

 سلام خالد، درود بر ادریس
\stoptext
%%%

it is not so easy to figure out how to typeset the same thing in mkiv:  
for instance the non specialist has to try several fonts which are  
installed on his system before getting a result…

%%%
%!TEX TS-program = mkiv

\setupdirections[bidi=global]

% defining a font for Arabic, Persian
\definefontfeature
  [CrypticFeatures]
  [analyze=yes,
  mode=node,
  language=dflt,
  script=arab,
  aalt=yes,
  init=yes,
  medi=yes,
  fina=yes,
  isol=yes,
  liga=yes,
  mset=yes]

%\font\Faarsi=Scheherazade*CrypticFeatures at 14pt  % this does not work
% after trying a few other fonts one finds that the following works:
\font\Faarsi=arabtype*CrypticFeatures at 14pt

% defining a font for Roman languages
\setupbodyfont[12pt]
\def\rom#1{{\start \textdir TLT #1 \stop}}

\pardir TRT \textdir TRT

\starttext
\rom{goedemorgen Hans}

\start
\Faarsi
 سلام خالد، درود بر ادریس
\stop
\stoptext


The ideal situation would be:
• in a document, when one sets a language then a certain font, with  
certain standard features is set by default;


• when an adapted font for that language is defined by the user, then  
certain features are set by default;


• possibly a command like \setupArabic[state=start] 
[...=...,features=...] (and the analogous settings for other languages  
such as \setupHanzi[state=start][...=...,features=...], and alike),  
could be imagined;


• for instance, as we have now in ConTeXt, when one has a document  
written in English, then without even defining a font one can write

\starttext
goedmorgen Hans! This is some maths formula: $a^2+b^2 = c^2$.
\stoptext

Therefore, in the same spirit one should have some default allowing  
the user to write

\setupArabic[state=start]
\setupHanzi[state=start]
\starttext
goedmorgen Hans! This is some maths formula: $a^2+b^2 = c^2$.
And this is some Arabic text written and typeset from right to left,  
in the midst of some English text:

\startArabic
 سلام خالد، درود بر ادریس
\stopArabic
and analogously this is in Hanzi
\startHanzi
大家你好
stopHanzi
\stoptext

I understand that this can be done by each user upon defining his own  
environment and installing fonts, etc. But
for the non specialist it is not that easy to understand the  
intricacies.


With my best regards: OK

On 20 févr. 09, at 19:57, Hans Hagen wrote:


Khaled Hosny wrote:

Currently, when defining a font feature one has to enable all  
features

by hand which is IMHO not very user friendly as it implies prior
knowledge about OpenType font features and the meaning of each one,  
not

every Arabic user, for example, knows what does 'init', 'medi, etc.
ligatures mean yet to know that he must enable them to get proper  
font
rendering. I think some font features should be on by default, so  
that
\definefontfeature[script=arabic] should be enough to get an Arabic  
font

rendered correctly with the default features as its designer intended
(designers assume that certain will be on while other are off by
default, like liga vs. dlig), and if some one wants to disable a  
certain

default feature he can turn it off, not the reverse.
Microsoft's OpenType features list page
(http://www.microsoft.com/typography/otspec/features_ae.htm) gives  
a "UI

suggestion" for each feature noting if it should be on by default, I
think those are what most OpenType enable by default (at least the  
ones

I tested).


i've been thinking of a features=default option (as there is already  
features=yes|no)


even then it can never be fully automatic as some usage of fonts  
(think of verbatim) demands devation from defaults


now, if we implement a default list then we first need to make a  
detailed list of what the supposed defaults are (and i'm not sure if  
ms is the onl

Re: [NTG-context] new beta

2009-02-19 Thread Hans Hagen

Dohyun Kim wrote:

2009/2/18 Hans Hagen :

Hi,

There is a new beta: a few additions to math as well as a prelude to new cjk
support, now to be triggered explicitly (since the methods differ too much
we cannot share them)

\setscript[hangul]



Now the Korean typesetting has become almost perfect.
Thanks a lot, Hans.  I really appreciate it.

We have three more things to do, however.

1.  inter_char_stretch_factor = 2.00 seems to be too large value.
I do not think that even Chinese or Japanese would allow that big value.
I suggest 0.50 instead.   Mr Wang, how do you think about that?


ok


2.  Upon tracing output, I get :

..\*unbatang12ptrmtfrm* 居
..\penalty 1
..\*unbatang12ptrmtfrm* )
..\penalty 1 %% this should be deleted.
..\glue 0.0 plus 6.0
..\*unbatang12ptrmtfrm* 하

\panalty1 after closing parenthesis should be deleted,
so that line-breaking can occur at this point.


so ...

..._close = {
jamo_initial = stretch_break,
korean   = stretch_break,
chinese  = stretch_break,
half_width_open  = stretch_break,
half_width_close = nobreak_stretch,
full_width_open  = stretch_break,
full_width_close = nobreak_stretch,
hyphen   = nobreak_stretch,
non_starter  = nobreak_stretch,
other= stretch_break,
},



3.  Line-breaking rule for medieval Korean is a little imperfect.
When input string is "가나", all from Hangul Jamo area, I get :

..\*unbatang12ptrmtfrm*  % U+1100
..\*unbatang12ptrmtfrm*  % U+1161
%% \penalty50 should be inserted here
..\*unbatang12ptrmtfrm*  % U+1102
..\*unbatang12ptrmtfrm*  % U+1161

As I said in a private email with Hans,
^(OP | LC) allowbreak (LC)
is another typesetting rule for Korean,
where OP stands for Openings and LC for Leading Consonants (U+1100 .. U+115F).
In the above output, as U+1161 is non-LC character,
line-breaking should be allowed between U+1161 and U+1102.


ok, but that's the chinese (hanzi) rule set, i added it it, but the 
chinese ruleset probably needs some more checking



btw, there is not much halfwidth correction code enabled yet but first 
we need to decide on a reference font for chinese (or korean we have the 
unbatang)


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new beta

2009-02-19 Thread Hans Hagen

Yanrui Li wrote:

2009/2/18 Hans Hagen :

Hi,

There is a new beta: a few additions to math as well as a prelude to new cjk
support, now to be triggered explicitly (since the methods differ too much
we cannot share them)

\setscript[hangul]

\setscript[hanzi]% arthur, is this the right name?



Hi,

I found that we can't copy the texts from pdf generated by new beta
for Chinese. The attachment
is my test files.


you need the latest luatex for that

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
 | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] new beta

2009-02-19 Thread Yanrui Li
2009/2/18 Hans Hagen :
> Hi,
>
> There is a new beta: a few additions to math as well as a prelude to new cjk
> support, now to be triggered explicitly (since the methods differ too much
> we cannot share them)
>
> \setscript[hangul]
>
> \setscript[hanzi]% arthur, is this the right name?
>

Hi,

I found that we can't copy the texts from pdf generated by new beta
for Chinese. The attachment
is my test files.

-- 
Best wishes,
Li Yanrui

* Gentoo Linux (~x86)
* LuaTeX (snapshot-0.33.1-2009021608, build 1866)
* ConTeXt Minimals (2009.02.17 18:50)


test.tar.bz2
Description: BZip2 compressed data
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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 beta

2009-02-18 Thread Yue Wang
2009/2/19 Dohyun Kim 

> 2009/2/18 Hans Hagen :
> > Hi,
> >
> > There is a new beta: a few additions to math as well as a prelude to new
> cjk
> > support, now to be triggered explicitly (since the methods differ too
> much
> > we cannot share them)
> >
> > \setscript[hangul]
> >
> > \setscript[hanzi]% arthur, is this the right name?
> >
>
> I have tested Chinese translation of Universal Declaration of Human Rights
> available at http://www.un.org/chinese/hr/issue/udhr.htm .
>
> 1.
> \**thedefinedfont** 认
> \glue 0.0 plus 20.0 %% line break should not occur
> \**thedefinedfont** , % U+FF0C
> \glue 0.0 plus 20.0
> \**thedefinedfont** 乃
>
> Line break is prohibited before U+FF0C (fullwidth comma)
> but current beta inserts glue.  This should be corrected.
> The same for U+FF1B (fullwidth semicolon).



right


>
>
> 2.
> \**thedefinedfont** 由
> \penalty 1
> \glue 0.0 plus 20.0
> \**thedefinedfont** 、 % U+3001
> \penalty 1 %% this should be deleted
> \glue 0.0 minus 5.0
> \glue 0.0 plus 20.0
> \**thedefinedfont** 正
>
> Line break is allowed after U+3001 (ideographic comma),
> so \penalty1 after U+3001 should not be inserted.


umm... maybe... I am not sure...


>
> The same for U+3002 (ideographic full stop).


right


>
>
> 3.
> I don't know much about Chinese typesetting, but IMO
> it would be better if these full width CJK punctuations
> is forced to half width and 0.5em glue is inserted after
> those characters.
>

We can use the bounding box information of these punctuations.


>
> Dohyun Kim
>
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> 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 beta

2009-02-18 Thread Dohyun Kim
2009/2/18 Hans Hagen :
> Hi,
>
> There is a new beta: a few additions to math as well as a prelude to new cjk
> support, now to be triggered explicitly (since the methods differ too much
> we cannot share them)
>
> \setscript[hangul]
>
> \setscript[hanzi]% arthur, is this the right name?
>

I have tested Chinese translation of Universal Declaration of Human Rights
available at http://www.un.org/chinese/hr/issue/udhr.htm .

1.
\**thedefinedfont** 认
\glue 0.0 plus 20.0 %% line break should not occur
\**thedefinedfont** , % U+FF0C
\glue 0.0 plus 20.0
\**thedefinedfont** 乃

Line break is prohibited before U+FF0C (fullwidth comma)
but current beta inserts glue.  This should be corrected.
The same for U+FF1B (fullwidth semicolon).

2.
\**thedefinedfont** 由
\penalty 1
\glue 0.0 plus 20.0
\**thedefinedfont** 、 % U+3001
\penalty 1 %% this should be deleted
\glue 0.0 minus 5.0
\glue 0.0 plus 20.0
\**thedefinedfont** 正

Line break is allowed after U+3001 (ideographic comma),
so \penalty1 after U+3001 should not be inserted.
The same for U+3002 (ideographic full stop).

3.
I don't know much about Chinese typesetting, but IMO
it would be better if these full width CJK punctuations
is forced to half width and 0.5em glue is inserted after
those characters.

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

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 beta

2009-02-17 Thread Arthur Reutenauer
> \setscript[hanzi]% arthur, is this the right name?

  That's indeed the Pinyin transcription of the word for "Chinese
character", even if it's not widely used in English.  The OpenType
script tag, hani, is short for "Han Ideograph".

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

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 beta

2009-02-17 Thread Hans Hagen

Hi,

There is a new beta: a few additions to math as well as a prelude to new 
cjk support, now to be triggered explicitly (since the methods differ 
too much we cannot share them)


\setscript[hangul]

\setscript[hanzi]% arthur, is this the right name?


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
___