How do you create a line break in Doxygen markdown?
Asked Answered
C

2

20

I'm having a hard time locating the documentation explaining how to add a line break in Doxygen markdown.

I've tried using two spaces at the end of the line, and I've also tried a single or double newline, but none of these are working for me.

I'm using Doxygen version 1.8.9.1.

Copernicus answered 8/7, 2015 at 16:28 Comment(2)
Did you try \n followed by a space or <br>Micky
@Micky Thanks, both of those work! I'm still hoping there is some other way, or something I was doing wrong, because using things like html or escape sequences in Markdown sort of defeats the point of using markdown.Copernicus
D
16

Put a HTML-break tag <br> where you want to have a linebreak, does the job. At least for man page output and HTML output.

Doubloon answered 22/2, 2017 at 14:5 Comment(3)
If I do this in a \par, I get the warning "warning: Illegal command n as part of a title section" (Doxygen 1.8.14).Hamitic
Emacs interprets literal <br> in weird ways - be warned!Senna
At least with Doxygen 1.8.17, using <br> is spotty in table header cells. \n followed by a space works there.Ferrara
S
10

Add \n followed by a space at the end of your line [1].

Especially recommended when editing with Emacs, which reacts in weird ways to the other suggested solution <br>.

[1] As per @albert's comment. Works for me under Doxygen 1.8.13.

Senna answered 22/6, 2019 at 9:43 Comment(2)
current version is 1.8.15 maybe you can check in 1.8.15 as well (I expect that it will work there as well)Micky
While I prefer <br>, it does not work well in table headers, while \n works fine.Ferrara

© 2022 - 2024 — McMap. All rights reserved.