* \author Lars Gullik Bjønnes
* \author Martin Vermeer
* \author André Pönitz
- * \author Richard Heck (roman numerals)
+ * \author Richard Kimberly Heck (roman numerals)
*
* Full author contact details are available in file CREDITS.
*/
CT_PRETTYFORMAT,
CT_INITIALVALUE,
CT_GUINAME,
+ CT_LATEXNAME,
CT_END
};
{ "initialvalue", CT_INITIALVALUE},
{ "labelstring", CT_LABELSTRING },
{ "labelstringappendix", CT_LABELSTRING_APPENDIX },
+ { "latexname", CT_LATEXNAME },
{ "prettyformat", CT_PRETTYFORMAT },
{ "within", CT_WITHIN }
};
lex.next();
guiname_ = lex.getDocString();
break;
+ case CT_LATEXNAME:
+ lex.next();
+ latexname_ = lex.getDocString();
+ break;
case CT_END:
getout = true;
break;
}
+docstring const & Counters::latexName(docstring const & cntr) const
+{
+ CounterList::const_iterator it = counterList_.find(cntr);
+ if (it == counterList_.end()) {
+ lyxerr << "step: Counter does not exist: "
+ << to_utf8(cntr) << endl;
+ return empty_docstring();
+ }
+
+ docstring const & latexname = it->second.latexName();
+ if (latexname.empty())
+ return cntr;
+ return latexname;
+}
+
+
void Counters::reset()
{
appendix_ = false;
}
-void Counters::copy(Counters const & from, Counters & to, docstring const & match)
-{
- for (auto const & ctr : counterList_) {
- if (ctr.first.find(match) != string::npos || match == "") {
- to.set(ctr.first, from.value(ctr.first));
- }
- }
-}
-
-
docstring Counters::labelItem(docstring const & ctr,
docstring const & numbertype) const
{