[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
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 >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]