diff options
Diffstat (limited to 'src/util.cpp')
-rwxr-xr-x | src/util.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp index 592398d..c630449 100755 --- a/src/util.cpp +++ b/src/util.cpp @@ -8679,3 +8679,23 @@ bool openOutputFile(const char *outFile,QFile &f) return fileOpened; } +void writeExtraLatexPackages(FTextStream &t) +{ + // User-specified packages + QStrList &extraPackages = Config_getList(EXTRA_PACKAGES); + if (!extraPackages.isEmpty()) + { + t << "% Packages requested by user\n"; + const char *pkgName=extraPackages.first(); + while (pkgName) + { + if ((pkgName[0] == '[') || (pkgName[0] == '{')) + t << "\\usepackage" << pkgName << "\n"; + else + t << "\\usepackage{" << pkgName << "}\n"; + pkgName=extraPackages.next(); + } + t << "\n"; + } +} + |