fonts_sans_scale[1] = 100;
fonts_typewriter_scale[0] = 100;
fonts_typewriter_scale[1] = 100;
- inputenc = "auto-legacy";
+ inputenc = "utf8";
lang_package = "default";
graphics_driver = "default";
default_output_format = "default";
output_sync = false;
use_refstyle = true;
use_minted = false;
+ use_lineno = false;
// map current author
author_map_[pimpl_->authorlist.get(0).bufferId()] = 0;
lex >> use_refstyle;
} else if (token == "\\use_minted") {
lex >> use_minted;
+ } else if (token == "\\use_lineno") {
+ lex >> use_lineno;
+ } else if (token == "\\lineno_options") {
+ lex.eatLine();
+ lineno_opts = trim(lex.getString());
} else {
lyxerr << "BufferParams::readToken(): Unknown token: " <<
token << endl;
<< "\n\\justification " << convert<string>(justification)
<< "\n\\use_refstyle " << use_refstyle
<< "\n\\use_minted " << use_minted
+ << "\n\\use_lineno " << use_lineno
<< '\n';
+
+ if (!lineno_opts.empty())
+ os << "\\lineno_options " << lineno_opts << '\n';
+
if (isbackgroundcolor == true)
os << "\\backgroundcolor " << lyx::X11hexname(backgroundcolor) << '\n';
if (isfontcolor == true)
// (In documents containing text in Thai language,
// we must load inputenc after babel, see lib/languages).
if (!contains(features.getBabelPostsettings(), from_ascii("thai.ldf")))
- writeEncodingPreamble(os, features);
+ writeEncodingPreamble(os, features);
// includeonly
if (!features.runparams().includeall && !included_children_.empty()) {
// hyperref loads this automatically
os << "\\usepackage{nameref}\n";
+ if (use_lineno){
+ os << "\\usepackage";
+ if (!lineno_opts.empty())
+ os << "[" << lineno_opts << "]";
+ os << "{lineno}\n";
+ os << "\\linenumbers\n";
+ }
+
// bibtopic needs to be loaded after hyperref.
// the dot provides the aux file naming which LyX can detect.
if (features.mustProvide("bibtopic"))
// In documents containing text in Thai language,
// we must load inputenc after babel (see lib/languages).
if (contains(features.getBabelPostsettings(), from_ascii("thai.ldf")))
- writeEncodingPreamble(os, features);
+ writeEncodingPreamble(os, features);
if (features.isRequired("bicaption"))
os << "\\usepackage{bicaption}\n";