#include "DispatchResult.h"
#include "Floating.h"
#include "FloatList.h"
-#include "FuncRequest.h"
#include "Language.h"
#include "LaTeXFeatures.h"
#include "Lexer.h"
-#include "MetricsInfo.h"
#include "Paragraph.h"
#include "output_xhtml.h"
#include "TextClass.h"
InsetFloatList::InsetFloatList(Buffer * buf)
- : InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE), "toc")
+ : InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE))
{}
InsetFloatList::InsetFloatList(Buffer * buf, string const & type)
- : InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE), "toc")
+ : InsetCommand(buf, InsetCommandParams(FLOAT_LIST_CODE))
{
setParam("type", from_ascii(type));
}
FloatList::const_iterator cit = floats[to_ascii(getParam("type"))];
if (cit != floats.end()) {
- os << cit->second.listCommand(buffer().params().language->code());
+ Floating const & fl = cit->second;
+ if (fl.needsFloatPkg())
+ os << "\\listof{" << getParam("type") << "}{"
+ << buffer().B_(fl.listName()) << "}\n";
+ else {
+ if (!fl.listCommand().empty())
+ os << "\\" << from_ascii(fl.listCommand()) << "\n";
+ else
+ os << "%% "
+ << bformat(_("LyX cannot generate a list of %1$s"), getParam("type"))
+ << "\n";
+ }
} else {
os << "%%\\listof{" << getParam("type") << "}{"
<< bformat(_("List of %1$s"), getParam("type"))
<< html::StartTag("a", parattr)
// FIXME XHTML
// There ought to be a simple way to customize this.
- << XHTMLStream::NextRaw() << "⇘"
+ << XHTMLStream::NextRaw() << ">"
<< html::EndTag("a");
xs << html::EndTag("div");
}