]> git.lyx.org Git - lyx.git/blobdiff - src/LyXRC.cpp
fix warning
[lyx.git] / src / LyXRC.cpp
index 3f9366cb044a73234ca9c23ec226cdd0a97526e4..dc78e8d3d5039fd3732c7cf53792d4aa567a8307 100644 (file)
@@ -116,6 +116,7 @@ LexerKeyword lyxrcTags[] = {
        { "\\make_backup", LyXRC::RC_MAKE_BACKUP },
        { "\\mark_foreign_language", LyXRC::RC_MARK_FOREIGN_LANGUAGE },
        { "\\mouse_wheel_speed", LyXRC::RC_MOUSE_WHEEL_SPEED },
+       { "\\nomencl_command", LyXRC::RC_NOMENCL_COMMAND },
        { "\\num_lastfiles", LyXRC::RC_NUMLASTFILES },
        { "\\open_buffers_in_tabs", LyXRC::RC_OPEN_BUFFERS_IN_TABS },
        { "\\path_prefix", LyXRC::RC_PATH_PREFIX },
@@ -226,6 +227,7 @@ void LyXRC::setDefaults()
        bibtex_command = "bibtex";
        fontenc = "default";
        index_command = "makeindex -c -q";
+       nomencl_command = "makeindex -s nomencl.ist";
        dpi = 75;
        // Because a screen typically is wider than a piece of paper:
        zoom = 150;
@@ -604,6 +606,12 @@ int LyXRC::read(Lexer & lexrc)
                        }
                        break;
 
+               case RC_NOMENCL_COMMAND:
+                       if (lexrc.next(true)) {
+                               nomencl_command = lexrc.getString();
+                       }
+                       break;
+
                case RC_SCREEN_DPI:
                        lexrc >> dpi;
                        break;
@@ -1321,6 +1329,13 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c
                }
                if (tag != RC_LAST)
                        break;
+       case RC_NOMENCL_COMMAND:
+               if (ignore_system_lyxrc ||
+                   nomencl_command != system_lyxrc.nomencl_command) {
+                       os << "\\nomencl_command \"" << escapeCommand(nomencl_command) << "\"\n";
+               }
+               if (tag != RC_LAST)
+                       break;
        case RC_TEX_EXPECTS_WINDOWS_PATHS:
                if (ignore_system_lyxrc ||
                    windows_style_tex_paths != system_lyxrc.windows_style_tex_paths) {
@@ -2535,6 +2550,10 @@ string const LyXRC::getDescription(LyXRCTags tag)
                str = _("Define the options of makeindex (cf. man makeindex) or select an alternative compiler. E.g., using xindy/make-rules, the command string would be \"makeindex.sh -m $$lang\".");
                break;
 
+       case RC_NOMENCL_COMMAND:
+               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_INPUT:
                break;