Is there a way to continue doxygen lists across multiple comment blocks? - documentation

Basically, I'm trying to do document code along the lines of:
//Description of Step 1
DoStep1_1();
DoStep1_2();
...
//Description of Step 2
DoStep2_1();
DoStep2_2();
I want the two comment blocks to turn into an ordered list in the Doxygen output. I've read the documentation on creating lists, and I understand that I can just use HTML tags, but it looks like there is extra stuff generated between to the tags that would be generated, that results in whitespace between the two items. Ultimately, I'd like to not have to use HTML tags; that is, I'd prefer to just use
/*!
-# Description of Step 1
*/
DoStep1_1();
DoStep1_2();
...
/*!
-# Description of Step 2
*/
DoStep2_1();
DoStep2_2();
or something along those lines. Is this even possible?
EDIT:
Okay, so I may not have described the results I'm getting and the results I want. The HTML generated from the above code is something like:
Description of Step 1
Description of Step2
Note that there are 2 paragraph tags that I don't want, since they result in unwanted whitespace.

Of course this is possible. I use it successfully. For more details, read my answer to that question: How to be able to extract comments from inside a function in doxygen?
EDIT: After having read your actual and expected result
Unfortunately, I didn't find a way to get rid off the whitespace between list elements.

Related

How to write xpath for following example?

For example, I have div tag that has two attributes.
class='hello#123' text='321#he#321llo#321'
<div> class='hello#123' text='321#he#321llo#321'></div>
Here, I want to write xpath for both class and text attributes but numbers may change dynamically. ie., "hello#123" may become "345" when we reload. "321#he#321llo#321" may become "567#he#456llo#321".
Note: Need to write xpath in single line not separately.
Assuming that you have the (corrected) two-attribute-HTML
<div class='hello#123' text='321#he#321llo#321'>...</div>
you can select it using the following, for example:
Using the contains() function
//div[contains(#class,'hello') and contains(#text,'#he#')]
This is quite specific and only applicable if the "hello" is always split in the same way
Using the translate() function to mask everything except the chars for "hello"
//div[translate(#class,'#0123456789','')='hello' and translate(#text,'#0123456789','')='hello']
This removes all # chars and digits and checks if the remaining string is "hello"
I guess combining these two approaches you will be able to create your own XPath expression fitting your needs. The patterns you provided were not fully clear, so this may only approach a good enough solution.

Tabulator - formatting print and PDF output

I am a relatively new user of Tabulator so please forgive me if I am asking anything that, perhaps, should be obvious.
I have a Tabulator report that I am able to print and create as a PDF, but the report's formatting (as shown on the screen) is not used in either output.
For printing I have used printAsHtml and printStyled=true, but this doesn't produce a printout that matches what is on the screen. I have formatted number fields (with comma separators) and these are showing correctly, but the number columns should be right-aligned but all of the columns appear as left-aligned.
I am also using Tree View where the tree rows are coloured differently to the main table, but when I print the report with a tree open it colours the whole table with the tree colours and not just the tree.
For the PDF none of the Tabulator formatting is being used. I've looked for anything similar to the printStyled option, but I can't see anything. I've also looked at the autoTable option, but I am struggling to find what to use.
I want to format the print and PDF outputs so that they look as close to the screen representation as possible.
Is there anywhere I could look that would provide examples of how to achieve the above? The Tabulator documentation is very good, but the provided examples don't appear to explain what I am trying to do.
Perhaps there are there CSS classes that I am missing or even mis-using? I have tried including .tabulator-print-table in my CSS, but I am probably not using it correctly. I also couldn't find anything equivalent for producing PDFs. Some examples would help immensely.
Thank you in advance for any advice or assistance.
Formatting is deliberately not included in these, below i will outline why:
Downloaders
Downloaded files do not contain formatted data, only the raw data, this is because a lot of the formatters create visual elements (progress bar, star formatter etc) that cannot be replicated sensibly in downloaded files.
If you want to change the format of data in the download you will need to use an accessor, the accessorDownload option is the one you want to use in this case. The accessors transform the data as it is leaving the table.
For instance we could create an accessor that prepended "Mr " to the front of every name in a column:
var mrAccessor= function(value, data, type, params, column, row){
return "Mr " + value;
}
Assign it to a columns definition:
{title:"Name", field:"name", accessorDownload:mrAccessor}
Printing
Printing also does not include the formatters, this is because when you print a Tabulator table, the whole table is actually rebuilt as a standard HTML table, which allows the printer to work out how to layout everything across multiple pages with column headers etc. The downside of this is that it is only loosely styled like a Tabulator and so formatted contents generated inside Tabulator cells will likely break when added to a normal td element.
For this reason there is also a accessorPrint option that works in the same way as the download accessor but for printing.
If you want to use the same accessor for both occasions, you can assign the function once to the accessor option and it will be applied in both instances.
Checkout the Accessor Documentation for full details.

How to Keep Velocity Ouput to a Single Line while Spanning Multiple Lines in vm File

I'm using a Velocity template to generate an e-mail. Within that e-mail, I want to create a mailto link that will look like this:
Link
I have this chunk of code that properly creates that link:
Link
That code works, but it's nearly impossible to read. I want to put some line breaks in there so that I'd have something more like this:
<a href="mailto:
#foreach(${person} in ${people})
${person.email}
#if($foreach.hasNext)
,
#end
#end
?subject=My%20Subject%20Line">Link</a>
I find that to be much easier to read, but Velocity will include all the whitespace into the output and causes the link that it produces to break.
Is there any way to format the code the way I want and tell Velocity to ignore all the whitespace throughout that segment?
Thanks!
A first option is to use comments:
<a href="mailto:#*
*##foreach(${person} in ${people})#*
*#${person.email}#*
*##if($foreach.hasNext)#*
*#,#*
*##end#*
*##end#*
*#?subject=My%20Subject%20Line">Link</a>
Another option is to add a pre-processing that will remove all indenting spaces and carriage returns.
Yet another is to do it as a post-processing.
The way to add this pre- or post- processing is dependent on the context in which you are using Velocity.

Solr/Lucene highlighted keywords - paddings

I would like a specific padding (EG '...') --> only on start/end of fragments that are truncated,
I would also like to concatenate 2 fragments, even if they are not close, like:
... fragment1 ... fragment2 ...
Are there any fragmenters / highlight settings that can be used?
i hope i understood your question correctly.
check out the HighlightingParameters
you have a lot of options there.
you can also specify your own hl.simple.pre/hl.simple.post. then you can parse the output every way you like.
it is also quite common to give a span tag with a custom css class, that you can style.

Controlling Doxygen's LaTeX output for making PDF documentation

I'm using Doxygen to generate documentation for my code. I need to make a PDF version of this and using Doxygen's LaTeX output appears to be the way to do it.
However I've run into a number of annoying problems, and not knowing anything about LaTeX previously haven't really got much of an idea on how to approach them, and the countless references for LaTeX related things are not much help...
I worked out how to create a custom style thing in a sty file and how to get Doxygen to use it. After a lot of searching I found out how to set the page margins etc. through this, and I'm guessing the perhaps this is the file I want for doing the other things I want, but I cant seem to find any commands for doign what I want :(
The table of contents at the start of the document contains a lot of items Id rather it didn't as it makes the contents very long. Is there some way to limit this contents to just say the first two levels, rather than having entries for every single individual function, variable, etc.? Id quite like to keep all the bookmarks however. I did try the "COMPACT_LATEX" option but as well as removing items on the contents pages, it removed the bookmarks and the member lists at the start of each section, which I do really want to keep.
Is there a way to change the order of things, like putting the full class description at the start of the section, rather than after all the members and attributes?
Wow, that's kind of evil of Doxygen.
Okay, to get around the tocdepth counter problem, add the following line to your .sty file:
\AtBeginDocument{\setcounter{tocdepth}{2}}% or whatever level you want
You can set the PDF bookmarks depth to a separate value:
% requires you \usepackage{hyperref} first
\hypersetup{
bookmarksdepth = section, % of whatever level you want
}
Also note that if you have a list of figures/tables, the tocdepth must be at least 2 for them to show up.
I don't see any way of rearranging those items within the LaTeX files---Doxygen just barfs them out there, so we can't do much. You'll have to poke around the Doxygen documentation to see if there's any way to specify the order I guess. (Here's hoping!)
You're so close.
Googling on "latex contents level" brought me to LaTeX - customizing the depth of the table of contents for different parts of the thesis which suggests
\setcounter{tocdepth}{n}
where n starts at zero for only the highest level division. This is presumable defined in all the default styles, but is worth a try in doxygen.
You could write a Perl/Awk script to simply delete the unwanted lines from the table of contents. For the file burble.tex, Latex will generate the file burble.toc, which will contain lines such as:
\contentsline {subsection}{Class F rewrites}{38}
\contentsline {subsection}{Class M rewrites}{39}
\contentsline {section}{\numberline {7}Definition and properties of the translation}{44}
\contentsline {paragraph}{Well-formedness}{54}
Simple regexes will identify which levels each line belongs to, and you can filter the file based on that. Once you have the table of contents the way you want it, insert \nofiles in the appropriate place (the style sheet?), which means that Latex will read the auxiliary files but not overwrite them.