On 8/27/07, Werner LEMBERG <[EMAIL PROTECTED]> wrote:
> /../
> This is correct.  By default, the CJK package doesn't use input
> characters from the range 0x00-0x7f.  If you want to do that, you have
> to use the trick from the UTF8.tex example file.
>
>   % we want the Unicode font for normal text also
>   \DeclareFontFamily{T1}{HGSoei}{}
>   \DeclareFontShape{T1}{song}{m}{n}{<-> hgsoei00}{}
>   \renewcommand\rmdefault{HGSoei}

Hello Werner,

It seems I still need some advice to progress further than one font
for the non-CJK characters.
The above only seems to work in the preamble, before \begin{document}.
So if I write a sequence of such groups, only the one definition of
\renewcommand\rmdefault{somefont} is selected for use in the document.
Note that changing fonts of CJK characters *does* work perfectly in
the document using the usual method of \begin{CJK}{UTF8}{somefont}.
So, I tried to make a new environment according to the example file
CJKutf8.tex. However, I could not find a way to make
\DeclarefontFamily and \DeclareFontShape in an environment,  and
\renewcommand\rmdefault{somefont}, have an effect, and CJKfamily as
Werner noted does not pick up the ASCII characters. What I tried in
the preamble is:

 \newenvironment{JapaneseA}{%
   \CJKfamily{hgkgb}%
   \CJKtilde
   \CJKnospace
   \DeclareFontFamily{T1}{hgkgb}{}
   \DeclareFontShape{T1}{hgkgb}{m}{n}{<->hgkgb00}{}
   \renewcommand\rmdefault{hgkgb}}{}

(hgkgb is the LaTeX name I gave the font) and then in the document:

 \begin{CJK}{UTF8}{}
  \begin{JapaneseA}
   Wow! This is hgkgb from Windows. 必ず出来る筈です。 ニホンゴ(full-width)
   ニホンゴ(half-width)
  \end{JapaneseA}
 \end{CJK}

My idea is to have different environments for different fonts
(JapaneseA,B,C and so on) in order that both the CJK characters and
the non-CJK characters will change font. I suppose the .fd file could
be changed to pick up the ASCII characters as well, but if possible
I'd like to keep separate the selection, for greater flexibility (I
want to control it in the document).

Any hints much appreciated.

Regards, Gernot

_______________________________________________
Cjk maillist  -  [email protected]
https://lists.ffii.org/mailman/listinfo/cjk

Reply via email to