Reputation: 11015
I want a fenced code block to appear without any syntax highlighting. For the following code:
~~~
Behold this, for this is an orange.
~~~
I get for
and this
in color. Notice I have not specified the file extension. Do I need to specify a specific extension? I tried with {.txt}
, but that didn't help.
Upvotes: 3
Views: 3105
Reputation: 395
with current versions of doxygen (i used 1.8.13) using the ~~~
-syntax without language specification produces a code block without syntax highlighting.
Common language specifications are
~~~{.cpp}
(C++)~~~{.c}
(C)~~~{.py}
(python)Upvotes: 2
Reputation: 11031
You can try to mimic the styles that doxygen uses, which is done like this:
/**
* <div class="fragment">
* <div class="line">Behold this, for this is an orange.</div>
* <div class="line">General use:</div>
* <div class="line"> ./SLAM_plus_plus -i <filename> --no-detailed-timing</div>
* <div class="line"></div>
* <div class="line">To run the pose-only datasets more quickly:</div>
* <div class="line"> ./SLAM_plus_plus -i <filename> --pose-only --no-detailed-timing</div>
* <div class="line"></div>
* <div class="line">To run incrementally:</div>
* <div class="line"> ./SLAM_plus_plus -nsp <optimize-each-N-verts> -fL -i <filename> --no-detailed-timing</div>
* </div>
*/
While a bit elaborate (each line of text needs to be surrounded by its own <div>
), it will get you what you want, with no highlighting. You might want to surroung this block with \htmlonly
and \endhtmlonly
to avoid whitespace condensation (otherwise sequences of multiple tabs / spaces are replaced by a single space by Doxygen - tweaking css will not help).
Alternately, you can use some more obscure language such as {.f}
or {.vhdl}
which Doxygen knows but which does not have keywords occurring in your text too much.
Upvotes: 0
Reputation: 1175
You have a couple of options here.
Upvotes: 3
Reputation: 8288
Doxygen will apply syntax highlighting to a fenced code block based on either an explicit language ({.cpp}
) or on the implicit language (the language of the code currently being parsed). If the language is not recognized, It appears to assume C/C++ syntax highlighting rules.
Unfortunately, this means that the code will be formatted according to one of the languages supported by Doxygen, and there isn't a way to trick it into displaying the fenced code block without syntax highlighting.
Upvotes: 2