mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-09-20 06:49:56 +00:00
load babel as _last_ package
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2841 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
eeb1a304e2
commit
8a8909e664
@ -1,6 +1,13 @@
|
||||
2001-10-04 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
|
||||
|
||||
* LaTeXFeatures.C: remove special case of french and index
|
||||
|
||||
* buffer.C (makeLaTeXFile): _really_ load babel late (i.e. just
|
||||
before \begin{document}). This solves several incompatibilities.
|
||||
|
||||
2001-10-03 Garst Reese <reese@isn.net>
|
||||
|
||||
* lyx_cb.C: fhange CheckTex error msg.
|
||||
* lyx_cb.C: change CheckTex error msg.
|
||||
|
||||
2001-10-03 José Matos <jamatos@fep.up.pt>
|
||||
|
||||
|
@ -155,10 +155,7 @@ string const LaTeXFeatures::getPackages() const
|
||||
|
||||
// makeidx.sty
|
||||
if (makeidx) {
|
||||
if (! tclass.provides(LyXTextClass::makeidx)
|
||||
&& params.language->babel() != "french") // french provides
|
||||
// \index !
|
||||
// French should not be hardcoded. (Lgb)
|
||||
if (! tclass.provides(LyXTextClass::makeidx))
|
||||
packages << "\\usepackage{makeidx}\n";
|
||||
packages << "\\makeindex\n";
|
||||
}
|
||||
|
26
src/buffer.C
26
src/buffer.C
@ -2263,19 +2263,6 @@ void Buffer::makeLaTeXFile(string const & fname,
|
||||
texrow.newline();
|
||||
}
|
||||
|
||||
// We try to load babel late, in case it interferes
|
||||
// with other packages.
|
||||
if (use_babel) {
|
||||
string tmp = lyxrc.language_package;
|
||||
if (!lyxrc.language_global_options
|
||||
&& tmp == "\\usepackage{babel}")
|
||||
tmp = string("\\usepackage[") +
|
||||
language_options.str().c_str() +
|
||||
"]{babel}";
|
||||
ofs << tmp << "\n";
|
||||
texrow.newline();
|
||||
}
|
||||
|
||||
if (params.secnumdepth != tclass.secnumdepth()) {
|
||||
ofs << "\\setcounter{secnumdepth}{"
|
||||
<< params.secnumdepth
|
||||
@ -2390,6 +2377,19 @@ void Buffer::makeLaTeXFile(string const & fname,
|
||||
|
||||
ofs << preamble;
|
||||
|
||||
// We try to load babel late, in case it interferes
|
||||
// with other packages.
|
||||
if (use_babel) {
|
||||
string tmp = lyxrc.language_package;
|
||||
if (!lyxrc.language_global_options
|
||||
&& tmp == "\\usepackage{babel}")
|
||||
tmp = string("\\usepackage[") +
|
||||
language_options.str().c_str() +
|
||||
"]{babel}";
|
||||
ofs << tmp << "\n";
|
||||
texrow.newline();
|
||||
}
|
||||
|
||||
// make the body.
|
||||
ofs << "\\begin{document}\n";
|
||||
texrow.newline();
|
||||
|
Loading…
Reference in New Issue
Block a user