Q:

How to get \s\p in doxygen documentation?

I want to include \s\p in the final documentation generated by doxygen. Below is an example comment block from a Java file:
/**
 * @section Sample sample
 * Need to use \s\p in the file.
 *
 */

and the resulting documentation should read Need to use \s\p in the file. However, when I run doxygen it replaces the \s\p with <computeruotput/> and the result in the doxygen XML output is Need to use <computeruotput/> in the file. How can I get \s\p in the final output rather than <computeruotput/>?

A:

This is because the backslash \ indicates a special command in doxygen. \p for example is used to format text with a typewriter font. To get \s\p in your output try using \\s\\p, i.e. replace a single backslash \ with two \\. \\ is a special command in doxygen which simply prints a single \.

