mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-27 06:19:36 +00:00
* InsetIndex (latex):
- latex is supposed to return the number of _rows_, so do not count the characters (fix bug 5378). git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26966 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
54c32f8501
commit
473e365a07
@ -52,7 +52,7 @@ int InsetIndex::latex(odocstream & os,
|
|||||||
{
|
{
|
||||||
os << "\\index";
|
os << "\\index";
|
||||||
os << '{';
|
os << '{';
|
||||||
int i = 7;
|
int i = 0;
|
||||||
|
|
||||||
// get contents of InsetText as LaTeX and plaintext
|
// get contents of InsetText as LaTeX and plaintext
|
||||||
odocstringstream ourlatex;
|
odocstringstream ourlatex;
|
||||||
@ -95,10 +95,9 @@ int InsetIndex::latex(odocstream & os,
|
|||||||
bool first = true;
|
bool first = true;
|
||||||
for (; it != end; ++it) {
|
for (; it != end; ++it) {
|
||||||
// write the separator except the first time
|
// write the separator except the first time
|
||||||
if (!first) {
|
if (!first)
|
||||||
os << '!';
|
os << '!';
|
||||||
i += 1;
|
else
|
||||||
} else
|
|
||||||
first = false;
|
first = false;
|
||||||
|
|
||||||
// correctly sort macros and formatted strings
|
// correctly sort macros and formatted strings
|
||||||
@ -136,21 +135,16 @@ int InsetIndex::latex(odocstream & os,
|
|||||||
subst(spart2, from_ascii("\\"), docstring());
|
subst(spart2, from_ascii("\\"), docstring());
|
||||||
os << ppart;
|
os << ppart;
|
||||||
os << '@';
|
os << '@';
|
||||||
i += ppart.size() + 1;
|
|
||||||
}
|
}
|
||||||
docstring const tpart = *it;
|
docstring const tpart = *it;
|
||||||
os << tpart;
|
os << tpart;
|
||||||
i += tpart.size();
|
|
||||||
if (it2 < levels_plain.end())
|
if (it2 < levels_plain.end())
|
||||||
++it2;
|
++it2;
|
||||||
}
|
}
|
||||||
// write the bit that followed "|"
|
// write the bit that followed "|"
|
||||||
if (!cmd.empty()) {
|
if (!cmd.empty())
|
||||||
os << "|" << cmd;
|
os << "|" << cmd;
|
||||||
i += cmd.size() + 1;
|
|
||||||
}
|
|
||||||
os << '}';
|
os << '}';
|
||||||
i += 1;
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user