[luatex] clash between fontspec and luatexja-fontspec

Hironori KITAGAWA h_kitagawa2001 at yahoo.co.jp
Thu Mar 19 00:34:19 CET 2015


Hello,

On Wed, 18 Mar 2015 18:20:46 -0500
Rembrandt Wolpert <r.f.wolpert at gmail.com> wrote:

> Updating texlive to fontspec 2015/03/14 v2.4c seems to have broken the
> use of \newjfontfamily; \setmainjfont works (as far as I can tell -- I
> get kanji etc.), but newjfontfamily (I need both Chinese and Japanese
> fonts in the same document) throws a "missing \begin{document}" error.
> 
> Reverting to the earlier fontspec "solves" the problem temporarily.

Thanks for reporting. 
The following patch of addons/luatexja-fontspec-24.sty seems to work
in my environment:

--- a/src/addons/luatexja-fontspec-24.sty
+++ b/src/addons/luatexja-fontspec-24.sty
@@ -207,7 +207,7 @@
 
 \DeclareDocumentCommand \newjfontfamily { m O{} m O{} } {
   \cs_set_eq:NN \fontspec_set_family:Nnn \ltj_fontspec_set_family:Nnn
-  \newfontfamily #1 [#2] {#3} [#4]
+  \newfontfamily #1 [#2,#4] {#3}
   \cs_set_eq:NN \fontspec_set_family:Nnn \__ltj_orig_fontspec_set_family:Nnn
 }
 

Regards
Hironori KITAGAWA <h_kitagawa2001 at yahoo.co.jp>


More information about the luatex mailing list