mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 02:28:35 +00:00
Get XHTML output for InsetRef working, again in a fairly primitive way. We just
use the label name as associated text, and put it into square brackets. It'd be nice to be able to do more, but for that we'd need to associate counters with the labels, which would be nice for display, too. But we don't have that yet. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31976 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cd35cebed1
commit
85503ec1b9
@ -18,6 +18,7 @@
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LyXFunc.h"
|
||||
#include "OutputParams.h"
|
||||
#include "output_xhtml.h"
|
||||
#include "ParIterator.h"
|
||||
#include "sgml.h"
|
||||
#include "TocBackend.h"
|
||||
@ -115,6 +116,16 @@ int InsetRef::docbook(odocstream & os, OutputParams const & runparams) const
|
||||
}
|
||||
|
||||
|
||||
docstring InsetRef::xhtml(odocstream & os, OutputParams const &) const
|
||||
{
|
||||
// FIXME What we'd really like to do is to be able to output some
|
||||
// appropriate sort of text here. But to do that, we need to associate
|
||||
// some sort of counter with the label, and we don't have that yet.
|
||||
docstring const ref = html::htmlize(getParam("reference"));
|
||||
os << "<a href=\"" << ref << "\">[" << ref << "]</a>";
|
||||
return docstring();
|
||||
}
|
||||
|
||||
void InsetRef::tocString(odocstream & os) const
|
||||
{
|
||||
plaintext(os, OutputParams(0));
|
||||
|
@ -54,6 +54,8 @@ public:
|
||||
int plaintext(odocstream &, OutputParams const &) const;
|
||||
///
|
||||
int docbook(odocstream &, OutputParams const &) const;
|
||||
///
|
||||
docstring xhtml(odocstream &, OutputParams const &) const;
|
||||
/// the string that is passed to the TOC
|
||||
void tocString(odocstream &) const;
|
||||
///
|
||||
@ -61,7 +63,7 @@ public:
|
||||
///
|
||||
static ParamInfo const & findInfo(std::string const &);
|
||||
///
|
||||
static std::string defaultCommand() { return "ref"; };
|
||||
static std::string defaultCommand() { return "ref"; }
|
||||
///
|
||||
static bool isCompatibleCommand(std::string const & s);
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user