// The format should also be updated in configure.py, and conversion code
// should be added to prefs2prefs_prefs.py.
-static unsigned int const LYXRC_FILEFORMAT = 20; // tommaso: 'needauth' options
+static unsigned int const LYXRC_FILEFORMAT = 22; // ef: pygmentize_command
// when adding something to this array keep it sorted!
LexerKeyword lyxrcTags[] = {
{ "\\index_alternatives", LyXRC::RC_INDEX_ALTERNATIVES },
{ "\\index_command", LyXRC::RC_INDEX_COMMAND },
{ "\\input", LyXRC::RC_INPUT },
+ { "\\jbibtex_alternatives", LyXRC::RC_JBIBTEX_ALTERNATIVES },
{ "\\jbibtex_command", LyXRC::RC_JBIBTEX_COMMAND },
{ "\\jindex_command", LyXRC::RC_JINDEX_COMMAND },
{ "\\kbmap", LyXRC::RC_KBMAP },
{ "\\print_landscape_flag", LyXRC::RC_PRINTLANDSCAPEFLAG },
{ "\\print_paper_dimension_flag", LyXRC::RC_PRINTPAPERDIMENSIONFLAG },
{ "\\print_paper_flag", LyXRC::RC_PRINTPAPERFLAG },
+ { "\\pygmentize_command", LyXRC::RC_PYGMENTIZE_COMMAND },
{ "\\save_compressed", LyXRC::RC_SAVE_COMPRESSED },
{ "\\save_origin", LyXRC::RC_SAVE_ORIGIN },
{ "\\screen_dpi", LyXRC::RC_SCREEN_DPI },
default_view_format = "pdf2";
default_otf_view_format = "pdf4";
chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
- bibtex_command = "bibtex";
+ bibtex_command = "automatic";
fontenc = "default";
index_command = "makeindex -c -q";
nomencl_command = "makeindex -s nomencl.ist";
+ pygmentize_command = string();
dpi = 75;
// Because a screen is typically wider than a piece of paper:
zoom = 150;
+ currentZoom = zoom;
allow_geometry_session = true;
// Default LaTeX font size:
font_sizes[FONT_SIZE_TINY] = "5.0";
lexrc >> print_paper_flag;
break;
+ case RC_PYGMENTIZE_COMMAND:
+ if (lexrc.next(true)) {
+ pygmentize_command = lexrc.getString();
+ }
+ break;
+
case RC_VIEWDVI_PAPEROPTION:
if (lexrc.next())
view_dvi_paper_option = lexrc.getString();
}
break;
+ case RC_JBIBTEX_ALTERNATIVES:
+ if (lexrc.next(true)) {
+ jbibtex_alternatives.insert(lexrc.getString());
+ }
+ break;
+
case RC_INDEX_ALTERNATIVES:
if (lexrc.next(true)) {
index_alternatives.insert(lexrc.getString());
case RC_VIEWER: {
string format, command;
lexrc >> format >> command;
- formats.setViewer(format, command);
+ theFormats().setViewer(format, command);
break;
}
case RC_FILEFORMAT: {
if (theConverters().formatIsUsed(format))
LYXERR0("Can't delete format " << format);
else
- formats.erase(format);
+ theFormats().erase(format);
} else {
- formats.add(format, extensions, prettyname,
+ theFormats().add(format, extensions, prettyname,
shortcut, viewer, editor, mime, flgs);
}
break;
}
/// Update converters data-structures
- theConverters().update(formats);
+ theConverters().update(theFormats());
theConverters().buildGraph();
theBufferList().invalidateConverterCache();
}
if (tag != RC_LAST)
break;
+ case RC_JBIBTEX_ALTERNATIVES: {
+ CommandSet::const_iterator it = jbibtex_alternatives.begin();
+ CommandSet::const_iterator end = jbibtex_alternatives.end();
+ for ( ; it != end; ++it) {
+ if (ignore_system_lyxrc
+ || !system_lyxrc.jbibtex_alternatives.count(*it))
+ os << "\\jbibtex_alternatives \""
+ << *it << "\"\n";
+ }
+ if (tag != RC_LAST)
+ break;
+ }
case RC_INDEX_ALTERNATIVES: {
CommandSet::const_iterator it = index_alternatives.begin();
CommandSet::const_iterator end = index_alternatives.end();
}
if (tag != RC_LAST)
break;
+ case RC_PYGMENTIZE_COMMAND:
+ if (ignore_system_lyxrc ||
+ pygmentize_command != system_lyxrc.pygmentize_command) {
+ os << "\\pygmentize_command \"" << escapeCommand(pygmentize_command) << "\"\n";
+ }
+ if (tag != RC_LAST)
+ break;
case RC_TEX_EXPECTS_WINDOWS_PATHS:
// Don't write this setting to the preferences file,
// but allow temporary changes (bug 7557).
case RC_FILEFORMAT:
// New/modified formats
- for (Formats::const_iterator cit = formats.begin();
- cit != formats.end(); ++cit) {
+ for (Formats::const_iterator cit = theFormats().begin();
+ cit != theFormats().end(); ++cit) {
Format const * format =
- system_formats.getFormat(cit->name());
+ theSystemFormats().getFormat(cit->name());
if (!format ||
format->extensions() != cit->extensions() ||
format->prettyname() != cit->prettyname() ||
}
// Look for deleted formats
- for (Formats::const_iterator cit = system_formats.begin();
- cit != system_formats.end(); ++cit)
- if (!formats.getFormat(cit->name()))
+ for (Formats::const_iterator cit = theSystemFormats().begin();
+ cit != theSystemFormats().end(); ++cit)
+ if (!theFormats().getFormat(cit->name()))
os << "\\format \"" << cit->name()
<< "\" \"\" \"\" \"\" \"\" \"\" \"\" \"\"\n";
if (tag != RC_LAST)
case LyXRC::RC_INDEX_ALTERNATIVES:
case LyXRC::RC_INDEX_COMMAND:
case LyXRC::RC_JBIBTEX_COMMAND:
+ case LyXRC::RC_JBIBTEX_ALTERNATIVES:
case LyXRC::RC_JINDEX_COMMAND:
case LyXRC::RC_NOMENCL_COMMAND:
+ case LyXRC::RC_PYGMENTIZE_COMMAND:
case LyXRC::RC_INPUT:
case LyXRC::RC_KBMAP:
case LyXRC::RC_KBMAP_PRIMARY:
str = _("Define the options of makeindex (cf. man makeindex) to be used for nomenclatures. This might differ from the index processing options.");
break;
+ case RC_PYGMENTIZE_COMMAND:
+ str = _("The command to run the python pygments syntax highlighter.");
+ break;
+
case RC_INPUT:
break;