Jepessen
Jepessen

Reputation: 12415

Doxygen: include custom latex command

I want to generate some images using the tikz-uml package These images should be shown also in HTML format, like formulas. In a normal latex document in order to draw these images I write

\documentclass[a4paper,10pt,openright,twoside,final]{memoir}
...
\usepackage{tikz}
\usepackage{tikz-uml}
\usetikzlibrary{positioning}


\begin{document}
 \begin{tikzpicture}
\begin{umlpackage}[x=0,y=0,fill=red!10]{package}
...
\end{umlpackage}
\end{tikzpicture}
\end{document}

In particular I need to call usetikzlibrary{positioning} after package declaration.

In the doxyfile I can put \usepackage{tikz-uml} with EXTRA_PACKAGES variable, that's works also when using LaTeX in html, but I don't know how put into the doxyfile the command \usetikzlibrary{positioning} that I need in order to define my images. How can I tell doxygen to add this line?

Upvotes: 0

Views: 1642

Answers (1)

gmug
gmug

Reputation: 785

I'm not sure if I understood your question correctly, but if you want to insert a sequence of multiple Latex commands into your Doxygen documentation using a custom command, you can do the following:

  1. Write your desired Latex commands in an extra file called "usetikzlib.tex"
  2. Create in your doxyfile a new command:

    ALIASES += "usetikzlib=\latexonly \input ./usetikzlib.tex \endlatexonly"

Then you can call this new command in your documentation using the custom doxygen command:

/**
 * Any text... 
 * \usetikzlib 
 * ...any text.
 */

Upvotes: 1

Related Questions