diff options
author | Karl Berry <karl@freefriends.org> | 2007-09-04 18:09:35 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2007-09-04 18:09:35 +0000 |
commit | d2dc0cb3d79612d10b3bd40dba8ebc9f3efdfe59 (patch) | |
tree | 93ffd9af73c8283efbe9399e66ea4a307d4cb284 /Master/texmf-dist | |
parent | 0e84bd293ad2e94ba3327368ad44991e9c70ee22 (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')
3 files changed, 30 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/image-gallery/gallery-example.tex b/Master/texmf-dist/doc/latex/image-gallery/gallery-example.tex index 2065f6cb296..b22a43f9af8 100644 --- a/Master/texmf-dist/doc/latex/image-gallery/gallery-example.tex +++ b/Master/texmf-dist/doc/latex/image-gallery/gallery-example.tex @@ -1,5 +1,5 @@ -% Rolf Niepraschk, Rolf.Niepraschk@ptb.de, 2006-12-05 +% Rolf Niepraschk, Rolf.Niepraschk@ptb.de, 2007-09-02 \documentclass[a4paper]{image-gallery} %\documentclass[a4paper,dummy]{image-gallery} @@ -15,7 +15,9 @@ % `mypics.txt' is created with the following call % ls -1 *.jpg > mypics.txt % - +% Caption text is the filename. Alternative Text can be given +% after a comma as separator. +% \ttfamily\footnotesize \makeGallery{mypics.txt} diff --git a/Master/texmf-dist/doc/latex/image-gallery/mypics.txt b/Master/texmf-dist/doc/latex/image-gallery/mypics.txt index cede9917612..01a0682f935 100644 --- a/Master/texmf-dist/doc/latex/image-gallery/mypics.txt +++ b/Master/texmf-dist/doc/latex/image-gallery/mypics.txt @@ -1,4 +1,4 @@ -pic001.jpg +pic001.jpg, \emph{Little Bird} pic002.jpg pic003.jpg pic004.jpg @@ -18,5 +18,5 @@ pic017.jpg pic018.jpg pic019.jpg pic020.jpg -pic021.jpg +pic021.jpg, \emph{Nice Cat} pic022.jpg 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 |