diff --git a/lib/configure.py b/lib/configure.py index 703287029c..63ab867a34 100644 --- a/lib/configure.py +++ b/lib/configure.py @@ -395,7 +395,7 @@ def checkLatex(dtl_tools): # run platex on chklatex.ltx and check result if cmdOutput(PLATEX + ' chklatex.ltx').find('pLaTeX2e') != -1: # We have the Japanese pLaTeX2e - addToRC(r'\converter platex dvi "%s" "latex=platex"' % PLATEX) + addToRC(r'\converter platex dvi "%s -kanji=$$E $$i" "latex=platex"' % PLATEX) else: PLATEX = '' removeFiles(['chklatex.ltx', 'chklatex.log']) diff --git a/lib/encodings b/lib/encodings index b0a001baa9..2bd80c6f79 100644 --- a/lib/encodings +++ b/lib/encodings @@ -177,11 +177,11 @@ End # Traditional Japanese TeX programs require the japanese package. # that is incompatible with CJK and inputenc. -Encoding euc-jp-plain EUC-JP-pLaTeX "Japanese (non-CJK) (EUC-JP)" EUC-JP variable japanese +Encoding euc-jp-plain euc "Japanese (non-CJK) (EUC-JP)" EUC-JP variable japanese End -Encoding jis-plain JIS-pLaTeX "Japanese (non-CJK) (JIS)" ISO-2022-JP variable japanese +Encoding jis-plain jis "Japanese (non-CJK) (JIS)" ISO-2022-JP variable japanese End -Encoding shift-jis-plain SJIS-pLaTeX "Japanese (non-CJK) (SJIS)" CP932 variable japanese +Encoding shift-jis-plain sjis "Japanese (non-CJK) (SJIS)" CP932 variable japanese End # This one needs hardcoded support, since the inputenc package does not know diff --git a/src/Converter.cpp b/src/Converter.cpp index a589b60b1f..a421c53170 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -51,6 +51,7 @@ string const token_to("$$o"); string const token_path("$$p"); string const token_orig_path("$$r"); string const token_encoding("$$e"); +string const token_latex_encoding("$$E"); string const add_options(string const & command, string const & options) @@ -376,7 +377,10 @@ bool Converters::convert(Buffer const * buffer, if (conv.latex) { run_latex = true; - string const command = subst(conv.command, token_from, ""); + string command = conv.command; + command = subst(command, token_from, ""); + command = subst(command, token_latex_encoding, buffer ? + buffer->params().encoding().latexName() : string()); LYXERR(Debug::FILES, "Running " << command); if (!runLaTeX(*buffer, command, runparams, errorList)) return false;