From 9ceb9aea8c6eade4843f93dba8720b9f005cf488 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 24 Mar 2014 20:42:27 +0000 Subject: latexpand (24mar14) git-svn-id: svn://tug.org/texlive/trunk@33278 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/scripts/latexpand/latexpand | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'Master/texmf-dist/scripts/latexpand') 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 +# 2012, 2013, 2014 Matthieu Moy # 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. -- cgit v1.2.3