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]

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


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

-- 
Justus H. Piater, Ph.D.         http://www.montefiore.ulg.ac.be/~piater/
Institut Montefiore, B28        Phone: +32-4-366-2279
Université de Liège, Belgium    Fax:   +32-4-366-2620


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]