On 20/06/12 18:09, Lex Trotman wrote:
On 20 June 2012 15:53, Wilhelm<[email protected]> wrote:
Am 20.06.2012 07:20, schrieb Lex Trotman:
On 20 June 2012 14:47, Wilhelm<[email protected]> wrote:
Am 20.06.2012 01:59, schrieb Stuart Rackham:
Thanks for the patch Lex, I've committed it to the trunk:
https://code.google.com/p/asciidoc/source/detail?r=f139415803b0107f84cc61437c180f7262a56bda
Now xml/pdf generation is ok, but in html5 now class=myrole is encluded.
Did I miss something?
Hi,
(x)html(5) from source highlight filter is pre-styled so external
classes shouldn't be applied. If you really need to do something the
output of source-highlight is in a<div class=listingblock><div
class=content> which you should be able to detect with CSS.
Mmh, so if I want to apply e.g. a different background color to a special
code-block I have to give source-highlight a different ccs-file via the
args-filter-argument in asciidoc?
I see from below what you are actually trying to do, better to ask directly :)
To distinguish different types of listings you can wrap the listings
that you want to have special handling in an open block with a role
attribute, that wraps the whole thing in a<div
class=openblock{role}>.
Nice FAQ candidate.
The other point is, that your patch works, but behaves different in titled
and untitled listing-blocks: for titled listing-blocks the role-attribute is
applied to the<formalpara> enclosing the title as well. I got the xslt
working with the role for the verbatim-block but I have no idea how to refer
to the role of the enclosing structure.
I just noted that this is the same as the rest of the docbook output
including non-source highlighted listings and literalblocks.
This is what I use for the
<xsl:attribute-set name="shade.verbatim.style">
<xsl:attribute name="background-color">
<xsl:choose>
<xsl:when test="@role='code'">#F5F5FF</xsl:when>
<xsl:when test="@role='command'">#F5FFF5</xsl:when>
<xsl:otherwise>lightgrey</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
Sorry, don't know xsl enough.
Cheers
Lex
Cheers
Lex
Cheers, Stuart
On 19/06/12 22:45, Lex Trotman wrote:
[...]
The "source" style sends it to the source filter, which doesn't
properly use the role attribute for listings without a title. That'd
be a bug :)
Patch attached.
Cheers
Lex
--
Wilhelm
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.
--
Wilhelm
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.
--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.