mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Better TOC output for XHTML, per Rob and Pavel.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38354 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
f567dd2bc1
commit
bfddee97e1
@ -34,6 +34,11 @@ AddToHTMLPreamble
|
||||
div.lyxtoc-4 { margin: 0em 0em 0em 1em; }
|
||||
div.lyxtoc-5 { margin: 0em 0em 0em 1em; }
|
||||
div.lyxtoc-6 { margin: 0em 0em 0em 1em; }
|
||||
a.tocentry {
|
||||
text-decoration: none;
|
||||
color: black;
|
||||
}
|
||||
a.tocentry:visited { color: black; }
|
||||
a.tocarrow {
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
|
@ -159,6 +159,10 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
|
||||
|
||||
// Now output TOC info for this entry
|
||||
Paragraph const & par = it->dit().innerParagraph();
|
||||
|
||||
string const attr = "href='#" + par.magicLabel() + "' class='tocentry'";
|
||||
xs << html::StartTag("a", attr);
|
||||
|
||||
// First the label, if there is one
|
||||
docstring const & label = par.params().labelString();
|
||||
if (!label.empty())
|
||||
@ -168,7 +172,9 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
|
||||
ours.for_toc = true;
|
||||
Font const dummy;
|
||||
par.simpleLyXHTMLOnePar(buffer(), xs, ours, dummy);
|
||||
xs << " ";
|
||||
|
||||
xs << html::EndTag("a") << " ";
|
||||
|
||||
// Now a link to that paragraph
|
||||
string const parattr = "href='#" + par.magicLabel() + "' class='tocarrow'";
|
||||
xs << html::StartTag("a", parattr);
|
||||
|
Loading…
Reference in New Issue
Block a user