doxygen.sty 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576
  1. \NeedsTeXFormat{LaTeX2e}
  2. \ProvidesPackage{doxygen}
  3. % Packages used by this style file
  4. \RequirePackage{alltt}
  5. %%\RequirePackage{array} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package
  6. \RequirePackage{calc}
  7. \RequirePackage{float}
  8. %%\RequirePackage{ifthen} %% moved to refman.tex due to workaround for LaTex 2019 version and unmaintained tabu package
  9. \RequirePackage{verbatim}
  10. \RequirePackage[table]{xcolor}
  11. \RequirePackage{longtable_doxygen}
  12. \RequirePackage{tabu_doxygen}
  13. \RequirePackage{fancyvrb}
  14. \RequirePackage{tabularx}
  15. \RequirePackage{multirow}
  16. \RequirePackage{hanging}
  17. \RequirePackage{ifpdf}
  18. \RequirePackage{adjustbox}
  19. \RequirePackage{amssymb}
  20. \RequirePackage{stackengine}
  21. \RequirePackage[normalem]{ulem} % for strikeout, but don't modify emphasis
  22. %---------- Internal commands used in this style file ----------------
  23. \newcommand{\ensurespace}[1]{%
  24. \begingroup%
  25. \setlength{\dimen@}{#1}%
  26. \vskip\z@\@plus\dimen@%
  27. \penalty -100\vskip\z@\@plus -\dimen@%
  28. \vskip\dimen@%
  29. \penalty 9999%
  30. \vskip -\dimen@%
  31. \vskip\z@skip% hide the previous |\vskip| from |\addvspace|
  32. \endgroup%
  33. }
  34. \newcommand{\DoxyHorRuler}[1]{%
  35. \setlength{\parskip}{0ex plus 0ex minus 0ex}%
  36. \ifthenelse{#1=0}%
  37. {%
  38. \hrule%
  39. }%
  40. {%
  41. \hrulefilll%
  42. }%
  43. }
  44. \newcommand{\DoxyLabelFont}{}
  45. \newcommand{\entrylabel}[1]{%
  46. {%
  47. \parbox[b]{\labelwidth-4pt}{%
  48. \makebox[0pt][l]{\DoxyLabelFont#1}%
  49. \vspace{1.5\baselineskip}%
  50. }%
  51. }%
  52. }
  53. \newenvironment{DoxyDesc}[1]{%
  54. \ensurespace{4\baselineskip}%
  55. \begin{list}{}{%
  56. \settowidth{\labelwidth}{20pt}%
  57. %\setlength{\parsep}{0pt}%
  58. \setlength{\itemsep}{0pt}%
  59. \setlength{\leftmargin}{\labelwidth+\labelsep}%
  60. \renewcommand{\makelabel}{\entrylabel}%
  61. }%
  62. \item[#1]%
  63. }{%
  64. \end{list}%
  65. }
  66. \newsavebox{\xrefbox}
  67. \newlength{\xreflength}
  68. \newcommand{\xreflabel}[1]{%
  69. \sbox{\xrefbox}{#1}%
  70. \setlength{\xreflength}{\wd\xrefbox}%
  71. \ifthenelse{\xreflength>\labelwidth}{%
  72. \begin{minipage}{\textwidth}%
  73. \setlength{\parindent}{0pt}%
  74. \hangindent=15pt\bfseries #1\vspace{1.2\itemsep}%
  75. \end{minipage}%
  76. }{%
  77. \parbox[b]{\labelwidth}{\makebox[0pt][l]{\textbf{#1}}}%
  78. }%
  79. }
  80. %---------- Commands used by doxygen LaTeX output generator ----------
  81. % Used by <pre> ... </pre>
  82. \newenvironment{DoxyPre}{%
  83. \small%
  84. \begin{alltt}%
  85. }{%
  86. \end{alltt}%
  87. \normalsize%
  88. }
  89. % Necessary for redefining not defined characters, i.e. "Replacement Character" in tex output.
  90. \newlength{\CodeWidthChar}
  91. \newlength{\CodeHeightChar}
  92. \settowidth{\CodeWidthChar}{?}
  93. \settoheight{\CodeHeightChar}{?}
  94. % Necessary for hanging indent
  95. \newlength{\DoxyCodeWidth}
  96. \newcommand\DoxyCodeLine[1]{\hangpara{\DoxyCodeWidth}{1}{#1}\par}
  97. \newcommand\NiceSpace{%
  98. \discretionary{}{\kern\fontdimen2\font}{\kern\fontdimen2\font}%
  99. }
  100. % Used by @code ... @endcode
  101. \newenvironment{DoxyCode}[1]{%
  102. \par%
  103. \scriptsize%
  104. \normalfont\ttfamily%
  105. \rightskip0pt plus 1fil%
  106. \settowidth{\DoxyCodeWidth}{000000}%
  107. \settowidth{\CodeWidthChar}{?}%
  108. \settoheight{\CodeHeightChar}{?}%
  109. \setlength{\parskip}{0ex plus 0ex minus 0ex}%
  110. \ifthenelse{\equal{#1}{0}}
  111. {
  112. {\lccode`~32 \lowercase{\global\let~}\NiceSpace}\obeyspaces%
  113. }
  114. {
  115. {\lccode`~32 \lowercase{\global\let~}}\obeyspaces%
  116. }
  117. }{%
  118. \normalfont%
  119. \normalsize%
  120. \settowidth{\CodeWidthChar}{?}%
  121. \settoheight{\CodeHeightChar}{?}%
  122. }
  123. % Redefining not defined characters, i.e. "Replacement Character" in tex output.
  124. \def\ucr{\adjustbox{width=\CodeWidthChar,height=\CodeHeightChar}{\stackinset{c}{}{c}{-.2pt}{%
  125. \textcolor{white}{\sffamily\bfseries\small ?}}{%
  126. \rotatebox{45}{$\blacksquare$}}}}
  127. % Used by @example, @include, @includelineno and @dontinclude
  128. \newenvironment{DoxyCodeInclude}[1]{%
  129. \DoxyCode{#1}%
  130. }{%
  131. \endDoxyCode%
  132. }
  133. % Used by @verbatim ... @endverbatim
  134. \newenvironment{DoxyVerb}{%
  135. \footnotesize%
  136. \verbatim%
  137. }{%
  138. \endverbatim%
  139. \normalsize%
  140. }
  141. % Used by @verbinclude
  142. \newenvironment{DoxyVerbInclude}{%
  143. \DoxyVerb%
  144. }{%
  145. \endDoxyVerb%
  146. }
  147. % Used by numbered lists (using '-#' or <ol> ... </ol>)
  148. \newenvironment{DoxyEnumerate}{%
  149. \enumerate%
  150. }{%
  151. \endenumerate%
  152. }
  153. % Used by bullet lists (using '-', @li, @arg, or <ul> ... </ul>)
  154. \newenvironment{DoxyItemize}{%
  155. \itemize%
  156. }{%
  157. \enditemize%
  158. }
  159. % Used by description lists (using <dl> ... </dl>)
  160. \newenvironment{DoxyDescription}{%
  161. \description%
  162. }{%
  163. \enddescription%
  164. }
  165. % Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc
  166. % (only if caption is specified)
  167. \newenvironment{DoxyImage}{%
  168. \begin{figure}[H]%
  169. \begin{center}%
  170. }{%
  171. \end{center}%
  172. \end{figure}%
  173. }
  174. % Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc
  175. % (only if no caption is specified)
  176. \newenvironment{DoxyImageNoCaption}{%
  177. \begin{center}%
  178. }{%
  179. \end{center}%
  180. }
  181. % Used by @image
  182. % (only if inline is specified)
  183. \newenvironment{DoxyInlineImage}{%
  184. }{%
  185. }
  186. % Used by @attention
  187. \newenvironment{DoxyAttention}[1]{%
  188. \begin{DoxyDesc}{#1}%
  189. }{%
  190. \end{DoxyDesc}%
  191. }
  192. % Used by @author and @authors
  193. \newenvironment{DoxyAuthor}[1]{%
  194. \begin{DoxyDesc}{#1}%
  195. }{%
  196. \end{DoxyDesc}%
  197. }
  198. % Used by @date
  199. \newenvironment{DoxyDate}[1]{%
  200. \begin{DoxyDesc}{#1}%
  201. }{%
  202. \end{DoxyDesc}%
  203. }
  204. % Used by @invariant
  205. \newenvironment{DoxyInvariant}[1]{%
  206. \begin{DoxyDesc}{#1}%
  207. }{%
  208. \end{DoxyDesc}%
  209. }
  210. % Used by @note
  211. \newenvironment{DoxyNote}[1]{%
  212. \begin{DoxyDesc}{#1}%
  213. }{%
  214. \end{DoxyDesc}%
  215. }
  216. % Used by @post
  217. \newenvironment{DoxyPostcond}[1]{%
  218. \begin{DoxyDesc}{#1}%
  219. }{%
  220. \end{DoxyDesc}%
  221. }
  222. % Used by @pre
  223. \newenvironment{DoxyPrecond}[1]{%
  224. \begin{DoxyDesc}{#1}%
  225. }{%
  226. \end{DoxyDesc}%
  227. }
  228. % Used by @copyright
  229. \newenvironment{DoxyCopyright}[1]{%
  230. \begin{DoxyDesc}{#1}%
  231. }{%
  232. \end{DoxyDesc}%
  233. }
  234. % Used by @remark
  235. \newenvironment{DoxyRemark}[1]{%
  236. \begin{DoxyDesc}{#1}%
  237. }{%
  238. \end{DoxyDesc}%
  239. }
  240. % Used by @return and @returns
  241. \newenvironment{DoxyReturn}[1]{%
  242. \begin{DoxyDesc}{#1}%
  243. }{%
  244. \end{DoxyDesc}%
  245. }
  246. % Used by @since
  247. \newenvironment{DoxySince}[1]{%
  248. \begin{DoxyDesc}{#1}%
  249. }{%
  250. \end{DoxyDesc}%
  251. }
  252. % Used by @see
  253. \newenvironment{DoxySeeAlso}[1]{%
  254. \begin{DoxyDesc}{#1}%
  255. }{%
  256. \end{DoxyDesc}%
  257. }
  258. % Used by @version
  259. \newenvironment{DoxyVersion}[1]{%
  260. \begin{DoxyDesc}{#1}%
  261. }{%
  262. \end{DoxyDesc}%
  263. }
  264. % Used by @warning
  265. \newenvironment{DoxyWarning}[1]{%
  266. \begin{DoxyDesc}{#1}%
  267. }{%
  268. \end{DoxyDesc}%
  269. }
  270. % Used by @internal
  271. \newenvironment{DoxyInternal}[1]{%
  272. \paragraph*{#1}%
  273. }{%
  274. }
  275. % Used by @par and @paragraph
  276. \newenvironment{DoxyParagraph}[1]{%
  277. \begin{DoxyDesc}{#1}%
  278. }{%
  279. \end{DoxyDesc}%
  280. }
  281. % Used by parameter lists
  282. \newenvironment{DoxyParams}[2][]{%
  283. \tabulinesep=1mm%
  284. \par%
  285. \ifthenelse{\equal{#1}{}}%
  286. {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description
  287. {\ifthenelse{\equal{#1}{1}}%
  288. {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc
  289. {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc
  290. }
  291. \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
  292. \hline%
  293. \endfirsthead%
  294. \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
  295. \hline%
  296. \endhead%
  297. }{%
  298. \end{longtabu*}%
  299. \vspace{6pt}%
  300. }
  301. % Used for fields of simple structs
  302. \newenvironment{DoxyFields}[1]{%
  303. \tabulinesep=1mm%
  304. \par%
  305. \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|X[-1,l]|}%
  306. \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
  307. \hline%
  308. \endfirsthead%
  309. \multicolumn{3}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
  310. \hline%
  311. \endhead%
  312. }{%
  313. \end{longtabu*}%
  314. \vspace{6pt}%
  315. }
  316. % Used for fields simple class style enums
  317. \newenvironment{DoxyEnumFields}[1]{%
  318. \tabulinesep=1mm%
  319. \par%
  320. \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
  321. \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
  322. \hline%
  323. \endfirsthead%
  324. \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
  325. \hline%
  326. \endhead%
  327. }{%
  328. \end{longtabu*}%
  329. \vspace{6pt}%
  330. }
  331. % Used for parameters within a detailed function description
  332. \newenvironment{DoxyParamCaption}{%
  333. \renewcommand{\item}[2][]{\\ \hspace*{2.0cm} ##1 {\em ##2}}%
  334. }{%
  335. }
  336. % Used by return value lists
  337. \newenvironment{DoxyRetVals}[1]{%
  338. \tabulinesep=1mm%
  339. \par%
  340. \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
  341. \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
  342. \hline%
  343. \endfirsthead%
  344. \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
  345. \hline%
  346. \endhead%
  347. }{%
  348. \end{longtabu*}%
  349. \vspace{6pt}%
  350. }
  351. % Used by exception lists
  352. \newenvironment{DoxyExceptions}[1]{%
  353. \tabulinesep=1mm%
  354. \par%
  355. \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
  356. \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
  357. \hline%
  358. \endfirsthead%
  359. \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
  360. \hline%
  361. \endhead%
  362. }{%
  363. \end{longtabu*}%
  364. \vspace{6pt}%
  365. }
  366. % Used by template parameter lists
  367. \newenvironment{DoxyTemplParams}[1]{%
  368. \tabulinesep=1mm%
  369. \par%
  370. \begin{longtabu*}spread 0pt [l]{|X[-1,r]|X[-1,l]|}%
  371. \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
  372. \hline%
  373. \endfirsthead%
  374. \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #1}\\[1ex]%
  375. \hline%
  376. \endhead%
  377. }{%
  378. \end{longtabu*}%
  379. \vspace{6pt}%
  380. }
  381. % Used for member lists
  382. \newenvironment{DoxyCompactItemize}{%
  383. \begin{itemize}%
  384. \setlength{\itemsep}{-3pt}%
  385. \setlength{\parsep}{0pt}%
  386. \setlength{\topsep}{0pt}%
  387. \setlength{\partopsep}{0pt}%
  388. }{%
  389. \end{itemize}%
  390. }
  391. % Used for member descriptions
  392. \newenvironment{DoxyCompactList}{%
  393. \begin{list}{}{%
  394. \setlength{\leftmargin}{0.5cm}%
  395. \setlength{\itemsep}{0pt}%
  396. \setlength{\parsep}{0pt}%
  397. \setlength{\topsep}{0pt}%
  398. \renewcommand{\makelabel}{\hfill}%
  399. }%
  400. }{%
  401. \end{list}%
  402. }
  403. % Used for reference lists (@bug, @deprecated, @todo, etc.)
  404. \newenvironment{DoxyRefList}{%
  405. \begin{list}{}{%
  406. \setlength{\labelwidth}{10pt}%
  407. \setlength{\leftmargin}{\labelwidth}%
  408. \addtolength{\leftmargin}{\labelsep}%
  409. \renewcommand{\makelabel}{\xreflabel}%
  410. }%
  411. }{%
  412. \end{list}%
  413. }
  414. % Used by @bug, @deprecated, @todo, etc.
  415. \newenvironment{DoxyRefDesc}[1]{%
  416. \begin{list}{}{%
  417. \renewcommand\makelabel[1]{\textbf{##1}}%
  418. \settowidth\labelwidth{\makelabel{#1}}%
  419. \setlength\leftmargin{\labelwidth+\labelsep}%
  420. }%
  421. }{%
  422. \end{list}%
  423. }
  424. % Used by parameter lists and simple sections
  425. \newenvironment{Desc}
  426. {\begin{list}{}{%
  427. \settowidth{\labelwidth}{20pt}%
  428. \setlength{\parsep}{0pt}%
  429. \setlength{\itemsep}{0pt}%
  430. \setlength{\leftmargin}{\labelwidth+\labelsep}%
  431. \renewcommand{\makelabel}{\entrylabel}%
  432. }
  433. }{%
  434. \end{list}%
  435. }
  436. % Used by tables
  437. \newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}%
  438. \newenvironment{TabularC}[1]%
  439. {\tabulinesep=1mm
  440. \begin{longtabu*}spread 0pt [c]{*#1{|X[-1]}|}}%
  441. {\end{longtabu*}\par}%
  442. \newenvironment{TabularNC}[1]%
  443. {\begin{tabu}spread 0pt [l]{*#1{|X[-1]}|}}%
  444. {\end{tabu}\par}%
  445. % Used for member group headers
  446. \newenvironment{Indent}{%
  447. \begin{list}{}{%
  448. \setlength{\leftmargin}{0.5cm}%
  449. }%
  450. \item[]\ignorespaces%
  451. }{%
  452. \unskip%
  453. \end{list}%
  454. }
  455. % Used when hyperlinks are turned off
  456. \newcommand{\doxyref}[3]{%
  457. \textbf{#1} (\textnormal{#2}\,\pageref{#3})%
  458. }
  459. % Used to link to a table when hyperlinks are turned on
  460. \newcommand{\doxytablelink}[2]{%
  461. \ref{#1}%
  462. }
  463. % Used to link to a table when hyperlinks are turned off
  464. \newcommand{\doxytableref}[3]{%
  465. \ref{#3}%
  466. }
  467. % Used by @addindex
  468. \newcommand{\lcurly}{\{}
  469. \newcommand{\rcurly}{\}}
  470. % Colors used for syntax highlighting
  471. \definecolor{comment}{rgb}{0.5,0.0,0.0}
  472. \definecolor{keyword}{rgb}{0.0,0.5,0.0}
  473. \definecolor{keywordtype}{rgb}{0.38,0.25,0.125}
  474. \definecolor{keywordflow}{rgb}{0.88,0.5,0.0}
  475. \definecolor{preprocessor}{rgb}{0.5,0.38,0.125}
  476. \definecolor{stringliteral}{rgb}{0.0,0.125,0.25}
  477. \definecolor{charliteral}{rgb}{0.0,0.5,0.5}
  478. \definecolor{vhdldigit}{rgb}{1.0,0.0,1.0}
  479. \definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43}
  480. \definecolor{vhdllogic}{rgb}{1.0,0.0,0.0}
  481. \definecolor{vhdlchar}{rgb}{0.0,0.0,0.0}
  482. % Color used for table heading
  483. \newcommand{\tableheadbgcolor}{lightgray}%
  484. % Version of hypertarget with correct landing location
  485. \newcommand{\Hypertarget}[1]{\Hy@raisedlink{\hypertarget{#1}{}}}
  486. % possibility to have sections etc. be within the margins
  487. % unfortunately had to copy part of book.cls and add \raggedright
  488. \makeatletter
  489. \newcommand\doxysection{\@startsection {section}{1}{\z@}%
  490. {-3.5ex \@plus -1ex \@minus -.2ex}%
  491. {2.3ex \@plus.2ex}%
  492. {\raggedright\normalfont\Large\bfseries}}
  493. \newcommand\doxysubsection{\@startsection{subsection}{2}{\z@}%
  494. {-3.25ex\@plus -1ex \@minus -.2ex}%
  495. {1.5ex \@plus .2ex}%
  496. {\raggedright\normalfont\large\bfseries}}
  497. \newcommand\doxysubsubsection{\@startsection{subsubsection}{3}{\z@}%
  498. {-3.25ex\@plus -1ex \@minus -.2ex}%
  499. {1.5ex \@plus .2ex}%
  500. {\raggedright\normalfont\normalsize\bfseries}}
  501. \newcommand\doxyparagraph{\@startsection{paragraph}{4}{\z@}%
  502. {3.25ex \@plus1ex \@minus.2ex}%
  503. {-1em}%
  504. {\raggedright\normalfont\normalsize\bfseries}}
  505. \newcommand\doxysubparagraph{\@startsection{subparagraph}{5}{\parindent}%
  506. {3.25ex \@plus1ex \@minus .2ex}%
  507. {-1em}%
  508. {\raggedright\normalfont\normalsize\bfseries}}
  509. \makeatother
  510. % Define caption that is also suitable in a table
  511. \makeatletter
  512. \def\doxyfigcaption{%
  513. \refstepcounter{figure}%
  514. \@dblarg{\@caption{figure}}}
  515. \makeatother