summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pgfplots/gallery/extractexamples.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/pgfplots/gallery/extractexamples.pl')
-rw-r--r--Master/texmf-dist/doc/latex/pgfplots/gallery/extractexamples.pl18
1 files changed, 17 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/pgfplots/gallery/extractexamples.pl b/Master/texmf-dist/doc/latex/pgfplots/gallery/extractexamples.pl
index 5576c9ad7fb..1033b3755d6 100644
--- a/Master/texmf-dist/doc/latex/pgfplots/gallery/extractexamples.pl
+++ b/Master/texmf-dist/doc/latex/pgfplots/gallery/extractexamples.pl
@@ -104,6 +104,10 @@ print OUTHTML
<body>
<h2>PGFPlots Gallery</h2>
<h4>The following graphics have been generated with the LaTeX Packages <a href="http://pgfplots.sourceforge.net/pgfplots.pdf">PGFPlots</a> and <a href="http://pgfplots.sourceforge.net/pgfplotstable.pdf">PGFPlotsTable</a>.</h4>
+
+They have been extracted from the reference manuals.
+
+<a href="http://pgfplots.sourceforge.net">PGFPlots Home</a>
';
for($j = 2; $j<=$#ARGV; ++$j ) {
@@ -122,7 +126,8 @@ for($j = 2; $j<=$#ARGV; ++$j ) {
if( $ARGV[$j] =~ m/pgfplotstable.tex/ ) {
$largegraphics = 1;
- $autoheaders = '
+ $autoheaders = $autoheaders.'
+\usepackage{pgfplotstable}
\usepackage{array}
\usepackage{colortbl}
\usepackage{booktabs}
@@ -131,6 +136,13 @@ for($j = 2; $j<=$#ARGV; ++$j ) {
';
}
+ @libName = ($ARGV[$j] =~ m/pgfplots\.libs\.(.*)\.tex/ );
+ if ($#libName >=0 ) {
+ $autoheaders = $autoheaders.'
+\usepgfplotslibrary{'.$libName[0].'}
+';
+ }
+
for( $q=0; $q<=$#matches/4; $q++ ) {
$prefix = $matches[4*$q];
$prefix = "" if not defined($prefix);
@@ -165,6 +177,10 @@ for($j = 2; $j<=$#ARGV; ++$j ) {
open(OUTFILE,">",$outfile) or die( "could not open $outfile for writing");
print OUTFILE $header;
print OUTFILE $autoheaders;
+ print OUTFILE "\\usepackage{pgfplotstable}\n" if ($match =~ /pgfplotstable/);
+ print OUTFILE "\\usepackage{hyperref}\n" if ($match =~ /\\url/);
+ print OUTFILE "\\usepackage{textcomp}\n" if ($match =~ /\\textdegree/);
+ print OUTFILE "\\usepackage{listings}\n" if ($match =~ /\\lst/);
print OUTFILE $prefix;
print OUTFILE "\n\\begin{document}\n";
print OUTFILE $match;