Many Thanks, Tetsyua. Looks like we are getting there.
I have only some minor formal comments. Could you have a look, change that, and please resend the patch as a real attachment (not inline) and without the changes from my patch #2678? Then I can commit it to my tree and test the thing. Tetsuya Makimura wrote: > Index: src/Buffer.cpp > =================================================================== > --- src/Buffer.cpp (revision 25709) > +++ src/Buffer.cpp (working copy) > @@ -1079,6 +1079,8 @@ > // Write the preamble > runparams.use_babel = params().writeLaTeX(os, features, d->texrow); > > + runparams.use_japanese = features.isRequired("japanese"); > + > if (!output_body) > return; > > @@ -2299,6 +2301,9 @@ > return "docbook"; > if (isLiterate()) > return "literate"; > + // if( isPLATEX() ) > + if ( params().encoding().package() == Encoding::japanese ) > + return "jlatex"; > return "latex"; > } You could also use OutputParams runparams(¶ms().encoding()); if (runparams.use_japanese) return "jlatex"; Strikes me slightly better, but it's probably a matter of taste. > Index: src/BufferParams.cpp > =================================================================== > --- src/BufferParams.cpp (revision 25709) > +++ src/BufferParams.cpp (working copy) > @@ -1055,6 +1055,8 @@ > os << "\\usepackage[" << from_ascii(lyxrc.fontenc) > << ",LFE,LAE]{fontenc}\n"; > texrow.newline(); > + }else if (language->lang() == "japanese"){ > + ; // do nothing. rather use if (lyxrc.fontenc != "default" && language->lang() != "japanese") { > Index: lib/languages > =================================================================== > --- lib/languages (revision 25709) > +++ lib/languages (working copy) > @@ -52,7 +52,7 @@ > interlingua interlingua "Interlingua" false iso8859-15 ia "" > irish irish "Irish" false iso8859-15 ga_IE "" > italian italian "Italian" false iso8859-15 it_IT "" > -japanese japanese "Japanese" false jis-plain ja_JP "" > +japanese japanese "Japanese" false jis-platex ja_JP "" There's no need to rename the encoding. > "" "%%" "document" Index: lib/encodings > =================================================================== > --- lib/encodings (revision 25709) > +++ lib/encodings (working copy) > @@ -173,11 +173,11 @@ > > # Traditional Japanese TeX programs require neither CJK nor inputenc > # package. > -Encoding euc-jp-plain EUC-JP-pLaTeX \\\ > "Japanese (non-CJK) (EUC-JP)" EUC-JP variable > none +Encoding euc-jp-platex EUC-JP-pLaTeX \\\ > "Japanese (pLaTeX, EUC-JP)" EUC-JP variable > japanese End > -Encoding jis-plain JIS-pLaTeX \\\ > "Japanese (non-CJK) (JIS)" ISO-2022-JP variable none > +Encoding jis-platex JIS-pLaTeX \\\ > "Japanese (pLaTeX, JIS)" ISO-2022-JP variable japanese > End > -Encoding shift-jis-plain SJIS-pLaTeX \\\ > "Japanese (non-CJK) (SJIS)" CP932 variable none > +Encoding shift-jis-platex SJIS-pLaTeX \\\ > "Japanese (pLaTeX, SJIS)" CP932 variable japanese > End dito. > # This one needs hardcoded support, since the inputenc package does not > know > ########################################################################### Thanks, Jürgen