On 23/07/10 05:13, Miklos Vajna wrote:
On Fri, Jul 09, 2010 at 07:43:11PM -0700, sashan<[email protected]>  wrote:
1) When I run a2x -f xhtml source-highlight-filter.txt it produces an
html file without syntax highlighting.
2) When I run a2x source-highlight-filter.txt it produces a pds with
syntax highlighting.
3) When I run asciidoc source-highlight-filter.txt it produces a html
file with syntax higlighting

Can anyone please explain why there is a difference between 1 and 3
with respect to syntax highlighting.

Isn't a2x -f xhtml uses asciidoc's xml output then docbook to turn xml
to xhtml? In that case probably the docbook toolchain that parses the
xml ignores the instructions that are parsed by dblatex correctly.

That's right, a2x is for outputs generated via DocBook toolchains. When you generate HTML directly from asciidoc (html4 or xhtml11 backends) you get source highlighting via asciidoc's source highlight filter. dblatex has it's own built-in syntax highlighting for PDFs so you do get highlighting via a2x (FOP does not so the --fop option won't generate highlighted PDFs). Similarly the Docbook XSL Stylesheets don't syntax highlight for HTML outputs.

Cheers, Stuart

--
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.

Reply via email to