summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/image-gallery
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/image-gallery
Initial commit
Diffstat (limited to 'macros/latex/contrib/image-gallery')
-rw-r--r--macros/latex/contrib/image-gallery/README8
-rw-r--r--macros/latex/contrib/image-gallery/gallery-example.pdfbin0 -> 797828 bytes
-rw-r--r--macros/latex/contrib/image-gallery/gallery-example.tex24
-rw-r--r--macros/latex/contrib/image-gallery/image-gallery.cls151
-rw-r--r--macros/latex/contrib/image-gallery/mypics.txt22
-rw-r--r--macros/latex/contrib/image-gallery/pic001.jpgbin0 -> 41818 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic002.jpgbin0 -> 36734 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic003.jpgbin0 -> 10581 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic004.jpgbin0 -> 36052 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic005.jpgbin0 -> 34419 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic006.jpgbin0 -> 37112 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic007.jpgbin0 -> 37999 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic008.jpgbin0 -> 34676 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic009.jpgbin0 -> 36322 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic010.jpgbin0 -> 36332 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic011.jpgbin0 -> 36569 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic012.jpgbin0 -> 36080 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic013.jpgbin0 -> 36993 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic014.jpgbin0 -> 35687 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic015.jpgbin0 -> 36606 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic016.jpgbin0 -> 37125 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic017.jpgbin0 -> 38176 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic018.jpgbin0 -> 38166 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic019.jpgbin0 -> 34744 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic020.jpgbin0 -> 36442 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic021.jpgbin0 -> 37996 bytes
-rw-r--r--macros/latex/contrib/image-gallery/pic022.jpgbin0 -> 35647 bytes
27 files changed, 205 insertions, 0 deletions
diff --git a/macros/latex/contrib/image-gallery/README b/macros/latex/contrib/image-gallery/README
new file mode 100644
index 0000000000..7ecabe0dd8
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/README
@@ -0,0 +1,8 @@
+
+The LaTeX class `image-gallery' can be used to create an overview of pictures
+from a digital camera or from other sources. It's possible to adjust the size of
+the pictures and all the margins. The example file shows the usage.
+
+Rolf Niepraschk, 2007-08-27
+
+
diff --git a/macros/latex/contrib/image-gallery/gallery-example.pdf b/macros/latex/contrib/image-gallery/gallery-example.pdf
new file mode 100644
index 0000000000..d17aa58816
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/gallery-example.pdf
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/gallery-example.tex b/macros/latex/contrib/image-gallery/gallery-example.tex
new file mode 100644
index 0000000000..b22a43f9af
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/gallery-example.tex
@@ -0,0 +1,24 @@
+
+% Rolf Niepraschk, Rolf.Niepraschk@ptb.de, 2007-09-02
+
+\documentclass[a4paper]{image-gallery}
+%\documentclass[a4paper,dummy]{image-gallery}
+
+\gallerySetup{left=20mm,right=20mm,top=20mm,bottom=20mm,
+ width=5cm,height=3.75cm,rows=6,columns=3,autorotate=false}
+
+\begin{document}
+
+% The resolution of all the pictures are reduced by
+% convert -resize 8% original.jpg new.jpg
+%
+% `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}
+
+\end{document}
diff --git a/macros/latex/contrib/image-gallery/image-gallery.cls b/macros/latex/contrib/image-gallery/image-gallery.cls
new file mode 100644
index 0000000000..73a2185db3
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/image-gallery.cls
@@ -0,0 +1,151 @@
+
+% Rolf Niepraschk <Rolf.Niepraschk@ptb.de>
+%
+% This file may be distributed and/or modified under the
+% conditions of the LaTeX Project Public License, either version 1.3
+% of this license or (at your option) any later version.
+% The latest version of this license is in:
+%
+% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2003/12/01 or later.
+
+\errorcontextlines=100
+
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesClass{image-gallery}[2007/10/04 v1.0j image gallery -- RN]
+\DeclareOption{dummy}{%
+ \AtEndOfClass{%
+ \renewcommand*\IG@image[2][]{\rule{\IG@width}{\IG@height}}%
+ \renewcommand*\IG@fillBox{%
+ \textcolor{red}{\rule{\IG@width}{\IG@height}}}%
+ \RequirePackage{color}%
+ }%
+}
+\DeclareOption{nocaption}{%
+ \AtEndOfClass{%
+ \let\IG@@showname\@gobble
+ \let\IG@@showtext\@gobble
+ }%
+}
+\DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}}
+\ProcessOptions\relax
+\LoadClass[10pt]{article}
+
+\RequirePackage{graphicx,keyval,url}
+\RequirePackage[margin={0mm,0mm},dvips]{geometry}
+
+\newcommand*\IG@image[2][]{%
+ \let\IG@tempa=\@empty
+ \ifIG@autorotate
+ \sbox\IG@box{\includegraphics[#1]{#2}}%
+ \ifdim\wd\IG@box<\ht\IG@box
+ \def\IG@tempa{angle=90,}%
+ \fi
+ \setbox\IG@box\box\voidb@x
+ \fi
+ \expandafter\includegraphics\expandafter[\IG@tempa#1]{#2}%
+}
+
+\newcommand*\IG@fillBox{\mbox{\phantom{\rule{\IG@width}{\IG@height}}}}
+
+\newlength\IG@width \newlength\IG@height
+\newlength\IG@top \newlength\IG@bottom
+\newlength\IG@left \newlength\IG@right
+\newif\ifIG@more
+\newcommand*\IG@rows{} \newcommand*\IG@columns{}
+\newcommand*\IG@tempa{} \newcommand*\IG@imagefile{}
+\newread\IG@input
+\newsavebox\IG@box
+\newif\ifIG@autorotate \IG@autorotatetrue
+
+\define@key{IG}{width}{\setlength\IG@width{#1}}
+\define@key{IG}{height}{\setlength\IG@height{#1}}
+\define@key{IG}{top}{\setlength\IG@top{#1}}
+\define@key{IG}{bottom}{\setlength\IG@bottom{#1}}
+\define@key{IG}{left}{\setlength\IG@left{#1}}
+\define@key{IG}{right}{\setlength\IG@right{#1}}
+\define@key{IG}{rows}{\edef\IG@rows{\number#1}}
+\define@key{IG}{columns}{\edef\IG@columns{\number#1}}
+\define@key{IG}{autorotate}[true]{\csname IG@autorotate#1\endcsname}
+
+\newcommand*\gallerySetup[1]{%
+ \setkeys{IG}{#1}
+ \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
+ \IG@moretrue\@tempcnta=\z@\@tempcntb=\@ne
+ \endlinechar=\m@ne
+ \loop
+ \ifeof\IG@input\IG@morefalse\else
+ \read\IG@input to\IG@tempa
+ \if\IG@tempa\par\else
+ \ifx\IG@tempa\@empty\else
+ \count@=\z@ \let\IG@alt@name=\@empty
+ \@for\reserved@a:=\IG@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\IG@@showtext
+ \fi
+ \makebox[0pt][c]{%
+ \hskip-\IG@width\raisebox{-\ht\strutbox}[0pt][0pt]{%
+ \expandafter\IG@showname\expandafter{\@tempa}}}%
+ \ifnum\@tempcnta=\IG@columns\relax
+ \@tempcnta=\z@ \par
+ \ifnum\@tempcntb=\IG@rows\relax
+ \@tempcntb=\@ne \newpage
+ \else
+ \advance\@tempcntb\@ne \vfill
+ \fi
+ \else
+ \hfill
+ \fi
+ \fi
+ \fi
+ \fi
+ \ifIG@more\repeat
+ \immediate\closeout\IG@input
+ \IG@moretrue
+ \ifnum\@tempcntb=\@ne\else
+ \loop
+ \advance\@tempcnta\@ne
+ \IG@fillBox
+ \ifnum\@tempcnta=\IG@columns\relax
+ \@tempcnta=\z@ \par
+ \ifnum\@tempcntb=\IG@rows\relax
+ \@tempcntb=\@ne \IG@morefalse
+ \else
+ \advance\@tempcntb\@ne \vfill
+ \fi
+ \else
+ \hfill
+ \fi
+ \ifIG@more\repeat
+ \fi
+ \endgroup
+}
+
+\parindent=\z@ \pagestyle{empty}
+\DeclareUrlCommand\IG@@showname{\urlstyle{same}}
+\let\IG@@showtext=\@firstofone
+
+\endinput
diff --git a/macros/latex/contrib/image-gallery/mypics.txt b/macros/latex/contrib/image-gallery/mypics.txt
new file mode 100644
index 0000000000..01a0682f93
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/mypics.txt
@@ -0,0 +1,22 @@
+pic001.jpg, \emph{Little Bird}
+pic002.jpg
+pic003.jpg
+pic004.jpg
+pic005.jpg
+pic006.jpg
+pic007.jpg
+pic008.jpg
+pic009.jpg
+pic010.jpg
+pic011.jpg
+pic012.jpg
+pic013.jpg
+pic014.jpg
+pic015.jpg
+pic016.jpg
+pic017.jpg
+pic018.jpg
+pic019.jpg
+pic020.jpg
+pic021.jpg, \emph{Nice Cat}
+pic022.jpg
diff --git a/macros/latex/contrib/image-gallery/pic001.jpg b/macros/latex/contrib/image-gallery/pic001.jpg
new file mode 100644
index 0000000000..25b05cf0ad
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic001.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic002.jpg b/macros/latex/contrib/image-gallery/pic002.jpg
new file mode 100644
index 0000000000..57d0cc18e4
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic002.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic003.jpg b/macros/latex/contrib/image-gallery/pic003.jpg
new file mode 100644
index 0000000000..f427d3a1e1
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic003.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic004.jpg b/macros/latex/contrib/image-gallery/pic004.jpg
new file mode 100644
index 0000000000..d15b90d03c
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic004.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic005.jpg b/macros/latex/contrib/image-gallery/pic005.jpg
new file mode 100644
index 0000000000..8c37685aaa
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic005.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic006.jpg b/macros/latex/contrib/image-gallery/pic006.jpg
new file mode 100644
index 0000000000..bdb932a1ed
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic006.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic007.jpg b/macros/latex/contrib/image-gallery/pic007.jpg
new file mode 100644
index 0000000000..d2283f6a91
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic007.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic008.jpg b/macros/latex/contrib/image-gallery/pic008.jpg
new file mode 100644
index 0000000000..6cb98b37b9
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic008.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic009.jpg b/macros/latex/contrib/image-gallery/pic009.jpg
new file mode 100644
index 0000000000..d4e533d486
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic009.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic010.jpg b/macros/latex/contrib/image-gallery/pic010.jpg
new file mode 100644
index 0000000000..1e3ed3f787
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic010.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic011.jpg b/macros/latex/contrib/image-gallery/pic011.jpg
new file mode 100644
index 0000000000..751ef8965f
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic011.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic012.jpg b/macros/latex/contrib/image-gallery/pic012.jpg
new file mode 100644
index 0000000000..f26b028bc8
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic012.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic013.jpg b/macros/latex/contrib/image-gallery/pic013.jpg
new file mode 100644
index 0000000000..8a33910d95
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic013.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic014.jpg b/macros/latex/contrib/image-gallery/pic014.jpg
new file mode 100644
index 0000000000..516911a517
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic014.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic015.jpg b/macros/latex/contrib/image-gallery/pic015.jpg
new file mode 100644
index 0000000000..6ca8fbd9bc
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic015.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic016.jpg b/macros/latex/contrib/image-gallery/pic016.jpg
new file mode 100644
index 0000000000..e87273bbef
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic016.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic017.jpg b/macros/latex/contrib/image-gallery/pic017.jpg
new file mode 100644
index 0000000000..9d901a7989
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic017.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic018.jpg b/macros/latex/contrib/image-gallery/pic018.jpg
new file mode 100644
index 0000000000..a3aeebcc09
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic018.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic019.jpg b/macros/latex/contrib/image-gallery/pic019.jpg
new file mode 100644
index 0000000000..8ac81b91ca
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic019.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic020.jpg b/macros/latex/contrib/image-gallery/pic020.jpg
new file mode 100644
index 0000000000..6cab697fcd
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic020.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic021.jpg b/macros/latex/contrib/image-gallery/pic021.jpg
new file mode 100644
index 0000000000..9d68f2ba4b
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic021.jpg
Binary files differ
diff --git a/macros/latex/contrib/image-gallery/pic022.jpg b/macros/latex/contrib/image-gallery/pic022.jpg
new file mode 100644
index 0000000000..9b26bfa2f5
--- /dev/null
+++ b/macros/latex/contrib/image-gallery/pic022.jpg
Binary files differ