Hi Keita,

Ikumi Keita <ik...@ikumi.que.jp> writes:

> It basically looks good to me. I'd like to ask one question. It searches
> for \graphicspath{...} repeatedly by
> (while (re-search-forward graphicspath-regex nil t)
> loop. Is it expected that \graphicspath{...} appears multiple times in a
> document?

I had a brief look at the patch.  I think the change will not work in a
.tex file when used like this:

  \graphicspath{{eps/}{tiff/}}

>From grfguide.pdf:

  A list of directories, each in a {} group (even if there is only one
  in the list). For example:
    \graphicspath{{eps/}{tiff/}}
  would cause the system to look in the subdirectories eps and tiff of
  the current directory.

So the regexp for matching the argument should look like this (or
something more appropriate):

  "\\\\graphicspath{\\([^}{]*\\(?:{[^}{]*}[^}{]*\\)*\\)}"

and then the match must be splitted before passing the results to other
functions.  And I would assume that this declaration is usually
somewhere in the master file, and not used repeatedly.

Best, Arash

Reply via email to