Hi,
In the context of my current project it would be very convenient to let
doxygen copy a bunch of additional files to the LaTeX output directory,
similar to what the HTML_EXTRA_FILES configuration variable provides for
HTML.
Please find a patch against the current HEAD of svn (r840) attached. It
would be cool if it could find its way into the next release.
Thanks,
Markus
diff -ru --exclude .svn doxygen.orig/doc/config.doc doxygen/doc/config.doc
--- doxygen.orig/doc/config.doc 2013-01-24 18:56:40.549318282 +0100
+++ doxygen/doc/config.doc 2013-01-24 18:47:23.386328313 +0100
@@ -197,6 +197,7 @@
\refitem cfg_latex_batchmode LATEX_BATCHMODE
\refitem cfg_latex_bib_style LATEX_BIB_STYLE
\refitem cfg_latex_cmd_name LATEX_CMD_NAME
+\refitem cfg_latex_extra_files LATEX_EXTRA_FILES
\refitem cfg_latex_footer LATEX_FOOTER
\refitem cfg_latex_header LATEX_HEADER
\refitem cfg_latex_hide_indices LATEX_HIDE_INDICES
@@ -2069,7 +2070,15 @@
the generated latex document. The footer should contain everything after
the last chapter. If it is left blank doxygen will generate a
standard footer. Notice: only use this tag if you know what you are doing!
-
+
+\anchor cfg_latex_extra_files
+<dt>\c LATEX_EXTRA_FILES <dd>
+ \addindex LATEX_EXTRA_FILES
+ The \c LATEX_EXTRA_FILES tag can be used to specify one or more extra images
+ or other source files which should be copied to the LaTeX output directory.
+ Note that the files will be copied as-is; there are no commands or markers
+ available.
+
\anchor cfg_pdf_hyperlinks
<dt>\c PDF_HYPERLINKS <dd>
\addindex PDF_HYPERLINKS
diff -ru --exclude .svn doxygen.orig/src/configoptions.cpp doxygen/src/configoptions.cpp
--- doxygen.orig/src/configoptions.cpp 2013-01-24 18:56:33.973421480 +0100
+++ doxygen/src/configoptions.cpp 2013-01-24 18:48:13.801435304 +0100
@@ -1835,6 +1835,16 @@
cs->setWidgetType(ConfigString::File);
cs->addDependency("GENERATE_LATEX");
//----
+ cl = cfg->addList(
+ "LATEX_EXTRA_FILES",
+ "The LATEX_EXTRA_FILES tag can be used to specify one or more extra images\n"
+ "or other source files which should be copied to the LaTeX output directory.\n"
+ "Note that the files will be copied as-is; there are no commands or markers\n"
+ "available."
+ );
+ cl->addDependency("GENERATE_LATEX");
+ cl->setWidgetType(ConfigList::File);
+ //----
cb = cfg->addBool(
"PDF_HYPERLINKS",
"If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated\n"
diff -ru --exclude .svn doxygen.orig/src/config.xml doxygen/src/config.xml
--- doxygen.orig/src/config.xml 2013-01-24 18:56:33.993421167 +0100
+++ doxygen/src/config.xml 2013-01-24 18:48:11.557473880 +0100
@@ -1246,6 +1246,12 @@
the last chapter. If it is left blank doxygen will generate a
standard footer. Notice: only use this tag if you know what you are doing!
' defval='' depends='GENERATE_LATEX'/>
+ <option type='list' id='LATEX_EXTRA_FILES' format='file' docs='
+The LATEX_EXTRA_FILES tag can be used to specify one or more extra images
+or other source files which should be copied to the LaTeX output directory.
+Note that the files will be copied as-is; there are no commands or markers
+available.
+' depends='GENERATE_LATEX'/>
<option type='bool' id='PDF_HYPERLINKS' docs='
If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
is prepared for conversion to pdf (using ps2pdf). The pdf file will
diff -ru --exclude .svn doxygen.orig/src/doxygen.cpp doxygen/src/doxygen.cpp
--- doxygen.orig/src/doxygen.cpp 2013-01-24 18:56:34.013420855 +0100
+++ doxygen/src/doxygen.cpp 2013-01-24 19:14:30.934581611 +0100
@@ -8754,9 +8754,9 @@
}
}
-static void copyExtraFiles()
+static void copyExtraFiles(const QCString& prefix)
{
- QStrList files = Config_getList("HTML_EXTRA_FILES");
+ QStrList files = Config_getList(prefix + "_EXTRA_FILES");
uint i;
for (i=0; i<files.count(); ++i)
{
@@ -8767,11 +8767,11 @@
QFileInfo fi(fileName);
if (!fi.exists())
{
- err("Extra HTML file '%s' specified in HTML_EXTRA_FILES does not exist!\n", fileName.data());
+ err("Extra file '%s' specified in" + prefix + "_EXTRA_FILES does not exist!\n", fileName.data());
}
else
{
- QCString destFileName = Config_getString("HTML_OUTPUT")+"/"+fi.fileName().data();
+ QCString destFileName = Config_getString(prefix + "_OUTPUT")+"/"+fi.fileName().data();
Doxygen::indexList->addImageFile(fi.fileName().data());
copyFile(fileName, destFileName);
}
@@ -10586,13 +10586,16 @@
// copy static stuff
copyStyleSheet();
copyLogo();
- copyExtraFiles();
+ copyExtraFiles("HTML");
FTVHelp::generateTreeViewImages();
}
if (generateLatex)
{
g_outputList->add(new LatexGenerator);
LatexGenerator::init();
+
+ // copy static stuff
+ copyExtraFiles("LATEX");
}
if (generateMan)
{
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Doxygen-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/doxygen-develop