+2003-02-14 Juergen Spitzmueller <j.spitzmueller@gmx.de>
+
+ * scripts/TeXFiles.sh: Add search for *.bib-files (>bibFiles.lst)
+ changed version to 0.3.
+
2003-02-11 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
* templates/elsart.lyx:
# TeX class files -> option cls
# TeX style files -> option sty
# bibtex style files -> option bst
+# bibtex database files -> option bib
#
# with the help
# of kpsewhich and creates a
-# bstFiles.lst, clsFiles.lst, styFiles.lst
+# bstFiles.lst, clsFiles.lst, styFiles.lst, bibFiles.lst
# without any parameter all files are created.
#
# Herbert Voss <voss@perce.org>
#
# Updates from Jean-Marc Lasgouttes.
#
+# bib support added by Juergen Spitzmueller (v0.3)
+#
CLS_STYLEFILE=clsFiles.lst
STY_STYLEFILE=styFiles.lst
BST_STYLEFILE=bstFiles.lst
-version='$Id: TeXFiles.sh,v 0.2 2001-10-15'
+BIB_FILES=bibFiles.lst
+version='$Id: TeXFiles.sh,v 0.3 2003-02-14'
progname=`echo $0 | sed 's%.*/%%'`
-usage="Usage: TeXFiles.sh [-version | cls | sty | bst]
+usage="Usage: TeXFiles.sh [-version | cls | sty | bst | bib ]
Default is without any Parameters,
so that all files will be created"
types=$1
-test -z "$types" && types="cls sty bst"
+test -z "$types" && types="cls sty bst bib"
#
# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use ';' to separate
kpsetype=.tex;;
bst) outfile=$BST_STYLEFILE
kpsetype=.bst;;
+ bib) outfile=$BIB_FILES
+ kpsetype=.bib;;
*) echo "ERROR: unknown type $type"
exit 1;;
esac
-2003-02-09 Juergen Spitzmueller <j.spitzmueller@gmx.de>
+2003-02-14 Juergen Spitzmueller <j.spitzmueller@gmx.de>
+
+ * ControlBibtex.[Ch]: new function getBibFiles() (provides list
+ of available *.bib-files from bibFiles.lst).
* tex_helpers.C (getTexFileList): sort and dis-duplicate
listWithoutPath correctly.
}
+string const ControlBibtex::getBibFiles() const
+{
+ string list = getTexFileList("bibFiles.lst", false);
+ // test, if we have a valid list, otherwise run rescan
+ if (list.empty()) {
+ rescanBibStyles();
+ list = getTexFileList("bibFiles.lst", false);
+ }
+ return list;
+}
+
+
void ControlBibtex::rescanBibStyles() const
{
rescanTexStyles();
string const Browse(string const &, string const &, string const &);
/// get the list of bst files
string const getBibStyles() const;
- /// build filelists of all availabe bst/cls/sty-files. done through
+ /// get the list of bib files
+ string const getBibFiles() const;
+ /// build filelists of all availabe bib/bst/cls/sty-files. done through
/// kpsewhich and an external script, saved in *Files.lst
void rescanBibStyles() const;
private:
* QBibtexDialog.C: Fix browsing mechanism of *.sty files (bug 773).
* ui/QBibtexDialogBase.ui: Remove unused Update button (bug 773).
+ Replace addBib LineEdit with ComboBox.
+ * QBibtex.C: Insert available .bib-files into addBibCB.
+
2003-02-13 John Levon <levon@movementarian.org>
* ui/QSpellcheckerDialogBase.ui: A&dd not &Add, bug 884
if (!bib.empty())
dialog_->databaseLB->insertItem(toqstr(bib));
}
+
+ dialog_->addBibCB->clear();
+
+ vector<string> const bib_str = getVectorFromString(
+ controller().getBibFiles(), "\n");
+ for (vector<string>::const_iterator it = bib_str.begin();
+ it != bib_str.end(); ++it) {
+ string bibItem(ChangeExtension(*it, ""));
+ dialog_->addBibCB->insertItem(toqstr(bibItem));
+ }
+ dialog_->addBibCB->clearEdit();
+
string bibtotoc = "bibtotoc";
string bibstyle(controller().params().getOptions());
if (!file.isNull()) {
string const filen = ChangeExtension(fromqstr(file), "");
bool present = false;
- int pres = 0;
+ unsigned int pres = 0;
for (unsigned int i = 0; i != styleCB->count(); i++) {
if (fromqstr(styleCB->text(i)) == filen) {
void QBibtexDialog::addPressed()
{
- QString const file = addBibED->text();
+ QString const file = addBibCB->currentText();
if (!file.isNull()) {
string const f = ChangeExtension(file.latin1(), "");
bool present = false;
<rect>
<x>0</x>
<y>0</y>
- <width>281</width>
+ <width>265</width>
<height>315</height>
</rect>
</property>
</property>
<property>
<name>toolTip</name>
- <string>Available BibTeX databases</string>
+ <string>Selected BibTeX databases</string>
</property>
</widget>
<widget row="1" column="1" >
<string>Add a BibTeX database file</string>
</property>
</widget>
- <widget row="1" column="0" >
- <class>QLineEdit</class>
- <property stdset="1">
- <name>name</name>
- <cstring>addBibED</cstring>
- </property>
- <property>
- <name>toolTip</name>
- <string>Add a BibTeX file manually</string>
- </property>
- </widget>
<widget row="2" column="1" >
<class>QPushButton</class>
<property stdset="1">
</size>
</property>
</spacer>
- <widget row="6" column="0" >
- <class>QComboBox</class>
- <property stdset="1">
- <name>name</name>
- <cstring>styleCB</cstring>
- </property>
- <property stdset="1">
- <name>editable</name>
- <bool>true</bool>
- </property>
- <property stdset="1">
- <name>autoCompletion</name>
- <bool>true</bool>
- </property>
- <property stdset="1">
- <name>duplicatesEnabled</name>
- <bool>false</bool>
- </property>
- </widget>
<widget row="5" column="0" >
<class>QLabel</class>
<property stdset="1">
<string>Choose a style file</string>
</property>
</widget>
- <widget row="9" column="0" rowspan="1" colspan="2" >
+ <widget row="8" column="0" rowspan="1" colspan="2" >
<class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
</widget>
</hbox>
</widget>
- <widget row="8" column="0" >
+ <widget row="7" column="0" >
<class>QCheckBox</class>
<property stdset="1">
<name>name</name>
<string>Add bibliography to the table of contents</string>
</property>
</widget>
+ <widget row="6" column="0" >
+ <class>QComboBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>styleCB</cstring>
+ </property>
+ <property stdset="1">
+ <name>editable</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>autoCompletion</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>duplicatesEnabled</name>
+ <bool>false</bool>
+ </property>
+ <property>
+ <name>toolTip</name>
+ <string>Chose a style file</string>
+ </property>
+ </widget>
+ <widget row="1" column="0" >
+ <class>QComboBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>addBibCB</cstring>
+ </property>
+ <property stdset="1">
+ <name>editable</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>autoCompletion</name>
+ <bool>true</bool>
+ </property>
+ <property stdset="1">
+ <name>duplicatesEnabled</name>
+ <bool>false</bool>
+ </property>
+ <property>
+ <name>toolTip</name>
+ <string>Select a database</string>
+ </property>
+ </widget>
</grid>
</widget>
<connections>