Ungoose (degoose?) bibliography

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9909 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Martin Vermeer 2005-05-05 18:33:50 +00:00
parent 4fac72de9f
commit 3956781c54
7 changed files with 32 additions and 23 deletions

View File

@ -1,3 +1,8 @@
2005-05-05 Martin Vermeer <martin.vermeer@hut.fi>
* layouts/stdlists.inc:
* layouts/stdstruct.inc: clean up bibliography
2005-05-04 Angus Leeming <leeming@lyx.org>
* Makefile.am (DISTCLEANFILES): add texput.log.

View File

@ -93,24 +93,6 @@ Style List
End
Style Bibliography
Margin Static
LatexType Bib_Environment
LatexName thebibliography
NextNoIndent 1
LeftMargin MMN
LabelSep xx
ParSkip 0.0
ItemSep 0.2
TopSep 0.7
BottomSep 0.7
ParSep 0.3
Align Block
AlignPossible Block, Left
LabelType Enumerate
End
#
# New environments (not active yet)
#

View File

@ -50,7 +50,7 @@ Style Bibliography
AlignPossible Block, Left
LabelType Bibliography
LabelString References
LabelBottomSep 0.7
LabelBottomSep 1.2
LabelFont
Series Bold
Size Larger

View File

@ -1,3 +1,9 @@
2005-05-05 Martin Vermeer <martin.vermeer@hut.fi>
* paragraph.C (bibitem):
* buffer_funcs.C (setCounter):
* src/text.C (redoParagraph): Ungoose bibliography (bug 940)
2005-05-05 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
* text3.C (getStatus): immediately return after setOnOff

View File

@ -440,10 +440,9 @@ void setCounter(Buffer const & buf, ParIterator & it)
} else if (layout->labeltype == LABEL_BIBLIO) {// ale970302
counters.step("bibitem");
int number = counters.value("bibitem");
if (par.bibitem()) {
if (par.bibitem())
par.bibitem()->setCounter(number);
par.params().labelString(layout->labelstring());
}
par.params().labelString(layout->labelstring());
// In biblio should't be following counters but...
} else if (layout->labeltype == LABEL_SENSITIVE) {
// Search for the first float or wrap inset in the iterator

View File

@ -704,7 +704,7 @@ InsetBibitem * Paragraph::bibitem() const
{
if (!insetlist.empty()) {
InsetBase * inset = insetlist.begin()->inset;
if (inset->lyxCode() == InsetBase::BIBTEX_CODE)
if (inset->lyxCode() == InsetBase::BIBITEM_CODE)
return static_cast<InsetBibitem *>(inset);
}
return 0;

View File

@ -1654,6 +1654,23 @@ void LyXText::redoParagraph(pit_type const pit)
// remove rows of paragraph, keep track of height changes
Paragraph & par = pars_[pit];
// Add bibitem insets if necessary
if (par.layout()->labeltype == LABEL_BIBLIO) {
bool hasbibitem(false);
if (!par.insetlist.empty()
// Insist on it being in pos 0
&& par.getChar(0) == Paragraph::META_INSET) {
InsetBase * inset = par.insetlist.begin()->inset;
if (inset->lyxCode() == InsetBase::BIBITEM_CODE)
hasbibitem = true;
}
if (!hasbibitem) {
InsetBibitem * inset(new
InsetBibitem(InsetCommandParams("bibitem")));
par.insertInset(0, static_cast<InsetBase *>(inset));
}
}
// redo insets
InsetList::iterator ii = par.insetlist.begin();
InsetList::iterator iend = par.insetlist.end();