doxygen.sty 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898
  1. \NeedsTeXFormat{LaTeX2e}
  2. \ProvidesPackage{doxygen}
  3. % Packages used by this style file
  4. \RequirePackage{alltt}
  5. \RequirePackage{array}
  6. \RequirePackage{calc}
  7. \RequirePackage{float}
  8. \RequirePackage{ifthen}
  9. \RequirePackage{verbatim}
  10. \RequirePackage{varwidth}
  11. \RequirePackage[table]{xcolor}
  12. \RequirePackage{longtable}
  13. \RequirePackage{xltabular}
  14. \RequirePackage{tabularray}
  15. \ExplSyntaxOn
  16. \IfPackageAtLeastTF{tabularray}{2025-03-11}
  17. {
  18. \IfPackageAtLeastTF{tabularray}{2025-03-12}
  19. {
  20. %newer version, do nothing
  21. }
  22. {
  23. %the required version
  24. \bool_gset_false:N \g__tblr_use_intarray_bool
  25. }
  26. }
  27. {
  28. %older version, do nothing
  29. }
  30. \ExplSyntaxOff
  31. \UseTblrLibrary{varwidth}
  32. \ExplSyntaxOn
  33. \int_new:N \g__doxy_nohyper_int
  34. \AtBeginDocument
  35. {
  36. \IfPackageAtLeastTF{tabularray}{2024-02-16}
  37. {
  38. \renewenvironment{tblrNoHyper}
  39. {
  40. \int_compare:nNnT {\g__doxy_nohyper_int} = {0} {\begin{NoHyper}}
  41. \int_gincr:N \g__doxy_nohyper_int
  42. }
  43. {
  44. \int_gdecr:N \g__doxy_nohyper_int
  45. \int_compare:nNnT {\g__doxy_nohyper_int} = {0} {\end{NoHyper}}
  46. }
  47. }
  48. {
  49. %older version, doesn't provide tblrNoHyper
  50. }
  51. }
  52. \ExplSyntaxOff
  53. \ExplSyntaxOn
  54. \dim_new:N \doxytablewidth
  55. \NewDocumentCommand \doxycalculatetablewidth {}
  56. {
  57. \cs_set_protected:Nn \__tblr_build_whole:
  58. {
  59. \__tblr_get_table_width:
  60. \dim_gset:Nn \doxytablewidth { \tablewidth }
  61. }
  62. }
  63. \ExplSyntaxOff
  64. \RequirePackage{fancyvrb}
  65. \RequirePackage{tabularx}
  66. \RequirePackage{multicol}
  67. \RequirePackage{multirow}
  68. \RequirePackage{hanging}
  69. \RequirePackage{ifpdf}
  70. \RequirePackage{adjustbox}
  71. \RequirePackage{amssymb}
  72. \RequirePackage{stackengine}
  73. \RequirePackage{enumitem}
  74. \RequirePackage{alphalph}
  75. \RequirePackage[normalem]{ulem} % for strikeout, but don't modify emphasis
  76. %---------- Internal commands used in this style file ----------------
  77. \newcommand{\ensurespace}[1]{%
  78. \begingroup%
  79. \setlength{\dimen@}{#1}%
  80. \vskip\z@\@plus\dimen@%
  81. \penalty -100\vskip\z@\@plus -\dimen@%
  82. \vskip\dimen@%
  83. \penalty 9999%
  84. \vskip -\dimen@%
  85. \vskip\z@skip% hide the previous |\vskip| from |\addvspace|
  86. \endgroup%
  87. }
  88. \newcommand{\DoxyHorRuler}[1]{%
  89. \setlength{\parskip}{0ex plus 0ex minus 0ex}%
  90. \ifthenelse{#1=0}%
  91. {%
  92. \hrule%
  93. }%
  94. {%
  95. \hrulefilll%
  96. }%
  97. }
  98. \newcommand{\DoxyLabelFont}{}
  99. \newcommand{\entrylabel}[1]{%
  100. {%
  101. \parbox[b]{\labelwidth-4pt}{%
  102. \makebox[0pt][l]{\DoxyLabelFont#1}%
  103. \vspace{1.5\baselineskip}%
  104. }%
  105. }%
  106. }
  107. \newenvironment{DoxyDesc}[1]{%
  108. \ensurespace{4\baselineskip}%
  109. \begin{list}{}{%
  110. \settowidth{\labelwidth}{20pt}%
  111. %\setlength{\parsep}{0pt}%
  112. \setlength{\itemsep}{0pt}%
  113. \setlength{\leftmargin}{\labelwidth+\labelsep}%
  114. \renewcommand{\makelabel}{\entrylabel}%
  115. }%
  116. \item[#1]%
  117. }{%
  118. \end{list}%
  119. }
  120. \newsavebox{\xrefbox}
  121. \newlength{\xreflength}
  122. \newcommand{\xreflabel}[1]{%
  123. \sbox{\xrefbox}{#1}%
  124. \setlength{\xreflength}{\wd\xrefbox}%
  125. \ifthenelse{\xreflength>\labelwidth}{%
  126. \begin{minipage}{\textwidth}%
  127. \setlength{\parindent}{0pt}%
  128. \hangindent=15pt\bfseries #1\vspace{1.2\itemsep}%
  129. \end{minipage}%
  130. }{%
  131. \parbox[b]{\labelwidth}{\makebox[0pt][l]{\textbf{#1}}}%
  132. }%
  133. }
  134. %---------- Commands used by doxygen LaTeX output generator ----------
  135. % Used by <pre> ... </pre>
  136. \newenvironment{DoxyPre}{%
  137. \small%
  138. \begin{alltt}%
  139. }{%
  140. \end{alltt}%
  141. \normalsize%
  142. }
  143. % Necessary for redefining not defined characters, i.e. "Replacement Character" in tex output.
  144. \newlength{\CodeWidthChar}
  145. \newlength{\CodeHeightChar}
  146. \settowidth{\CodeWidthChar}{?}
  147. \settoheight{\CodeHeightChar}{?}
  148. % Necessary for hanging indent
  149. \newlength{\DoxyCodeWidth}
  150. \newcommand\DoxyCodeLine[1]{
  151. \ifthenelse{\equal{\detokenize{#1}}{}}
  152. {
  153. \vspace*{\baselineskip}
  154. }
  155. {
  156. \hangpara{\DoxyCodeWidth}{1}{#1}\par
  157. }
  158. }
  159. \newcommand\NiceSpace{%
  160. \discretionary{}{\kern\fontdimen2\font}{\kern\fontdimen2\font}%
  161. }
  162. % Used by @code ... @endcode
  163. \newenvironment{DoxyCode}[1]{%
  164. \par%
  165. \vspace{2pt}%
  166. \scriptsize%
  167. \normalfont\ttfamily%
  168. \rightskip0pt plus 1fil%
  169. \settowidth{\DoxyCodeWidth}{000000}%
  170. \settowidth{\CodeWidthChar}{?}%
  171. \settoheight{\CodeHeightChar}{?}%
  172. \setlength{\parskip}{0ex plus 0ex minus 0ex}%
  173. \ifthenelse{\equal{#1}{0}}%
  174. {%
  175. {\lccode`~32 \lowercase{\global\let~}\NiceSpace}\obeyspaces%
  176. }%
  177. {%
  178. {\lccode`~32 \lowercase{\global\let~}\relax}\obeyspaces%
  179. }%
  180. \vspace{2pt}%
  181. }{%
  182. \normalfont%
  183. \normalsize%
  184. \settowidth{\CodeWidthChar}{?}%
  185. \settoheight{\CodeHeightChar}{?}%
  186. }
  187. \newlength{\ttcharwidth}%
  188. \newenvironment{DoxyEmbeddedDoc}[1][4]{%
  189. \begingroup%
  190. \scriptsize%
  191. \settowidth{\ttcharwidth}{\scriptsize\texttt{M}}%
  192. \setlength{\leftskip}{#1\ttcharwidth}%
  193. \setlength{\@totalleftmargin}{#1\ttcharwidth}%
  194. \addtolength{\linewidth}{-#1\ttcharwidth}%
  195. \parshape 0 %
  196. \noindent\ignorespaces%
  197. }{%
  198. \par\endgroup
  199. }
  200. % Redefining not defined characters, i.e. "Replacement Character" in tex output.
  201. \def\ucr{\adjustbox{width=\CodeWidthChar,height=\CodeHeightChar}{\stackinset{c}{}{c}{-.2pt}{%
  202. \textcolor{white}{\sffamily\bfseries\small ?}}{%
  203. \rotatebox{45}{$\blacksquare$}}}}
  204. % Used by @example, @include, @includelineno and @dontinclude
  205. \newenvironment{DoxyCodeInclude}[1]{%
  206. \DoxyCode{#1}%
  207. }{%
  208. \endDoxyCode%
  209. }
  210. % Used by @verbatim ... @endverbatim
  211. \newenvironment{DoxyVerb}{%
  212. \par%
  213. \footnotesize%
  214. \verbatim%
  215. }{%
  216. \endverbatim%
  217. \normalsize%
  218. }
  219. % Used by @verbinclude
  220. \newenvironment{DoxyVerbInclude}{%
  221. \DoxyVerb%
  222. }{%
  223. \endDoxyVerb%
  224. }
  225. % Used by numbered lists (using '-#' or <ol> ... </ol>)
  226. \setlistdepth{12}
  227. \newlist{DoxyEnumerate}{enumerate}{12}
  228. \setlist[DoxyEnumerate,1]{label=\arabic*.}
  229. \setlist[DoxyEnumerate,2]{label=(\enumalphalphcnt*)}
  230. \setlist[DoxyEnumerate,3]{label=\roman*.}
  231. \setlist[DoxyEnumerate,4]{label=\enumAlphAlphcnt*.}
  232. \setlist[DoxyEnumerate,5]{label=\arabic*.}
  233. \setlist[DoxyEnumerate,6]{label=(\enumalphalphcnt*)}
  234. \setlist[DoxyEnumerate,7]{label=\roman*.}
  235. \setlist[DoxyEnumerate,8]{label=\enumAlphAlphcnt*.}
  236. \setlist[DoxyEnumerate,9]{label=\arabic*.}
  237. \setlist[DoxyEnumerate,10]{label=(\enumalphalphcnt*)}
  238. \setlist[DoxyEnumerate,11]{label=\roman*.}
  239. \setlist[DoxyEnumerate,12]{label=\enumAlphAlphcnt*.}
  240. % Used by bullet lists (using '-', @li, @arg, or <ul> ... </ul>)
  241. \setlistdepth{12}
  242. \newlist{DoxyItemize}{itemize}{12}
  243. \setlist[DoxyItemize]{label=\textperiodcentered}
  244. \setlist[DoxyItemize,1]{label=\textbullet}
  245. \setlist[DoxyItemize,2]{label=\normalfont\bfseries \textendash}
  246. \setlist[DoxyItemize,3]{label=\textasteriskcentered}
  247. \setlist[DoxyItemize,4]{label=\textperiodcentered}
  248. % Used for check boxes
  249. \newcommand{\DoxyUnchecked}{$\square$}
  250. \newcommand{\DoxyChecked}{\rlap{\raisebox{0.3ex}{\hspace{0.4ex}\tiny \checkmark}}$\square$}
  251. % Used by description lists (using <dl> ... </dl>)
  252. \newenvironment{DoxyDescription}{%
  253. \description%
  254. }{%
  255. \enddescription%
  256. }
  257. % Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc
  258. % (only if caption is specified)
  259. \newenvironment{DoxyImage}{%
  260. \begin{figure}[H]%
  261. \centering%
  262. }{%
  263. \end{figure}%
  264. }
  265. % Used by @image, @dotfile, @dot ... @enddot, and @msc ... @endmsc
  266. % (only if no caption is specified)
  267. \newenvironment{DoxyImageNoCaption}{%
  268. \begin{center}%
  269. }{%
  270. \end{center}%
  271. }
  272. % Used by @image
  273. % (only if inline is specified)
  274. \newenvironment{DoxyInlineImage}{%
  275. }{%
  276. }
  277. % Used by @attention
  278. \newenvironment{DoxyAttention}[1]{%
  279. \begin{DoxyDesc}{#1}%
  280. }{%
  281. \end{DoxyDesc}%
  282. }
  283. % Used by @important
  284. \newenvironment{DoxyImportant}[1]{%
  285. \begin{DoxyDesc}{#1}%
  286. }{%
  287. \end{DoxyDesc}%
  288. }
  289. % Used by @author and @authors
  290. \newenvironment{DoxyAuthor}[1]{%
  291. \begin{DoxyDesc}{#1}%
  292. }{%
  293. \end{DoxyDesc}%
  294. }
  295. % Used by @date
  296. \newenvironment{DoxyDate}[1]{%
  297. \begin{DoxyDesc}{#1}%
  298. }{%
  299. \end{DoxyDesc}%
  300. }
  301. % Used by @invariant
  302. \newenvironment{DoxyInvariant}[1]{%
  303. \begin{DoxyDesc}{#1}%
  304. }{%
  305. \end{DoxyDesc}%
  306. }
  307. % Used by @note
  308. \newenvironment{DoxyNote}[1]{%
  309. \begin{DoxyDesc}{#1}%
  310. }{%
  311. \end{DoxyDesc}%
  312. }
  313. % Used by @post
  314. \newenvironment{DoxyPostcond}[1]{%
  315. \begin{DoxyDesc}{#1}%
  316. }{%
  317. \end{DoxyDesc}%
  318. }
  319. % Used by @pre
  320. \newenvironment{DoxyPrecond}[1]{%
  321. \begin{DoxyDesc}{#1}%
  322. }{%
  323. \end{DoxyDesc}%
  324. }
  325. % Used by @copyright
  326. \newenvironment{DoxyCopyright}[1]{%
  327. \begin{DoxyDesc}{#1}%
  328. }{%
  329. \end{DoxyDesc}%
  330. }
  331. % Used by @remark
  332. \newenvironment{DoxyRemark}[1]{%
  333. \begin{DoxyDesc}{#1}%
  334. }{%
  335. \end{DoxyDesc}%
  336. }
  337. % Used by @return and @returns
  338. \newenvironment{DoxyReturn}[1]{%
  339. \begin{DoxyDesc}{#1}%
  340. }{%
  341. \end{DoxyDesc}%
  342. }
  343. % Used by @since
  344. \newenvironment{DoxySince}[1]{%
  345. \begin{DoxyDesc}{#1}%
  346. }{%
  347. \end{DoxyDesc}%
  348. }
  349. % Used by @see
  350. \newenvironment{DoxySeeAlso}[1]{%
  351. \begin{DoxyDesc}{#1}%
  352. }{%
  353. \end{DoxyDesc}%
  354. }
  355. % Used by @version
  356. \newenvironment{DoxyVersion}[1]{%
  357. \begin{DoxyDesc}{#1}%
  358. }{%
  359. \end{DoxyDesc}%
  360. }
  361. % Used by @warning
  362. \newenvironment{DoxyWarning}[1]{%
  363. \begin{DoxyDesc}{#1}%
  364. }{%
  365. \end{DoxyDesc}%
  366. }
  367. % Used by @par and @paragraph
  368. \newenvironment{DoxyParagraph}[1]{%
  369. \begin{DoxyDesc}{#1}%
  370. }{%
  371. \end{DoxyDesc}%
  372. }
  373. % define a theme for the DoxyTable environment (without caption)
  374. \NewTblrTheme{DoxyTableBareTheme}{
  375. \DefTblrTemplate{firsthead}{default}{}%
  376. \DefTblrTemplate{middlehead, lasthead}{default}{}%
  377. \DefTblrTemplate{contfoot-text}{default}{}%
  378. }
  379. % define a theme for the DoxyTable environment (with caption)
  380. \NewTblrTheme{DoxyTableCaptionTheme}{
  381. \SetTblrStyle{firsthead}{font=\bfseries}{}%
  382. \DefTblrTemplate{middlehead, lasthead}{default}{}%
  383. \DefTblrTemplate{contfoot-text}{default}{}%
  384. }
  385. % Define a table environment to use with Doxygen
  386. % parameters:
  387. % - #1: number of columns
  388. % - #2: table caption (can be empty)
  389. % - #3: label to refer to the table (can be empty)
  390. % - #4: 1=table has a heading row, 0=no heading row
  391. % - #5: body of the table (part between start{DoxyTable}..\end{DoxyTable}
  392. \NewDocumentEnvironment{DoxyTable}{m +m m m +b}{%
  393. \par%
  394. \def\hascaption{#2}%
  395. \def\haslabel{#3}%
  396. \ifx\hascaption\empty% if caption is empty
  397. \SetTblrOuter[longtblr]{theme=DoxyTableBareTheme,entry=none}% table without caption or label
  398. \else% caption not empty
  399. \ifx\haslabel\empty% if label is empty
  400. \SetTblrOuter[longtblr]{theme=DoxyTableCaptionTheme,caption={#2}}% set table caption
  401. \else% label not empty
  402. \SetTblrOuter[longtblr]{theme=DoxyTableCaptionTheme,caption={#2},label={#3}}% set table caption and label
  403. \fi%
  404. \fi%
  405. \begingroup
  406. \doxycalculatetablewidth
  407. \sbox0{% first render the table in a savebox to calculate the width of the table which will be stored in \doxytablewidth
  408. \begin{tblr}{hlines,vlines,measure=vbox,colspec={*{#1}{l}}}%
  409. #5
  410. \end{tblr}%
  411. }% end of sbox0
  412. \endgroup
  413. \ifdim\doxytablewidth>\linewidth% use flexible columns
  414. % now render the table for real
  415. \begin{longtblr}{hlines,vlines,% automatically set horizontal and vertical cell lines
  416. measure=vbox,% needed to allow nested lists and tables
  417. colspec={*{#1}{X[-1]}},% set column type for all columns
  418. rowhead=#4} % set which row is the header (0=disable, 1=enable)
  419. #5
  420. \end{longtblr}%
  421. \else% use fixed left aligned columns
  422. % now render the table for real
  423. \begin{longtblr}{hlines,vlines,% automatically set horizontal and vertical cell lines
  424. measure=vbox,% needed to allow nested lists and tables
  425. colspec={*{#1}{l}},% set column type for all columns
  426. rowhead=#4} % set which row is the header (0=disable, 1=enable)
  427. #5
  428. \end{longtblr}%
  429. \fi%
  430. }{% no end marker needed anymore
  431. }%
  432. % Define a nested table environment to use with Doxygen
  433. % parameters:
  434. % - #1: number of columns
  435. % - #2: 1=table has a heading row, 0=no heading row
  436. \NewDocumentEnvironment{DoxyTableNested}{m m +b}{%
  437. \begingroup
  438. \doxycalculatetablewidth
  439. \sbox0{% first render the table in a savebox to calculate the width of the table which will be stored in \doxytablewidth
  440. \begin{tblr}{hlines,vlines,measure=vbox,colspec={*{#1}{l}}}%
  441. #3
  442. \end{tblr}%
  443. }% end of sbox0
  444. \endgroup
  445. \ifdim\doxytablewidth>\linewidth% use flexible columns
  446. % now render the table for real
  447. \begin{tblr}{hlines,vlines,% automatically set horizontal and vertical cell lines
  448. measure=vbox,% needed to allow nested lists and tables
  449. colspec={*{#1}{X[-1]}},% set column type for all columns
  450. rowhead=#2} % set which row is the header (0=disable, 1=enable)
  451. #3
  452. \end{tblr}%
  453. \else% use fixed left aligned columns
  454. % now render the table for real
  455. \begin{tblr}{hlines,vlines,% automatically set horizontal and vertical cell lines
  456. measure=vbox,% needed to allow nested lists and tables
  457. colspec={*{#1}{l}},% set column type for all columns
  458. rowhead=#2} % set which row is the header (0=disable, 1=enable)
  459. #3
  460. \end{tblr}%
  461. \fi%
  462. }{% no end marker needed anymore
  463. }%
  464. % Defines a parameter table
  465. % Arguments:
  466. % #1: Number of columns
  467. % #2: Initial format for tblr, i.e. format except for last column
  468. % #3: Title of the table e.g. Params, Enumerator
  469. % #4: Body
  470. \NewDocumentCommand{\DoxyParamTable}{m m +m +m}{%
  471. \SetTblrOuter[longtblr]{theme=DoxyTableBareTheme,entry=none}% set table caption and label
  472. \begingroup
  473. \doxycalculatetablewidth
  474. \sbox0{% render table off-screen first to capture its width in \doxytablewidth
  475. \begin{tblr}{measure=vbox,colspec={*{#1}{|l}|}}%
  476. \SetCell[c=#1]{l} \tf{#3} \\[1ex]%
  477. \hline%
  478. #4
  479. \end{tblr}%
  480. }%
  481. \endgroup
  482. \ifdim\doxytablewidth>\linewidth% use flexible columns
  483. \edef\DoxyTableColSpec{#2X[-1]}%
  484. \else%
  485. \edef\DoxyTableColSpec{#2l}%
  486. \fi%
  487. \expanded{\noexpand\begin{longtblr}[l,theme=DoxyTableBareTheme]%
  488. {vline{1-Z}={2-Z}{solid},% show vertical lines for all rows except the first
  489. measure=vbox,% needed to allow nested lists and tables
  490. colspec=\DoxyTableColSpec}}% set column type for all columns
  491. \SetCell[c=#1]{l} \tf{#3} \\\nopagebreak%
  492. \hline\nopagebreak%
  493. #4
  494. \end{longtblr}%
  495. \par\addvspace{6pt}%
  496. }
  497. % Used by parameter lists
  498. \NewDocumentEnvironment{DoxyParams}{O{0} m +b}{%
  499. \par
  500. \ifnum#1>1
  501. \DoxyParamTable{4}{lll}{#2}{#3}
  502. \else
  503. \ifnum#1>0
  504. \DoxyParamTable{3}{ll}{#2}{#3}
  505. \else
  506. \DoxyParamTable{2}{l}{#2}{#3}
  507. \fi
  508. \fi
  509. }{}
  510. % Used for fields of simple structs
  511. \NewDocumentEnvironment{DoxyFields}{m +b}{%
  512. \par
  513. \DoxyParamTable{3}{rl}{#1}{#2}
  514. }{}
  515. % Used for fields simple class style enums
  516. \NewDocumentEnvironment{DoxyEnumFields}{O{2} m +b}{%
  517. \par
  518. \ifnum#1>2
  519. \DoxyParamTable{3}{lr}{#2}{#3}
  520. \else
  521. \DoxyParamTable{2}{l}{#2}{#3}
  522. \fi
  523. }{}
  524. \NewDocumentCommand{\tf}{m}{%
  525. \hspace{-\tabcolsep}\bfseries #1%
  526. }
  527. % Used for parameters within a detailed function description
  528. \newenvironment{DoxyParamCaption}{%
  529. \renewcommand{\item}[3][]{\\ \hspace*{2.0cm} ##1 {\em ##2}##3}%
  530. }{%
  531. }
  532. % Used by return value lists
  533. \NewDocumentEnvironment{DoxyRetVals}{m +b}{%
  534. \par
  535. \DoxyParamTable{2}{r}{#1}{#2}
  536. }{}
  537. % Used by exception lists
  538. \NewDocumentEnvironment{DoxyExceptions}{m +b}{%
  539. \par
  540. \DoxyParamTable{2}{r}{#1}{#2}
  541. }{}
  542. % Used by template parameter lists
  543. \NewDocumentEnvironment{DoxyTemplParams}{m +b}{%
  544. \par
  545. \DoxyParamTable{2}{r}{#1}{#2}
  546. }{}
  547. % Used for member lists
  548. \newenvironment{DoxyCompactItemize}{%
  549. \begin{itemize}%
  550. \setlength{\itemsep}{-3pt}%
  551. \setlength{\parsep}{0pt}%
  552. \setlength{\topsep}{0pt}%
  553. \setlength{\partopsep}{0pt}%
  554. }{%
  555. \end{itemize}%
  556. }
  557. % Used for member descriptions
  558. \newenvironment{DoxyCompactList}{%
  559. \begin{list}{}{%
  560. \setlength{\leftmargin}{0.5cm}%
  561. \setlength{\itemsep}{0pt}%
  562. \setlength{\parsep}{0pt}%
  563. \setlength{\topsep}{0pt}%
  564. \renewcommand{\makelabel}{\hfill}%
  565. }%
  566. }{%
  567. \end{list}%
  568. }
  569. % Used for reference lists (@bug, @deprecated, @todo, etc.)
  570. \newenvironment{DoxyRefList}{%
  571. \begin{list}{}{%
  572. \setlength{\labelwidth}{10pt}%
  573. \setlength{\leftmargin}{\labelwidth}%
  574. \addtolength{\leftmargin}{\labelsep}%
  575. \renewcommand{\makelabel}{\xreflabel}%
  576. }%
  577. }{%
  578. \end{list}%
  579. }
  580. % Used by @bug, @deprecated, @todo, etc.
  581. \newenvironment{DoxyRefDesc}[1]{%
  582. \begin{list}{}{%
  583. \renewcommand\makelabel[1]{\textbf{##1}}%
  584. \settowidth\labelwidth{\makelabel{#1}}%
  585. \setlength\leftmargin{\labelwidth+\labelsep}%
  586. }%
  587. }{%
  588. \end{list}%
  589. }
  590. % Used by parameter lists and simple sections
  591. \newenvironment{Desc}
  592. {\begin{list}{}{%
  593. \settowidth{\labelwidth}{20pt}%
  594. \setlength{\parsep}{0pt}%
  595. \setlength{\itemsep}{0pt}%
  596. \setlength{\leftmargin}{\labelwidth+\labelsep}%
  597. \renewcommand{\makelabel}{\entrylabel}%
  598. }
  599. }{%
  600. \end{list}%
  601. }
  602. % Used by tables
  603. \newcommand{\PBS}[1]{\let\temp=\\#1\let\\=\temp}%
  604. % Used for member group headers
  605. \newenvironment{Indent}{%
  606. \begin{list}{}{%
  607. \setlength{\leftmargin}{0.5cm}%
  608. }%
  609. \item[]\ignorespaces%
  610. }{%
  611. \unskip%
  612. \end{list}%
  613. }
  614. \newsavebox{\doxymboxbox}
  615. \newlength{\doxymboxlength}
  616. \newcommand{\doxymbox}[1]{%
  617. \sbox{\doxymboxbox}{#1}%
  618. \setlength{\doxymboxlength}{\wd\doxymboxbox}%
  619. \ifthenelse{\doxymboxlength>\linewidth}{%
  620. #1%
  621. }{%
  622. \mbox{#1}%
  623. }%
  624. }
  625. % Used when hyperlinks are turned on
  626. \newcommand{\doxylink}[2]{%
  627. \doxymbox{\hyperlink{#1}{#2}}%
  628. }
  629. % Used for the cite command
  630. \newcommand{\DoxyCite}[3]{%
  631. \ifthenelse{#3=1}% 1 with square parenthesis
  632. {
  633. \ifthenelse{\equal{#2}{number}}%
  634. { \cite{#1} }%
  635. {%
  636. \ifthenelse{\equal{#2}{shortauthor}}%
  637. { \citetext{\citeauthor{#1}} }%
  638. {%
  639. \ifthenelse{\equal{#2}{year}}%
  640. { \citeyearpar{#1} }%
  641. {}%
  642. }%
  643. }%
  644. }%
  645. {%
  646. \ifthenelse{\equal{#2}{number}}%
  647. { \citealp{#1} }%
  648. {%
  649. \ifthenelse{\equal{#2}{shortauthor}}%
  650. { \citeauthor{#1} }%
  651. {%
  652. \ifthenelse{\equal{#2}{year}}%
  653. { \citeyear{#1} }%
  654. {}%
  655. }%
  656. }%
  657. }%
  658. }
  659. % Used when hyperlinks are turned on
  660. % Third argument is the SectionType, see the doxygen internal
  661. % documentation for the values (relevant: Page ... Subsubsection).
  662. \newcommand{\doxysectlink}[3]{%
  663. \doxymbox{\hyperlink{#1}{#2}}%
  664. }
  665. % Used when hyperlinks are turned off
  666. \newcommand{\doxyref}[3]{%
  667. \textbf{#1} (\textnormal{#2}\,\pageref{#3})%
  668. }
  669. % Used when hyperlinks are turned off
  670. % Fourth argument is the SectionType, see the doxygen internal
  671. % documentation for the values (relevant: Page ... Subsubsection).
  672. \newcommand{\doxysectref}[4]{%
  673. \textbf{#1} (\textnormal{#2}\,\pageref{#3})%
  674. }
  675. % Used to link to a table when hyperlinks are turned on
  676. \newcommand{\doxytablelink}[2]{%
  677. \ref{#1}%
  678. }
  679. % Used to link to a table when hyperlinks are turned off
  680. \newcommand{\doxytableref}[3]{%
  681. \ref{#3}%
  682. }
  683. % Used by @addindex
  684. \newcommand{\lcurly}{\{}
  685. \newcommand{\rcurly}{\}}
  686. % Colors used for syntax highlighting
  687. \definecolor{comment}{rgb}{0.5,0.0,0.0}
  688. \definecolor{keyword}{rgb}{0.0,0.5,0.0}
  689. \definecolor{keywordtype}{rgb}{0.38,0.25,0.125}
  690. \definecolor{keywordflow}{rgb}{0.88,0.5,0.0}
  691. \definecolor{preprocessor}{rgb}{0.5,0.38,0.125}
  692. \definecolor{stringliteral}{rgb}{0.0,0.125,0.25}
  693. \definecolor{charliteral}{rgb}{0.0,0.5,0.5}
  694. \definecolor{xmlcdata}{rgb}{0.0,0.0,0.0}
  695. \definecolor{vhdldigit}{rgb}{1.0,0.0,1.0}
  696. \definecolor{vhdlkeyword}{rgb}{0.43,0.0,0.43}
  697. \definecolor{vhdllogic}{rgb}{1.0,0.0,0.0}
  698. \definecolor{vhdlchar}{rgb}{0.0,0.0,0.0}
  699. % Color used for table heading
  700. \newcommand{\tableheadbgcolor}{lightgray}%
  701. % Version of hypertarget with correct landing location
  702. \newcommand{\Hypertarget}[1]{\Hy@raisedlink{\hypertarget{#1}{}}}
  703. % possibility to have sections etc. be within the margins
  704. % unfortunately had to copy part of book.cls and add \raggedright
  705. \makeatletter
  706. \newcounter{subsubsubsection}[subsubsection]
  707. \newcounter{subsubsubsubsection}[subsubsubsection]
  708. \newcounter{subsubsubsubsubsection}[subsubsubsubsection]
  709. \newcounter{subsubsubsubsubsubsection}[subsubsubsubsubsection]
  710. \renewcommand{\thesubsubsubsection}{\thesubsubsection.\arabic{subsubsubsection}}
  711. \renewcommand{\thesubsubsubsubsection}{\thesubsubsubsection.\arabic{subsubsubsubsection}}
  712. \renewcommand{\thesubsubsubsubsubsection}{\thesubsubsubsubsection.\arabic{subsubsubsubsubsection}}
  713. \renewcommand{\thesubsubsubsubsubsubsection}{\thesubsubsubsubsubsection.\arabic{subsubsubsubsubsubsection}}
  714. \newcommand{\subsubsubsectionmark}[1]{}
  715. \newcommand{\subsubsubsubsectionmark}[1]{}
  716. \newcommand{\subsubsubsubsubsectionmark}[1]{}
  717. \newcommand{\subsubsubsubsubsubsectionmark}[1]{}
  718. \def\toclevel@subsubsubsection{4}
  719. \def\toclevel@subsubsubsubsection{5}
  720. \def\toclevel@subsubsubsubsubsection{6}
  721. \def\toclevel@subsubsubsubsubsubsection{7}
  722. \def\toclevel@paragraph{8}
  723. \def\toclevel@subparagraph{9}
  724. \newcommand\doxysection{\@startsection {section}{1}{\z@}%
  725. {-3.5ex \@plus -1ex \@minus -.2ex}%
  726. {2.3ex \@plus.2ex}%
  727. {\raggedright\normalfont\Large\bfseries}}
  728. \newcommand\doxysubsection{\@startsection{subsection}{2}{\z@}%
  729. {-3.25ex\@plus -1ex \@minus -.2ex}%
  730. {1.5ex \@plus .2ex}%
  731. {\raggedright\normalfont\large\bfseries}}
  732. \newcommand\doxysubsubsection{\@startsection{subsubsection}{3}{\z@}%
  733. {-3.25ex\@plus -1ex \@minus -.2ex}%
  734. {1.5ex \@plus .2ex}%
  735. {\raggedright\normalfont\normalsize\bfseries}}
  736. \newcommand\doxysubsubsubsection{\@startsection{subsubsubsection}{4}{\z@}%
  737. {-3.25ex\@plus -1ex \@minus -.2ex}%
  738. {1.5ex \@plus .2ex}%
  739. {\raggedright\normalfont\normalsize\bfseries}}
  740. \newcommand\doxysubsubsubsubsection{\@startsection{subsubsubsubsection}{5}{\z@}%
  741. {-3.25ex\@plus -1ex \@minus -.2ex}%
  742. {1.5ex \@plus .2ex}%
  743. {\raggedright\normalfont\normalsize\bfseries}}
  744. \newcommand\doxysubsubsubsubsubsection{\@startsection{subsubsubsubsubsection}{6}{\z@}%
  745. {-3.25ex\@plus -1ex \@minus -.2ex}%
  746. {1.5ex \@plus .2ex}%
  747. {\raggedright\normalfont\normalsize\bfseries}}
  748. \newcommand\doxysubsubsubsubsubsubsection{\@startsection{subsubsubsubsubsubsection}{7}{\z@}%
  749. {-3.25ex\@plus -1ex \@minus -.2ex}%
  750. {1.5ex \@plus .2ex}%
  751. {\raggedright\normalfont\normalsize\bfseries}}
  752. \newcommand\doxyparagraph{\@startsection{paragraph}{8}{\z@}%
  753. {-3.25ex\@plus -1ex \@minus -.2ex}%
  754. {1.5ex \@plus .2ex}%
  755. {\raggedright\normalfont\normalsize\bfseries}}
  756. \newcommand\doxysubparagraph{\@startsection{subparagraph}{9}{\parindent}%
  757. {-3.25ex\@plus -1ex \@minus -.2ex}%
  758. {1.5ex \@plus .2ex}%
  759. {\raggedright\normalfont\normalsize\bfseries}}
  760. \newcommand\l@subsubsubsection{\@dottedtocline{4}{10.0em}{7.8em}}
  761. \newcommand\l@subsubsubsubsection{\@dottedtocline{5}{13.0em}{9.4em}}
  762. \newcommand\l@subsubsubsubsubsection{\@dottedtocline{6}{15.0em}{11em}}
  763. \newcommand\l@subsubsubsubsubsubsection{\@dottedtocline{7}{18.0em}{12.6em}}
  764. \renewcommand\l@paragraph{\@dottedtocline{8}{21.0em}{14.2em}}
  765. \renewcommand\l@subparagraph{\@dottedtocline{9}{24.0em}{15.8em}}
  766. \makeatother
  767. % the sectsty doesn't look to be maintained but gives, in our case, some warning like:
  768. % LaTeX Warning: Command \underline has changed.
  769. % Check if current package is valid.
  770. % unfortunately had to copy the relevant part
  771. \newcommand*{\doxypartfont} [1]
  772. {\gdef\SS@partnumberfont{\SS@sectid{0}\SS@nopart\SS@makeulinepartchap#1}
  773. \gdef\SS@parttitlefont{\SS@sectid{0}\SS@titlepart\SS@makeulinepartchap#1}}
  774. \newcommand*{\doxychapterfont} [1]
  775. {\gdef\SS@chapnumfont{\SS@sectid{1}\SS@nopart\SS@makeulinepartchap#1}
  776. \gdef\SS@chaptitlefont{\SS@sectid{1}\SS@titlepart\SS@makeulinepartchap#1}}
  777. \newcommand*{\doxysectionfont} [1]
  778. {\gdef\SS@sectfont{\SS@sectid{2}\SS@rr\SS@makeulinesect#1}}
  779. \newcommand*{\doxysubsectionfont} [1]
  780. {\gdef\SS@subsectfont{\SS@sectid{3}\SS@rr\SS@makeulinesect#1}}
  781. \newcommand*{\doxysubsubsectionfont} [1]
  782. {\gdef\SS@subsubsectfont{\SS@sectid{4}\SS@rr\SS@makeulinesect#1}}
  783. \newcommand*{\doxyparagraphfont} [1]
  784. {\gdef\SS@parafont{\SS@sectid{5}\SS@rr\SS@makeulinesect#1}}
  785. \newcommand*{\doxysubparagraphfont} [1]
  786. {\gdef\SS@subparafont{\SS@sectid{6}\SS@rr\SS@makeulinesect#1}}
  787. \newcommand*{\doxyminisecfont} [1]
  788. {\gdef\SS@minisecfont{\SS@sectid{7}\SS@rr\SS@makeulinepartchap#1}}
  789. \newcommand*{\doxyallsectionsfont} [1] {\doxypartfont{#1}%
  790. \doxychapterfont{#1}%
  791. \doxysectionfont{#1}%
  792. \doxysubsectionfont{#1}%
  793. \doxysubsubsectionfont{#1}%
  794. \doxyparagraphfont{#1}%
  795. \doxysubparagraphfont{#1}%
  796. \doxyminisecfont{#1}}%
  797. % Define caption that is also suitable in a table
  798. % for usage with hyperlinks
  799. \makeatletter
  800. \def\doxyfigcaption{%
  801. \H@refstepcounter{figure}%
  802. \@dblarg{\@caption{figure}}}
  803. % for usage without hyperlinks
  804. \def\doxyfigcaptionnolink{%
  805. \refstepcounter{figure}%
  806. \@dblarg{\@caption{figure}}}
  807. \makeatother
  808. % Define alpha enumarative names for counters > 26
  809. \makeatletter
  810. \def\enumalphalphcnt#1{\expandafter\@enumalphalphcnt\csname c@#1\endcsname}
  811. \def\@enumalphalphcnt#1{\alphalph{#1}}
  812. \def\enumAlphAlphcnt#1{\expandafter\@enumAlphAlphcnt\csname c@#1\endcsname}
  813. \def\@enumAlphAlphcnt#1{\AlphAlph{#1}}
  814. \makeatother
  815. \AddEnumerateCounter{\enumalphalphcnt}{\@enumalphalphcnt}{aa}
  816. \AddEnumerateCounter{\enumAlphAlphcnt}{\@enumAlphAlphcnt}{AA}