mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-12 16:50:39 +00:00
Fix bug #2872: reference in math to label with "underscore"...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33332 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
1be79634a9
commit
64ddb9f47d
@ -58,6 +58,7 @@ following hack as starting point to write some macros:
|
||||
#include "InsetMathSpace.h"
|
||||
#include "InsetMathSplit.h"
|
||||
#include "InsetMathSqrt.h"
|
||||
#include "InsetMathString.h"
|
||||
#include "InsetMathTabular.h"
|
||||
#include "MathMacroTemplate.h"
|
||||
#include "MathFactory.h"
|
||||
@ -1394,8 +1395,14 @@ bool Parser::parse1(InsetMathGrid & grid, unsigned flags,
|
||||
else if (t.cs() == "ref" || t.cs() == "eqref" || t.cs() == "prettyref"
|
||||
|| t.cs() == "pageref" || t.cs() == "vpageref" || t.cs() == "vref") {
|
||||
cell->push_back(MathAtom(new InsetMathRef(buf, t.cs())));
|
||||
parse(cell->back().nucleus()->cell(1), FLAG_OPTION, mode);
|
||||
parse(cell->back().nucleus()->cell(0), FLAG_ITEM, mode);
|
||||
docstring const opt = parse_verbatim_option();
|
||||
docstring const ref = parse_verbatim_item();
|
||||
if (!opt.empty()) {
|
||||
cell->back().nucleus()->cell(1).push_back(
|
||||
MathAtom(new InsetMathString(opt)));
|
||||
}
|
||||
cell->back().nucleus()->cell(0).push_back(
|
||||
MathAtom(new InsetMathString(ref)));
|
||||
}
|
||||
|
||||
else if (t.cs() == "left") {
|
||||
|
@ -135,6 +135,9 @@ What's new
|
||||
|
||||
- Resolve duplicate labels in mathed on pasting (bug 6218).
|
||||
|
||||
- Allow labels containing an underscore or caret to be referenced in
|
||||
math insets instead of only outside math (bug 2872).
|
||||
|
||||
- Detect user-specified package dependencies for modules (bug 6361).
|
||||
|
||||
- Prevent the error dialog from jumping to the first item when
|
||||
|
Loading…
Reference in New Issue
Block a user