del_token(document.preamble, "% Added by lyx2lyx", j-2, j-1)
k = find_token(document.header, "\\index ")
- document.header[k:k] = ["\\use_lineno %d" % use_lineno,
- "\\lineno_options %s" % options]
+ if options == "":
+ document.header[k:k] = ["\\use_lineno %d" % use_lineno]
+ else:
+ document.header[k:k] = ["\\use_lineno %d" % use_lineno,
+ "\\lineno_options %s" % options]
##
<< "\n\\use_lineno " << use_lineno
<< '\n';
- os << "\\lineno_options " << lineno_opts << '\n';
+ if (!lineno_opts.empty())
+ os << "\\lineno_options " << lineno_opts << '\n';
if (isbackgroundcolor == true)
os << "\\backgroundcolor " << lyx::X11hexname(backgroundcolor) << '\n';