mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 16:50:39 +00:00
Get a sensible prefix inside figure and tabular floats (bug 1999).
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X@13393 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4836399ae8
commit
d1bf49434e
@ -1,3 +1,8 @@
|
||||
2006-03-16 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* text.C (getPossibleLabel): get a sensible prefix inside figure and
|
||||
tabular floats (bug 1999).
|
||||
|
||||
2006-03-16 John Spray <spray@lyx.org>
|
||||
|
||||
* lyxfunc.C (getStatus): disable LFUN_MENUWRITE when document is
|
||||
|
21
src/text.C
21
src/text.C
@ -2264,8 +2264,25 @@ string LyXText::getPossibleLabel(LCursor & cur) const
|
||||
}
|
||||
}
|
||||
|
||||
string text = layout->latexname().substr(0, 3);
|
||||
if (layout->latexname() == "theorem")
|
||||
string name = layout->latexname();
|
||||
|
||||
// for captions, we want the abbreviation of the float type
|
||||
if (layout->labeltype == LABEL_SENSITIVE) {
|
||||
// Search for the first float or wrap inset in the iterator
|
||||
size_t i = cur.depth();
|
||||
while (i > 0) {
|
||||
--i;
|
||||
InsetBase * const in = &cur[i].inset();
|
||||
if (in->lyxCode() == InsetBase::FLOAT_CODE
|
||||
|| in->lyxCode() == InsetBase::WRAP_CODE) {
|
||||
name = in->getInsetName();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
string text = name.substr(0, 3);
|
||||
if (name == "theorem")
|
||||
text = "thm"; // Create a correct prefix for prettyref
|
||||
|
||||
text += ':';
|
||||
|
@ -41,6 +41,8 @@ What's new
|
||||
|
||||
- Fix jurabib error with Spanish documents (bug 2365).
|
||||
|
||||
- More sensible default label in table and figure captions (bug 1999).
|
||||
|
||||
- Do not skip change in "Merge changes..." dialog (bug 2212).
|
||||
|
||||
- Improve handling of the labeling environment in KOMA letters (bug 2246).
|
||||
|
Loading…
Reference in New Issue
Block a user