mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
customize bibtex call (bug 720)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8559 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0848070e91
commit
aecf612d10
@ -1,5 +1,8 @@
|
||||
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>
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "LaTeX.h"
|
||||
#include "bufferlist.h"
|
||||
#include "gettext.h"
|
||||
#include "lyxrc.h"
|
||||
#include "debug.h"
|
||||
#include "DepTable.h"
|
||||
#include "support/filetools.h"
|
||||
@ -70,13 +71,11 @@ using std::vector;
|
||||
// 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;
|
||||
|
||||
@ -528,11 +527,7 @@ bool LaTeX::runBibTeX(vector<Aux_Info> const & bibtex_info)
|
||||
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);
|
||||
|
@ -1,5 +1,9 @@
|
||||
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
|
||||
|
@ -161,6 +161,7 @@ void QPrefs::apply()
|
||||
|
||||
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 =
|
||||
@ -472,6 +473,7 @@ void QPrefs::update_contents()
|
||||
|
||||
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);
|
||||
|
@ -202,6 +202,7 @@ QPrefsDialog::QPrefsDialog(QPrefs * form)
|
||||
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()));
|
||||
|
@ -13,7 +13,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>376</width>
|
||||
<width>372</width>
|
||||
<height>237</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -21,7 +21,7 @@
|
||||
<name>caption</name>
|
||||
<string>LaTeX settings</string>
|
||||
</property>
|
||||
<vbox>
|
||||
<grid>
|
||||
<property stdset="1">
|
||||
<name>margin</name>
|
||||
<number>11</number>
|
||||
@ -30,7 +30,7 @@
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget>
|
||||
<widget row="0" column="0" >
|
||||
<class>QLayoutWidget</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
@ -177,7 +177,7 @@
|
||||
</spacer>
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget>
|
||||
<widget row="1" column="0" >
|
||||
<class>QCheckBox</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
@ -192,7 +192,28 @@
|
||||
<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>
|
||||
@ -211,22 +232,7 @@
|
||||
<name>spacing</name>
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget row="0" column="0" >
|
||||
<class>QLabel</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>latexChecktexLA</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>Chec&kTeX command:</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>buddy</name>
|
||||
<cstring>latexChecktexED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="1" column="0" >
|
||||
<widget row="2" column="0" >
|
||||
<class>QLabel</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
@ -241,7 +247,7 @@
|
||||
<cstring>latexDviPaperED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="1" column="1" >
|
||||
<widget row="2" column="1" >
|
||||
<class>QLineEdit</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
@ -263,30 +269,50 @@
|
||||
<string>CheckTeX start options and flags</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="0" column="0" >
|
||||
<class>QLabel</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>latexChecktexLA</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>Chec&kTeX command:</string>
|
||||
</property>
|
||||
<property>
|
||||
<name>buddy</name>
|
||||
<cstring>latexChecktexED</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="1" column="1" >
|
||||
<class>QLineEdit</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>latexBibtexED</cstring>
|
||||
</property>
|
||||
<property>
|
||||
<name>toolTip</name>
|
||||
<string>BibTeX command and options</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget row="1" column="0" >
|
||||
<class>QLabel</class>
|
||||
<property stdset="1">
|
||||
<name>name</name>
|
||||
<cstring>latexChecktexLA_2</cstring>
|
||||
</property>
|
||||
<property stdset="1">
|
||||
<name>text</name>
|
||||
<string>&BibTeX command:</string>
|
||||
</property>
|
||||
<property>
|
||||
<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>
|
||||
|
@ -1,5 +1,8 @@
|
||||
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
|
||||
|
@ -1737,6 +1737,7 @@ void FormPreferences::OutputsMisc::apply(LyXRC & rc) const
|
||||
|
||||
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);
|
||||
}
|
||||
@ -1802,6 +1803,8 @@ void FormPreferences::OutputsMisc::update(LyXRC const & rc)
|
||||
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,
|
||||
|
@ -2750,7 +2750,7 @@ argument:
|
||||
Name: form_preferences_outputs_misc
|
||||
Width: 455
|
||||
Height: 375
|
||||
Number of Objects: 10
|
||||
Number of Objects: 11
|
||||
|
||||
--------------------
|
||||
class: FL_BOX
|
||||
@ -2849,7 +2849,7 @@ argument: 0
|
||||
--------------------
|
||||
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
|
||||
@ -2885,7 +2885,7 @@ argument: 0
|
||||
--------------------
|
||||
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
|
||||
@ -2903,7 +2903,7 @@ argument: 0
|
||||
--------------------
|
||||
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
|
||||
@ -2936,5 +2936,23 @@ name: check_autoreset_classopt
|
||||
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
|
||||
|
16
src/lyxrc.C
16
src/lyxrc.C
@ -65,6 +65,7 @@ keyword_item lyxrcTags[] = {
|
||||
{ "\\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 },
|
||||
@ -201,6 +202,7 @@ void LyXRC::setDefaults() {
|
||||
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:
|
||||
@ -555,6 +557,12 @@ int LyXRC::read(string const & filename)
|
||||
chktex_command = lexrc.getString();
|
||||
}
|
||||
break;
|
||||
|
||||
case RC_BIBTEX_COMMAND:
|
||||
if (lexrc.next()) {
|
||||
bibtex_command = lexrc.getString();
|
||||
}
|
||||
break;
|
||||
|
||||
case RC_SCREEN_DPI:
|
||||
if (lexrc.next()) {
|
||||
@ -1161,6 +1169,10 @@ void LyXRC::output(ostream & os) const
|
||||
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';
|
||||
@ -1977,6 +1989,10 @@ string const LyXRC::getDescription(LyXRCTags tag)
|
||||
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.");
|
||||
|
@ -98,6 +98,7 @@ enum LyXRCTags {
|
||||
RC_PERS_DICT,
|
||||
RC_ESC_CHARS,
|
||||
RC_CHKTEX_COMMAND,
|
||||
RC_BIBTEX_COMMAND,
|
||||
RC_CURSOR_FOLLOWS_SCROLLBAR,
|
||||
RC_DIALOGS_ICONIFY_WITH_MAIN,
|
||||
RC_MAKE_BACKUP,
|
||||
@ -196,6 +197,8 @@ enum LyXRCTags {
|
||||
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;
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user