So the real problem is that my XML uses a tag that Doxygen recognizes and 
processes.  So I'll just use <pre> and escape that tag as needed.  Looks like 
all my other XML tags are pretty specific to my project, so Doxygen won't 
process them..  :)

Your example for captioning a <pre> block looks ok, but my text is not very 
wide and the centered caption makes the \verbatim block take the full width of 
the window.  I'll play with that a bit and see what I can come up with.  (Also 
wanted title, not caption, but a similar thing ought to work there, too.

        Thanks!



-----Original Message-----
From: Dimitri Van Heesch [mailto:doxy...@gmail.com] 
Sent: Monday, July 09, 2012 1:47 PM
To: Broida, Michael
Cc: doxygen-users@lists.sourceforge.net
Subject: Re: [Doxygen-users] Bug: <list> inside <pre> generates bad html


On Jul 9, 2012, at 20:17 , <michael.bro...@thomsonreuters.com> 
<michael.bro...@thomsonreuters.com> wrote:

> ((I hope Outlook doesn't mess up this formatting...))
> 
> Still, the conversions Doxygen did on the <list> and </list> tags are really 
> weird.
> 
> Here is a complete but silly example of XML in a <pre> block:
> 
>       /*! \page junkid JunkTitle
>       <pre>
>         <xxx>
>           <list>
>             <yyy>foo</yyy>
>             <zzz>bar</zzz>
>           </list>
>         </xxx>
>       </pre>
>       */
> 
> Doxygen generates this HTML (inside a  class="textblock"  div tag):
> 
>       <pre>
>         &lt;xxx&gt;
>           </p>
>       <ul>
>       </ul>
>       <p>&lt;yyy&gt;foo&lt;/yyy&gt;
>             &lt;zzz&gt;bar&lt;/zzz&gt;
>           </pre><pre>
>         &lt;/xxx&gt;
>       </pre>
> 
> which is not correct and renders -very- badly.

That's because <list> is an XML command doxygen supports:
http://www.stack.nl/~dimitri/doxygen/xmlcmds.html

> 
> (My original file, with the <pre> inside a cell of a table, also generated 
> </li></ul> between the first </pre> and second <pre> tags, so maybe this is 
> partially dependent on other content.)
> 
> 
> BTW: \verbatim works but since my <pre> is in a cell in a table, the 
> resulting colored block around the \verbatim adds another border inside that 
> cell.  Using <pre> and escaping <list> and </list> looks cleaner in this 
> case.  :)  But it does mean I have to watch the output closely to catch any 
> other glitches like that.
> 
> I'm using a table so I can give the block a title in one row and put the 
> block in the second row.  Is there a way to "title" a \verbatim or \code 
> block?  (<pre> has a "title" attribute, but it's only visible when mousing 
> over the block.)

You could use:

/*! \page junkid JunkTitle
  Some text
  \myblock
   <xxx>
    <list>
     <yyy>foo</yyy>
     <zzz>bar</zzz>
    </list>
   </xxx>
  \endmyblock{some title}
  More text
 */

along with the following alias definitions in the config file:

ALIASES = myblock=\verbatim endmyblock{1}=\endverbatim<center><b>\1</b></center>

for a verbatim block with caption.

Regards,
  Dimitri




This email was sent to you by Thomson Reuters, the global news and information 
company. Any views expressed in this message are those of the individual 
sender, except where the sender specifically states them to be the views of 
Thomson Reuters.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Doxygen-users mailing list
Doxygen-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/doxygen-users

Reply via email to