summary refs log tree commit diff
path: root/pkgs/misc/tex/nix/find-includes.pl
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2005-06-21 20:34:15 +0000
committerEelco Dolstra <eelco.dolstra@logicblox.com>2005-06-21 20:34:15 +0000
commit1751b6481d7733eff437ee5e69e0804279ec7532 (patch)
tree7dbd1a5f95f5f550a6097de9a6113d23ca6bb900 /pkgs/misc/tex/nix/find-includes.pl
parentfa6570f7160989120e984d51a8a090ed6391736a (diff)
downloadnixpkgs-1751b6481d7733eff437ee5e69e0804279ec7532.tar
nixpkgs-1751b6481d7733eff437ee5e69e0804279ec7532.tar.gz
nixpkgs-1751b6481d7733eff437ee5e69e0804279ec7532.tar.bz2
nixpkgs-1751b6481d7733eff437ee5e69e0804279ec7532.tar.lz
nixpkgs-1751b6481d7733eff437ee5e69e0804279ec7532.tar.xz
nixpkgs-1751b6481d7733eff437ee5e69e0804279ec7532.tar.zst
nixpkgs-1751b6481d7733eff437ee5e69e0804279ec7532.zip
* Process \includegraphics{filename}.
svn path=/nixpkgs/trunk/; revision=3237
Diffstat (limited to 'pkgs/misc/tex/nix/find-includes.pl')
-rw-r--r--pkgs/misc/tex/nix/find-includes.pl5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/misc/tex/nix/find-includes.pl b/pkgs/misc/tex/nix/find-includes.pl
index 633f9084370..0f171c78703 100644
--- a/pkgs/misc/tex/nix/find-includes.pl
+++ b/pkgs/misc/tex/nix/find-includes.pl
@@ -56,6 +56,11 @@ while (scalar @workset > 0) {
                 $bib =~ s/\s+$//;
                 push @workset, $path . "/" . $bib . ".bib";
             }
+	} elsif (/\\includegraphics(\[.*\])?\{(.*)\}/) {
+	    my $fn2 = $2;
+            die "absolute path! $fn2" if substr($fn2, 0, 1) eq "/";
+	    push @workset, $path . "/" . $fn2 . ".pdf";
+	    push @workset, $path . "/" . $fn2 . ".ps";
         }
         # !!! also support \usepackage
     }