This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [docbook] <emphasis> in <code>; syntax highlighting


This isn't directly an answer to the original question, but is something that might be useful and the xsl gives examples of the approach Mike suggests. A while back, Norm posted an xsl to convert the output of htmlize.el (which converts an emacs buffer's font-locking to html) to docbook with some role attributes. Norm's original message got munged, so see these two for the whole story:

http://sources.redhat.com/ml/docbook-apps/2003-q4/msg00562.html
http://sources.redhat.com/ml/docbook-apps/2003-q4/msg00549.html

David

> -----Original Message-----
> From: Michael Smith [mailto:smith@xml-doc.org]
> Sent: Friday, February 13, 2004 3:40 AM
> To: docbook@lists.oasis-open.org
> Subject: Re: [docbook] <emphasis> in <code>; syntax highlighting
> 
> 
> Instead of <emphasis>, why not just use another, nested <code> or
> a <literal>? e.g., <code>foo <code role="prgkey">bar</code></code>
> 
>   --Mike
> 
> "Justus H. Piater" <Justus.Piater@ULg.ac.be> writes:
> 
> > Hi,
> > 
> > Is there a reason why <emphasis> is not allowed inside <code> (or,
> > %gen.char.class is not part of %cptr.char.mix;, or whatever)?
> > 
> > I think there are many legitimate uses for that, and I miss it
> > badly. In general, I think that <code> should allow all
> > inline-formatted content that <programlisting> allows.
> > 
> > Likewise, it would make a lot of sense to allow <emphasis> inside
> > other %cptr.char.mix; clients such as <userinput> and
> > <computeroutput>.
> > 
> > Can an appropriate change be put into V4.3?
> > 
> > 
> > This is actually part of a bigger need of mine: I put lots 
> of program
> > code examples into my lecture slides. Lacking tags for (program)
> > keywords, operators, comments, strings etc., I (ab)use 
> <emphasis> for
> > syntax highlighting, using roles such as "prgkey", "prgcomment" etc.
> > 
> > It would be nice to have tags for such things. On the other hand,
> > quite a few of those would need to be added in various 
> places, adding
> > substantial complexity to the DTD. This seems to be a prime 
> candidate
> > for a future extension module of a modular DocBook.
> > 
> > For now, using <emphasis> may not be all that abusive, if 
> you view it
> > like the term syntax *highlighting* indicates: visual sugar for a
> > human reader.
> > 
> > Justus
> > 
> 
> To unsubscribe from this list, send a post to 
> docbook-unsubscribe@lists.oasis-open.org, or visit 
http://www.oasis-open.org/mlmanage/.


To unsubscribe from this list, send a post to docbook-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]