Skip to content

Commit

Permalink
Bug 659590 - EXTRA_PACKAGES can't handle package options
Browse files Browse the repository at this point in the history
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 ([<package-option-list>]{<package-list>}[<version>])
  • Loading branch information
albert-github committed Mar 4, 2015
1 parent ad53cba commit 1c47dd4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/latexgen.cpp
Expand Up @@ -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";
Expand Down

0 comments on commit 1c47dd4

Please sign in to comment.