diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2015-03-05 20:57:41 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2015-03-05 20:57:41 (GMT) |
commit | 9751e8b3f8fa1b35c00e77e788a042e36f0920bb (patch) | |
tree | 9d557ac9000786f05b92bae969c143bfec2d7bc9 /src | |
parent | 8ca7b5e920965ad0b7ac1ca0efddea9b67bfb281 (diff) | |
parent | 1c47dd436358ffc7bc76901cddc559b2d8ce233d (diff) | |
download | Doxygen-9751e8b3f8fa1b35c00e77e788a042e36f0920bb.zip Doxygen-9751e8b3f8fa1b35c00e77e788a042e36f0920bb.tar.gz Doxygen-9751e8b3f8fa1b35c00e77e788a042e36f0920bb.tar.bz2 |
Merge pull request #304 from albert-github/feature/bug_659590
Bug 659590 - EXTRA_PACKAGES can't handle package options
Diffstat (limited to 'src')
-rw-r--r-- | src/config.xml | 15 | ||||
-rw-r--r-- | src/latexgen.cpp | 5 |
2 files changed, 16 insertions, 4 deletions
diff --git a/src/config.xml b/src/config.xml index 3d81a21..9eb9feb 100644 --- a/src/config.xml +++ b/src/config.xml @@ -2492,10 +2492,19 @@ EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... <docs> <![CDATA[ The \c EXTRA_PACKAGES tag can be used to specify one or more \f$\mbox{\LaTeX}\f$ - package names that should be included in the \f$\mbox{\LaTeX}\f$ output. - To get the times font for instance you can specify + package names that should be included in the \f$\mbox{\LaTeX}\f$ output. The package + can be specified just by its name or with the correct syntax as to be used with the + \f$\mbox{\LaTeX}\f$ `\usepackage` command. + + To get the `times` font for instance you can specify : +\verbatim + EXTRA_PACKAGES=times +or + EXTRA_PACKAGES={times} +\endverbatim + To use the option `intlimits` with the `amsmath` package you can specify: \verbatim -EXTRA_PACKAGES=times + EXTRA_PACKAGES=[intlimits]{amsmath} \endverbatim If left blank no extra packages will be included. ]]> diff --git a/src/latexgen.cpp b/src/latexgen.cpp index facdda1..1e2589e 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -421,7 +421,10 @@ static void writeDefaultHeaderPart1(FTextStream &t) const char *pkgName=extraPackages.first(); while (pkgName) { - t << "\\usepackage{" << pkgName << "}\n"; + if ((pkgName[0] == '[') || (pkgName[0] == '{')) + t << "\\usepackage" << pkgName << "\n"; + else + t << "\\usepackage{" << pkgName << "}\n"; pkgName=extraPackages.next(); } t << "\n"; |