2
votes

I found out, that doxygen add hyphenation hints for latex when outputting text of "\c" command, like:

 {\ttfamily on\-Ready\-State\-Change\-Listener}

I want to disable this behavior (so onReadyStateChangeListener won't be hyphenated). Is that possible and how?

2

2 Answers

2
votes

No this is not possible. Without hyphenation hints LaTeX will often run long identifiers off the page and into the margin, which is the reason why they were introduced.

If you really want to get rid of it have a look at the function filterLatexString() in src/utils.cpp and remove the if in the default case at the end of the function.

1
votes

I found this is possible in Doxygen 1.8.9.1, using a small workaround job.

  1. Create a custom header.tex file for use with Doxygen. (Instructions)
  2. Find the line in the header.tex file that starts \newcommand{\+}. If you don't find that text, insert an empty line towards the top of the document.
  3. Replace that line with the following text:

    \newcommand{\+}{}

  4. Use the header.tex file with your Doxygen output (Instructions)

This effectively disables all of the hyphenation marks that Doxygen adds to the words.

NOTES: This is for words with \+ added (e.g. D\+O\+X\+Y\+G\+E\+N). It may work for \- if you just substitute the minus sign into the steps above, but I have not verified that.

I found some itentifiers to still be hyphenated after applying this, but in more reasonable places.

Also, do watch out for text running into the margins, as noted by @doxygen.