mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Pass the encoding to the japanese pLaTeX processor (#4697).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@39982 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d1d597d9cf
commit
0bff66b8a5
@ -395,7 +395,7 @@ def checkLatex(dtl_tools):
|
|||||||
# run platex on chklatex.ltx and check result
|
# run platex on chklatex.ltx and check result
|
||||||
if cmdOutput(PLATEX + ' chklatex.ltx').find('pLaTeX2e') != -1:
|
if cmdOutput(PLATEX + ' chklatex.ltx').find('pLaTeX2e') != -1:
|
||||||
# We have the Japanese pLaTeX2e
|
# 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:
|
else:
|
||||||
PLATEX = ''
|
PLATEX = ''
|
||||||
removeFiles(['chklatex.ltx', 'chklatex.log'])
|
removeFiles(['chklatex.ltx', 'chklatex.log'])
|
||||||
|
@ -177,11 +177,11 @@ End
|
|||||||
|
|
||||||
# Traditional Japanese TeX programs require the japanese package.
|
# Traditional Japanese TeX programs require the japanese package.
|
||||||
# that is incompatible with CJK and inputenc.
|
# 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
|
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
|
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
|
End
|
||||||
|
|
||||||
# This one needs hardcoded support, since the inputenc package does not know
|
# This one needs hardcoded support, since the inputenc package does not know
|
||||||
|
@ -51,6 +51,7 @@ string const token_to("$$o");
|
|||||||
string const token_path("$$p");
|
string const token_path("$$p");
|
||||||
string const token_orig_path("$$r");
|
string const token_orig_path("$$r");
|
||||||
string const token_encoding("$$e");
|
string const token_encoding("$$e");
|
||||||
|
string const token_latex_encoding("$$E");
|
||||||
|
|
||||||
|
|
||||||
string const add_options(string const & command, string const & options)
|
string const add_options(string const & command, string const & options)
|
||||||
@ -376,7 +377,10 @@ bool Converters::convert(Buffer const * buffer,
|
|||||||
|
|
||||||
if (conv.latex) {
|
if (conv.latex) {
|
||||||
run_latex = true;
|
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);
|
LYXERR(Debug::FILES, "Running " << command);
|
||||||
if (!runLaTeX(*buffer, command, runparams, errorList))
|
if (!runLaTeX(*buffer, command, runparams, errorList))
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user