summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/latexpand
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-03-24 20:42:27 +0000
committerKarl Berry <karl@freefriends.org>2014-03-24 20:42:27 +0000
commit9ceb9aea8c6eade4843f93dba8720b9f005cf488 (patch)
treec3b2055359e9a2e8f49da8868009cfaf65e4952c /Master/texmf-dist/scripts/latexpand
parentf70b06da25c665c72900ba23f10ca1bc8dbadd79 (diff)
latexpand (24mar14)
git-svn-id: svn://tug.org/texlive/trunk@33278 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/latexpand')
-rwxr-xr-xMaster/texmf-dist/scripts/latexpand/latexpand18
1 files changed, 15 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/latexpand/latexpand b/Master/texmf-dist/scripts/latexpand/latexpand
index 23bf1d1db09..23ac416868f 100755
--- a/Master/texmf-dist/scripts/latexpand/latexpand
+++ b/Master/texmf-dist/scripts/latexpand/latexpand
@@ -1,6 +1,6 @@
#!/usr/bin/perl
# Inspired by latexpand by D. Musliner, University of Michigan
-# 2012 Matthieu Moy <Matthieu.Moy@imag.fr>
+# 2012, 2013, 2014 Matthieu Moy <Matthieu.Moy@imag.fr>
# BSD License
use strict;
@@ -158,8 +158,8 @@ sub process_line
}
}
if ($show_graphics) {
- if (/\\includegraphics{([^}]*)}/) {
- my $full = find_tex_file($1, $graphics_extensions);
+ if (/\\includegraphics(\[[^\]]*\])?{([^}]*)}/) {
+ my $full = find_tex_file($2, $graphics_extensions);
say $prefix . "needs graphics file: ";
print STDERR "$full\n";
}
@@ -266,3 +266,15 @@ appear within verbatim environments (while it shouldn't).
It would be nice to remove code between \begin{comment} and
\end{comment} too if \usepackage{comment} is used.
+
+Code like
+
+ foo%
+ \begin{comment}
+
+will produce the incorrect
+
+ foo\begin{comment}
+
+A workaround is to use --empty-comments when such tricky usage of the
+comments package is done.