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.
> 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!
- package documentation is in Chinese.
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.
> * 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.
(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