From ad53cbab6474e11692f2ca1018a821d042df28e6 Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 4 Mar 2015 18:58:55 +0100 Subject: Bug 659590 - EXTRA_PACKAGES can't handle package options Create the possibility to specify options with the EXTRA_PACKAGES command. It is possible to specify the package by just its name or in the syntax as required by the LaTeX \usepackage command ([]{}[]) --- src/config.xml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/config.xml b/src/config.xml index 726183c..92da3ca 100644 --- a/src/config.xml +++ b/src/config.xml @@ -2492,10 +2492,19 @@ EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ... -- cgit v0.12 From 1c47dd436358ffc7bc76901cddc559b2d8ce233d Mon Sep 17 00:00:00 2001 From: albert-github Date: Wed, 4 Mar 2015 19:00:01 +0100 Subject: Bug 659590 - EXTRA_PACKAGES can't handle package options Create the possibility to specify options with the EXTRA_PACKAGES command. It is possible to specify the package by just its name or in the syntax as required by the LaTeX \usepackage command ([]{}[]) --- src/latexgen.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/latexgen.cpp b/src/latexgen.cpp index de2ed22..a9613ac 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"; -- cgit v0.12