Search code examples
includedoxygen

Doxygen include plain text


Is there a way to include plain text in a doxygen file

 Hello Wold
 ----------

 @include helloworld.txt

without it ending up in a fragment like:

I dont want this

​I wanted it to end up like the other text I write in a .markdown file:

I want this


Solution

  • I'm sorry to say I don't think there's an easy way to do this as of May 2016 - what you really need is a mdinclude command to match htmlinclude.

    The problem is that Markdown is processed as a pre-processing step and the output from that then run through the normal Doxygen processing detecting generated HTML and special commands.

    So, unless you want to make a submission to Doxygen, the only way I can think of is to do your own pre-processing for this particular include.

    You could do that in a build step where you use some Unix commands or a script to merge in a file at the include stage.

    If you wanted this driven by Doxygen you could use a custom file extension and write your own filter, as described in this SO answer