1

In doxygen if you want your formulas to be formatted correctly you must do:

\f$ x=2 \f$

I have lots of md files with math formulas. These files are part of an internal wiki and must abide by the algorithmic rules of that wiki. Which means latex is formatted normally, i.e $x=2$.

However I would also like to complement the documentation with doxygen. But then the generated math sections are not formatted and appear as plain latex code.

Is there anyway I can disable that \f?

The only alternative I can think of is having a script that copies the md files to a temp directory, replace $ with \f$ then instruct doxygen to use those files instead. This is a possibility but an ugly one. Is there anything you can do to avoid \f ?

Makogan
  • 8,208
  • 7
  • 44
  • 112

1 Answers1

1

You don't really have to copy the files, a possibility would be to write a filter that does the you in doxygen for you (the filter will read the file and output the altered output to stdout).

From the documentation https://www.doxygen.nl/manual/config.html#cfg_filter_patterns):

FILTER_PATTERNS

The FILTER_PATTERNS tag can be used to specify filters on a per file pattern basis. Doxygen will compare the file name with each pattern and apply the filter if there is a match. The filters are a list of the form: pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how filters are used. If the FILTER_PATTERNS tag is empty or if none of the patterns match the file name, INPUT_FILTER is applied.

Note that for custom extensions or not directly supported extensions you also need to set EXTENSION_MAPPING for the extension otherwise the files are not properly processed by doxygen.

Makogan
  • 8,208
  • 7
  • 44
  • 112
albert
  • 8,285
  • 3
  • 19
  • 32