mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
add bibtopic support (bug 870).
That's it for now. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8560 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
aecf612d10
commit
7aadb167bf
@ -1,6 +1,27 @@
|
|||||||
LyX file-format changes
|
LyX file-format changes
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
|
|
||||||
|
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
|
* format incremented to 232.
|
||||||
|
|
||||||
|
* Support for bibtopic (sectioned bibliographies).
|
||||||
|
- bufferparam \use_bibtopic [1|0]
|
||||||
|
- the bibtex inset has a second argument for bibtopic's
|
||||||
|
btPrint{Cited|NotCited|All} command:
|
||||||
|
< 231:
|
||||||
|
\begin_inset LatexCommand \bibtex[<style>]{<database>}
|
||||||
|
now:
|
||||||
|
\begin_inset LatexCommand \bibtex[<style>][<btPrintX>]{<database>}
|
||||||
|
Forwards, there's nothing to be done. Backwards, \usepackage[dot]{bibtopic}
|
||||||
|
has to be inserted to the preamble. Instead of the bibtex inset, the LaTeX
|
||||||
|
\bibliographystyle{<style>}
|
||||||
|
\begin{btSect}{<database>}
|
||||||
|
\<btprintX>
|
||||||
|
\end{btSect}
|
||||||
|
has to be inserted.
|
||||||
|
|
||||||
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
* format incremented to 231.
|
* format incremented to 231.
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
|
* dco/LaTeXConfig.lyx.in: check for bibtopic.
|
||||||
|
|
||||||
2004-03-22 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
2004-03-22 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||||
|
|
||||||
* lyxrc.example: remove \ps_command
|
* lyxrc.example: remove \ps_command
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX 1.4.0cvs created this file. For more info see http://www.lyx.org/
|
#LyX 1.4.0cvs created this file. For more info see http://www.lyx.org/
|
||||||
\lyxformat 230
|
\lyxformat 232
|
||||||
\textclass article
|
\textclass article
|
||||||
\language english
|
\language english
|
||||||
\inputencoding default
|
\inputencoding default
|
||||||
@ -14,6 +14,7 @@
|
|||||||
\use_natbib 0
|
\use_natbib 0
|
||||||
\use_numerical_citations 0
|
\use_numerical_citations 0
|
||||||
\use_jurabib 0
|
\use_jurabib 0
|
||||||
|
\use_bibtopic 0
|
||||||
\paperorientation portrait
|
\paperorientation portrait
|
||||||
\secnumdepth 2
|
\secnumdepth 2
|
||||||
\tocdepth 3
|
\tocdepth 3
|
||||||
@ -2414,6 +2415,32 @@ index of algorithms
|
|||||||
|
|
||||||
\begin_layout Subsection
|
\begin_layout Subsection
|
||||||
|
|
||||||
|
bibtopic
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Description
|
||||||
|
|
||||||
|
Found: @chk_bibtopic@
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Description
|
||||||
|
|
||||||
|
CTAN:
|
||||||
|
\family typewriter
|
||||||
|
macros/latex/contrib/bibtopic/
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Description
|
||||||
|
|
||||||
|
Notes: The package
|
||||||
|
\family sans
|
||||||
|
bibtopic
|
||||||
|
\family default
|
||||||
|
is used to split BibTeX created bibliographies into sections.
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Subsection
|
||||||
|
|
||||||
fancyhdr
|
fancyhdr
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
@ -2513,15 +2540,13 @@ jura
|
|||||||
bib
|
bib
|
||||||
\family default
|
\family default
|
||||||
|
|
||||||
\color None
|
\color none
|
||||||
(
|
(
|
||||||
\begin_inset LatexCommand \url{http://www.jurabib.org}
|
\begin_inset LatexCommand \url{http://www.jurabib.org}
|
||||||
|
|
||||||
\end_inset
|
\end_inset
|
||||||
|
|
||||||
)
|
) can be used as an alternative to
|
||||||
\color default
|
|
||||||
can be used as an alternative to
|
|
||||||
\family sans
|
\family sans
|
||||||
natbib
|
natbib
|
||||||
\family default
|
\family default
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
|
* lyx2lyx: up the format to 232.
|
||||||
|
|
||||||
* lyx2lyx: up the format to 231.
|
* lyx2lyx: up the format to 231.
|
||||||
|
|
||||||
2004-03-26 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
2004-03-26 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||||
|
@ -41,7 +41,7 @@ opt.quiet = 0
|
|||||||
format = re.compile(r"(\d)[\.,]?(\d\d)")
|
format = re.compile(r"(\d)[\.,]?(\d\d)")
|
||||||
fileformat = re.compile(r"\\lyxformat\s*(\S*)")
|
fileformat = re.compile(r"\\lyxformat\s*(\S*)")
|
||||||
lst_ft = [210, 215, 216, 217, 218, 220, 221, 223, 224, 225, 226, 227, 228, 229,
|
lst_ft = [210, 215, 216, 217, 218, 220, 221, 223, 224, 225, 226, 227, 228, 229,
|
||||||
230, 231]
|
230, 231, 232]
|
||||||
|
|
||||||
def usage():
|
def usage():
|
||||||
print """Usage: lyx2lyx [options] [file]
|
print """Usage: lyx2lyx [options] [file]
|
||||||
|
29
lib/lyx2lyx/lyxconvert_231.py
Normal file
29
lib/lyx2lyx/lyxconvert_231.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# This file is part of lyx2lyx
|
||||||
|
# -*- coding: iso-8859-1 -*-
|
||||||
|
# Copyright (C) 2003 José Matos <jamatos@fep.up.pt>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License
|
||||||
|
# as published by the Free Software Foundation; either version 2
|
||||||
|
# of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from parser_tools import find_token
|
||||||
|
|
||||||
|
|
||||||
|
def convert(header, body):
|
||||||
|
pass
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
pass
|
29
lib/lyx2lyx/lyxrevert_232.py
Normal file
29
lib/lyx2lyx/lyxrevert_232.py
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# This file is part of lyx2lyx
|
||||||
|
# -*- coding: iso-8859-1 -*-
|
||||||
|
# Copyright (C) 2003 José Matos <jamatos@fep.up.pt>
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU General Public License
|
||||||
|
# as published by the Free Software Foundation; either version 2
|
||||||
|
# of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from parser_tools import find_token
|
||||||
|
|
||||||
|
|
||||||
|
def convert(header, body):
|
||||||
|
pass
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
pass
|
@ -1,5 +1,9 @@
|
|||||||
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
|
* buffer.C: increment file format to 232.
|
||||||
|
* LaTeXFeatures.C: add bibtopic package.
|
||||||
|
* bufferparams.[Ch]: param \use_bibtopic.
|
||||||
|
|
||||||
* lyxrc.[Ch]: add lyxrc bibtex_command
|
* lyxrc.[Ch]: add lyxrc bibtex_command
|
||||||
* LaTeX.C: use rc.bibtex_command instead of hardcoded string.
|
* LaTeX.C: use rc.bibtex_command instead of hardcoded string.
|
||||||
|
|
||||||
|
@ -306,6 +306,12 @@ string const LaTeXFeatures::getPackages() const
|
|||||||
}
|
}
|
||||||
packages << "]{natbib}\n";
|
packages << "]{natbib}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// bibtopic -- the dot provides the aux file naming which
|
||||||
|
// LyX can detect.
|
||||||
|
if (isRequired("bibtopic")) {
|
||||||
|
packages << "\\usepackage[dot]{bibtopic}\n";
|
||||||
|
}
|
||||||
|
|
||||||
return packages.str();
|
return packages.str();
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ extern BufferList bufferlist;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
const int LYX_FORMAT = 231;
|
const int LYX_FORMAT = 232;
|
||||||
|
|
||||||
} // namespace anon
|
} // namespace anon
|
||||||
|
|
||||||
|
@ -116,6 +116,7 @@ BufferParams::BufferParams()
|
|||||||
use_natbib = false;
|
use_natbib = false;
|
||||||
use_numerical_citations = false;
|
use_numerical_citations = false;
|
||||||
use_jurabib = false;
|
use_jurabib = false;
|
||||||
|
use_bibtopic = false;
|
||||||
tracking_changes = false;
|
tracking_changes = false;
|
||||||
secnumdepth = 3;
|
secnumdepth = 3;
|
||||||
tocdepth = 3;
|
tocdepth = 3;
|
||||||
@ -325,6 +326,9 @@ string const BufferParams::readToken(LyXLex & lex, string const & token)
|
|||||||
} else if (token == "\\use_jurabib") {
|
} else if (token == "\\use_jurabib") {
|
||||||
lex.nextToken();
|
lex.nextToken();
|
||||||
use_jurabib = lex.getInteger();
|
use_jurabib = lex.getInteger();
|
||||||
|
} else if (token == "\\use_bibtopic") {
|
||||||
|
lex.nextToken();
|
||||||
|
use_bibtopic = lex.getInteger();
|
||||||
} else if (token == "\\tracking_changes") {
|
} else if (token == "\\tracking_changes") {
|
||||||
lex.nextToken();
|
lex.nextToken();
|
||||||
tracking_changes = lex.getInteger();
|
tracking_changes = lex.getInteger();
|
||||||
@ -543,6 +547,7 @@ void BufferParams::writeFile(ostream & os) const
|
|||||||
<< "\n\\use_natbib " << use_natbib
|
<< "\n\\use_natbib " << use_natbib
|
||||||
<< "\n\\use_numerical_citations " << use_numerical_citations
|
<< "\n\\use_numerical_citations " << use_numerical_citations
|
||||||
<< "\n\\use_jurabib " << use_jurabib
|
<< "\n\\use_jurabib " << use_jurabib
|
||||||
|
<< "\n\\use_bibtopic " << use_bibtopic
|
||||||
<< "\n\\paperorientation " << string_orientation[orientation]
|
<< "\n\\paperorientation " << string_orientation[orientation]
|
||||||
<< '\n';
|
<< '\n';
|
||||||
|
|
||||||
|
@ -184,6 +184,8 @@ public:
|
|||||||
bool use_numerical_citations;
|
bool use_numerical_citations;
|
||||||
///
|
///
|
||||||
bool use_jurabib;
|
bool use_jurabib;
|
||||||
|
///
|
||||||
|
bool use_bibtopic;
|
||||||
/// revision tracking for this buffer ?
|
/// revision tracking for this buffer ?
|
||||||
bool tracking_changes;
|
bool tracking_changes;
|
||||||
/// Time ago we agreed that this was a buffer property [ale990407]
|
/// Time ago we agreed that this was a buffer property [ale990407]
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
|
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
|
* ControlBibtex.[Ch]: add member usingBibtopic().
|
||||||
|
|
||||||
2004-03-28 Alfredo Braunstein <abraunst@lyx.org>
|
2004-03-28 Alfredo Braunstein <abraunst@lyx.org>
|
||||||
|
|
||||||
* ControlDocument.C:
|
* ControlDocument.C:
|
||||||
|
@ -14,6 +14,9 @@
|
|||||||
|
|
||||||
#include "ControlBibtex.h"
|
#include "ControlBibtex.h"
|
||||||
|
|
||||||
|
#include "buffer.h"
|
||||||
|
#include "bufferparams.h"
|
||||||
|
|
||||||
#include "lyxrc.h"
|
#include "lyxrc.h"
|
||||||
#include "helper_funcs.h"
|
#include "helper_funcs.h"
|
||||||
#include "tex_helpers.h"
|
#include "tex_helpers.h"
|
||||||
@ -86,3 +89,9 @@ void ControlBibtex::rescanBibStyles() const
|
|||||||
{
|
{
|
||||||
rescanTexStyles();
|
rescanTexStyles();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool ControlBibtex::usingBibtopic() const
|
||||||
|
{
|
||||||
|
return kernel().buffer().params().use_bibtopic;
|
||||||
|
}
|
||||||
|
@ -45,6 +45,8 @@ public:
|
|||||||
/// build filelists of all availabe bib/bst/cls/sty-files. done through
|
/// build filelists of all availabe bib/bst/cls/sty-files. done through
|
||||||
/// kpsewhich and an external script, saved in *Files.lst
|
/// kpsewhich and an external script, saved in *Files.lst
|
||||||
void rescanBibStyles() const;
|
void rescanBibStyles() const;
|
||||||
|
/// do we use bibtopic (for sectioned bibliography)?
|
||||||
|
bool usingBibtopic() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
|
* QBibtex.C:
|
||||||
|
* QDocument.C:
|
||||||
|
* QDocumentDialog.C:
|
||||||
|
* ui/BiblioModuleBase.ui: bibtopic support.
|
||||||
|
|
||||||
* QPrefs.C:
|
* QPrefs.C:
|
||||||
* QPrefsDialog.C:
|
* QPrefsDialog.C:
|
||||||
* ui/QPrefsLaTeXModule.ui: customize bibtex call.
|
* ui/QPrefsLaTeXModule.ui: customize bibtex call.
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
*
|
*
|
||||||
* \author John Levon
|
* \author John Levon
|
||||||
* \author Herbert Voß
|
* \author Herbert Voß
|
||||||
|
* \author Jürgen Spitzmüller
|
||||||
*
|
*
|
||||||
* Full author contact details are available in file CREDITS.
|
* Full author contact details are available in file CREDITS.
|
||||||
*/
|
*/
|
||||||
@ -64,6 +65,8 @@ void QBibtex::build_dialog()
|
|||||||
|
|
||||||
void QBibtex::update_contents()
|
void QBibtex::update_contents()
|
||||||
{
|
{
|
||||||
|
bool bibtopic = controller().usingBibtopic();
|
||||||
|
|
||||||
dialog_->databaseLB->clear();
|
dialog_->databaseLB->clear();
|
||||||
|
|
||||||
string bibs(controller().params().getContents());
|
string bibs(controller().params().getContents());
|
||||||
@ -90,18 +93,31 @@ void QBibtex::update_contents()
|
|||||||
string bibstyle(controller().params().getOptions());
|
string bibstyle(controller().params().getOptions());
|
||||||
|
|
||||||
// bibtotoc exists?
|
// bibtotoc exists?
|
||||||
if (prefixIs(bibstyle, bibtotoc)) {
|
if (prefixIs(bibstyle, bibtotoc)){
|
||||||
dialog_->bibtocCB->setChecked(true);
|
|
||||||
|
|
||||||
// bibstyle exists?
|
// bibstyle exists?
|
||||||
if (contains(bibstyle,','))
|
if (contains(bibstyle,','))
|
||||||
bibstyle = split(bibstyle, bibtotoc, ',');
|
bibstyle = split(bibstyle, bibtotoc, ',');
|
||||||
else
|
else
|
||||||
bibstyle.erase();
|
bibstyle.erase();
|
||||||
} else
|
}
|
||||||
|
|
||||||
|
if (prefixIs(bibstyle, bibtotoc) && !bibtopic)
|
||||||
|
dialog_->bibtocCB->setChecked(true);
|
||||||
|
else
|
||||||
dialog_->bibtocCB->setChecked(false);
|
dialog_->bibtocCB->setChecked(false);
|
||||||
|
|
||||||
|
dialog_->bibtocCB->setEnabled(!bibtopic);
|
||||||
|
|
||||||
|
string btprint(controller().params().getSecOptions());
|
||||||
|
int btp = 0;
|
||||||
|
if (btprint == "btPrintNotCited")
|
||||||
|
btp = 1;
|
||||||
|
else if (btprint == "btPrintAll")
|
||||||
|
btp = 2;
|
||||||
|
|
||||||
|
dialog_->btPrintCO->setCurrentItem(btp);
|
||||||
|
dialog_->btPrintCO->setEnabled(bibtopic);
|
||||||
|
|
||||||
dialog_->styleCB->clear();
|
dialog_->styleCB->clear();
|
||||||
|
|
||||||
int item_nr(-1);
|
int item_nr(-1);
|
||||||
@ -152,6 +168,27 @@ void QBibtex::apply()
|
|||||||
// command!
|
// command!
|
||||||
controller().params().setOptions(bibstyle);
|
controller().params().setOptions(bibstyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// bibtopic allows three kinds of sections:
|
||||||
|
// 1. sections that include all cited references of the database(s)
|
||||||
|
// 2. sections that include all uncited references of the database(s)
|
||||||
|
// 3. sections that include all references of the database(s), cited or not
|
||||||
|
int btp = dialog_->btPrintCO->currentItem();
|
||||||
|
|
||||||
|
switch (btp) {
|
||||||
|
case 0:
|
||||||
|
controller().params().setSecOptions("btPrintCited");
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
controller().params().setSecOptions("btPrintNotCited");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
controller().params().setSecOptions("btPrintAll");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!controller().usingBibtopic())
|
||||||
|
controller().params().setSecOptions("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -194,6 +194,8 @@ void QDocument::apply()
|
|||||||
dialog_->biblioModule->citeStyleCO->currentItem();
|
dialog_->biblioModule->citeStyleCO->currentItem();
|
||||||
params.use_jurabib =
|
params.use_jurabib =
|
||||||
dialog_->biblioModule->citeJurabibRB->isChecked();
|
dialog_->biblioModule->citeJurabibRB->isChecked();
|
||||||
|
params.use_bibtopic =
|
||||||
|
dialog_->biblioModule->bibtopicCB->isChecked();
|
||||||
|
|
||||||
// language & quotes
|
// language & quotes
|
||||||
if (dialog_->langModule->defaultencodingCB->isChecked()) {
|
if (dialog_->langModule->defaultencodingCB->isChecked()) {
|
||||||
@ -440,7 +442,7 @@ void QDocument::update_contents()
|
|||||||
dialog_->preambleModule->preambleMLE->setText(preamble);
|
dialog_->preambleModule->preambleMLE->setText(preamble);
|
||||||
|
|
||||||
// biblio
|
// biblio
|
||||||
dialog_->biblioModule->citeNatbibRB->setChecked(
|
dialog_->biblioModule->citeDefaultRB->setChecked(
|
||||||
!params.use_natbib && !params.use_jurabib);
|
!params.use_natbib && !params.use_jurabib);
|
||||||
dialog_->biblioModule->citeNatbibRB->setChecked(
|
dialog_->biblioModule->citeNatbibRB->setChecked(
|
||||||
params.use_natbib);
|
params.use_natbib);
|
||||||
@ -448,6 +450,8 @@ void QDocument::update_contents()
|
|||||||
params.use_numerical_citations ? 1 : 0);
|
params.use_numerical_citations ? 1 : 0);
|
||||||
dialog_->biblioModule->citeJurabibRB->setChecked(
|
dialog_->biblioModule->citeJurabibRB->setChecked(
|
||||||
params.use_jurabib);
|
params.use_jurabib);
|
||||||
|
dialog_->biblioModule->bibtopicCB->setChecked(
|
||||||
|
params.use_bibtopic);
|
||||||
|
|
||||||
// language & quotes
|
// language & quotes
|
||||||
int const pos = int(findPos(lang_,
|
int const pos = int(findPos(lang_,
|
||||||
|
@ -89,6 +89,7 @@ QDocumentDialog::QDocumentDialog(QDocument * form)
|
|||||||
connect(biblioModule->citeNatbibRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
|
connect(biblioModule->citeNatbibRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
|
||||||
connect(biblioModule->citeStyleCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
|
connect(biblioModule->citeStyleCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
|
||||||
connect(biblioModule->citeJurabibRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
|
connect(biblioModule->citeJurabibRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
|
||||||
|
connect(biblioModule->bibtopicCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
|
||||||
// language & quote
|
// language & quote
|
||||||
connect(langModule->languageCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
|
connect(langModule->languageCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
|
||||||
connect(langModule->defaultencodingCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
|
connect(langModule->defaultencodingCB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor()));
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>426</width>
|
<width>418</width>
|
||||||
<height>376</height>
|
<height>376</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -150,7 +150,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</grid>
|
</grid>
|
||||||
</widget>
|
</widget>
|
||||||
<spacer row="1" column="0" >
|
<spacer row="2" column="0" >
|
||||||
<property>
|
<property>
|
||||||
<name>name</name>
|
<name>name</name>
|
||||||
<cstring>Spacer2</cstring>
|
<cstring>Spacer2</cstring>
|
||||||
@ -171,6 +171,21 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
|
<widget row="1" column="0" >
|
||||||
|
<class>QCheckBox</class>
|
||||||
|
<property stdset="1">
|
||||||
|
<name>name</name>
|
||||||
|
<cstring>bibtopicCB</cstring>
|
||||||
|
</property>
|
||||||
|
<property stdset="1">
|
||||||
|
<name>text</name>
|
||||||
|
<string>S&ectioned bibliography</string>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>toolTip</name>
|
||||||
|
<string>Select this if you want to split your bibliography into sections</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</grid>
|
</grid>
|
||||||
</widget>
|
</widget>
|
||||||
<connections>
|
<connections>
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>306</width>
|
<width>298</width>
|
||||||
<height>279</height>
|
<height>313</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property stdset="1">
|
<property stdset="1">
|
||||||
@ -34,7 +34,7 @@
|
|||||||
<name>spacing</name>
|
<name>spacing</name>
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<widget row="4" column="0" >
|
<widget row="4" column="0" rowspan="1" colspan="2" >
|
||||||
<class>QLabel</class>
|
<class>QLabel</class>
|
||||||
<property stdset="1">
|
<property stdset="1">
|
||||||
<name>name</name>
|
<name>name</name>
|
||||||
@ -60,7 +60,7 @@
|
|||||||
<string>The BibTeX style</string>
|
<string>The BibTeX style</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget row="7" column="0" rowspan="1" colspan="2" >
|
<widget row="8" column="0" rowspan="1" colspan="3" >
|
||||||
<class>QLayoutWidget</class>
|
<class>QLayoutWidget</class>
|
||||||
<property stdset="1">
|
<property stdset="1">
|
||||||
<name>name</name>
|
<name>name</name>
|
||||||
@ -132,7 +132,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</hbox>
|
</hbox>
|
||||||
</widget>
|
</widget>
|
||||||
<widget row="0" column="0" rowspan="1" colspan="2" >
|
<widget row="0" column="0" rowspan="1" colspan="3" >
|
||||||
<class>QLabel</class>
|
<class>QLabel</class>
|
||||||
<property stdset="1">
|
<property stdset="1">
|
||||||
<name>name</name>
|
<name>name</name>
|
||||||
@ -165,7 +165,7 @@
|
|||||||
<name>vAlign</name>
|
<name>vAlign</name>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget row="1" column="0" rowspan="3" colspan="1" >
|
<widget row="1" column="0" rowspan="3" colspan="2" >
|
||||||
<class>QListBox</class>
|
<class>QListBox</class>
|
||||||
<property stdset="1">
|
<property stdset="1">
|
||||||
<name>name</name>
|
<name>name</name>
|
||||||
@ -180,7 +180,7 @@
|
|||||||
<string>Selected BibTeX databases</string>
|
<string>Selected BibTeX databases</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget row="1" column="1" >
|
<widget row="1" column="2" >
|
||||||
<class>QPushButton</class>
|
<class>QPushButton</class>
|
||||||
<property stdset="1">
|
<property stdset="1">
|
||||||
<name>name</name>
|
<name>name</name>
|
||||||
@ -195,7 +195,7 @@
|
|||||||
<string>Add a BibTeX database file</string>
|
<string>Add a BibTeX database file</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget row="2" column="1" >
|
<widget row="2" column="2" >
|
||||||
<class>QPushButton</class>
|
<class>QPushButton</class>
|
||||||
<property stdset="1">
|
<property stdset="1">
|
||||||
<name>name</name>
|
<name>name</name>
|
||||||
@ -210,7 +210,7 @@
|
|||||||
<string>Remove the selected database</string>
|
<string>Remove the selected database</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<spacer row="3" column="1" >
|
<spacer row="3" column="2" rowspan="2" colspan="1" >
|
||||||
<property>
|
<property>
|
||||||
<name>name</name>
|
<name>name</name>
|
||||||
<cstring>Spacer5</cstring>
|
<cstring>Spacer5</cstring>
|
||||||
@ -231,7 +231,7 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
<widget row="5" column="0" >
|
<widget row="5" column="0" rowspan="1" colspan="2" >
|
||||||
<class>QComboBox</class>
|
<class>QComboBox</class>
|
||||||
<property stdset="1">
|
<property stdset="1">
|
||||||
<name>name</name>
|
<name>name</name>
|
||||||
@ -254,7 +254,7 @@
|
|||||||
<string>Chose a style file</string>
|
<string>Chose a style file</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget row="5" column="1" >
|
<widget row="5" column="2" >
|
||||||
<class>QPushButton</class>
|
<class>QPushButton</class>
|
||||||
<property stdset="1">
|
<property stdset="1">
|
||||||
<name>name</name>
|
<name>name</name>
|
||||||
@ -273,22 +273,7 @@
|
|||||||
<string>Choose a style file</string>
|
<string>Choose a style file</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget row="6" column="0" >
|
<spacer row="6" column="2" rowspan="2" colspan="1" >
|
||||||
<class>QCheckBox</class>
|
|
||||||
<property stdset="1">
|
|
||||||
<name>name</name>
|
|
||||||
<cstring>bibtocCB</cstring>
|
|
||||||
</property>
|
|
||||||
<property stdset="1">
|
|
||||||
<name>text</name>
|
|
||||||
<string>Add bibliography to &TOC</string>
|
|
||||||
</property>
|
|
||||||
<property>
|
|
||||||
<name>toolTip</name>
|
|
||||||
<string>Add bibliography to the table of contents</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<spacer row="6" column="1" >
|
|
||||||
<property>
|
<property>
|
||||||
<name>name</name>
|
<name>name</name>
|
||||||
<cstring>Spacer6</cstring>
|
<cstring>Spacer6</cstring>
|
||||||
@ -309,6 +294,76 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
|
<widget row="6" column="1" >
|
||||||
|
<class>QComboBox</class>
|
||||||
|
<item>
|
||||||
|
<property>
|
||||||
|
<name>text</name>
|
||||||
|
<string>all cited references</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property>
|
||||||
|
<name>text</name>
|
||||||
|
<string>all uncited references</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<property>
|
||||||
|
<name>text</name>
|
||||||
|
<string>all references</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
|
<property stdset="1">
|
||||||
|
<name>name</name>
|
||||||
|
<cstring>btPrintCO</cstring>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>toolTip</name>
|
||||||
|
<string>This bibliography section contains...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget row="6" column="0" >
|
||||||
|
<class>QLabel</class>
|
||||||
|
<property stdset="1">
|
||||||
|
<name>name</name>
|
||||||
|
<cstring>btPrintLA</cstring>
|
||||||
|
</property>
|
||||||
|
<property stdset="1">
|
||||||
|
<name>sizePolicy</name>
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>1</hsizetype>
|
||||||
|
<vsizetype>0</vsizetype>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property stdset="1">
|
||||||
|
<name>text</name>
|
||||||
|
<string>C&ontent:</string>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>buddy</name>
|
||||||
|
<cstring>styleCB</cstring>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>toolTip</name>
|
||||||
|
<string>This bibliography section contains...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget row="7" column="0" rowspan="1" colspan="2" >
|
||||||
|
<class>QCheckBox</class>
|
||||||
|
<property stdset="1">
|
||||||
|
<name>name</name>
|
||||||
|
<cstring>bibtocCB</cstring>
|
||||||
|
</property>
|
||||||
|
<property stdset="1">
|
||||||
|
<name>text</name>
|
||||||
|
<string>Add bibliography to &TOC</string>
|
||||||
|
</property>
|
||||||
|
<property>
|
||||||
|
<name>toolTip</name>
|
||||||
|
<string>Add bibliography to the table of contents</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</grid>
|
</grid>
|
||||||
</widget>
|
</widget>
|
||||||
<connections>
|
<connections>
|
||||||
@ -342,6 +397,12 @@
|
|||||||
<receiver>QBibtexDialogBase</receiver>
|
<receiver>QBibtexDialogBase</receiver>
|
||||||
<slot>change_adaptor()</slot>
|
<slot>change_adaptor()</slot>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>btPrintCO</sender>
|
||||||
|
<signal>activated(int)</signal>
|
||||||
|
<receiver>QBibtexDialogBase</receiver>
|
||||||
|
<slot>change_adaptor()</slot>
|
||||||
|
</connection>
|
||||||
<connection>
|
<connection>
|
||||||
<sender>addBibPB</sender>
|
<sender>addBibPB</sender>
|
||||||
<signal>clicked()</signal>
|
<signal>clicked()</signal>
|
||||||
@ -361,6 +422,7 @@
|
|||||||
<tabstop>styleCB</tabstop>
|
<tabstop>styleCB</tabstop>
|
||||||
<tabstop>stylePB</tabstop>
|
<tabstop>stylePB</tabstop>
|
||||||
<tabstop>bibtocCB</tabstop>
|
<tabstop>bibtocCB</tabstop>
|
||||||
|
<tabstop>btPrintCO</tabstop>
|
||||||
<tabstop>okPB</tabstop>
|
<tabstop>okPB</tabstop>
|
||||||
<tabstop>closePB</tabstop>
|
<tabstop>closePB</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
|
@ -1,5 +1,10 @@
|
|||||||
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
|
* FormBibtex.C:
|
||||||
|
* FormDocument.[Ch]:
|
||||||
|
* forms/form_bibtex.fd: bibtopic support.
|
||||||
|
* forms/form_document.fd: radio default/natbib/jurabib.
|
||||||
|
|
||||||
* FormPreferences.C:
|
* FormPreferences.C:
|
||||||
* forms/form_preferences.fd: customize bibtex call.
|
* forms/form_preferences.fd: customize bibtex call.
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ void FormBibtex::build()
|
|||||||
bcview().addReadOnly(dialog_->button_rescan);
|
bcview().addReadOnly(dialog_->button_rescan);
|
||||||
bcview().addReadOnly(dialog_->input_style);
|
bcview().addReadOnly(dialog_->input_style);
|
||||||
bcview().addReadOnly(dialog_->check_bibtotoc);
|
bcview().addReadOnly(dialog_->check_bibtotoc);
|
||||||
|
bcview().addReadOnly(dialog_->choice_btprint);
|
||||||
|
|
||||||
// trigger an input event for cut&paste with middle mouse button.
|
// trigger an input event for cut&paste with middle mouse button.
|
||||||
setPrehandler(dialog_->input_database);
|
setPrehandler(dialog_->input_database);
|
||||||
@ -77,6 +78,11 @@ void FormBibtex::build()
|
|||||||
// callback for double click in browser
|
// callback for double click in browser
|
||||||
fl_set_browser_dblclick_callback(dialog_->browser_styles,
|
fl_set_browser_dblclick_callback(dialog_->browser_styles,
|
||||||
C_FormDialogView_InputCB, 2);
|
C_FormDialogView_InputCB, 2);
|
||||||
|
|
||||||
|
fl_addto_choice(dialog_->choice_btprint,
|
||||||
|
_(" all cited references "
|
||||||
|
"| all uncited references "
|
||||||
|
"| all references ").c_str());
|
||||||
|
|
||||||
// set up the tooltips
|
// set up the tooltips
|
||||||
string str = _("The database you want to cite from. Insert it "
|
string str = _("The database you want to cite from. Insert it "
|
||||||
@ -107,6 +113,9 @@ void FormBibtex::build()
|
|||||||
"the styles which are in directories where TeX finds them "
|
"the styles which are in directories where TeX finds them "
|
||||||
"are listed!");
|
"are listed!");
|
||||||
tooltips().init(dialog_->button_rescan, str);
|
tooltips().init(dialog_->button_rescan, str);
|
||||||
|
|
||||||
|
str = _("The bibliography section contains...");
|
||||||
|
tooltips().init(dialog_->choice_btprint, str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -177,8 +186,10 @@ void FormBibtex::update()
|
|||||||
string bibtotoc = "bibtotoc";
|
string bibtotoc = "bibtotoc";
|
||||||
string bibstyle = controller().params().getOptions();
|
string bibstyle = controller().params().getOptions();
|
||||||
|
|
||||||
|
bool const bibtopic = controller().usingBibtopic();
|
||||||
bool const bibtotoc_exists = prefixIs(bibstyle, bibtotoc);
|
bool const bibtotoc_exists = prefixIs(bibstyle, bibtotoc);
|
||||||
fl_set_button(dialog_->check_bibtotoc, bibtotoc_exists);
|
fl_set_button(dialog_->check_bibtotoc, bibtotoc_exists && !bibtopic);
|
||||||
|
setEnabled(dialog_->check_bibtotoc, !bibtopic);
|
||||||
if (bibtotoc_exists) {
|
if (bibtotoc_exists) {
|
||||||
if (contains(bibstyle, ',')) { // bibstyle exists?
|
if (contains(bibstyle, ',')) { // bibstyle exists?
|
||||||
bibstyle = split(bibstyle, bibtotoc, ',');
|
bibstyle = split(bibstyle, bibtotoc, ',');
|
||||||
@ -187,6 +198,16 @@ void FormBibtex::update()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
fl_set_input(dialog_->input_style, bibstyle.c_str());
|
fl_set_input(dialog_->input_style, bibstyle.c_str());
|
||||||
|
|
||||||
|
string btprint = controller().params().getSecOptions();
|
||||||
|
int btp = 1;
|
||||||
|
if (btprint == "btPrintNotCited")
|
||||||
|
btp = 2;
|
||||||
|
else if (btprint == "btPrintAll")
|
||||||
|
btp = 3;
|
||||||
|
|
||||||
|
fl_set_choice(dialog_->choice_btprint, btp);
|
||||||
|
setEnabled(dialog_->choice_btprint, bibtopic);
|
||||||
|
|
||||||
vector<string> styles;
|
vector<string> styles;
|
||||||
controller().getBibStyles(styles);
|
controller().getBibStyles(styles);
|
||||||
@ -219,6 +240,7 @@ void FormBibtex::apply()
|
|||||||
// no database -> no bibtex-command and no options!
|
// no database -> no bibtex-command and no options!
|
||||||
controller().params().setContents("");
|
controller().params().setContents("");
|
||||||
controller().params().setOptions("");
|
controller().params().setOptions("");
|
||||||
|
controller().params().setSecOptions("");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,7 +260,30 @@ void FormBibtex::apply()
|
|||||||
controller().params().setOptions(bibtotoc + ',' + bibstyle);
|
controller().params().setOptions(bibtotoc + ',' + bibstyle);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// At least one of addtotoc and bibstyle is empty. No harm to output both!
|
// At least one of addtotoc and bibstyle is empty.
|
||||||
|
// No harm to output both!
|
||||||
controller().params().setOptions(bibtotoc + bibstyle);
|
controller().params().setOptions(bibtotoc + bibstyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// bibtopic allows three kinds of sections:
|
||||||
|
// 1. sections that include all cited references of the database(s)
|
||||||
|
// 2. sec. that include all uncited references of the database(s)
|
||||||
|
// 3. sec. that include all references of the database(s), cited or not
|
||||||
|
if (controller().usingBibtopic()){
|
||||||
|
int btp = fl_get_choice(dialog_->choice_btprint);
|
||||||
|
switch (btp) {
|
||||||
|
case 1:
|
||||||
|
controller().params().setSecOptions("btPrintCited");
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
controller().params().setSecOptions("btPrintNotCited");
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
controller().params().setSecOptions("btPrintAll");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
else
|
||||||
|
controller().params().setSecOptions("");
|
||||||
}
|
}
|
||||||
|
@ -70,6 +70,11 @@ bool const scalableTabfolders = false;
|
|||||||
bool const scalableTabfolders = true;
|
bool const scalableTabfolders = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
enum {
|
||||||
|
DEFCITE,
|
||||||
|
NATBIB,
|
||||||
|
JURABIB
|
||||||
|
};
|
||||||
|
|
||||||
} // namespace anon
|
} // namespace anon
|
||||||
|
|
||||||
@ -298,17 +303,28 @@ void FormDocument::build()
|
|||||||
bcview().addReadOnly(options_->counter_secnumdepth);
|
bcview().addReadOnly(options_->counter_secnumdepth);
|
||||||
bcview().addReadOnly(options_->counter_tocdepth);
|
bcview().addReadOnly(options_->counter_tocdepth);
|
||||||
bcview().addReadOnly(options_->choice_ams_math);
|
bcview().addReadOnly(options_->choice_ams_math);
|
||||||
bcview().addReadOnly(options_->check_use_natbib);
|
bcview().addReadOnly(options_->radio_use_defcite);
|
||||||
bcview().addReadOnly(options_->check_use_jurabib);
|
bcview().addReadOnly(options_->radio_use_jurabib);
|
||||||
|
bcview().addReadOnly(options_->radio_use_natbib);
|
||||||
|
bcview().addReadOnly(options_->check_bibtopic);
|
||||||
bcview().addReadOnly(options_->choice_citation_format);
|
bcview().addReadOnly(options_->choice_citation_format);
|
||||||
bcview().addReadOnly(options_->input_float_placement);
|
bcview().addReadOnly(options_->input_float_placement);
|
||||||
bcview().addReadOnly(options_->choice_postscript_driver);
|
bcview().addReadOnly(options_->choice_postscript_driver);
|
||||||
|
|
||||||
|
// add cite style radio buttons
|
||||||
|
citestyle_.init(options_->radio_use_defcite, DEFCITE);
|
||||||
|
citestyle_.init(options_->radio_use_natbib, NATBIB);
|
||||||
|
citestyle_.init(options_->radio_use_jurabib, JURABIB);
|
||||||
|
|
||||||
// set up the tooltips for optionss form
|
// set up the tooltips for optionss form
|
||||||
string str = _("Use the natbib styles for natural sciences and arts");
|
string str = _("Use LaTeX's default citation style");
|
||||||
tooltips().init(options_->check_use_natbib, str);
|
tooltips().init(options_->radio_use_defcite, str);
|
||||||
|
str = _("Use the natbib styles for natural sciences and arts");
|
||||||
|
tooltips().init(options_->radio_use_natbib, str);
|
||||||
str = _("Use the jurabib styles for law and humanities");
|
str = _("Use the jurabib styles for law and humanities");
|
||||||
tooltips().init(options_->check_use_jurabib, str);
|
tooltips().init(options_->radio_use_jurabib, str);
|
||||||
|
str = _("Select this if you want to split your bibliography into sections");
|
||||||
|
tooltips().init(options_->check_bibtopic, str);
|
||||||
|
|
||||||
// trigger an input event for cut&paste with middle mouse button.
|
// trigger an input event for cut&paste with middle mouse button.
|
||||||
setPrehandler(options_->input_float_placement);
|
setPrehandler(options_->input_float_placement);
|
||||||
@ -514,17 +530,11 @@ ButtonPolicy::SMInput FormDocument::input(FL_OBJECT * ob, long)
|
|||||||
fl_set_choice_text(class_->choice_skip_units,
|
fl_set_choice_text(class_->choice_skip_units,
|
||||||
default_unit.c_str());
|
default_unit.c_str());
|
||||||
|
|
||||||
} else if (ob == options_->check_use_natbib) {
|
} else if (ob == options_->radio_use_jurabib ||
|
||||||
|
ob == options_->radio_use_defcite ||
|
||||||
|
ob == options_->radio_use_natbib) {
|
||||||
setEnabled(options_->choice_citation_format,
|
setEnabled(options_->choice_citation_format,
|
||||||
fl_get_button(options_->check_use_natbib));
|
fl_get_button(options_->radio_use_natbib));
|
||||||
if (fl_get_button(options_->check_use_natbib))
|
|
||||||
fl_set_button(options_->check_use_jurabib, 0);
|
|
||||||
|
|
||||||
} else if (ob == options_->check_use_jurabib) {
|
|
||||||
if (fl_get_button(options_->check_use_jurabib))
|
|
||||||
fl_set_button(options_->check_use_natbib, 0);
|
|
||||||
setEnabled(options_->choice_citation_format,
|
|
||||||
fl_get_button(options_->check_use_natbib));
|
|
||||||
|
|
||||||
} else if (ob == branch_->browser_all_branches ||
|
} else if (ob == branch_->browser_all_branches ||
|
||||||
ob == branch_->browser_selection ||
|
ob == branch_->browser_selection ||
|
||||||
@ -1013,10 +1023,11 @@ bool FormDocument::options_apply(BufferParams & params)
|
|||||||
params.graphicsDriver = getString(options_->choice_postscript_driver);
|
params.graphicsDriver = getString(options_->choice_postscript_driver);
|
||||||
params.use_amsmath = static_cast<BufferParams::AMS>(
|
params.use_amsmath = static_cast<BufferParams::AMS>(
|
||||||
fl_get_choice(options_->choice_ams_math) - 1);
|
fl_get_choice(options_->choice_ams_math) - 1);
|
||||||
params.use_natbib = fl_get_button(options_->check_use_natbib);
|
params.use_natbib = fl_get_button(options_->radio_use_natbib);
|
||||||
params.use_numerical_citations =
|
params.use_numerical_citations =
|
||||||
fl_get_choice(options_->choice_citation_format) - 1;
|
fl_get_choice(options_->choice_citation_format) - 1;
|
||||||
params.use_jurabib = fl_get_button(options_->check_use_jurabib);
|
params.use_jurabib = fl_get_button(options_->radio_use_jurabib);
|
||||||
|
params.use_bibtopic = fl_get_button(options_->check_bibtopic);
|
||||||
|
|
||||||
int tmpchar = int(fl_get_counter_value(options_->counter_secnumdepth));
|
int tmpchar = int(fl_get_counter_value(options_->counter_secnumdepth));
|
||||||
if (params.secnumdepth != tmpchar)
|
if (params.secnumdepth != tmpchar)
|
||||||
@ -1182,11 +1193,12 @@ void FormDocument::options_update(BufferParams const & params)
|
|||||||
fl_set_choice_text(options_->choice_postscript_driver,
|
fl_set_choice_text(options_->choice_postscript_driver,
|
||||||
params.graphicsDriver.c_str());
|
params.graphicsDriver.c_str());
|
||||||
fl_set_choice(options_->choice_ams_math, params.use_amsmath + 1);
|
fl_set_choice(options_->choice_ams_math, params.use_amsmath + 1);
|
||||||
fl_set_button(options_->check_use_natbib, params.use_natbib);
|
fl_set_button(options_->radio_use_natbib, params.use_natbib);
|
||||||
fl_set_choice(options_->choice_citation_format,
|
fl_set_choice(options_->choice_citation_format,
|
||||||
int(params.use_numerical_citations)+1);
|
int(params.use_numerical_citations)+1);
|
||||||
setEnabled(options_->choice_citation_format, params.use_natbib);
|
setEnabled(options_->choice_citation_format, params.use_natbib);
|
||||||
fl_set_button(options_->check_use_jurabib, params.use_jurabib);
|
fl_set_button(options_->radio_use_jurabib, params.use_jurabib);
|
||||||
|
fl_set_button(options_->check_bibtopic, params.use_bibtopic);
|
||||||
fl_set_counter_value(options_->counter_secnumdepth, params.secnumdepth);
|
fl_set_counter_value(options_->counter_secnumdepth, params.secnumdepth);
|
||||||
fl_set_counter_value(options_->counter_tocdepth, params.tocdepth);
|
fl_set_counter_value(options_->counter_tocdepth, params.tocdepth);
|
||||||
if (!params.float_placement.empty())
|
if (!params.float_placement.empty())
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
#include "FormBase.h"
|
#include "FormBase.h"
|
||||||
#include "BranchList.h"
|
#include "BranchList.h"
|
||||||
|
#include "RadioButtonGroup.h"
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <boost/scoped_ptr.hpp>
|
||||||
|
|
||||||
@ -141,6 +142,9 @@ private:
|
|||||||
std::vector<std::string> lang_;
|
std::vector<std::string> lang_;
|
||||||
/// Contains all legal branches for this doc
|
/// Contains all legal branches for this doc
|
||||||
BranchList branchlist_;
|
BranchList branchlist_;
|
||||||
|
|
||||||
|
/// citation style buttons
|
||||||
|
RadioButtonGroup citestyle_;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,13 +10,13 @@ SnapGrid: 5
|
|||||||
=============== FORM ===============
|
=============== FORM ===============
|
||||||
Name: form_bibtex
|
Name: form_bibtex
|
||||||
Width: 395
|
Width: 395
|
||||||
Height: 235
|
Height: 255
|
||||||
Number of Objects: 12
|
Number of Objects: 13
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_BOX
|
class: FL_BOX
|
||||||
type: FLAT_BOX
|
type: FLAT_BOX
|
||||||
box: 0 0 395 235
|
box: 0 0 395 255
|
||||||
boxtype: FL_FLAT_BOX
|
boxtype: FL_FLAT_BOX
|
||||||
colors: FL_COL1 FL_COL1
|
colors: FL_COL1 FL_COL1
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
@ -70,7 +70,7 @@ argument: 0
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
type: RETURN_BUTTON
|
type: RETURN_BUTTON
|
||||||
box: 110 205 90 25
|
box: 110 225 90 25
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_COL1 FL_COL1
|
colors: FL_COL1 FL_COL1
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
@ -88,7 +88,7 @@ argument: 0
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
type: NORMAL_BUTTON
|
type: NORMAL_BUTTON
|
||||||
box: 300 205 90 25
|
box: 300 225 90 25
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_COL1 FL_COL1
|
colors: FL_COL1 FL_COL1
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
@ -142,7 +142,7 @@ argument: 0
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_CHECKBUTTON
|
class: FL_CHECKBUTTON
|
||||||
type: PUSH_BUTTON
|
type: PUSH_BUTTON
|
||||||
box: 5 165 180 25
|
box: 5 190 180 25
|
||||||
boxtype: FL_NO_BOX
|
boxtype: FL_NO_BOX
|
||||||
colors: FL_COL1 FL_YELLOW
|
colors: FL_COL1 FL_YELLOW
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
@ -160,7 +160,7 @@ argument: 0
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_BROWSER
|
class: FL_BROWSER
|
||||||
type: HOLD_BROWSER
|
type: HOLD_BROWSER
|
||||||
box: 245 50 145 145
|
box: 245 50 145 165
|
||||||
boxtype: FL_DOWN_BOX
|
boxtype: FL_DOWN_BOX
|
||||||
colors: FL_COL1 FL_YELLOW
|
colors: FL_COL1 FL_YELLOW
|
||||||
alignment: FL_ALIGN_TOP_LEFT
|
alignment: FL_ALIGN_TOP_LEFT
|
||||||
@ -196,7 +196,7 @@ argument: 0
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
type: NORMAL_BUTTON
|
type: NORMAL_BUTTON
|
||||||
box: 205 205 90 25
|
box: 205 225 90 25
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_COL1 FL_COL1
|
colors: FL_COL1 FL_COL1
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
@ -214,7 +214,7 @@ argument: 0
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_BUTTON
|
class: FL_BUTTON
|
||||||
type: NORMAL_BUTTON
|
type: NORMAL_BUTTON
|
||||||
box: 5 205 90 25
|
box: 5 225 90 25
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_COL1 FL_COL1
|
colors: FL_COL1 FL_COL1
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
@ -229,5 +229,23 @@ name: button_restore
|
|||||||
callback: C_FormDialogView_RestoreCB
|
callback: C_FormDialogView_RestoreCB
|
||||||
argument: 0
|
argument: 0
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_CHOICE
|
||||||
|
type: NORMAL_CHOICE
|
||||||
|
box: 85 155 145 25
|
||||||
|
boxtype: FL_FRAME_BOX
|
||||||
|
colors: FL_COL1 FL_BLACK
|
||||||
|
alignment: FL_ALIGN_LEFT
|
||||||
|
style: FL_NORMAL_STYLE
|
||||||
|
size: FL_DEFAULT_SIZE
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label: Content:|#o
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: choice_btprint
|
||||||
|
callback: C_FormDialogView_InputCB
|
||||||
|
argument: 0
|
||||||
|
|
||||||
==============================
|
==============================
|
||||||
create_the_forms
|
create_the_forms
|
||||||
|
@ -1260,7 +1260,7 @@ argument: 0
|
|||||||
Name: form_document_options
|
Name: form_document_options
|
||||||
Width: 395
|
Width: 395
|
||||||
Height: 315
|
Height: 315
|
||||||
Number of Objects: 10
|
Number of Objects: 12
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_BOX
|
class: FL_BOX
|
||||||
@ -1283,7 +1283,7 @@ argument:
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_INPUT
|
class: FL_INPUT
|
||||||
type: NORMAL_INPUT
|
type: NORMAL_INPUT
|
||||||
box: 185 15 120 25
|
box: 185 10 120 25
|
||||||
boxtype: FL_DOWN_BOX
|
boxtype: FL_DOWN_BOX
|
||||||
colors: FL_COL1 FL_MCOL
|
colors: FL_COL1 FL_MCOL
|
||||||
alignment: FL_ALIGN_LEFT
|
alignment: FL_ALIGN_LEFT
|
||||||
@ -1301,7 +1301,7 @@ argument: 0
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_COUNTER
|
class: FL_COUNTER
|
||||||
type: SIMPLE_COUNTER
|
type: SIMPLE_COUNTER
|
||||||
box: 185 55 80 25
|
box: 185 40 80 25
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_COL1 FL_BLUE
|
colors: FL_COL1 FL_BLUE
|
||||||
alignment: FL_ALIGN_LEFT
|
alignment: FL_ALIGN_LEFT
|
||||||
@ -1323,7 +1323,7 @@ argument: 0
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_COUNTER
|
class: FL_COUNTER
|
||||||
type: SIMPLE_COUNTER
|
type: SIMPLE_COUNTER
|
||||||
box: 185 90 80 25
|
box: 185 70 80 25
|
||||||
boxtype: FL_UP_BOX
|
boxtype: FL_UP_BOX
|
||||||
colors: FL_COL1 FL_BLUE
|
colors: FL_COL1 FL_BLUE
|
||||||
alignment: FL_ALIGN_LEFT
|
alignment: FL_ALIGN_LEFT
|
||||||
@ -1345,7 +1345,7 @@ argument: 0
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_CHOICE
|
class: FL_CHOICE
|
||||||
type: NORMAL_CHOICE
|
type: NORMAL_CHOICE
|
||||||
box: 185 125 140 25
|
box: 185 100 140 25
|
||||||
boxtype: FL_FRAME_BOX
|
boxtype: FL_FRAME_BOX
|
||||||
colors: FL_COL1 FL_BLACK
|
colors: FL_COL1 FL_BLACK
|
||||||
alignment: FL_ALIGN_LEFT
|
alignment: FL_ALIGN_LEFT
|
||||||
@ -1361,30 +1361,30 @@ callback: C_FormBaseInputCB
|
|||||||
argument: 0
|
argument: 0
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_CHECKBUTTON
|
class: FL_ROUND3DBUTTON
|
||||||
type: PUSH_BUTTON
|
type: RADIO_BUTTON
|
||||||
box: 35 205 140 25
|
box: 25 205 140 25
|
||||||
boxtype: FL_NO_BOX
|
boxtype: FL_NO_BOX
|
||||||
colors: FL_COL1 FL_YELLOW
|
colors: FL_COL1 FL_YELLOW
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
style: FL_NORMAL_STYLE
|
style: FL_NORMAL_STYLE
|
||||||
size: FL_NORMAL_SIZE
|
size: FL_NORMAL_SIZE
|
||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
label: Use Natbib|#N
|
label: Natbib|#N
|
||||||
shortcut:
|
shortcut:
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_ALL
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
name: check_use_natbib
|
name: radio_use_natbib
|
||||||
callback: C_FormBaseInputCB
|
callback: C_FormBaseInputCB
|
||||||
argument: 0
|
argument: 0
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_CHOICE
|
class: FL_CHOICE
|
||||||
type: NORMAL_CHOICE
|
type: NORMAL_CHOICE
|
||||||
box: 185 235 140 25
|
box: 235 230 140 25
|
||||||
boxtype: FL_FRAME_BOX
|
boxtype: FL_FRAME_BOX
|
||||||
colors: FL_COL1 FL_BLACK
|
colors: FL_COL1 FL_BLACK
|
||||||
alignment: FL_ALIGN_LEFT
|
alignment: FL_ALIGN_TOP_LEFT
|
||||||
style: FL_NORMAL_STYLE
|
style: FL_NORMAL_STYLE
|
||||||
size: FL_NORMAL_SIZE
|
size: FL_NORMAL_SIZE
|
||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
@ -1399,7 +1399,7 @@ argument: 0
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_CHOICE
|
class: FL_CHOICE
|
||||||
type: NORMAL_CHOICE
|
type: NORMAL_CHOICE
|
||||||
box: 185 155 140 25
|
box: 185 130 140 25
|
||||||
boxtype: FL_FRAME_BOX
|
boxtype: FL_FRAME_BOX
|
||||||
colors: FL_COL1 FL_BLACK
|
colors: FL_COL1 FL_BLACK
|
||||||
alignment: FL_ALIGN_LEFT
|
alignment: FL_ALIGN_LEFT
|
||||||
@ -1417,7 +1417,7 @@ argument: 0
|
|||||||
--------------------
|
--------------------
|
||||||
class: FL_LABELFRAME
|
class: FL_LABELFRAME
|
||||||
type: ENGRAVED_FRAME
|
type: ENGRAVED_FRAME
|
||||||
box: 15 190 370 110
|
box: 15 170 370 95
|
||||||
boxtype: FL_NO_BOX
|
boxtype: FL_NO_BOX
|
||||||
colors: FL_BLACK FL_COL1
|
colors: FL_BLACK FL_COL1
|
||||||
alignment: FL_ALIGN_TOP_LEFT
|
alignment: FL_ALIGN_TOP_LEFT
|
||||||
@ -1433,20 +1433,56 @@ callback:
|
|||||||
argument:
|
argument:
|
||||||
|
|
||||||
--------------------
|
--------------------
|
||||||
class: FL_CHECKBUTTON
|
class: FL_ROUND3DBUTTON
|
||||||
type: PUSH_BUTTON
|
type: RADIO_BUTTON
|
||||||
box: 35 265 140 25
|
box: 25 230 140 25
|
||||||
boxtype: FL_NO_BOX
|
boxtype: FL_NO_BOX
|
||||||
colors: FL_COL1 FL_YELLOW
|
colors: FL_COL1 FL_YELLOW
|
||||||
alignment: FL_ALIGN_CENTER
|
alignment: FL_ALIGN_CENTER
|
||||||
style: FL_NORMAL_STYLE
|
style: FL_NORMAL_STYLE
|
||||||
size: FL_NORMAL_SIZE
|
size: FL_NORMAL_SIZE
|
||||||
lcol: FL_BLACK
|
lcol: FL_BLACK
|
||||||
label: Use Jurabib|#J
|
label: Jurabib|#J
|
||||||
shortcut:
|
shortcut:
|
||||||
resize: FL_RESIZE_ALL
|
resize: FL_RESIZE_ALL
|
||||||
gravity: FL_NoGravity FL_NoGravity
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
name: check_use_jurabib
|
name: radio_use_jurabib
|
||||||
|
callback: C_FormBaseInputCB
|
||||||
|
argument: 0
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_ROUND3DBUTTON
|
||||||
|
type: RADIO_BUTTON
|
||||||
|
box: 25 180 155 25
|
||||||
|
boxtype: FL_NO_BOX
|
||||||
|
colors: FL_COL1 FL_YELLOW
|
||||||
|
alignment: FL_ALIGN_CENTER
|
||||||
|
style: FL_NORMAL_STYLE
|
||||||
|
size: FL_NORMAL_SIZE
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label: Default (numerical)|#D
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: radio_use_defcite
|
||||||
|
callback: C_FormBaseInputCB
|
||||||
|
argument: 0
|
||||||
|
|
||||||
|
--------------------
|
||||||
|
class: FL_CHECKBUTTON
|
||||||
|
type: PUSH_BUTTON
|
||||||
|
box: 15 270 255 25
|
||||||
|
boxtype: FL_NO_BOX
|
||||||
|
colors: FL_COL1 FL_YELLOW
|
||||||
|
alignment: FL_ALIGN_CENTER
|
||||||
|
style: FL_NORMAL_STYLE
|
||||||
|
size: FL_NORMAL_SIZE
|
||||||
|
lcol: FL_BLACK
|
||||||
|
label: Sectioned bibliography|#e
|
||||||
|
shortcut:
|
||||||
|
resize: FL_RESIZE_ALL
|
||||||
|
gravity: FL_NoGravity FL_NoGravity
|
||||||
|
name: check_bibtopic
|
||||||
callback: C_FormBaseInputCB
|
callback: C_FormBaseInputCB
|
||||||
argument: 0
|
argument: 0
|
||||||
|
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
2004-03-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||||
|
|
||||||
|
* insetbibtex.[Ch]: bibtopic support.
|
||||||
|
|
||||||
* insetfloat.[Ch]: add param \sideways {true|false}
|
* insetfloat.[Ch]: add param \sideways {true|false}
|
||||||
(support for sideways floats from rotating.sty).
|
(support for sideways floats from rotating.sty).
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "dispatchresult.h"
|
#include "dispatchresult.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "funcrequest.h"
|
#include "funcrequest.h"
|
||||||
|
#include "LaTeXFeatures.h"
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
#include "metricsinfo.h"
|
#include "metricsinfo.h"
|
||||||
#include "outputparams.h"
|
#include "outputparams.h"
|
||||||
@ -93,13 +94,34 @@ string const InsetBibtex::getScreenLabel(Buffer const &) const
|
|||||||
int InsetBibtex::latex(Buffer const & buffer, ostream & os,
|
int InsetBibtex::latex(Buffer const & buffer, ostream & os,
|
||||||
OutputParams const & runparams) const
|
OutputParams const & runparams) const
|
||||||
{
|
{
|
||||||
// changing the sequence of the commands
|
// the sequence of the commands:
|
||||||
// 1. \bibliographystyle{style}
|
// 1. \bibliographystyle{style}
|
||||||
// 2. \addcontentsline{...} - if option bibtotoc set
|
// 2. \addcontentsline{...} - if option bibtotoc set
|
||||||
// 3. \bibliography{database}
|
// 3. \bibliography{database}
|
||||||
|
// and with bibtopic:
|
||||||
|
// 1. \bibliographystyle{style}
|
||||||
|
// 2. \begin{btSect}{database}
|
||||||
|
// 3. \btPrint{Cited|NotCited|All}
|
||||||
|
// 4. \end{btSect}
|
||||||
|
|
||||||
|
// the database string
|
||||||
string adb;
|
string adb;
|
||||||
string db_in = getContents();
|
string db_in = getContents();
|
||||||
db_in = split(db_in, adb, ',');
|
db_in = split(db_in, adb, ',');
|
||||||
|
// If we generate in a temp dir, we might need to give an
|
||||||
|
// absolute path there. This is a bit complicated since we can
|
||||||
|
// have a comma-separated list of bibliographies
|
||||||
|
string db_out;
|
||||||
|
while (!adb.empty()) {
|
||||||
|
if (!runparams.nice &&
|
||||||
|
IsFileReadable(MakeAbsPath(adb, buffer.filePath())+".bib"))
|
||||||
|
adb = os::external_path(MakeAbsPath(adb,
|
||||||
|
buffer.filePath()));
|
||||||
|
db_out += adb;
|
||||||
|
db_out += ',';
|
||||||
|
db_in = split(db_in, adb,',');
|
||||||
|
}
|
||||||
|
db_out = rtrim(db_out, ",");
|
||||||
|
|
||||||
// Style-Options
|
// Style-Options
|
||||||
string style = getOptions(); // maybe empty! and with bibtotoc
|
string style = getOptions(); // maybe empty! and with bibtotoc
|
||||||
@ -110,18 +132,33 @@ int InsetBibtex::latex(Buffer const & buffer, ostream & os,
|
|||||||
style = split(style, bibtotoc, ',');
|
style = split(style, bibtotoc, ',');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// line count
|
||||||
|
int i = 0;
|
||||||
|
|
||||||
if (!runparams.nice
|
if (!runparams.nice
|
||||||
&& IsFileReadable(MakeAbsPath(style, buffer.filePath()) + ".bst")) {
|
&& IsFileReadable(MakeAbsPath(style, buffer.filePath()) + ".bst")) {
|
||||||
style = MakeAbsPath(style, buffer.filePath());
|
style = MakeAbsPath(style, buffer.filePath());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!style.empty()) { // we want no \biblio...{}
|
if (!style.empty()) {
|
||||||
os << "\\bibliographystyle{" << style << "}\n";
|
os << "\\bibliographystyle{" << style << "}\n";
|
||||||
|
i += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buffer.params().use_bibtopic){
|
||||||
|
os << "\\begin{btSect}{" << db_out << "}\n";
|
||||||
|
string btprint = getSecOptions();
|
||||||
|
if (btprint.empty())
|
||||||
|
// default
|
||||||
|
btprint = "btPrintCited";
|
||||||
|
os << "\\" << btprint << "\n"
|
||||||
|
<< "\\end{btSect}\n";
|
||||||
|
i += 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// bibtotoc-Option
|
// bibtotoc-Option
|
||||||
if (!bibtotoc.empty()) {
|
if (!bibtotoc.empty() && !buffer.params().use_bibtopic) {
|
||||||
// maybe a problem when a textclass has no "art" as
|
// maybe a problem when a textclass has no "art" as
|
||||||
// part of its name, because it's than book.
|
// part of its name, because it's than book.
|
||||||
// For the "official" lyx-layouts it's no problem to support
|
// For the "official" lyx-layouts it's no problem to support
|
||||||
@ -145,22 +182,12 @@ int InsetBibtex::latex(Buffer const & buffer, ostream & os,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// database
|
if (!buffer.params().use_bibtopic){
|
||||||
// If we generate in a temp dir, we might need to give an
|
os << "\\bibliography{" << db_out << "}\n";
|
||||||
// absolute path there. This is a bit complicated since we can
|
i += 1;
|
||||||
// have a comma-separated list of bibliographies
|
|
||||||
string db_out;
|
|
||||||
while (!adb.empty()) {
|
|
||||||
if (!runparams.nice &&
|
|
||||||
IsFileReadable(MakeAbsPath(adb, buffer.filePath())+".bib"))
|
|
||||||
adb = os::external_path(MakeAbsPath(adb, buffer.filePath()));
|
|
||||||
db_out += adb;
|
|
||||||
db_out += ',';
|
|
||||||
db_in = split(db_in, adb,',');
|
|
||||||
}
|
}
|
||||||
db_out = rtrim(db_out, ",");
|
|
||||||
os << "\\bibliography{" << db_out << "}\n";
|
return i;
|
||||||
return 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -256,3 +283,11 @@ bool InsetBibtex::delDatabase(string const & db)
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void InsetBibtex::validate(LaTeXFeatures & features) const
|
||||||
|
{
|
||||||
|
if (features.bufferParams().use_bibtopic)
|
||||||
|
features.require("bibtopic");
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -44,6 +44,8 @@ public:
|
|||||||
bool addDatabase(std::string const &);
|
bool addDatabase(std::string const &);
|
||||||
///
|
///
|
||||||
bool delDatabase(std::string const &);
|
bool delDatabase(std::string const &);
|
||||||
|
///
|
||||||
|
void validate(LaTeXFeatures &) const;
|
||||||
protected:
|
protected:
|
||||||
///
|
///
|
||||||
virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
|
virtual void priv_dispatch(LCursor & cur, FuncRequest & cmd);
|
||||||
|
Loading…
Reference in New Issue
Block a user