2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
+ * lyxrc.[Ch]: add lyxrc bibtex_command
+ * LaTeX.C: use rc.bibtex_command instead of hardcoded string.
+
* buffer.C: increment file format to 231.
2004-03-28 Alfredo Braunstein <abraunst@lyx.org>
#include "LaTeX.h"
#include "bufferlist.h"
#include "gettext.h"
+#include "lyxrc.h"
#include "debug.h"
#include "DepTable.h"
#include "support/filetools.h"
// BufferList::updateIncludedTeXfiles, this should either
// be done before calling LaTeX::funcs or in a completely
// different way.
-// - the bibtex command options should be supported.
// - the makeindex style files should be taken care of with
// the dependency mechanism.
// - makeindex commandline options should be supported
// - somewhere support viewing of bibtex and makeindex log files.
// - we should perhaps also scan the bibtex log file
-// - we should perhaps also scan the bibtex log file
extern BufferList bufferlist;
continue;
result = true;
- // FIXME: the bibtex call should not be hardcoded. bibtex has
- // options (--min-crossrefs is useful) and there are also
- // alternatives (bibtex8, bibulus, mlbibtex, clbibtex etc.).
- // Move to converters? (JSpitzm)
- string tmp = "bibtex ";
+ string tmp = lyxrc.bibtex_command + " ";
tmp += OnlyFilename(ChangeExtension(it->aux_file, string()));
Systemcall one;
one.startscript(Systemcall::Wait, tmp);
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
+ * QPrefs.C:
+ * QPrefsDialog.C:
+ * ui/QPrefsLaTeXModule.ui: customize bibtex call.
+
* QFloat.C:
* QFloatDialog.C:
* floatplacement.[Ch]: add support for sidewaysfloats
rc.fontenc = fromqstr(latexmod->latexEncodingED->text());
rc.chktex_command = fromqstr(latexmod->latexChecktexED->text());
+ rc.bibtex_command = fromqstr(latexmod->latexBibtexED->text());
rc.auto_reset_options = latexmod->latexAutoresetCB->isChecked();
rc.view_dvi_paper_option = fromqstr(latexmod->latexDviPaperED->text());
rc.default_papersize =
latexmod->latexEncodingED->setText(toqstr(rc.fontenc));
latexmod->latexChecktexED->setText(toqstr(rc.chktex_command));
+ latexmod->latexBibtexED->setText(toqstr(rc.bibtex_command));
latexmod->latexAutoresetCB->setChecked(rc.auto_reset_options);
latexmod->latexDviPaperED->setText(toqstr(rc.view_dvi_paper_option));
latexmod->latexPaperSizeCO->setCurrentItem(rc.default_papersize);
connect(dateModule->DateED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
connect(latexModule->latexEncodingED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
connect(latexModule->latexChecktexED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
+ connect(latexModule->latexBibtexED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
connect(latexModule->latexAutoresetCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
connect(latexModule->latexDviPaperED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor()));
connect(latexModule->latexPaperSizeCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
<rect>
<x>0</x>
<y>0</y>
- <width>376</width>
+ <width>372</width>
<height>237</height>
</rect>
</property>
<name>caption</name>
<string>LaTeX settings</string>
</property>
- <vbox>
+ <grid>
<property stdset="1">
<name>margin</name>
<number>11</number>
<name>spacing</name>
<number>6</number>
</property>
- <widget>
+ <widget row="0" column="0" >
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
</spacer>
</hbox>
</widget>
- <widget>
+ <widget row="1" column="0" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<string>Set class options to default on class change</string>
</property>
</widget>
- <widget>
+ <spacer row="3" column="0" >
+ <property>
+ <name>name</name>
+ <cstring>Spacer3</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Vertical</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget row="2" column="0" >
<class>QGroupBox</class>
<property stdset="1">
<name>name</name>
<name>spacing</name>
<number>6</number>
</property>
- <widget row="0" column="0" >
+ <widget row="2" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>latexChecktexLA</cstring>
+ <cstring>latexDviPaperLA</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>Chec&kTeX command:</string>
+ <string>DVI viewer paper size options:</string>
</property>
<property>
<name>buddy</name>
+ <cstring>latexDviPaperED</cstring>
+ </property>
+ </widget>
+ <widget row="2" column="1" >
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>latexDviPaperED</cstring>
+ </property>
+ <property>
+ <name>toolTip</name>
+ <string>Optional paper size flag (-paper) for some DVI viewers</string>
+ </property>
+ </widget>
+ <widget row="0" column="1" >
+ <class>QLineEdit</class>
+ <property stdset="1">
+ <name>name</name>
<cstring>latexChecktexED</cstring>
</property>
+ <property>
+ <name>toolTip</name>
+ <string>CheckTeX start options and flags</string>
+ </property>
</widget>
- <widget row="1" column="0" >
+ <widget row="0" column="0" >
<class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>latexDviPaperLA</cstring>
+ <cstring>latexChecktexLA</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>DVI viewer paper size options:</string>
+ <string>Chec&kTeX command:</string>
</property>
<property>
<name>buddy</name>
- <cstring>latexDviPaperED</cstring>
+ <cstring>latexChecktexED</cstring>
</property>
</widget>
<widget row="1" column="1" >
<class>QLineEdit</class>
<property stdset="1">
<name>name</name>
- <cstring>latexDviPaperED</cstring>
+ <cstring>latexBibtexED</cstring>
</property>
<property>
<name>toolTip</name>
- <string>Optional paper size flag (-paper) for some DVI viewers</string>
+ <string>BibTeX command and options</string>
</property>
</widget>
- <widget row="0" column="1" >
- <class>QLineEdit</class>
+ <widget row="1" column="0" >
+ <class>QLabel</class>
<property stdset="1">
<name>name</name>
- <cstring>latexChecktexED</cstring>
+ <cstring>latexChecktexLA_2</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&BibTeX command:</string>
</property>
<property>
- <name>toolTip</name>
- <string>CheckTeX start options and flags</string>
+ <name>buddy</name>
+ <cstring>latexChecktexED</cstring>
</property>
</widget>
</grid>
</widget>
- <spacer>
- <property>
- <name>name</name>
- <cstring>Spacer3</cstring>
- </property>
- <property stdset="1">
- <name>orientation</name>
- <enum>Vertical</enum>
- </property>
- <property stdset="1">
- <name>sizeType</name>
- <enum>Expanding</enum>
- </property>
- <property>
- <name>sizeHint</name>
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </vbox>
+ </grid>
</widget>
<tabstops>
<tabstop>latexEncodingED</tabstop>
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
+ * FormPreferences.C:
+ * forms/form_preferences.fd: customize bibtex call.
+
* FormFloat.C:
* forms/form_float.fd:
add support for sidewaysfloats
rc.ascii_roff_command = fl_get_input(dialog_->input_ascii_roff);
rc.chktex_command = fl_get_input(dialog_->input_checktex);
+ rc.bibtex_command = fl_get_input(dialog_->input_bibtex);
rc.view_dvi_paper_option = fl_get_input(dialog_->input_paperoption);
rc.auto_reset_options = fl_get_button(dialog_->check_autoreset_classopt);
}
rc.ascii_roff_command.c_str());
fl_set_input(dialog_->input_checktex,
rc.chktex_command.c_str());
+ fl_set_input(dialog_->input_bibtex,
+ rc.bibtex_command.c_str());
fl_set_input(dialog_->input_paperoption,
rc.view_dvi_paper_option.c_str());
fl_set_button(dialog_->check_autoreset_classopt,
Name: form_preferences_outputs_misc
Width: 455
Height: 375
-Number of Objects: 10
+Number of Objects: 11
--------------------
class: FL_BOX
--------------------
class: FL_LABELFRAME
type: ENGRAVED_FRAME
-box: 10 190 435 135
+box: 10 190 435 165
boxtype: FL_NO_BOX
colors: FL_BLACK FL_COL1
alignment: FL_ALIGN_TOP_LEFT
--------------------
class: FL_INPUT
type: NORMAL_INPUT
-box: 145 245 285 30
+box: 145 240 285 30
boxtype: FL_DOWN_BOX
colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_LEFT
--------------------
class: FL_INPUT
type: NORMAL_INPUT
-box: 145 285 285 30
+box: 145 310 285 30
boxtype: FL_DOWN_BOX
colors: FL_COL1 FL_MCOL
alignment: FL_ALIGN_LEFT
callback: C_FormBaseInputCB
argument: 0
+--------------------
+class: FL_INPUT
+type: NORMAL_INPUT
+box: 145 275 285 30
+boxtype: FL_DOWN_BOX
+colors: FL_COL1 FL_MCOL
+alignment: FL_ALIGN_LEFT
+style: FL_NORMAL_STYLE
+size: FL_NORMAL_SIZE
+lcol: FL_BLACK
+label: Bibtex:|#B
+shortcut:
+resize: FL_RESIZE_ALL
+gravity: FL_NoGravity FL_NoGravity
+name: input_bibtex
+callback: C_FormBaseInputCB
+argument: 0
+
==============================
create_the_forms
{ "\\auto_reset_options", LyXRC::RC_AUTORESET_OPTIONS },
{ "\\autosave", LyXRC::RC_AUTOSAVE },
{ "\\backupdir_path", LyXRC::RC_BACKUPDIR_PATH },
+ { "\\bibtex_command", LyXRC::RC_BIBTEX_COMMAND },
{ "\\bind_file", LyXRC::RC_BINDFILE },
{ "\\check_lastfiles", LyXRC::RC_CHECKLASTFILES },
{ "\\chktex_command", LyXRC::RC_CHKTEX_COMMAND },
default_papersize = PAPER_USLETTER;
custom_export_format = "ps";
chktex_command = "chktex -n1 -n3 -n6 -n9 -n22 -n25 -n30 -n38";
+ bibtex_command = "bibtex";
fontenc = "default";
dpi = 75;
// Because a screen typically is wider than a piece of paper:
chktex_command = lexrc.getString();
}
break;
+
+ case RC_BIBTEX_COMMAND:
+ if (lexrc.next()) {
+ bibtex_command = lexrc.getString();
+ }
+ break;
case RC_SCREEN_DPI:
if (lexrc.next()) {
if (chktex_command != system_lyxrc.chktex_command) {
os << "\\chktex_command \"" << chktex_command << "\"\n";
}
+ case RC_BIBTEX_COMMAND:
+ if (bibtex_command != system_lyxrc.bibtex_command) {
+ os << "\\bibtex_command \"" << bibtex_command << "\"\n";
+ }
case RC_KBMAP:
if (use_kbmap != system_lyxrc.use_kbmap) {
os << "\\kbmap " << tostr(use_kbmap) << '\n';
case RC_CHKTEX_COMMAND:
str = _("Define how to run chktex. E.g. \"chktex -n11 -n1 -n3 -n6 -n9 -22 -n25 -n30 -n38\" Refer to the ChkTeX documentation.");
break;
+
+ case RC_BIBTEX_COMMAND:
+ str = _("Define the options of bibtex (cf. man bibtex) or select and alternative compiler (e.g. mlbibtex or bibulus).");
+ break;
case RC_CURSOR_FOLLOWS_SCROLLBAR:
str = _("LyX normally doesn't update the cursor position if you move the scrollbar. Set to true if you'd prefer to always have the cursor on screen.");
RC_PERS_DICT,
RC_ESC_CHARS,
RC_CHKTEX_COMMAND,
+ RC_BIBTEX_COMMAND,
RC_CURSOR_FOLLOWS_SCROLLBAR,
RC_DIALOGS_ICONIFY_WITH_MAIN,
RC_MAKE_BACKUP,
PAPER_SIZE default_papersize;
/// command to run chktex incl. options
std::string chktex_command;
+ /// command to run bibtex incl. options
+ std::string bibtex_command;
///
std::string document_path;
///