mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
* adjust line lengths
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26206 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cd42bffb52
commit
5da25426f5
@ -1016,17 +1016,18 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
|||||||
language_options << ',';
|
language_options << ',';
|
||||||
language_options << language->babel();
|
language_options << language->babel();
|
||||||
}
|
}
|
||||||
// if Vietnamese is used, babel must directly be loaded with the
|
// if Vietnamese is used, babel must directly be loaded
|
||||||
// language options, not in the class options, see
|
// with language options, not in the class options, see
|
||||||
// http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129417.html
|
// http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg129417.html
|
||||||
size_t viet = language_options.str().find("vietnam");
|
size_t viet = language_options.str().find("vietnam");
|
||||||
// viet = string::npos when not found
|
// viet = string::npos when not found
|
||||||
// if Japanese is used, babel must directly be loaded with the
|
// if Japanese is used, babel must directly be loaded
|
||||||
// language options, not in the class options, see
|
// with language options, not in the class options, see
|
||||||
// http://bugzilla.lyx.org/show_bug.cgi?id=4597#c4
|
// http://bugzilla.lyx.org/show_bug.cgi?id=4597#c4
|
||||||
size_t japan = language_options.str().find("japanese");
|
size_t japan = language_options.str().find("japanese");
|
||||||
// japan = string::npos when not found
|
// japan = string::npos when not found
|
||||||
if (lyxrc.language_global_options && !language_options.str().empty()
|
if (lyxrc.language_global_options
|
||||||
|
&& !language_options.str().empty()
|
||||||
&& viet == string::npos && japan == string::npos)
|
&& viet == string::npos && japan == string::npos)
|
||||||
clsoptions << language_options.str() << ',';
|
clsoptions << language_options.str() << ',';
|
||||||
}
|
}
|
||||||
@ -1062,9 +1063,11 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
|||||||
|
|
||||||
// set font encoding
|
// set font encoding
|
||||||
// this one is not per buffer
|
// this one is not per buffer
|
||||||
// for arabic_arabi and farsi we also need to load the LAE and LFE encoding
|
// for arabic_arabi and farsi we also need to load the LAE and
|
||||||
|
// LFE encoding
|
||||||
if (lyxrc.fontenc != "default" && language->lang() != "japanese") {
|
if (lyxrc.fontenc != "default" && language->lang() != "japanese") {
|
||||||
if (language->lang() == "arabic_arabi" || language->lang() == "farsi") {
|
if (language->lang() == "arabic_arabi"
|
||||||
|
|| language->lang() == "farsi") {
|
||||||
os << "\\usepackage[" << from_ascii(lyxrc.fontenc)
|
os << "\\usepackage[" << from_ascii(lyxrc.fontenc)
|
||||||
<< ",LFE,LAE]{fontenc}\n";
|
<< ",LFE,LAE]{fontenc}\n";
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
@ -1082,8 +1085,10 @@ bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
|
|||||||
os << "\\usepackage{listings}\n";
|
os << "\\usepackage{listings}\n";
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
os << "\\lstset{";
|
os << "\\lstset{";
|
||||||
// do not test validity because listings_params is supposed to be valid
|
// do not test validity because listings_params is
|
||||||
string par = InsetListingsParams(listings_params).separatedParams(true);
|
// supposed to be valid
|
||||||
|
string par =
|
||||||
|
InsetListingsParams(listings_params).separatedParams(true);
|
||||||
os << from_ascii(par);
|
os << from_ascii(par);
|
||||||
// count the number of newlines
|
// count the number of newlines
|
||||||
for (size_t i = 0; i < par.size(); ++i)
|
for (size_t i = 0; i < par.size(); ++i)
|
||||||
@ -1916,9 +1921,10 @@ void BufferParams::writeEncodingPreamble(odocstream & os,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// The encoding "armscii8" is only available when the package "armtex" is loaded.
|
// The encoding "armscii8" (for Armenian) is only available when
|
||||||
// armscii8 is used for Armenian.
|
// the package "armtex" is loaded.
|
||||||
if (language->encoding()->latexName() == "armscii8" || inputenc == "armscii8") {
|
if (language->encoding()->latexName() == "armscii8"
|
||||||
|
|| inputenc == "armscii8") {
|
||||||
os << "\\usepackage{armtex}\n";
|
os << "\\usepackage{armtex}\n";
|
||||||
texrow.newline();
|
texrow.newline();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user