Thread: [Doxygen-users] image issues - alignment, bold for nearby text, loses \ref link...
Brought to you by:
dimitri
From: Monique S. <mon...@ea...> - 2015-09-08 18:02:42
|
Hello, Doxygen users, I’m using Doxygen 1.8.10 on Win 7, and am having trouble getting an image to be included without affecting the format/alignment of accompanying text, as well as suppressing proper output of a \ref link to another .page file. In my Mainpage.page file, I want to include a 2-column tabular presentation, but not include any actual table headers or cell borders, where the first column contains images and the second column contains text (and links to other page files). But everything I try ends up with three problems: 1. The image and subsequent text is output as two “rows” with center justification. 2. The text is output as bold for no apparent reason. 3. The link to the desired page disappears, and the <page-name> instead of the page’s title ends up in the output. I tried plain text, as follows: \image html image-name.jpg Text that leads in to the page link \ref <page-name>. \image html image2-name.jpg More text \ref <page-name2>. Then I tried a table just to see if that would help (which is how I had it in the DoxyS project that I’m now porting to Doxygen). But that results in all the problems above, with all the output being put into the first column (even though clearly the table coding places the text in the second column): | image | info | |-------|------| \image html image-name.jpg | Text that leads in to the page link \ref <page-name>. \image html iamge2-name | More text \ref <page-name2>. The images are found just fine (and Doxygen copies them to the expected output/html folder), and when I delete the images, the page references work as expected. Any suggestions? Thanks very much, -Monique |
From: Dimitri v. H. <do...@gm...> - 2015-09-08 18:28:36
|
Hi Monique, Here are two ways to achieve what you want: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /** @mainpage Using Markdown syntax: | image | info | |-------|------| \image html image-name.png "" | Text that leads in to the page link \ref pagename. \image html image2-name.png "" | More text \ref pagename2. Using HTML syntax: <table> <tr><th>image <th>info <tr><td>\image html image-name.png <td>Text that leads in to the page link \ref pagename. <tr><td>\image html image2-name.png <td>More text \ref pagename2. </table> */ /** @page pagename * A page */ /** @page pagename2 * Another page */ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Note that if you plan to put more than just plain text in the table cells, the HTML syntax is more robust and flexible. Also note the "" after \image to introduce an empty caption, if omitted the rest of the line is seen as the image's caption! Regards, Dimitri > On 08 Sep 2015, at 20:01 , Monique Semp <mon...@ea...> wrote: > > Hello, Doxygen users, > > I’m using Doxygen 1.8.10 on Win 7, and am having trouble getting an image to be included without affecting the format/alignment of accompanying text, as well as suppressing proper output of a \ref link to another .page file. > > In my Mainpage.page file, I want to include a 2-column tabular presentation, but not include any actual table headers or cell borders, where the first column contains images and the second column contains text (and links to other page files). But everything I try ends up with three problems: > > 1. The image and subsequent text is output as two “rows” with center justification. > 2. The text is output as bold for no apparent reason. > 3. The link to the desired page disappears, and the <page-name> instead of the page’s title ends up in the output. > > I tried plain text, as follows: > > \image html image-name.jpg Text that leads in to the page link \ref <page-name>. > \image html image2-name.jpg More text \ref <page-name2>. > > Then I tried a table just to see if that would help (which is how I had it in the DoxyS project that I’m now porting to Doxygen). But that results in all the problems above, with all the output being put into the first column (even though clearly the table coding places the text in the second column): > > | image | info | > |-------|------| > \image html image-name.jpg | Text that leads in to the page link \ref <page-name>. > \image html iamge2-name | More text \ref <page-name2>. > > The images are found just fine (and Doxygen copies them to the expected output/html folder), and when I delete the images, the page references work as expected. > > Any suggestions? > > Thanks very much, > -Monique > > ------------------------------------------------------------------------------ > _______________________________________________ > Doxygen-users mailing list > Dox...@li... > https://lists.sourceforge.net/lists/listinfo/doxygen-users |
From: Monique S. <mon...@ea...> - 2015-09-08 19:04:23
|
I've got what I need, but it did require a bit of tweaking. The HTML syntax didn't work with the \ref Doxygen commands. So when I replace them with regular <a href></a> markup, the links worked fine. But the links are not in bold as they are when Doxygen creates links to pages, so somewhat less than desirable. So I looked at the generated source and found that the class for Doxygen links is "el", so I added the following to the <a href...> element, and now I've got exactly what I want :-): class = "el" The Markdown syntax works as you described, and Doxygen's commands are properly implemented -- I hadn't realized that the text I was adding was being interpreted by Doxygen as the caption to the image. Thanks for that explanation! But if only I could get rid of the header row and table cell borders. I've googled a bit and found other postings for this wish in StackOverflow, but no solutions for the basic Markdown that I'm assuming is used by Doxygen. Any ideas? Putting an image and associated text/links on the same line in the .page file still puts the image on a separate line in the output, which I'm guessing is not changeable except by editing the css for the image class, which would likely have unintended consequences?. So I'll abandon that approach. Thanks so much for the speedy reply, Dimitri, -Monique |
From: Dimitri v. H. <do...@gm...> - 2015-09-08 19:38:35
|
Hi Monique, > On 08 Sep 2015, at 21:04 , Monique Semp <mon...@ea...> wrote: > > I've got what I need, but it did require a bit of tweaking. > > The HTML syntax didn't work with the \ref Doxygen commands. Why not? Did you try with the example I provided? It should work fine there, and there should be no reason why \ref cannot by used inside a HTML table. It doesn't work if you would put the table in a \htmlonly...\endhtmlonly block of course, but I assume you didn't do that. Regards, Dimitri |
From: Monique S. <mon...@ea...> - 2015-09-08 21:05:53
|
> Why not? Did you try with the example I provided? It should work fine > there, and there should be no reason why \ref cannot by used inside a HTML table. It doesn't work if you would put the table in a \htmlonly...\endhtmlonly block of course, but I assume you didn't do that. Well, I went contrary to the logical assumption, and I had surrounded the <table/> with \htmlonly and \endhtmlonly, largely because that's how I'd originally coded the DoxyS page's contents. Perhaps this was unnecessary way back when (2010), but I don't recall and don't need to bother tracking that down. So yes, when I removed the \htmlonly and \endhtmlonly commands, the \image and \ref commands worked fine inside the <table> code. But... the class that was used changed. Without the \htmlonly, the class is "doxtable", but with the \htmlonly, the class is unspecified, which I've interpreted to mean simply "table". So when I omit the \htmlonly tag (and closing \endhtmlonly), and include the class="table" in the <table> element, I get the desired output. So that's what I'll go with. I assume by extension that Doxygen does not parse anything in an \htmlonly block, and so that's why the \image and \ref commands didn't work. So thanks for explaining that important point! -Monique |