summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/image-gallery
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-09-04 18:09:35 +0000
committerKarl Berry <karl@freefriends.org>2007-09-04 18:09:35 +0000
commitd2dc0cb3d79612d10b3bd40dba8ebc9f3efdfe59 (patch)
tree93ffd9af73c8283efbe9399e66ea4a307d4cb284 /Master/texmf-dist/tex/latex/image-gallery
parent0e84bd293ad2e94ba3327368ad44991e9c70ee22 (diff)
image-gallery update (2sep07)
git-svn-id: svn://tug.org/texlive/trunk@4877 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/image-gallery')
-rw-r--r--Master/texmf-dist/tex/latex/image-gallery/image-gallery.cls31
1 files changed, 24 insertions, 7 deletions
diff --git a/Master/texmf-dist/tex/latex/image-gallery/image-gallery.cls b/Master/texmf-dist/tex/latex/image-gallery/image-gallery.cls
index 2f364b556e1..02c4911545a 100644
--- a/Master/texmf-dist/tex/latex/image-gallery/image-gallery.cls
+++ b/Master/texmf-dist/tex/latex/image-gallery/image-gallery.cls
@@ -11,10 +11,10 @@
% and version 1.3 or later is part of all distributions of LaTeX
% version 2003/12/01 or later.
-%\errorcontextlines=100
+\errorcontextlines=100
\NeedsTeXFormat{LaTeX2e}
-\ProvidesClass{image-gallery}[2007/08/27 v1.0h image gallery -- RN]
+\ProvidesClass{image-gallery}[2007/09/02 v1.0i image gallery -- RN]
\DeclareOption{dummy}{%
\AtEndOfClass{%
\renewcommand*\IG@image[2][]{\rule{\IG@width}{\IG@height}}%
@@ -69,6 +69,9 @@
\geometry{left=\IG@left,right=\IG@right,top=\IG@top,bottom=\IG@bottom}
}
+\newcommand*\IG@showname{}
+\newcommand*\IG@alt@name{}
+
\newcommand*\makeGallery[1]{%
\begingroup
\immediate\openin\IG@input=#1\relax
@@ -76,16 +79,30 @@
\endlinechar=\m@ne
\loop
\ifeof\IG@input\IG@morefalse\else
- \read\IG@input to\IG@imagefile
- \if\IG@imagefile\par\else
- \ifx\IG@imagefile\@empty\else
+ \read\IG@input to\@tempa
+ \if\@tempa\par\else
+ \ifx\@tempa\@empty\else
+ \count@=\z@ \let\IG@alt@name=\@empty
+ \@for\reserved@a:=\@tempa\do{%
+ \ifcase\count@
+ \edef\IG@imagefile{\reserved@a}%
+ \or
+ \protected@edef\IG@alt@name{\reserved@a}%
+ \fi
+ \advance\count@\@ne
+ }%
\advance\@tempcnta\@ne
\makebox[\IG@width][c]{%
\IG@image[width=\IG@width,height=\IG@height,keepaspectratio]%
{\IG@imagefile}}%
+ \ifx\IG@alt@name\@empty
+ \edef\@tempa{\IG@imagefile}\let\IG@showname\IG@@showname
+ \else
+ \def\@tempa{\IG@alt@name}\let\IG@showname\@firstofone
+ \fi
\makebox[0pt][c]{%
\hskip-\IG@width\raisebox{-\ht\strutbox}[0pt][0pt]{%
- \expandafter\IG@showname\expandafter{\IG@imagefile}}}%
+ \expandafter\IG@showname\expandafter{\@tempa}}}%
\ifnum\@tempcnta=\IG@columns\relax
\@tempcnta=\z@ \par
\ifnum\@tempcntb=\IG@rows\relax
@@ -122,6 +139,6 @@
}
\parindent=\z@ \pagestyle{empty}
-\DeclareUrlCommand\IG@showname{\urlstyle{same}}
+\DeclareUrlCommand\IG@@showname{\urlstyle{same}}
\endinput