> and that's where, eventually, an error message is printed,
> because lslisting{} doesn't have a definition of "UPC",Yes. > > Therefore, the short-term solution would be to figure out > how to pass a new language definition to dblatex. That will Configuring latex, good luck and may god bless all who sail in her ... thats (un)fortunately beyond the scope of this ML. > add some support for the new dialect of C (UPC), but note > that the way dblatex colorizes the code is different than > the way that 'source-highlight' colorizes the code, and > there is still no source highlight support for 'fop'. giyf http://sourceforge.net/apps/mediawiki/xslthl/index.php?title=Main_Page and several how-to pages come up in a search. Seems to need a java xslt processor (xalan or saxon) but that should be ok if you can run fop. > > Given that GNU 'source-highlight' doesn't add descriptive tags > (only strong emphasis for keywords, etc.), to its docbook output, > using DocBook output directly seems un-workable. > > Perhaps best is to take its XHTML output and process it with an > XSLT filter that maps it back into meaningful DocBook XML that: > (1) preserves the HTML formatting, (2) doesn't freak out dblatex, fop, Can't, docbook doesn't have formatting, it is content markup not presentational markup. Thats why you have to play with the backends. Of course thats also why you can use differing backends from the same source :-) > or any other backend, (3) preserves callouts in a meaningful way. > (This could be done as a user-defined source filter, hopefully.) > > The other alternative to investigate is to see if source-highlight's > docbook output can be enhanced, and then insert that directly. IIUC source-highlight is configurable. Off the top of my head I would suggest that you define roles on <phrase> entities wrapping bits of source. That can be used to control xsl processing, see http://www.sagehill.net/docbookxsl/AddNewTemplate.html#AttValueFormatting so you can translate it into fo instructions for fop and probably latex instructions for dblatex. And for HTML the role gets added as a class (with the right option set) so you can use CSS to style the HTML, which is better than the hard coded way it is done by source-highlight HTML. > The docbook output would have to be something that both dblatex and fop > understand and can process in a way that leads to output similar > to that of the .html output. > > BTW, I first tried the following, to generate .html output: > > $ a2x -v -k -f html4 asciidoc-test-upc-highlight.txt > Usage: a2x [OPTIONS] SOURCE_FILE > a2x: error: option -f: invalid choice: 'html4' (choose from 'chunked', > 'epub', > 'htmlhelp', 'manpage', 'pdf', 'text', 'xhtml', 'dvi', 'ps', 'tex', > 'docbook') > > Yet, the direct asciidoc invocation worked fine: > > $ asciidoc -v -b html4 asciidoc-test-upc-highlight.txt a2x runs asciidoc to generate docbook (-b docbook) and then processes it with xslt or dblatex or fop so its formats must match the ones those can produce. asciidoc produces the html itself instead of docbook and knows how to produce several other outputs, eg html4, html5 etc Cheers Lex -- 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.
