trackChanges = false;
outputChanges = false;
use_default_options = true;
+ maintain_unincluded_children = false;
secnumdepth = 3;
tocdepth = 3;
language = default_language;
}
// default index
indiceslist().addDefault(B_("Index"));
+ html_be_strict = true;
+ html_use_mathml = true;
}
readModules(lex);
} else if (token == "\\begin_removed_modules") {
readRemovedModules(lex);
+ } else if (token == "\\begin_includeonly") {
+ readIncludeonly(lex);
+ } else if (token == "\\maintain_unincluded_children") {
+ lex >> maintain_unincluded_children;
} else if (token == "\\options") {
lex.eatLine();
options = lex.getString();
toktmp << endl;
return toktmp;
}
+ } else if (token == "\\html_use_mathml") {
+ lex >> html_use_mathml;
+ } else if (token == "\\html_be_strict") {
+ lex >> html_be_strict;
} else {
lyxerr << "BufferParams::readToken(): Unknown token: " <<
token << endl;
os << *it << '\n';
os << "\\end_modules" << '\n';
}
-
+
+ // includeonly
+ if (!includedChildren_.empty()) {
+ os << "\\begin_includeonly" << '\n';
+ list<string>::const_iterator it = includedChildren_.begin();
+ list<string>::const_iterator en = includedChildren_.end();
+ for (; it != en; it++)
+ os << *it << '\n';
+ os << "\\end_includeonly" << '\n';
+ }
+ os << "\\maintain_unincluded_children "
+ << convert<string>(maintain_unincluded_children) << '\n';
+
// local layout information
if (!local_layout.empty()) {
// remove '\n' from the end
}
}
- os << "\\tracking_changes " << convert<string>(trackChanges) << "\n";
- os << "\\output_changes " << convert<string>(outputChanges) << "\n";
+ os << "\\tracking_changes " << convert<string>(trackChanges) << "\n"
+ << "\\output_changes " << convert<string>(outputChanges) << "\n"
+ << "\\html_use_mathml " << convert<string>(html_use_mathml) << "\n"
+ << "\\html_be_strict " << convert<string>(html_be_strict) << "\n";
os << pimpl_->authorlist;
}
features.require("hyperref");
// due to interferences with babel and hyperref, the color package has to
// be loaded after hyperref when hyperref is used with the colorlinks
- // option, see http://bugzilla.lyx.org/show_bug.cgi?id=5291
+ // option, see http://www.lyx.org/trac/ticket/5291
if (pdfoptions().colorlinks)
features.require("color");
}
bool BufferParams::writeLaTeX(odocstream & os, LaTeXFeatures & features,
- TexRow & texrow) const
+ TexRow & texrow, FileName const & filepath) const
{
os << "\\documentclass";
size_t mongo = language_options.str().find("mongolian");
// if Japanese is used, babel must directly be loaded
// with language options, not in the class options, see
- // http://bugzilla.lyx.org/show_bug.cgi?id=4597#c4
+ // http://www.lyx.org/trac/ticket/4597#c4
size_t japan = language_options.str().find("japanese");
if (lyxrc.language_global_options && !language_options.str().empty()
&& viet == string::npos && japan == string::npos
// handle inputenc etc.
writeEncodingPreamble(os, features, texrow);
+ // includeonly
+ if (!features.runparams().includeall && !includedChildren_.empty()) {
+ os << "\\includeonly{";
+ list<string>::const_iterator it = includedChildren_.begin();
+ bool first = true;
+ for (; it != includedChildren_.end() ; ++it) {
+ string incfile = *it;
+ FileName inc = makeAbsPath(incfile, filepath.absFilename());
+ string mangled = DocFileName(changeExtension(inc.absFilename(), ".tex")).
+ mangledFilename();
+ if (!features.runparams().nice)
+ incfile = mangled;
+ // \includeonly doesn't want an extension
+ incfile = changeExtension(incfile, string());
+ incfile = latex_path(incfile);
+ if (!incfile.empty()) {
+ if (!first)
+ os << ",";
+ os << from_utf8(incfile);
+ }
+ first = false;
+ }
+ os << "}\n";
+ }
+
if (!listings_params.empty() || features.isRequired("listings")) {
os << "\\usepackage{listings}\n";
texrow.newline();
// due to interferences with babel and hyperref, the color package has to
// be loaded (when it is not already loaded) before babel when hyperref
// is used with the colorlinks option, see
- // http://bugzilla.lyx.org/show_bug.cgi?id=5291
+ // http://www.lyx.org/trac/ticket/5291
// we decided therefore to load color always before babel, see
// http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg144349.html
lyxpreamble += from_ascii(features.getColorOptions());
}
+void BufferParams::readIncludeonly(Lexer & lex)
+{
+ if (!lex.eatLine()) {
+ lyxerr << "Error (BufferParams::readIncludeonly):"
+ "Unexpected end of input." << endl;
+ return;
+ }
+ while (true) {
+ string child = lex.getString();
+ if (child == "\\end_includeonly")
+ break;
+ includedChildren_.push_back(child);
+ lex.eatLine();
+ }
+}
+
+
string BufferParams::paperSizeName(PapersizePurpose purpose) const
{
char real_papersize = papersize;
size_t mongo = lang_opts.find("mongolian");
// If Japanese is used, babel must directly be loaded with the
// language options, see
- // http://bugzilla.lyx.org/show_bug.cgi?id=4597#c4
+ // http://www.lyx.org/trac/ticket/4597#c4
size_t japan = lang_opts.find("japanese");
if (!lyxrc.language_global_options || viet != string::npos
|| japan != string::npos || latvian != string::npos