Set non-TeX fonts supporting Japanese in Japanese documents.

This commit is contained in:
Günter Milde 2019-04-12 17:57:46 +02:00
parent e5435cd61e
commit 0e11914929
26 changed files with 175 additions and 73 deletions

View File

@ -94,8 +94,8 @@ End
\language_package default
\inputencoding jis-platex
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -89,8 +89,8 @@ End
\language_package default
\inputencoding jis-platex
\fontencoding auto
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -11,8 +11,8 @@
\language_package default
\inputencoding jis-platex
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -11,8 +11,8 @@
\language_package default
\inputencoding jis-platex
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -207,8 +207,8 @@ End
\language_package default
\inputencoding jis-platex
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -4,7 +4,7 @@
\begin_header
\save_transient_properties true
\origin /systemlyxdir/doc/ja/
\textclass jsbook
\textclass bxjsbook
\begin_preamble
\usepackage{ifpdf}
@ -49,8 +49,8 @@
\language_package default
\inputencoding jis-platex
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -58,8 +58,8 @@ End
\language_package auto
\inputencoding jis-platex
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -11,8 +11,8 @@
\language_package default
\inputencoding jis-platex
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -178,8 +178,8 @@ End
\language_package default
\inputencoding jis-platex
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -21,8 +21,8 @@ initials
\language_package default
\inputencoding jis-platex
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -4,7 +4,7 @@
\begin_header
\save_transient_properties true
\origin /systemlyxdir/doc/ja/
\textclass jsarticle
\textclass bxjsarticle
\use_default_options false
\maintain_unincluded_children false
\begin_local_layout
@ -38,8 +38,8 @@ End
\language_package auto
\inputencoding jis-platex
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -4,7 +4,7 @@
\begin_header
\save_transient_properties false
\origin /systemlyxdir/doc/ja/
\textclass jsbook
\textclass bxjsbook
\use_default_options false
\maintain_unincluded_children false
\begin_local_layout
@ -38,8 +38,8 @@ End
\language_package auto
\inputencoding jis-platex
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -86,8 +86,8 @@ End
\language_package auto
\inputencoding jis-platex
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -36,8 +36,8 @@
\language_package default
\inputencoding utf8-platex
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -35,8 +35,8 @@
\language_package default
\inputencoding utf8-platex
\fontencoding global
\font_roman "ae" "default"
\font_sans "default" "default"
\font_roman "ae" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -4,7 +4,7 @@
\begin_header
\save_transient_properties true
\origin /systemlyxdir/examples/ja/Modules/
\textclass jarticle
\textclass bxjsarticle
\begin_preamble
% color greyed-out notes blue
\renewenvironment{lyxgreyedout}
@ -19,8 +19,8 @@ braille
\language_package default
\inputencoding jis-platex
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_roman "default" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -14,8 +14,8 @@ lilypond
\language_package default
\inputencoding utf8-platex
\fontencoding global
\font_roman "lmodern" "default"
\font_sans "lmss" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "lmss" "IPAexGothic"
\font_typewriter "lmtt" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -19,8 +19,8 @@ linguistics
\language_package default
\inputencoding utf8-platex
\fontencoding global
\font_roman "lmodern" "FreeSerif"
\font_sans "default" "FreeSans"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "FreeMono"
\font_math "auto" "auto"
\font_default_family default

View File

@ -30,8 +30,8 @@ bicaption
\language_package default
\inputencoding utf8-platex
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_roman "default" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -14,8 +14,8 @@ knitr
\language_package default
\inputencoding utf8-platex
\fontencoding global
\font_roman "palatino" "default"
\font_sans "lmss" "default"
\font_roman "palatino" "IPAexMincho"
\font_sans "lmss" "IPAexGothic"
\font_typewriter "lmtt" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -26,8 +26,8 @@ sweave
\language_package none
\inputencoding utf8-platex
\fontencoding global
\font_roman "palatino" "default"
\font_sans "lmss" "default"
\font_roman "palatino" "IPAexMincho"
\font_sans "lmss" "IPAexGothic"
\font_typewriter "lmtt" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -4,7 +4,7 @@
\begin_header
\save_transient_properties true
\origin /systemlyxdir/examples/ja/
\textclass article
\textclass bxjsarticle
\begin_preamble
% line breaking, punctuation kerning and font switching features
% for CJK with non-TeX fonts requires additional packages
@ -143,7 +143,7 @@ Japanese
\begin_inset Quotes brd
\end_inset
use platex).
use pLaTeX).
\end_layout
\begin_layout Itemize

View File

@ -4,16 +4,16 @@
\begin_header
\save_transient_properties true
\origin /systemlyxdir/examples/ja/
\textclass jarticle
\textclass bxjsarticle
\use_default_options false
\maintain_unincluded_children false
\language japanese
\language_package auto
\inputencoding utf8
\fontencoding auto
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_typewriter "default" "default"
\font_roman "DejaVuSerif" "IPAexMincho"
\font_sans "DejaVuSans" "IPAexGothic"
\font_typewriter "DejaVuSansMono" "default"
\font_math "auto" "auto"
\font_default_family default
\use_non_tex_fonts false
@ -91,7 +91,27 @@
\end_layout
\begin_layout Standard
Text in other languages:
You can write text in other scripts and languages inside Japanese documents.
With non-TeX fonts, make sure to use document classes that support XeTeX
or LuaTeX.
(e.g.
document classes
\begin_inset Quotes eld
\end_inset
Japanese … (BXJS Class)
\begin_inset Quotes erd
\end_inset
or non-Japaneses standard classes).
\end_layout
\begin_layout Subsection*
Examples
\end_layout
\begin_layout Standard
Text in Latin script:
\end_layout
\begin_layout Quotation
@ -105,27 +125,109 @@ Deutsch: Grüße aus Österreich!
\begin_layout Standard
Some Japanese fonts contain Greek and Cyrillic characters, however they
are are considerabely wider than characters in Latin, Greek, and Cyrillic
TeX fonts.
Therefore, LyX converts them to LaTeX macros, so that the output matches
other non-Japanese text:
are considerabely wider than characters in Latin, Greek, and Cyrillic TeX
fonts.
\end_layout
\begin_layout Quotation
Griechisch: χαιρετισμός!
\begin_layout Itemize
With
\emph on
TeX fonts
\emph default
, LyX converts them to LaTeX macros, so that the output matches other non-Japane
se text.
\end_layout
\begin_layout Itemize
With
\emph on
non-TeX fonts
\emph default
and
\emph on
Xe/LuaTeX
\emph default
, there is no native support for use of specific fonts for different scripts/lan
guages.
Some Unicode fonts provide a large range of characters, but quality is
not always best and
\begin_inset Quotes eld
\end_inset
exotic
\begin_inset Quotes erd
\end_inset
characters (like accented Greek) lead to
\emph on
missing character
\emph default
errors.
\end_layout
\begin_layout Standard
Text in Cyrillic and Greek script:
\end_layout
\begin_layout Quotation
Russisch: Привет с
\series bold
\emph on
новым
\series default
\emph default
годом!
\end_layout
\begin_layout Quotation
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
ifdefined
\backslash
fontspec
\end_layout
\end_inset
Griechisch: χαιρετισμος!
\end_layout
\begin_layout Quotation
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
else
\end_layout
\end_inset
Griechisch: χαιρετισμός!
\begin_inset ERT
status collapsed
\begin_layout Plain Layout
\backslash
fi
\end_layout
\end_inset
\end_layout
\begin_layout Standard
Text in some other languages with correct language setting (not all languages
supported by LyX are compatible with pLaTeX, try
supported by LyX are compatible with Japanese (you may try
\begin_inset Quotes eld
\end_inset
@ -169,17 +271,17 @@ French: «Bonsoir à vous.»
\begin_layout Standard
\lang greek
Griechisch: χαιρετισμός!
\lang afrikaans
Griechisch: χαιρετισμος!
\end_layout
\begin_layout Standard
\lang russian
Russisch: Привет с
\series bold
\emph on
новым
\series default
\emph default
годом!
\end_layout

View File

@ -24,8 +24,8 @@
\language_package default
\inputencoding jis-platex
\fontencoding global
\font_roman "default" "default"
\font_sans "default" "default"
\font_roman "default" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -4,15 +4,15 @@
\begin_header
\save_transient_properties true
\origin /systemlyxdir/examples/ja/
\textclass jarticle
\textclass bxjsarticle
\use_default_options false
\maintain_unincluded_children false
\language japanese
\language_package auto
\inputencoding utf8
\fontencoding auto
\font_roman "lmodern" "default"
\font_sans "default" "default"
\font_roman "lmodern" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default

View File

@ -23,8 +23,8 @@
\language_package default
\inputencoding jis-platex
\fontencoding global
\font_roman "times" "default"
\font_sans "default" "default"
\font_roman "times" "IPAexMincho"
\font_sans "default" "IPAexGothic"
\font_typewriter "default" "default"
\font_math "auto" "auto"
\font_default_family default