mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
* separate nomencl processing command from index processing command, since nomencl
relies on makeindex (with specific options) [bug 5184]. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26226 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b556fe1bcb
commit
641708ac4b
@ -594,6 +594,8 @@ def checkOtherEntries():
|
||||
rc_entry = [ r'\bibtex_command "%%"' ])
|
||||
checkProg('an index processor', ['texindy', 'makeindex -c -q'],
|
||||
rc_entry = [ r'\index_command "%%"' ])
|
||||
checkProg('a nomenclature processor', ['makeindex'],
|
||||
rc_entry = [ r'\nomencl_command "makeindex -s nomencl.ist"' ])
|
||||
checkProg('a spellchecker', ['ispell'],
|
||||
rc_entry = [ r'\spell_command "%%"' ])
|
||||
## FIXME: OCTAVE is not used anywhere
|
||||
|
@ -261,7 +261,7 @@ int LaTeX::run(TeXErrors & terr)
|
||||
if (head.haschanged(idxfile)) {
|
||||
// no checks for now
|
||||
LYXERR(Debug::LATEX, "Running MakeIndex.");
|
||||
message(_("Running MakeIndex."));
|
||||
message(_("Running Index Processor."));
|
||||
// onlyFilename() is needed for cygwin
|
||||
rerun |= runMakeIndex(onlyFilename(idxfile.absFilename()),
|
||||
runparams);
|
||||
@ -335,7 +335,7 @@ int LaTeX::run(TeXErrors & terr)
|
||||
if (head.haschanged(idxfile)) {
|
||||
// no checks for now
|
||||
LYXERR(Debug::LATEX, "Running MakeIndex.");
|
||||
message(_("Running MakeIndex."));
|
||||
message(_("Running Index Processor."));
|
||||
// onlyFilename() is needed for cygwin
|
||||
rerun = runMakeIndex(onlyFilename(changeExtension(
|
||||
file.absFilename(), ".idx")), runparams);
|
||||
@ -416,12 +416,14 @@ bool LaTeX::runMakeIndexNomencl(FileName const & file,
|
||||
{
|
||||
LYXERR(Debug::LATEX, "Running MakeIndex for nomencl.");
|
||||
message(_("Running MakeIndex for nomencl."));
|
||||
string tmp = lyxrc.nomencl_command + ' ';
|
||||
// onlyFilename() is needed for cygwin
|
||||
string const nomenclstr = " -s nomencl.ist -o "
|
||||
tmp += quoteName(onlyFilename(changeExtension(file.absFilename(), nlo)));
|
||||
tmp += " -o "
|
||||
+ onlyFilename(changeExtension(file.toFilesystemEncoding(), nls));
|
||||
return runMakeIndex(
|
||||
onlyFilename(changeExtension(file.absFilename(), nlo)),
|
||||
runparams, nomenclstr);
|
||||
Systemcall one;
|
||||
one.startscript(Systemcall::Wait, tmp);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1837,6 +1837,7 @@ void actOnUpdatedPrefs(LyXRC const & lyxrc_orig, LyXRC const & lyxrc_new)
|
||||
case LyXRC::RC_FORMAT:
|
||||
case LyXRC::RC_GROUP_LAYOUTS:
|
||||
case LyXRC::RC_INDEX_COMMAND:
|
||||
case LyXRC::RC_NOMENCL_COMMAND:
|
||||
case LyXRC::RC_INPUT:
|
||||
case LyXRC::RC_KBMAP:
|
||||
case LyXRC::RC_KBMAP_PRIMARY:
|
||||
|
@ -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;
|
||||
|
||||
|
@ -103,6 +103,7 @@ public:
|
||||
RC_MAKE_BACKUP,
|
||||
RC_MARK_FOREIGN_LANGUAGE,
|
||||
RC_MOUSE_WHEEL_SPEED,
|
||||
RC_NOMENCL_COMMAND,
|
||||
RC_NUMLASTFILES,
|
||||
RC_PATH_PREFIX,
|
||||
RC_PERS_DICT,
|
||||
@ -246,6 +247,8 @@ public:
|
||||
std::string bibtex_command;
|
||||
/// command to run makeindex incl. options or other index programs
|
||||
std::string index_command;
|
||||
/// command to run makeindex incl. options for nomencl
|
||||
std::string nomencl_command;
|
||||
///
|
||||
std::string document_path;
|
||||
///
|
||||
|
@ -556,6 +556,7 @@ void PrefLatex::apply(LyXRC & rc) const
|
||||
rc.chktex_command = fromqstr(latexChecktexED->text());
|
||||
rc.bibtex_command = fromqstr(latexBibtexED->text());
|
||||
rc.index_command = fromqstr(latexIndexED->text());
|
||||
rc.nomencl_command = fromqstr(latexNomenclED->text());
|
||||
rc.auto_reset_options = latexAutoresetCB->isChecked();
|
||||
rc.view_dvi_paper_option = fromqstr(latexDviPaperED->text());
|
||||
rc.default_papersize =
|
||||
@ -572,6 +573,7 @@ void PrefLatex::update(LyXRC const & rc)
|
||||
latexChecktexED->setText(toqstr(rc.chktex_command));
|
||||
latexBibtexED->setText(toqstr(rc.bibtex_command));
|
||||
latexIndexED->setText(toqstr(rc.index_command));
|
||||
latexNomenclED->setText(toqstr(rc.nomencl_command));
|
||||
latexAutoresetCB->setChecked(rc.auto_reset_options);
|
||||
latexDviPaperED->setText(toqstr(rc.view_dvi_paper_option));
|
||||
latexPaperSizeCO->setCurrentIndex(
|
||||
|
@ -6,7 +6,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>427</width>
|
||||
<height>308</height>
|
||||
<height>359</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
@ -19,33 +19,58 @@
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<item row="7" column="0" colspan="3" >
|
||||
<widget class="QCheckBox" name="latexAutoresetCB" >
|
||||
<property name="toolTip" >
|
||||
<string>Set class options to default on class change</string>
|
||||
</property>
|
||||
<item row="5" column="0" >
|
||||
<widget class="QLabel" name="latexNomenclLA" >
|
||||
<property name="text" >
|
||||
<string>&Reset class options when document class changes</string>
|
||||
<string>&Nomenclature command:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>latexIndexED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="8" column="0" colspan="3" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Vertical</enum>
|
||||
<item row="5" column="1" colspan="2" >
|
||||
<widget class="QLineEdit" name="latexNomenclED" >
|
||||
<property name="toolTip" >
|
||||
<string>Command and options for nomencl (usually makeindex)</string>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>409</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" colspan="3" >
|
||||
<item row="4" column="0" >
|
||||
<widget class="QLabel" name="latexIndexLA" >
|
||||
<property name="text" >
|
||||
<string>&Index command:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>latexIndexED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="2" >
|
||||
<widget class="QLineEdit" name="latexIndexED" >
|
||||
<property name="toolTip" >
|
||||
<string>Index command and options (makeindex, xindy)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1" colspan="2" >
|
||||
<widget class="QLineEdit" name="latexDviPaperED" >
|
||||
<property name="toolTip" >
|
||||
<string>Optional paper size flag (-paper) for some DVI viewers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0" >
|
||||
<widget class="QLabel" name="latexDviPaperLA" >
|
||||
<property name="text" >
|
||||
<string>&DVI viewer paper size options:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>latexDviPaperED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0" colspan="3" >
|
||||
<widget class="QCheckBox" name="pathCB" >
|
||||
<property name="enabled" >
|
||||
<bool>true</bool>
|
||||
@ -64,113 +89,32 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="latexPaperSizeLA" >
|
||||
<property name="text" >
|
||||
<string>Default paper si&ze:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>latexPaperSizeCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="latexEncodingLA" >
|
||||
<property name="text" >
|
||||
<string>Te&X encoding:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>latexEncodingED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2" >
|
||||
<widget class="QLineEdit" name="latexChecktexED" >
|
||||
<item row="8" column="0" colspan="3" >
|
||||
<widget class="QCheckBox" name="latexAutoresetCB" >
|
||||
<property name="toolTip" >
|
||||
<string>CheckTeX start options and flags</string>
|
||||
<string>Set class options to default on class change</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0" >
|
||||
<widget class="QLabel" name="latexIndexLA" >
|
||||
<property name="text" >
|
||||
<string>&Index command:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>latexIndexED</cstring>
|
||||
<string>&Reset class options when document class changes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="latexBibtexLA" >
|
||||
<property name="text" >
|
||||
<string>&BibTeX command:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>latexBibtexED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" >
|
||||
<widget class="QLabel" name="latexDviPaperLA" >
|
||||
<property name="text" >
|
||||
<string>&DVI viewer paper size options:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>latexDviPaperED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="latexChecktexLA" >
|
||||
<property name="text" >
|
||||
<string>Chec&kTeX command:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>latexChecktexED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2" >
|
||||
<widget class="QLineEdit" name="latexBibtexED" >
|
||||
<property name="toolTip" >
|
||||
<string>BibTeX command and options</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1" colspan="2" >
|
||||
<widget class="QLineEdit" name="latexDviPaperED" >
|
||||
<property name="toolTip" >
|
||||
<string>Optional paper size flag (-paper) for some DVI viewers</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1" colspan="2" >
|
||||
<widget class="QLineEdit" name="latexIndexED" >
|
||||
<property name="toolTip" >
|
||||
<string>Index command and options (makeindex, xindy)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item rowspan="2" row="0" column="2" >
|
||||
<item row="9" column="0" colspan="3" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>21</width>
|
||||
<height>52</height>
|
||||
<width>409</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="latexEncodingED" />
|
||||
</item>
|
||||
<item row="1" column="1" >
|
||||
<widget class="QComboBox" name="latexPaperSizeCO" >
|
||||
<item>
|
||||
@ -215,6 +159,79 @@
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1" >
|
||||
<widget class="QLineEdit" name="latexEncodingED" />
|
||||
</item>
|
||||
<item rowspan="2" row="0" column="2" >
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType" >
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>21</width>
|
||||
<height>52</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="1" colspan="2" >
|
||||
<widget class="QLineEdit" name="latexBibtexED" >
|
||||
<property name="toolTip" >
|
||||
<string>BibTeX command and options</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" >
|
||||
<widget class="QLabel" name="latexChecktexLA" >
|
||||
<property name="text" >
|
||||
<string>Chec&kTeX command:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>latexChecktexED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0" >
|
||||
<widget class="QLabel" name="latexBibtexLA" >
|
||||
<property name="text" >
|
||||
<string>&BibTeX command:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>latexBibtexED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1" colspan="2" >
|
||||
<widget class="QLineEdit" name="latexChecktexED" >
|
||||
<property name="toolTip" >
|
||||
<string>CheckTeX start options and flags</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0" >
|
||||
<widget class="QLabel" name="latexEncodingLA" >
|
||||
<property name="text" >
|
||||
<string>Te&X encoding:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>latexEncodingED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" >
|
||||
<widget class="QLabel" name="latexPaperSizeLA" >
|
||||
<property name="text" >
|
||||
<string>Default paper si&ze:</string>
|
||||
</property>
|
||||
<property name="buddy" >
|
||||
<cstring>latexPaperSizeCO</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<tabstops>
|
||||
|
Loading…
Reference in New Issue
Block a user