Asian Language Support
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)
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
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 -----------------------------------------------------------------
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)
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/
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 -----------------------------------------------------------------
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), hwitloc@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/
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?
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/
Dear Henman-san,
So a question might be can ptex be used with ConTeXt? as the the engine? Would this wowrk? With ConTeXt mark II (not mark IV), you can use ptex as the engine. Such support is included in W32TeX. (I don't know whether TeXLive 2011 supports it.) You can type `texexec --eptex foo'.
If you want to try it, please read share/texmf/doc/context/context-w32.
txt and test-eptex.tex. (It is written in Japanese, but I think it does
not matter for you.)
2012/05/07(Mon) 22:54:47, "d.henman"
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? ____________________________________________________________________________ _______ If your question is of interest to others as well, please add an entry to the Wiki!
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 ____________________________________________________________________________ _______
Sincerely, Noriyuki Abe
Abe-san,
thanks for the suggestion. I will do the reading as you suggested. It's always good to have backup for now, in case a clean method can't be worked out with Mark IV right away.
Regards
ABE Noriyuki
Dear Henman-san,
So a question might be can ptex be used with ConTeXt? as the the engine? Would this wowrk? With ConTeXt mark II (not mark IV), you can use ptex as the engine. Such support is included in W32TeX. (I don't know whether TeXLive 2011 supports it.) You can type `texexec --eptex foo'.
If you want to try it, please read share/texmf/doc/context/context-w32. txt and test-eptex.tex. (It is written in Japanese, but I think it does not matter for you.)
2012/05/07(Mon) 22:54:47, "d.henman"
: 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? ____________________________________________________________________________ _______ If your question is of interest to others as well, please add an entry to the Wiki!
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 ____________________________________________________________________________ _______
Sincerely, Noriyuki Abe ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
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 ___________________________________________________________________________________
On 7-5-2012 14: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?
Just a remark: for cjk one can best use the mkiv feature to combine fonts; there are probably some examples of korean fonts mixed with e.g. palatino or times in the email archive 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 -----------------------------------------------------------------
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), hwitloc@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 ___________________________________________________________________________________
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 -----------------------------------------------------------------
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/
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)
participants (6)
-
ABE Noriyuki
-
d.henman
-
Hans Hagen
-
hwitloc@gmail.com
-
KUROKI Yusuke
-
S Barmeier