mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
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:
parent
4fac72de9f
commit
3956781c54
@ -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.
|
||||
|
@ -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)
|
||||
#
|
||||
|
@ -50,7 +50,7 @@ Style Bibliography
|
||||
AlignPossible Block, Left
|
||||
LabelType Bibliography
|
||||
LabelString References
|
||||
LabelBottomSep 0.7
|
||||
LabelBottomSep 1.2
|
||||
LabelFont
|
||||
Series Bold
|
||||
Size Larger
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
17
src/text.C
17
src/text.C
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user