On Fri, Jul 10, 2015 at 1:37 AM, Guenter Milde <mi...@users.sf.net> wrote:

> On 2015-07-08, Guenter Milde wrote:
> > On 2015-07-08, Richard Opheim wrote:
>
> >> So what I want to do is to have one font that applies only to
> >> English and another that applies only to Japanese.
>
> ...
>
> >> "Times New Roman" is set in the Settings/Fonts/Roman dropdown box. I
> have
> >> of course checked non-TeX fonts.
>
>
> >> ... I read somewhere about the following command which I inserted into
> >> the preamble.
>
> >>  \newfontfamily\CJKfont{MS PMincho}
>
> It would be interesting to find out where... maybe this works with Chinese
> or Korean, if these languages are supported by polyglossia or some extra
> package is required.
>

http://tex.stackexchange.com/questions/203078/two-fonts-for-two-languages-using-lyx
This information however didn't lead me to success.

>
> > The problem is, that polyglossia does not support Japanese! Therefore,
> LyX
> > selects babel instead of polyglossia as language package as soon as a
> part
> > of the document is in  Japanese language.
>
> > What are the options then:
>
>   * use the xeCJK package provided with XeTeX (in my Debian TeXLive
>     installation, at least).
>
>     In the LaTeX preamble, write:
>
>       \usepackage{xeCJK}
>       \setCJKmainfont{Droid Sans Japanese}
>
>     and XeTeX will automatically use the "CJKmainfont" for Chinese, Korean
> and
>     Japanese Unicode characters.
>
>     + no special markup of Japanese words/text required, it just works!
>

Tried it out. This is the best method of all! Works like a charm and no
text selection.


>     - package documentation is in Chinese.
>

Could be a problem for some non-Chinese speakers, but not for me, as I
don't require any additional functionality.

>
>     Source:
> http://www.preining.info/blog/2014/12/writing-japanese-in-latex-part-3-simple-documents/


> > * set the sans-serif or teletype(monospace) font to the Japanese font and
> >   change the font family for Japanese text parts
> >   (works only, if you have a "spare" font family).
>
>     To change text properties, select the text and go to Edit>Text
>     style>Custom (or similar, my LyX speaks German) and select from the
>     "Family" drop-down list.
>
>     There is also a tool-bar button to re-apply the last text-features
>     setting to the selection.
>

OK, I tried it on my doc and it worked. This method is easier than the
"dummy-language" method because you don't have to write any commands in the
preamble. Other than that, they both involve selecting text, which could be
time-consuming.

>
> > * use a "dummy" language that is supported by polyglossia.
>
>     Polyglossia is the default language package used by LyX with "non-TeX
>     fonts".
>
>     + It supports per-language and per-skript fonts defined with
>
>          \newfontfamily\<language>font{<Font Name>}
>
>     - it does not support Japanese.
>
>     Source:
> http://mirrors.ctan.org/macros/latex/contrib/polyglossia/polyglossia.pdf
>
> >   In the LaTeX preamble write, e.g.
>
> >     \newfontfamily\telugufont{MS PMincho}
>
> >   and in the document mark the Japanese text parts as beeing in the
> >   language "telugu".
>
>
> The workaround with Babel is only advisable, if you have babel support for
> Japanese installed and want the Japanese text parts with the correct
> language setting.
>

This is the method I'm currently using. Though I had to set the language to
"basque" instead of "japanese." Anyway, I'll switch to writing
" \usepackage{xeCJK}
      \setCJKmainfont{MS PMincho}" in the preamble from now on, which will
relieve me of having to select text.
>
>
> (Problem: Although LyX knows which of the two language packages "babel"
> and "polyglossia" support which languagages, it does not check which
> language definition files are actually installed.)
>
> Günter
>
>


-- 
Richard Opheim
P.O. Box 2261 Arizona City, AZ 85123
Tel: (1) 206-965-0564
Skype name: richard.opheim

Self-publishing Consultant
Editing---Layout---Musical Scores---Images---Kindle conversion

website URL:
https://sites.google.com/site/opheimrichard/home

self-publishing faq:
 https:/ <https://sites.google.com/site/opheimrichard/home>
/sites.google.com/site/opheimrichard/publishing-faq
<https://sites.google.com/site/opheimrichard/home>

publishing tasks:
https://sites.google.com/site/opheimrichard/publishing-faq/publishing-tasks

marketing techniques:
https://sites.google.com/site/opheimrichard/publishing-faq/marketing

Japanese translation & consulting:
https://sites.google.com/site/japanesetranslationconsulting/
<https://url.sites.google.com/site/japanesetranslationconsulting/>

blog:
http://foliocirculaire.blogspot.com

*"It is* the glory of God to conceal a thing: but the honour of kings *is* to
search out a matter."
Proverbs 25:2

Reply via email to