summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-07-13 23:27:59 +0000
committerKarl Berry <karl@freefriends.org>2012-07-13 23:27:59 +0000
commit755ee977e784df555d3142c1dcf67a6701c76cc5 (patch)
treec0c91ff588ee8cf59dfcb8d49c76ce17099417c1
parent0b6eaa10b2f47abfb80d42492678e4d55c8b68ab (diff)
new latex package incgraph (21jun12)
git-svn-id: svn://tug.org/texlive/trunk@27038 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/incgraph/CHANGES37
-rw-r--r--Master/texmf-dist/doc/latex/incgraph/README52
-rw-r--r--Master/texmf-dist/doc/latex/incgraph/exaimage-0001.pngbin0 -> 1150 bytes
-rw-r--r--Master/texmf-dist/doc/latex/incgraph/exaimage-0037.pngbin0 -> 2519 bytes
-rw-r--r--Master/texmf-dist/doc/latex/incgraph/exaimage-0123.pngbin0 -> 2886 bytes
-rw-r--r--Master/texmf-dist/doc/latex/incgraph/example.jpgbin0 -> 76966 bytes
-rw-r--r--Master/texmf-dist/doc/latex/incgraph/incgraph-example-a.pdfbin0 -> 88901 bytes
-rw-r--r--Master/texmf-dist/doc/latex/incgraph/incgraph-example-a.tex9
-rw-r--r--Master/texmf-dist/doc/latex/incgraph/incgraph-example-b.pdfbin0 -> 99366 bytes
-rw-r--r--Master/texmf-dist/doc/latex/incgraph/incgraph-example-b.tex18
-rw-r--r--Master/texmf-dist/doc/latex/incgraph/incgraph-example-c.pdfbin0 -> 92251 bytes
-rw-r--r--Master/texmf-dist/doc/latex/incgraph/incgraph-example-c.tex8
-rw-r--r--Master/texmf-dist/doc/latex/incgraph/incgraph.pdfbin0 -> 636753 bytes
-rw-r--r--Master/texmf-dist/doc/latex/incgraph/incgraph.tex907
-rw-r--r--Master/texmf-dist/tex/latex/incgraph/incgraph.sty325
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/incgraph.tlpsrc0
18 files changed, 1358 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/incgraph/CHANGES b/Master/texmf-dist/doc/latex/incgraph/CHANGES
new file mode 100644
index 00000000000..67443f6754c
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/incgraph/CHANGES
@@ -0,0 +1,37 @@
+%% The LaTeX package incgraph - version 1.02 (2012/07/06)
+%%
+%% -------------------------------------------------------------------------------------------
+%% Copyright (c) 2012 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% -------------------------------------------------------------------------------------------
+%%
+%% This work 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 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `author-maintained'.
+%%
+%% This work consists of all files listed in README
+%%
+
+version 1.00 (2012/06/21): initial public release
+
+version 1.01 (2012/07/04):
+- the code of the hypertarget setting is rewritten to place it at
+ the top left corner of the page (previously it was placed at the
+ top left corner of the text area).
+- new macro '\igrtargetset' to set hypertarget values manually
+- new key 'target' to set hypertarget values manually
+
+version 1.02 (2012/07/06):
+- bug fixed in '\igrboxtikz' which caused a small shift.
+- key 'nohyper' renamed to 'no hyper'
+- new macro '\igrboxtikzcenter' to support tikz pictures with a centered box.
+- option key 'include command' now has a default.
+- new feature to overlay included graphics with tikz picture code
+ using the new option keys 'overlay', 'overlay page number at',
+ 'overlay page number at bottom', 'overlay page number at top',
+ 'no overlay'.
diff --git a/Master/texmf-dist/doc/latex/incgraph/README b/Master/texmf-dist/doc/latex/incgraph/README
new file mode 100644
index 00000000000..877fb337b6e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/incgraph/README
@@ -0,0 +1,52 @@
+%% The LaTeX package incgraph - version 1.02 (2012/07/06)
+%%
+%% -------------------------------------------------------------------------------------------
+%% Copyright (c) 2012 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% -------------------------------------------------------------------------------------------
+%%
+%% This work 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 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `author-maintained'.
+%%
+%% This work consists of all files listed in README
+%%
+
+incgraph provides tools for including graphics on full paper size. The graphics
+can be centered for a given paper format or the paper may be resized to the
+graphics dimensions. The main use case for the package incgraph is to transform
+one or many scans or taken pictures to a PDF document. It can also be applied
+for full paper size LaTeX created graphics. The package incgraph provides a tool
+box with basic macros and a convenience user interface which wraps the
+well-known includegraphics. Also, bookmarking is especially supported.
+
+Contents of the package
+=======================
+ 'README' this file
+ 'CHANGES' log of changes (history)
+ 'incgraph.sty' LaTeX package file (style file)
+ 'incgraph.pdf' documentation for csvsimple
+ 'incgraph.tex' source code of the documentation
+ 'incgraph-example-a.tex' example file A for package usage
+ 'incgraph-example-a.pdf' compiled example A
+ 'incgraph-example-b.tex' example file B for package usage
+ 'incgraph-example-b.pdf' compiled example B
+ 'incgraph-example-c.tex' example file C for package usage
+ 'incgraph-example-c.pdf' compiled example C
+ 'example.jpg' example image file
+ 'exaimage-0001.png' example image file
+ 'exaimage-0037.png' example image file
+ 'exaimage-0123.png' example image file
+
+Installation
+============
+Copy the contents of the 'incgraph.tds.zip' from CTAN to your local TeX file tree.
+
+Alternatively, put the files to their respective locations within the TeX installation:
+ 'incgraph.sty' -> /tex/latex/incgraph
+ all other files -> /doc/latex/incgraph
diff --git a/Master/texmf-dist/doc/latex/incgraph/exaimage-0001.png b/Master/texmf-dist/doc/latex/incgraph/exaimage-0001.png
new file mode 100644
index 00000000000..06a40445796
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/incgraph/exaimage-0001.png
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/incgraph/exaimage-0037.png b/Master/texmf-dist/doc/latex/incgraph/exaimage-0037.png
new file mode 100644
index 00000000000..504c1893505
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/incgraph/exaimage-0037.png
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/incgraph/exaimage-0123.png b/Master/texmf-dist/doc/latex/incgraph/exaimage-0123.png
new file mode 100644
index 00000000000..27ae245d35e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/incgraph/exaimage-0123.png
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/incgraph/example.jpg b/Master/texmf-dist/doc/latex/incgraph/example.jpg
new file mode 100644
index 00000000000..6107ab5a652
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/incgraph/example.jpg
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/incgraph/incgraph-example-a.pdf b/Master/texmf-dist/doc/latex/incgraph/incgraph-example-a.pdf
new file mode 100644
index 00000000000..1e4a7ffc4aa
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/incgraph/incgraph-example-a.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/incgraph/incgraph-example-a.tex b/Master/texmf-dist/doc/latex/incgraph/incgraph-example-a.tex
new file mode 100644
index 00000000000..f7e46d3482d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/incgraph/incgraph-example-a.tex
@@ -0,0 +1,9 @@
+\documentclass{article}
+\usepackage{incgraph}
+
+\igrset{center,zerofill=4,bookmark={Page \theigrpage\ (\nt)}}
+
+\begin{document}%
+ \incgraph{example.jpg}
+ \incmultigraph{exaimage-\nn.png}{1,...,150}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/incgraph/incgraph-example-b.pdf b/Master/texmf-dist/doc/latex/incgraph/incgraph-example-b.pdf
new file mode 100644
index 00000000000..25da93a2ea7
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/incgraph/incgraph-example-b.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/incgraph/incgraph-example-b.tex b/Master/texmf-dist/doc/latex/incgraph/incgraph-example-b.tex
new file mode 100644
index 00000000000..e70d4ee343f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/incgraph/incgraph-example-b.tex
@@ -0,0 +1,18 @@
+\documentclass{article}
+\usepackage{incgraph,tikz}
+
+\igrset{page,zerofill=4,options={width=18cm},
+ overlay page number at top=7mm}
+
+\igrsetmatches{ 1 = A very red image,
+ 123 = A greenish example }
+
+\begin{document}
+
+ \incgraph[bookmark={Page \theigrpage: My first example}]{example.jpg}
+
+ \incmultigraph[if match set bookmark=
+ {\n}{Page \theigrpage: \igrmatchvalue}{Page \theigrpage}]
+ {exaimage-\nn.png}{1,...,150}
+
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/incgraph/incgraph-example-c.pdf b/Master/texmf-dist/doc/latex/incgraph/incgraph-example-c.pdf
new file mode 100644
index 00000000000..a2cb337393f
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/incgraph/incgraph-example-c.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/incgraph/incgraph-example-c.tex b/Master/texmf-dist/doc/latex/incgraph/incgraph-example-c.tex
new file mode 100644
index 00000000000..3a47e886eb2
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/incgraph/incgraph-example-c.tex
@@ -0,0 +1,8 @@
+\documentclass[a4paper]{article}
+\usepackage{incgraph}
+
+\begin{document}%
+ \incmultigraph[center,
+ bookmark={Imported page \n\ of \nt}][page=\n]
+ {incgraph-example-a.pdf}{1,...,4}
+\end{document}
diff --git a/Master/texmf-dist/doc/latex/incgraph/incgraph.pdf b/Master/texmf-dist/doc/latex/incgraph/incgraph.pdf
new file mode 100644
index 00000000000..3e2bc935247
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/incgraph/incgraph.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/incgraph/incgraph.tex b/Master/texmf-dist/doc/latex/incgraph/incgraph.tex
new file mode 100644
index 00000000000..930f66ff762
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/incgraph/incgraph.tex
@@ -0,0 +1,907 @@
+% \LaTeX-Main\
+%% The LaTeX package incgraph - version 1.02 (2012/07/06)
+%% incgraph.sty: Manual
+%%
+%% -------------------------------------------------------------------------------------------
+%% Copyright (c) 2012 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% -------------------------------------------------------------------------------------------
+%%
+%% This work 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 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `author-maintained'.
+%%
+%% This work consists of all files listed in README
+%%
+\documentclass[a4paper,11pt]{ltxdoc}
+
+\usepackage[T1]{fontenc}
+\usepackage[latin1]{inputenc}
+\usepackage[english]{babel}
+\usepackage{lmodern,parskip,array,ifthen,calc,makeidx}
+\usepackage{amsmath,amssymb}
+\usepackage[svgnames,table,hyperref]{xcolor}
+\usepackage{tikz}
+\usepackage[pdftex,bookmarks,raiselinks,pageanchor,hyperindex,colorlinks]{hyperref}
+\urlstyle{sf}
+
+\usepackage[a4paper,left=2.5cm,right=2.5cm,top=1.5cm,bottom=1.5cm,
+ marginparsep=5mm,marginparwidth=10mm,
+ headheight=0mm,headsep=0cm,
+ footskip=1.5cm,includeheadfoot]{geometry}
+\usepackage{fancyhdr}
+\fancyhf{}
+\fancyfoot[C]{\thepage}%
+\renewcommand{\headrulewidth}{0pt}
+\renewcommand{\footrulewidth}{0pt}
+\pagestyle{fancy}
+\tolerance=2000%
+\setlength{\emergencystretch}{20pt}%
+
+\RequirePackage{csquotes}
+\RequirePackage[style=numeric-comp,sorting=nyt,
+ maxnames=8,minnames=8,abbreviate=false,backend=biber]{biblatex}
+\DeclareFieldFormat{url}{\newline\url{#1}}%
+\DeclareListFormat{language}{}%
+\setlength{\bibitemsep}{\smallskipamount}
+\addbibresource{\jobname.bib}
+
+\usepackage[listings,theorems,documentation,skins]{tcolorbox}
+\usepackage{incgraph}
+
+\hypersetup{
+ pdftitle={Manual for the incgraph package},
+ pdfauthor={Thomas F. Sturm},
+ pdfsubject={graphics inclusion},
+ pdfkeywords={graphics inclusion page}
+}
+
+\def\version{1.02}%
+\def\datum{2012/07/06}%
+\makeindex
+
+
+\usepackage{tikz,multicol}
+
+\tcbmakedocSubKey{docIgrKey}{igr}
+
+\newcounter{texexp}
+
+\tcbset{
+ example/.code 2 args={\refstepcounter{texexp}\label{#2}%
+ \pgfkeysalso{docexample,fonttitle=\bfseries,title={Example \thetexexp: #1}}},
+}
+
+\newenvironment{texexptitled}[3][]{%
+ \hypersetup{linkcolor=white}%
+ \tcbset{example={#2}{#3},listing file={\jobname.\thetexexp.listing},#1}%
+ \tcblisting{}}{\endtcblisting}
+
+\newcommand{\inputlisting}[1]{\input{\jobname.#1.listing}}
+\newcommand{\inputlastlisting}{\inputlisting{\thetexexp}}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\begin{document}
+\begin{center}
+\vspace*{5mm}\par
+{\bfseries\LARGE The \texttt{incgraph} package\par}
+{\large Manual for version \version\ (\datum)\par}\bigskip
+{\large Thomas F.~Sturm%
+ \footnote{Prof.~Dr.~Dr.~Thomas F.~Sturm, Institut f\"{u}r Mathematik und Informatik,
+ Universit\"{a}t der Bundeswehr M\"{u}nchen, D-85577 Neubiberg, Germany;
+ email: \href{mailto:thomas.sturm@unibw.de}{thomas.sturm@unibw.de}} }
+\end{center}
+\bigskip
+\begin{absquote}
+ \begin{center}\bfseries Abstract\end{center}
+ |incgraph| provides tools for including graphics on full paper size.
+ The graphics can be centered for a given paper format or the paper may be
+ resized to the graphics dimensions.
+ The main use case for the package |incgraph| is to transform one or many scans
+ or taken pictures to a PDF document. It can also be applied for full paper size
+ \LaTeX\ created graphics.
+ The package |incgraph| provides a tool box with basic macros and a
+ convenience user interface which wraps the well-known |includegraphics|.
+ Also, bookmarking is especially supported.
+\end{absquote}
+
+
+\tableofcontents
+
+\clearpage
+%--------------------------------------
+\section{Introduction}
+\subsection{Motivation}
+The main purpose of this package is to include one or more graphics on full
+paper size. This means that a graphic is either centered on a blank page
+presumable of the given document paper size or the page is resized
+to the dimensions of the graphic.
+For the graphics, JPG files or PDF files or other supported formats may be
+used by inclusion. Alternatively, the graphics (or whatever) can be produced
+by \LaTeX\ code.
+An important use case for the package |incgraph| is to transform one or many scans
+or taken pictures to a PDF document. Optionally, the included graphics can
+be commented with bookmarks for the resulting PDF document.
+
+The well-known |graphicx| package \cite{carlisle:1999a} allows the inclusion
+of several types of external graphics files. The convenience user interface
+of |incgraph| described in Section \ref{sec:interface} relies on this package and adds
+assistance for the described purpose. Note that the package is designed for and
+tested with |pdflatex| to produce PDF directly. Some features like the paper
+resizing may not be applicable for other work-flows.
+
+Many of the features of the convenience user interface can be used directly
+with various basic macros. These are collected and described
+as a 'basic tool box' in Section \ref{sec:basictoolbox}.
+
+If this package does not aid your intended purpose, you may take a look
+at the |pdfpages| package \cite{matthias:2012a} which also supports the insertion of
+external multi-page PDF documents.
+
+
+\subsection{Loading the Package}
+|incgraph| is loaded in the usual manner in the preamble:
+\begin{dispListing}
+\usepackage{incgraph}
+\end{dispListing}
+
+The package |incgraph| loads the package
+|pgfkeys| \cite{tantau:2010c}. If no options are given, it also
+loads the packages |pgf|, |pgffor| \cite{tantau:2010c},
+the package |graphicx| \cite{carlisle:1999a}, and the
+package |bookmark| \cite{oberdiek:2011a}.
+
+\begin{itemize}
+\item The option |nopgf| prevents the loading of |pgf| and |pgffor|.\\
+ The opposite option |pgf| resets to loading the packages.
+\item The option |nographicx| prevents the loading of |graphicx|.\\
+ The opposite option |graphicx| resets to loading the package.
+\item The option |nobookmark| prevents the loading of |bookmark|.\\
+ The opposite option |bookmark| resets to loading the package.
+\end{itemize}
+
+So, the minimal package loading is done with the following:
+\begin{dispListing}
+\usepackage[nopgf,nographicx,nobookmark]{incgraph}
+\end{dispListing}
+
+Note that you can always load the mentioned packages yourself. This is
+intended to avoid possible option clashes the easy way.
+
+
+%--------------------------------------
+\section{Basic Tool Box}\label{sec:basictoolbox}
+If you are just looking for macros to include an external picture, you may
+proceed to Section \ref{sec:interface} directly.
+
+\subsection{Full Page Commands}
+
+\begin{docCommand}{igrpage}{\marg{text}}
+ The \meta{text} is put on a separate page which is resized to fit the
+ dimensions of the \meta{text}. \meta{text} may be single letter, an
+ included picture, or any \LaTeX\ code.
+ The page number is stored into \docAuxCommand{theigrpage} and
+ \docAuxCommand{igrAutoTarget} holds a hypertarget value for bookmarking.
+ The style of the separate page is set to
+ the content of the macro
+ \docAuxCommand{igrpagestyle} which defaults to 'empty' but can be
+ redefined.\\
+ An application for |igrpage| is found in Example~\ref{fullpaperdrawing1}
+ on page~\pageref{fullpaperdrawing1}.
+\end{docCommand}
+
+\begin{docCommand}{igrcenter}{\marg{text}}
+ The \meta{text} is put in the center of a separate page which has the
+ current document dimensions. \meta{text} may be single letter, an
+ included picture or any \LaTeX\ code.
+ The page number is stored into \docAuxCommand{theigrpage} and
+ \docAuxCommand{igrAutoTarget} holds a hypertarget value for bookmarking.
+ The style of the separate page is set to
+ the content of the macro
+ \docAuxCommand{igrpagestyle} which defaults to 'empty' but can be
+ redefined.\\
+ An application for |igrcenter| is found in Example~\ref{fullpaperdrawing2}
+ on page~\pageref{fullpaperdrawing2}.
+\end{docCommand}
+
+\begin{docCommand}{igrtargetset}{\marg{anchor}}
+ The next value for \docAuxCommand{igrAutoTarget} is set to \meta{anchor}.
+ This can be used for hand-made hyperlinks or bookmarks.
+ An application for |igrtargetset| is found in Example~\ref{fullpaperdrawing2}
+ on page~\pageref{fullpaperdrawing2}.
+\end{docCommand}
+
+
+\subsection{Box Commands}
+
+\begin{docCommand}{igrboxset}{\marg{text}}
+ The \meta{text} is put into a \TeX\ box named \docAuxCommand{igrbox}.
+ Additionally, some auxiliary macros are defined:
+ \begin{itemize}
+ \item\docAuxCommand{igrAutoTarget}: unique value for a hyper target.
+ \item\docAuxCommand{igrBoxWidth}: width of the |\igrbox|.
+ \item\docAuxCommand{igrBoxHeight}: total height of the |\igrbox|.
+ \item\docAuxCommand{igrBoxht}: height of the |\igrbox|.
+ \item\docAuxCommand{igrBoxdp}: depth of the |\igrbox|.
+ \end{itemize}
+\begin{dispExample}
+ \igrboxset{This is an example}
+ |\igrAutoTarget| = \igrAutoTarget, |\igrBoxWidth| = \igrBoxWidth,
+ |\igrBoxHeight| = \igrBoxHeight,\\
+ |\igrBoxht| = \igrBoxht, |\igrBoxdp| = \igrBoxdp;
+\end{dispExample}
+\end{docCommand}
+
+\begin{docCommand}{igrboxcenter}{}
+ The current content of the |\igrbox|
+ is put in the center of a separate page which has the
+ current |pdfpage| dimensions.\\
+ The style of the separate page is set to
+ the content of the macro
+ \docAuxCommand{igrpagestyle} which defaults to 'empty' but can be
+ redefined.
+ Note that a |\clearpage| or similar has to be inserted before this command.
+\end{docCommand}
+
+\clearpage
+\begin{docCommand}{igrboxtikz}{}
+ The current content of the |\igrbox| is embedded into a |\node| command
+ from the |tikz| package \cite{tantau:2010c} which has to be loaded separately.
+ Also, the bounding box is adjusted to the |\igrbox|.\\
+ To support positioning inside the picture, two |tikz| nodes named
+ |box| and |page| are defined which both take the dimensions of the |\igrbox|.
+\begin{dispExample}
+\igrboxset{\includegraphics{example.jpg}}%
+\begin{tikzpicture}%
+ \igrboxtikz%
+ \draw[blue,very thick] (0,0) rectangle (\igrBoxWidth,\igrBoxHeight);
+ \draw[red] (0,0) grid (\igrBoxWidth,\igrBoxHeight);
+ \draw[black] ([xshift=-1cm,yshift=-1cm]page.north east) circle (1cm);
+\end{tikzpicture}
+\end{dispExample}
+
+The boxing macros can also be used nested (see the result on the following page):
+\begin{dispListing}
+\igrpage{\igrboxset{\includegraphics{example.jpg}}%
+ \begin{tikzpicture}%
+ \igrboxtikz%
+ \draw[blue,very thick] (0,0) rectangle (\igrBoxWidth,\igrBoxHeight);
+ \draw[red] (0,0) grid (\igrBoxWidth,\igrBoxHeight);
+ \draw[black] ([xshift=1cm,yshift=-1cm]page.north west) circle (1cm);
+\end{tikzpicture}}
+\end{dispListing}
+\tcbusetemp
+\end{docCommand}
+
+
+\begin{docCommand}{igrboxtikzpage}{}
+ This is an alias for \refCom{igrboxtikz}.
+\end{docCommand}
+
+
+\begin{docCommand}{igrboxtikzcenter}{}
+ The current content of the |\igrbox| is embedded into a |\node| command
+ from the |tikz| package \cite{tantau:2010c} which has to be loaded separately.
+ This node is placed in the center of a bounding box which takes the current
+ page dimensions. Afterwards, |\igrBoxWidth| and |\igrBoxHeight| are
+ redefined to the dimensions of the total page.\\
+ To support positioning inside the picture, two |tikz| nodes named
+ |box| and |page| are defined. |box| takes the dimensions of the |\igrbox|
+ and |page| takes the dimensions of the |tikzpicture|.
+\begin{dispListing}
+\igrcenter{\igrboxset{\includegraphics{example.jpg}}%
+ \begin{tikzpicture}%
+ \igrboxtikzcenter%
+ \draw[help lines] (0,0) grid (\igrBoxWidth,\igrBoxHeight);
+ \draw[dashed] (box.south west) rectangle (box.north east);
+
+ \draw[very thick,<->] (page.north west)--(box.north west);
+ \draw[very thick,<->] (page.north east)--(box.north east);
+ \draw[very thick,<->] (page.south west)--(box.south west);
+ \draw[very thick,<->] (page.south east)--(box.south east);
+\end{tikzpicture}}
+\end{dispListing}
+See the result on the following page.
+\tcbusetemp
+\end{docCommand}
+
+
+\subsection{Map and Match Commands}
+
+
+\begin{docCommand}{igrsetmatchvalue}{\marg{key}\marg{value}}
+ The given \meta{key} is mapped to the given \meta{value}. Later, this
+ \meta{value} can be retrieved by \refCom{igrifmatch}.
+\begin{dispExample}
+\igrsetmatchvalue{my key A}{my value A}
+\def\keytester#1{\igrifmatch{#1}{Hurray: '\igrmatchvalue'}{'#1' unknown}}
+
+\keytester{foo}\\
+\keytester{my key A}
+\end{dispExample}
+\end{docCommand}
+
+
+\begin{docCommand}{igrsetmatches}{\marg{list}}
+ The \meta{list} is a comma separated list of \meta{key}=\meta{value} pairs.
+ On every pair, the \refCom{igrsetmatchvalue} macro is applied.
+\begin{dispExample}
+\igrsetmatches{my key A = my value A, bar = Shakespeare}
+\def\keytester#1{\igrifmatch{#1}{Hurray: '\igrmatchvalue'}{'#1' unknown}}
+
+\keytester{foo}\\
+\keytester{bar}\\
+\keytester{my key A}
+\end{dispExample}
+\end{docCommand}
+
+
+\begin{docCommand}{igrifmatch}{\marg{key}\marg{then}\marg{else}}
+ If a \meta{key} was defined by \refCom{igrsetmatchvalue} or
+ \refCom{igrsetmatches}, the corresponding value is put in the
+ macro \docAuxCommand{igrmatchvalue} and the \meta{then} code is
+ executed. If the \meta{key} is unknown, the \meta{else} code is
+ executed.
+\begin{dispExample}
+\igrsetmatches{1 = January, 2 = February, 3 = March, apr = April}
+\def\monthname#1{\igrifmatch{#1}{The name of month #1\ is \igrmatchvalue.}{%
+ You are kidding.}}
+
+\monthname{1} \monthname{foo} \monthname{2}\\
+\monthname{3} \monthname{apr} \monthname{35}
+\end{dispExample}
+\end{docCommand}
+
+
+\clearpage
+\subsection{Zero Filling Commands}
+
+\begin{docCommand}{igrmakezerofill}{\marg{macro}\marg{digits}}
+ With this command, a new \meta{macro} can be defined which takes a
+ non negative number as parameter.
+ This number is filled up with leading zeros until the
+ \meta{digits} count is reached.
+ If \meta{digits} is 0 or 1, nothing is added. A \meta{digits} value
+ greater than 10 is treated as 10 which is the maximum number of
+ possible digits.
+\begin{dispExample}
+\igrmakezerofill{\myfill}{0}
+\myfill{7}, \myfill{12}, \myfill{934}, \myfill{665234}.\\
+\igrmakezerofill{\myfill}{3}
+\myfill{7}, \myfill{12}, \myfill{934}, \myfill{665234}.\\
+\igrmakezerofill{\myfill}{5}
+\myfill{7}, \myfill{12}, \myfill{934}, \myfill{665234}.\\
+\igrmakezerofill{\myfill}{9}
+\myfill{7}, \myfill{12}, \myfill{934}, \myfill{665234}.\\
+\igrmakezerofill{\myfill}{30}
+\myfill{7}, \myfill{12}, \myfill{934}, \myfill{665234}.
+\end{dispExample}
+\begin{dispExample}
+\igrmakezerofill{\threedigits}{3}
+\threedigits{1}%
+\foreach \n in {2,...,100} {, \threedigits{\n}}.
+\end{dispExample}
+\end{docCommand}
+
+\clearpage
+%--------------------------------------
+\section{Convenience User Interface}\label{sec:interface}
+The macros of this section rely on the |\includegraphics| command from
+the package |graphicx| \cite{carlisle:1999a}.
+Section \ref{sec:basictoolbox} describes more basic commands.
+
+\subsection{Inclusion Macros for Graphics}
+
+\begin{docCommand}{incgraph}{\oarg{options}\oarg{graphics options}\marg{file name}}
+ The picture file with the given \meta{file name} is included in the center
+ of a separate page. Depending on the \meta{options}, this page keeps the
+ document size or is resized to the graphics dimensions.
+ The applicable \meta{options} are listed in Subsection \ref{sec:keys}.
+ If \meta{graphics options} are given, these are added to the options for
+ the underlying |\includegraphics| command. See the documentation of
+ |graphicx| \cite{carlisle:1999a} for a list of applicable \meta{graphics options}.
+
+\begin{texexptitled}[listing only,before={\par\medskip}]%
+ {The hand-drawn example (centered); see page~\pageref{exacenter}}{exacenter.listing}
+\incgraph[center,label={exacenter},overlay page number at bottom,
+ bookmark={The hand-drawn example (centered)}]{example.jpg}
+\end{texexptitled}
+
+\begin{texexptitled}[listing only,before={\par\medskip}]%
+ {The hand-drawn example (resized page); see page~\pageref{exaresized}}{exaresized.listing}
+\incgraph[page,label={exaresized},
+ bookmark={The hand-drawn example (resized page)}]{example.jpg}
+\end{texexptitled}
+
+\begin{texexptitled}[listing only,before={\par\medskip}]%
+ {The hand-drawn example (rotated and oversized); see page~\pageref{exarotated}}{exarotated.listing}
+\incgraph[center,label={exarotated},target=oversized,
+ bookmark={The hand-drawn example (rotated and oversized)}]%
+ [angle=30,scale=3]{example.jpg}
+\end{texexptitled}
+\end{docCommand}
+
+\enlargethispage*{1cm}
+\begin{docCommand}{incmultigraph}{\oarg{options}\oarg{graphics options}\marg{file name pattern}\marg{list}}
+ All picture files matching the given \meta{file name pattern} where some
+ parts are substituted by elements of the \meta{list}
+ are included in the center of a separate page. Depending on the \meta{options}, the pages keep the
+ document size or are resized to the graphics dimensions.
+ The applicable \meta{options} are listed in Subsection \ref{sec:keys}.
+ If \meta{graphics options} are given, these are added to the options for
+ the underlying |\includegraphics| command. See the documentation of
+ |graphicx| \cite{carlisle:1999a} for a list of applicable \meta{graphics options}.\\
+ The \meta{list} may contain any construction allowed for the |\foreach| statement \cite{tantau:2010c},
+ especially a list of numbers.
+ The elements of the list can be used inside the \meta{file name pattern}
+ with the following macros:
+ \begin{itemize}
+ \item\docAuxCommand{n}: The current element of the list (may be a number).
+ \item\docAuxCommand{ni}: The position of the current element inside the list, i.\,e.\ |\ni|
+ counts from 1 to the size of the list.
+ \item\docAuxCommand{nn}: The zero-filled |\n|, if |\n| is a number. The digit
+ number of |\nn| is determined by \refKey{/igr/zerofill}.
+ \end{itemize}
+ The resolved \meta{file name pattern} is stored inside the macro:
+ \begin{itemize}
+ \item\docAuxCommand{nt}: This file name may be used for bookmarking.
+ \end{itemize}
+ In the default behavior, non existing files are ignored.
+
+\begin{texexptitled}[listing only,before={\par\medskip}]%
+ {A series of pictures; see from page~\pageref{exaseries.1}. The image files
+ exaimage-0001.png to exaimage-0150.png are included but only three
+ of them exist.}{exaseries.listing}
+\incmultigraph[zerofill=4,center,bookmark={A series of pictures: \nt},
+ label={exaseries.\n}]{exaimage-\nn.png}{1,...,150}
+\end{texexptitled}
+\end{docCommand}
+
+
+\begin{docCommand}{igrset}{\marg{options}}
+ Sets options for \refCom{incgraph} and \refCom{incmultigraph}
+ inside the current \TeX\ group.
+ For example, the options \refKey{/igr/center} and
+ \refKey{/igr/zerofill} may be defined for the whole document by this:
+\begin{dispListing}
+\igrset{center,zerofill=3}
+\end{dispListing}
+\end{docCommand}
+
+\subsection{Option Keys}\label{sec:keys}
+
+\begin{docIgrKey}{center}{}{no value}
+ The included image file is put in the center of a separate page which has the
+ current document dimensions. See page \pageref{exacenter} for the output
+ of Example \ref{exacenter.listing} on page \pageref{exacenter.listing}.
+\end{docIgrKey}
+
+\begin{docIgrKey}{page}{}{no value, initially set}
+ The included image file is put on a separate page which is resized to fit the
+ dimensions of the image. See page \pageref{exaresized} for the output
+ of Example \ref{exaresized.listing} on page \pageref{exaresized.listing}.
+\end{docIgrKey}
+
+\begin{docIgrKey}{options}{=\marg{graphics options}}{no default, initially empty}
+ The \meta{graphics options} are applied to the underlying |\includegraphics| command.
+ See the documentation of
+ |graphicx| \cite{carlisle:1999a} for a list of applicable \meta{graphics options}.
+\begin{texexptitled}[listing only,before={\par\medskip}]%
+ {A resized image; see page~\pageref{exagraphresize}}{exagraphresize.listing}
+\igrset{options={width=10cm,height=10cm},page,
+ overlay page number at top=5mm}
+
+\incgraph[bookmark={A resized image}, label={exagraphresize}]%
+ {exaimage-0037.png}
+\end{texexptitled}
+\end{docIgrKey}
+
+\begin{docIgrKey}{options add}{=\marg{graphics options}}{no default, initially empty}
+ The \meta{graphics options} are added to the current list of options
+ for the underlying |\includegraphics| command.
+\end{docIgrKey}
+
+\begin{docIgrKey}{label}{=\marg{text}}{no default, initially empty}
+ Adds a \LaTeX\ label to the included image.
+\end{docIgrKey}
+
+\begin{docIgrKey}{zerofill}{=\marg{digits}}{no default, initially |0|}
+ For \refCom{incmultigraph}, the current number element
+ is filled up with leading zeros until the \meta{digits} count is reached.
+ If \meta{digits} is 0 or 1, nothing is added. A \meta{digits} value
+ greater than 10 is treated as 10 which is the maximum number of
+ possible digits. The result is accessible as |\nn|, see \refCom{incmultigraph}.
+ Note that |zerofill| should be set to |0| if the list elements
+ in \refCom{incmultigraph} are not numbers.
+\end{docIgrKey}
+
+\begin{docIgrKey}{hyper}{}{no value, initially set}
+ An automated hypertarget is set to the current image. The hypertarget is placed
+ at the top left corner of the page. It is used internally, when a bookmark is added.
+\end{docIgrKey}
+
+\begin{docIgrKey}{no hyper}{}{no value}
+ No automated hypertarget is set to the current image. Use this option, if
+ the package |bookmark| is not included.
+\end{docIgrKey}
+
+
+\clearpage
+\begin{docIgrKey}{bookmark}{=\marg{text}}{no default, initially empty}
+ Adds a PDF bookmark with the given \meta{text} to the current image.
+\end{docIgrKey}
+
+\begin{docIgrKey}{bookmark options}{=\marg{bookmark options}}{no default, initially empty}
+ Sets the options for a bookmark.
+ See the documentation of
+ |bookmark| \cite{oberdiek:2011a} for a list of applicable \meta{bookmark options}.
+\begin{texexptitled}[listing only,before={\par\medskip}]%
+ {Bookmark options; see page~\pageref{exabookmark}}{exabookmark.listing}
+% not every PDF reader will show the effect!
+\igrset{bookmark options={bold,color={red}},center}
+\incgraph[bookmark={This ugly image again!},label={exabookmark}]%
+ {example.jpg}
+\end{texexptitled}
+\end{docIgrKey}
+
+\begin{docIgrKey}{bookmark heading}{=\marg{text}}{no default, initially empty}
+ For \refCom{incmultigraph}, an additional bookmark with the given \meta{text}
+ is set as a heading before the images are included.
+\begin{texexptitled}[listing only,before={\par\medskip}]%
+ {A series of pictures; see from page~\pageref{exaheading.1}}{exaheading.listing}
+\incmultigraph[zerofill=4,center,bookmark heading={A series of pictures},
+ bookmark heading options={level=subsection},
+ bookmark={\nt},bookmark options={level=subsubsection},
+ overlay page number at bottom,
+ label={exaheading.\n}]{exaimage-\nn.png}{1,...,150}
+\end{texexptitled}
+\end{docIgrKey}
+
+\begin{docIgrKey}{bookmark heading options}{=\marg{bookmark options}}{no default, initially empty}
+ Sets the options for a \refKey{/igr/bookmark heading}.
+ See the documentation of
+ |bookmark| \cite{oberdiek:2011a} for a list of applicable \meta{bookmark options}.
+\end{docIgrKey}
+
+\begin{docIgrKey}{target}{=\marg{anchor}}{no default}
+ The next hypertarget destination value is set to \meta{anchor} instead of
+ an automatically created value. This may be used for hyperlinks.
+\begin{dispExample}
+\hyperlink{oversized}{This is linked to the oversized example (click me)}.
+The target value '|oversized|' was defined in Example~\ref{exarotated.listing},
+see page~\pageref{exarotated.listing}.
+\end{dispExample}
+\end{docIgrKey}
+
+\clearpage
+\begin{docIgrKey}{set matches}{=\marg{list}}{no default, initially empty}
+ The \meta{list} is a comma separated list of \meta{key}=\meta{value} pairs.
+ For every pair, the given \meta{key} is mapped to the given \meta{value}.
+ Later, this \meta{value} can be retrieved by
+ \refKey{/igr/if match code},
+ \refKey{/igr/if match set}, and
+ \refKey{/igr/if match set bookmark}.
+
+\begin{tcblisting}{docexample,listing only}
+\igrset{set matches={
+ foo = bar,
+ 1 = A very red image,
+ 37 = A not so centered number,
+ 123 = A greenish example}}
+\end{tcblisting}
+\end{docIgrKey}
+\tcbuselistingtext
+
+\begin{docIgrKey}{if match code}{=\marg{key}\marg{then}\marg{else}}{no default}
+ If the \meta{key} was defined by \refKey{/igr/set matches},
+ \refCom{igrsetmatchvalue}, or \refCom{igrsetmatches},
+ the corresponding value is put in the
+ macro |\igrmatchvalue| and the \meta{then} code is
+ executed. If the \meta{key} is unknown, the \meta{else} code is
+ executed.
+\end{docIgrKey}
+
+\begin{docIgrKey}{if match set}{=\marg{key}\marg{then}\marg{else}}{no default}
+ If the \meta{key} was defined by \refKey{/igr/set matches},
+ \refCom{igrsetmatchvalue}, or \refCom{igrsetmatches},
+ the corresponding value is put in the
+ macro |\igrmatchvalue| and |\igrset{|\meta{then}|}| is executed.
+ If the \meta{key} is unknown, |\igrset{|\meta{else}|}| is executed.
+\end{docIgrKey}
+
+\begin{docIgrKey}{if match set bookmark}{=\marg{key}\marg{then}\marg{else}}{no default}
+ If the \meta{key} was defined by \refKey{/igr/set matches},
+ \refCom{igrsetmatchvalue}, or \refCom{igrsetmatches},
+ the corresponding value is put in the
+ macro |\igrmatchvalue| and the current PDF bookmark is set to \meta{then}.
+ If the \meta{key} is unknown, the current PDF bookmark is set to \meta{else}.
+\begin{texexptitled}[listing only,before={\par\medskip}]%
+ {Map and match example; see from page~\pageref{examatch.1}}{examatch.listing}
+\incmultigraph[zerofill=4,page,bookmark heading={Map and match example},
+ bookmark heading options={level=subsection},
+ bookmark options={level=subsubsection},
+ if match set bookmark={\n}{\igrmatchvalue\ (\n)}{\nt},
+ overlay page number at bottom,
+ label={examatch.\n}]{exaimage-\nn.png}{1,...,150}
+\end{texexptitled}
+\end{docIgrKey}
+
+\begin{docIgrKey}{disable match}{}{no value, initially set}
+ Disables the statements by
+ \refKey{/igr/if match code},
+ \refKey{/igr/if match set}, and
+ \refKey{/igr/if match set bookmark}.
+\end{docIgrKey}
+
+\clearpage
+\begin{docIgrKey}{include command}{\colOpt{=\marg{macro}}}{default and initially \cs{includegraphics}}
+ Replaces the internally used \cs{includegraphics} command by the given \meta{macro}.
+ Note that \meta{macro} has to have the same signature as \cs{includegraphics},
+ i.\,e.\ it has to take two arguments where the first argument is optional.
+\end{docIgrKey}
+
+\begin{docIgrKey}{existence check}{=\marg{macro}}{no default}
+ Replaces the internally used \cs{IfFileExists} command by the given \meta{macro}.
+ Note that \meta{macro} has to have the same signature as \cs{IfFileExists},
+ i.\,e.\ it has to take three arguments.
+\end{docIgrKey}
+
+\begin{docIgrKey}{fail on not found}{}{no value}
+ Stops the compilation with an error if the included file does not exist.
+\end{docIgrKey}
+
+\begin{docIgrKey}{ignore on not found}{}{no value, initially set}
+ Not existing included files are ignored without warning.
+\end{docIgrKey}
+
+\begin{docIgrKey}{pagestyle}{=\marg{page style}}{no default, initially |empty|}
+ Sets the \meta{page style} for the included graphics.
+\end{docIgrKey}
+
+\begin{docIgrKey}{overlay}{=\marg{tikz code}}{no default, initially unset}
+ Introduces arbitrary \meta{tikz code} to be drawn over the included image.
+ Note that the |tikz| package \cite{tantau:2010c} has to be loaded separately.
+ To support positioning inside the picture, two |tikz| nodes named
+ |box| and |page| are defined. |box| takes the dimensions of the included image
+ and |page| takes the dimensions of the image or of the page depending on the usage of
+ \refKey{/igr/page} or \refKey{/igr/center}.
+\begin{texexptitled}[listing only,before={\par\medskip}]%
+ {Overlay; see page~\pageref{overlay}}{overlay.listing}
+\igrset{bookmark options={level=subsection},center}
+\incgraph[bookmark={Picture with overlay},label={overlay},
+ overlay={
+ \node[draw=red,line width=3pt,fill=red,fill opacity=0.1,
+ minimum width=14cm,circle] (circ) at (page.center) {};
+ \node[fill=blue!5!white,below right,text width=4cm] (A)
+ at ([xshift=1cm,yshift=-1cm]page.north west)
+ {This included image is overlayed with |tikz| code.};
+ \node[fill=green!10!white,above,text width=7cm] (B)
+ at ([yshift=2cm]page.south)
+ {Image Name: \nt\\Page number: \thepage\\
+ Example~\ref{overlay.listing} on page~\pageref{overlay.listing}};
+ \draw[line width=2pt,->] (A)--(circ);
+ \draw[line width=2pt,green!50!black,dashed]
+ (box.south west)--(box.south east);
+ \draw[line width=2pt,->,green!50!black] (B)--(box.south);
+ }]{example.jpg}
+\end{texexptitled}
+\end{docIgrKey}
+
+\begin{docIgrKey}{overlay page number at}{=\marg{position}}{no default, initially unset}
+ Overlays the page number at the given |tikz| \meta{position}.
+\end{docIgrKey}
+
+\begin{docIgrKey}{overlay page number at bottom}{\colOpt{=\marg{length}}}{default |1.5cm|}
+ Overlays the page number at \meta{length} above the bottom edge of the paper.
+ See Example~\ref{exacenter.listing} on page~\pageref{exacenter.listing}
+ and the result on page~\pageref{exacenter}.
+\end{docIgrKey}
+
+\begin{docIgrKey}{overlay page number at top}{\colOpt{=\marg{length}}}{default |1.5cm|}
+ Overlays the page number at \meta{length} below the top edge of the paper.
+ See Example~\ref{exagraphresize.listing} on page~\pageref{exagraphresize.listing}
+ and the result on page~\pageref{exagraphresize}.
+\end{docIgrKey}
+
+\begin{docIgrKey}{no overlay}{}{no value, initially set}
+ Removes the overlay setting, identical to |include command| without value.
+\end{docIgrKey}
+
+\clearpage
+\foreach \n in {1,...,9} {\inputlisting{\n}}
+
+\clearpage
+%--------------------------------------
+\section{Examples}
+
+\subsection{Including some Scans to Standard Paper}
+In this scenario, we have some scans (or images from whatever source) which
+should be combined to a PDF document for our paperless office.
+The paper size of the PDF document is set to a standard paper (here: letter size)
+if the document has to be printed.
+
+The following Example \ref{somescans} is a complete template for such a document.
+Here, the images |example.jpg|,
+|exaimage-0001.png|,
+|exaimage-0037.png|, and
+|exaimage-0123.png| are used for the resulting document.
+All included images are automatically bookmarked with the page number and
+the file name of the source image.
+
+\def\thecurrentexample{\jobname-example-a.tex}
+\tcbinputlisting{listing file=\thecurrentexample,listing only,
+ example={\texttt{\thecurrentexample}}{somescans}}
+
+The compiled result of this stand-alone source code is not found in this document but as
+a separate file in the documentation directory of the package.
+
+
+
+\clearpage
+\subsection{Creating a Picture Book}
+For this example, we assume again that a bunch of image files is to be
+combined to a PDF document. This time, the target document should be read or
+displayed mainly on computer screens and may never be printed. Therefore,
+the paper size is set flexible for the current image.
+
+The following Example \ref{picturebook} is a complete template for such a document.
+All included images are resized to a common width, but this is not necessary.
+The resulting document is considered as an e-book where the bookmarks are the
+most important navigation accessory.
+Single page inclusions with \refCom{incgraph} are bookmarked directly, but
+multi-page inclusions with \refCom{incmultigraph} can be bookmarked using the
+map-and-match feature of the package.
+The example shows a mixed usage of the macros.
+Note that the bookmarks of the multi-page part are matched with the numbers
+contained in the file names of |exaimage-0001.png| to |exaimage-0150.png|.
+
+\def\thecurrentexample{\jobname-example-b.tex}
+\tcbinputlisting{listing file=\thecurrentexample,listing only,
+ example={\texttt{\thecurrentexample}}{picturebook}}
+
+The compiled result of this stand-alone source code is not found in this document but as
+a separate file in the documentation directory of the package.
+
+
+\clearpage
+\subsection{Reformatting from Letter to DIN A4 (and vice versa)}
+In this scenario, we assume to have a PDF document with the 'wrong' paper size.
+Here, |incgraph-example-a.pdf| has the letter format, but DIN A4 paper
+is needed. |incgraph| is used to reformat to the desired paper size.
+Of course, it also works the other way around.
+
+The following Example \ref{reformatting} is a complete template for such a document.
+The document gets the desired paper size with the usual |\documentclass| option.
+Then, all four pages of the original document are imported to the new paper
+size. Note that the actual document content itself is not resized because
+letter and DIN A4 are not so very different. If needed, the content could be
+shrunk or enlarged easily by adding a |scale| option for the underlying
+|\includegraphics| macro.
+
+
+
+
+\def\thecurrentexample{\jobname-example-c.tex}
+\tcbinputlisting{listing file=\thecurrentexample,listing only,
+example={\texttt{\thecurrentexample}}{reformatting}}
+
+The compiled result of this stand-alone source code is not found in this document but as
+a separate file in the documentation directory of the package.
+
+
+
+\clearpage
+\subsection{Drawing on Full Paper Size}
+In the following examples, no external image is included to the document.
+Instead, the image (or whatever) is created inside the document and put
+on a separate page which could be resized or take the original document
+paper size.
+
+In Example \ref{fullpaperdrawing1}, a |tikzpicture| is drawn. The whole
+environment is put inside an \refCom{igrpage} macro which puts the drawing
+on a separate page which gets the dimensions of the drawing.
+
+
+\begin{texexptitled}[listing only]{Creation of a special text page (resized)}{fullpaperdrawing1}
+\igrpage{\begin{tikzpicture}%
+ \coordinate (A) at (0,0); \coordinate (B) at (16,16);
+ \path[use as bounding box,top color=Goldenrod!25,bottom color=Navy!25]
+ (A) rectangle (B);
+ \coordinate (C) at ([xshift=1cm,yshift=1cm]A);
+ \coordinate (D) at ([xshift=-1cm,yshift=-1cm]B);
+ \path (C) -- coordinate (E) (D);
+ \draw[rounded corners=5mm,very thick,Navy] (C) rectangle (D);
+ \path (C) |-
+ node [pos=0.75,fill=white,draw=Navy,very thick,inner sep=3mm]
+ {My Special Page \thepage} (D);
+ \node[text width=10cm,align=flush center,font=\Large] at (E) {
+ This is my special page. It takes the dimensions of the underlying
+ |tikzpicture| as seen in the source code of Example~\ref{fullpaperdrawing1}
+ on page~\pageref{fullpaperdrawing1}.};
+\end{tikzpicture}}
+\bookmark[dest=\igrAutoTarget,level=subsubsection]%
+ {My special text page (resized)}
+\end{texexptitled}
+See the result on the following page.
+\clearpage\inputlastlisting
+
+
+In Example \ref{fullpaperdrawing2}, nearly the same |tikzpicture| is drawn.
+This time, the whole environment is put inside an \refCom{igrcenter} macro which puts the drawing
+on a separate page but without resizing the paper.
+To draw seamlessly, the document paper size of 21cm to 29.7cm is used
+directly inside the |tikzpicture|.
+
+
+\begin{texexptitled}[listing only]{Creation of a special text page (fitted)}{fullpaperdrawing2}
+\igrtargetset{mytarget}
+\bookmark[dest=mytarget,level=subsubsection]{My special text page (fitted)}
+\igrcenter{\begin{tikzpicture}%
+ \coordinate (A) at (0,0); \coordinate (B) at (21,29.7);
+ \path[use as bounding box,top color=Goldenrod!25,bottom color=Navy!25]
+ (A) rectangle (B);
+ \coordinate (C) at ([xshift=1cm,yshift=1cm]A);
+ \coordinate (D) at ([xshift=-1cm,yshift=-1cm]B);
+ \path (C) -- coordinate (E) (D);
+ \draw[rounded corners=5mm,very thick,Navy] (C) rectangle (D);
+ \path (C) |-
+ node [pos=0.75,fill=white,draw=Navy,very thick,inner sep=3mm]
+ {My Special Page \thepage} (D);
+ \node[text width=10cm,align=flush center,font=\Large] at (E) {
+ This is my special page. It consumes the whole document paper size with
+ an underlying |tikzpicture| as seen in the source code of
+ Example~\ref{fullpaperdrawing2} on page~\pageref{fullpaperdrawing2}.};
+\end{tikzpicture}}
+\end{texexptitled}
+See the result on the following \hyperlink{mytarget}{page}.
+\clearpage\inputlastlisting
+
+
+
+
+
+% Actually, it is not a good idea to include the references like this!
+% Do not follow this bad example ...
+\begin{tcbverbatimwrite}{\jobname.bib}
+@manual{tantau:2010c,
+ author = {Till Tantau},
+ title = {The TikZ and PGF Packages},
+ subtitle = {Manual for version 2.10},
+ url = {http://mirror.ctan.org/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf},
+ date = {2010-10-25},
+}
+
+@manual{carlisle:1999a,
+ author = {D. P. Carlisle and S. P. Q. Rahtz},
+ title = {The graphicx package},
+ url = {http://mirror.ctan.org/macros/latex/required/graphics/},
+ date = {1999-02-16},
+ }
+
+@manual{matthias:2012a,
+ author = {Andreas Matthias},
+ title = {The pdfpages Package},
+ url = {http://mirror.ctan.org/macros/latex/contrib/pdfpages/pdfpages.pdf},
+ date = {2012-04-03},
+}
+
+@manual{oberdiek:2011a,
+ author = {Heiko Oberdiek},
+ title = {The bookmark Package},
+ url = {http://mirror.ctan.org/macros/latex/contrib/oberdiek/bookmark.pdf},
+ date = {2011-12-02},
+}
+
+\end{tcbverbatimwrite}
+
+\clearpage
+\printbibliography[heading=bibintoc]
+
+\printindex
+
+\end{document}
diff --git a/Master/texmf-dist/tex/latex/incgraph/incgraph.sty b/Master/texmf-dist/tex/latex/incgraph/incgraph.sty
new file mode 100644
index 00000000000..a7c6bbe7c0a
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/incgraph/incgraph.sty
@@ -0,0 +1,325 @@
+%% The LaTeX package incgraph - version 1.02 (2012/07/06)
+%% incgraph.sty: Graphics inclusion page
+%%
+%% -------------------------------------------------------------------------------------------
+%% Copyright (c) 2012 by Prof. Dr. Dr. Thomas F. Sturm <thomas dot sturm at unibw dot de>
+%% -------------------------------------------------------------------------------------------
+%%
+%% This work 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 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `author-maintained'.
+%%
+%% This work consists of all files listed in README
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{incgraph}[2012/07/06 version 1.02 LaTeX special graphics inclusion]
+
+\DeclareOption{pgf}{\def\igrreq@pgf{\RequirePackage{pgf}[2008/01/15]\RequirePackage{pgffor}}}%
+\DeclareOption{nopgf}{\def\igrreq@pgf{}}%
+\DeclareOption{graphicx}{\def\igrreq@graphicx{\RequirePackage{graphicx}}}%
+\DeclareOption{nographicx}{\def\igrreq@graphicx{}}%
+\DeclareOption{bookmark}{\def\igrreq@bookmark{\RequirePackage{bookmark}}}%
+\DeclareOption{nobookmark}{\def\igrreq@bookmark{}}%
+
+\ExecuteOptions{pgf,graphicx,bookmark}
+\ProcessOptions\relax
+
+\RequirePackage{pgfkeys}
+\igrreq@pgf
+\igrreq@graphicx
+\igrreq@bookmark
+
+% key management
+\pgfkeys{/igr/.is family}
+
+\def\igrset{\pgfqkeys{/igr}}
+
+\newbox\igrbox
+\newdimen\igr@length
+\newcounter{igrtarget}
+
+\AtBeginDocument{%
+ \edef\igrOrginalPageWidth{\the\pdfpagewidth}%
+ \edef\igrOrginalPageHeight{\the\pdfpageheight}%
+}
+
+\def\igr@target@auto{%
+ \edef\igrAutoTarget{igr-\theigrtarget}%
+}
+
+\def\igr@target@user{%
+ \edef\igrAutoTarget{\igr@usertarget}%
+ \global\let\igr@target@next=\igr@target@auto%
+}
+
+\let\igr@target@next=\igr@target@auto
+
+\def\igrtargetset#1{%
+ \def\igr@usertarget{#1}%
+ \let\igr@target@next=\igr@target@user%
+}
+
+\def\igr@nextAutoTarget{%
+ \refstepcounter{igrtarget}%
+ \igr@target@next%
+}
+
+\long\def\igrboxset#1{%
+ \igr@nextAutoTarget%
+ \setbox\igrbox\hbox{#1}%
+ \igr@length=\wd\igrbox%
+ \edef\igrBoxWidth{\the\igr@length}%
+ \igr@length=\ht\igrbox%
+ \edef\igrBoxht{\the\igr@length}%
+ \igr@length=\dp\igrbox%
+ \edef\igrBoxdp{\the\igr@length}%
+ \advance\igr@length by \igrBoxht%
+ \edef\igrBoxHeight{\the\igr@length}%
+}
+
+\def\igr@hyper{\hypertarget{\igrAutoTarget}{}}
+\def\igr@empty{}
+
+\def\igrboxcenter{%
+ \thispagestyle{\igrpagestyle}%
+ %
+ \igr@length=-1in%
+ \advance\igr@length by -\voffset%
+ \advance\igr@length by -\topmargin%
+ \advance\igr@length by -\headheight%
+ \advance\igr@length by -\headsep%
+ \advance\igr@length by -\lineskip%
+ \edef\igr@offy@top{\the\igr@length}%
+ %
+ \igr@length=\pdfpageheight%
+ \advance\igr@length by -\igrBoxHeight%
+ \divide\igr@length by 2%
+ \edef\igr@offy@abs{\the\igr@length}%
+ %
+ \igr@length=-1in%
+ \advance\igr@length by -\hoffset%
+ \advance\igr@length by -\@themargin%
+ \edef\igr@offx@left{\the\igr@length}%
+ %
+ \igr@length=\pdfpagewidth%
+ \advance\igr@length by -\igrBoxWidth%
+ \divide\igr@length by 2%
+ \advance\igr@length by \igr@offx@left%
+ \edef\igr@offx{\the\igr@length}%
+ %
+ \vbox to \vsize{%
+ \kern\igr@offy@top\hbox{\kern\igr@offx@left\igr@hypertarget\hss}\kern\igr@offy@abs%
+ \hbox to \hsize{\kern\igr@offx\box\igrbox\hss}%
+ \vss}%
+ \break%
+}
+
+\def\igrboxtikz{%
+ \path[use as bounding box] (0,0) rectangle (\igrBoxWidth,\igrBoxHeight);
+ \node[line width=0mm,inner sep=0,rectangle,above right] (box) at (0,0) {\box\igrbox};
+ \node[minimum width=\igrBoxWidth,minimum height=\igrBoxHeight,line width=0mm,inner sep=0mm,above right] (page) at (0,0) {};%
+}
+
+\let\igrboxtikzpage=\igrboxtikz
+
+\def\igrboxtikzcenter{%
+ \path[use as bounding box] (0,0) rectangle (\pdfpagewidth,\pdfpageheight);
+ \node[line width=0mm,inner sep=0,rectangle,above right] (box) at ({(\pdfpagewidth-\igrBoxWidth)/2},{(\pdfpageheight-\igrBoxHeight)/2}) {\box\igrbox};
+ \let\igrBoxWidth=\pdfpagewidth%
+ \let\igrBoxHeight=\pdfpageheight%
+ \node[minimum width=\pdfpagewidth,minimum height=\pdfpageheight,line width=0mm,inner sep=0mm,above right] (page) at (0,0) {};%
+}
+
+\long\def\igrpage#1{%
+ \def\igr@mode{page}%
+ \igrboxset{#1}%
+ \eject%
+ \pdfpagewidth=\igrBoxWidth%
+ \pdfpageheight=\igrBoxHeight%
+ \edef\theigrpage{\thepage}%
+ \igrboxcenter%
+ \pdfpagewidth=\igrOrginalPageWidth%
+ \pdfpageheight=\igrOrginalPageHeight%
+}
+
+\long\def\igrcenter#1{%
+ \def\igr@mode{center}%
+ \igrboxset{#1}%
+ \clearpage%
+ \edef\theigrpage{\thepage}%
+ \igrboxcenter%
+}
+
+\def\incgraph{%
+ \@ifnextchar[{\inc@incgraph}{\inc@incgraph[]}}
+
+\def\inc@incgraph[#1]{%
+ \@ifnextchar[{\inc@@incgraph[#1]}{\inc@@incgraph[#1][]}}
+
+\long\def\inc@@incgraph[#1][#2]#3{%
+ \begingroup%
+ \def\nt{#3}%
+ \igr@if@file@exists{\nt}{%
+ \igrset{#1}%
+ \igr@match@hook%
+ \edef\igr@incgraph{\noexpand\igr@include@graphics[\igr@options,#2]}%
+ \igr@output{\igr@incgraph{\nt}\ifx\igr@label@text\igr@empty\else\label{\igr@label@text}\fi}%
+ \ifx\igr@bookmark@text\igr@empty\else%
+ \edef\igr@bookmark{\noexpand\bookmark[\igr@bookmark@options,dest=\noexpand\igrAutoTarget]}%
+ \igr@bookmark{\igr@bookmark@text}\fi%
+ }{}%
+ \endgroup%
+}
+
+\def\igr@bookmark@heading{%
+ \global\let\igr@process@label=\igr@empty%
+ \ifx\igr@bookmark@heading@text\igr@empty\else%
+ \edef\igr@bookmark{\noexpand\bookmark[\igr@bookmark@heading@options,dest=\noexpand\igrAutoTarget]}%
+ \igr@bookmark{\igr@bookmark@heading@text}\fi%
+ \global\let\igr@process@bookmark@heading=\igr@empty%
+}
+
+\def\incmultigraph{%
+ \@ifnextchar[{\inc@incmultigraph}{\inc@incmultigraph[]}}
+
+\def\inc@incmultigraph[#1]{%
+ \@ifnextchar[{\inc@@incmultigraph[#1]}{\inc@@incmultigraph[#1][]}}
+
+\long\def\inc@@incmultigraph[#1][#2]#3#4{%
+ \begingroup%
+ \igrset{#1}%
+ \ifx\igr@label@text\igr@empty\global\let\igr@process@label=\igr@empty\else%
+ \global\def\igr@process@label{\label{\igr@label@text}}\fi%
+ \global\let\igr@process@bookmark@heading=\igr@bookmark@heading%
+ \foreach \n [count=\ni] in {#4} {%
+ \edef\nn{\igr@zero@fill{\n}}%
+ \def\nt{#3}%
+ \igr@if@file@exists{\nt}{%
+ \igr@match@hook%
+ \edef\igr@incgraph{\noexpand\igr@include@graphics[\igr@options,#2]}%
+ \igr@output{\igr@incgraph{\nt}\igr@process@label}%
+ \igr@process@bookmark@heading%
+ \ifx\igr@bookmark@text\igr@empty\else%
+ \edef\igr@bookmark{\noexpand\bookmark[\igr@bookmark@options,dest=\noexpand\igrAutoTarget]}%
+ \igr@bookmark{\igr@bookmark@text}\fi%
+ }{}}\endgroup%
+}
+
+\def\igr@make@zerofill#1#2#3#4#5#6#7#8#9{%
+ \def\igr@zerofill##1{%
+ \ifnum##1<10 #1%
+ \else\ifnum##1<100 #2%
+ \else\ifnum##1<1000 #3%
+ \else\ifnum##1<10000 #4%
+ \else\ifnum##1<100000 #5%
+ \else\ifnum##1<1000000 #6%
+ \else\ifnum##1<10000000 #7%
+ \else\ifnum##1<100000000 #8%
+ \else\ifnum##1<1000000000 #9%
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi%
+ ##1%
+ }%
+}
+
+\def\igrmakezerofill#1#2{%
+ \def\igr@zerofill##1{##1}%
+ \ifcase#2\or\or\igr@make@zerofill{0}{}{}{}{}{}{}{}{}%
+ \or\igr@make@zerofill{00}{0}{}{}{}{}{}{}{}%
+ \or\igr@make@zerofill{000}{00}{0}{}{}{}{}{}{}%
+ \or\igr@make@zerofill{0000}{000}{00}{0}{}{}{}{}{}%
+ \or\igr@make@zerofill{00000}{0000}{000}{00}{0}{}{}{}{}%
+ \or\igr@make@zerofill{000000}{00000}{0000}{000}{00}{0}{}{}{}%
+ \or\igr@make@zerofill{0000000}{000000}{00000}{0000}{000}{00}{0}{}{}%
+ \or\igr@make@zerofill{00000000}{0000000}{000000}{00000}{0000}{000}{00}{0}{}%
+ \else\igr@make@zerofill{000000000}{00000000}{0000000}{000000}{00000}{0000}{000}{00}{0}%
+ \fi%
+ \let#1=\igr@zerofill%
+}
+
+\newcommand{\igrsetmatchvalue}[2]{%
+ \pgfkeyssetvalue{/igrmatch/#1}{#2}%
+}
+
+\newcommand{\igrifmatch}[3]{%
+ \pgfkeysifdefined{/igrmatch/#1}{%
+ \pgfkeysgetvalue{/igrmatch/#1}{\igrmatchvalue}#2}{#3}%
+}
+
+\pgfkeys{%
+ /igrsetmatch/.unknown/.code={%
+ \let\igrmatchkey=\pgfkeyscurrentname%
+ \igrsetmatchvalue{\igrmatchkey}{#1}%
+ }%
+}
+
+\newcommand{\igrsetmatches}[1]{\pgfkeys{/igrsetmatch/.cd,#1}}
+
+\newcommand{\igr@no@existence@check}[3]{#2}
+
+\newcommand{\igr@include@graphics@tikz}[2][1]{%
+ \igrboxset{\includegraphics[#1]{#2}}%
+ \begin{tikzpicture}%
+ \csname igrboxtikz\igr@mode\endcsname%
+ \igr@tikz@hook%
+ \end{tikzpicture}}
+
+\igrset{%
+ center/.code={\let\igr@output=\igrcenter},
+ page/.code={\let\igr@output=\igrpage},
+ options/.store in=\igr@options,
+ options add/.code={%
+ \toks0=\expandafter{\igr@options}%
+ \def\temp{#1}\toks1=\expandafter{\temp}%
+ \edef\igr@options{\the\toks0,\the\toks1}},
+ bookmark/.store in=\igr@bookmark@text,
+ bookmark options/.store in=\igr@bookmark@options,
+ bookmark heading/.store in=\igr@bookmark@heading@text,
+ bookmark heading options/.store in=\igr@bookmark@heading@options,
+ label/.store in=\igr@label@text,
+ zerofill/.code={\igrmakezerofill{\igr@zero@fill}{#1}},
+ set matches/.code=\igrsetmatches{#1},
+ hyper/.code={\let\igr@hypertarget=\igr@hyper},
+ no hyper/.code={\let\igr@hypertarget=\igr@empty},
+ if match code/.code args={#1#2#3}{\def\igr@match@hook{\igrifmatch{#1}{#2}{#3}}},
+ if match set/.style args={#1#2#3}{if match code={#1}{\igrset{#2}}{\igrset{#3}}},
+ if match set bookmark/.style args={#1#2#3}{if match code={#1}{\igrset{bookmark={#2}}}{\igrset{bookmark={#3}}}},
+ disable match/.code={\let\igr@match@hook=\igr@empty},
+ include command/.code={\let\igr@include@graphics=#1},
+ include command/.default=\includegraphics,
+ existence check/.code={\let\igr@if@file@exists=#1},
+ fail on not found/.style={existence check=\igr@no@existence@check},
+ ignore on not found/.style={existence check=\IfFileExists},
+ pagestyle/.store in=\igrpagestyle,
+ target/.code={\igrtargetset{#1}},
+ overlay@code/.store in=\igr@tikz@hook,
+ overlay/.style={include command=\igr@include@graphics@tikz,overlay@code={#1}},
+ overlay page number at/.style={overlay={\node[fill opacity=0.35,draw opacity=0.5,text opacity=1,
+ inner xsep=1em,rounded corners,fill=white,draw=black] at (#1) {\thepage};}},
+ overlay page number at top/.style={overlay page number at={\igrBoxWidth/2,\igrBoxHeight-#1}},
+ overlay page number at top/.default=1.5cm,
+ overlay page number at bottom/.style={overlay page number at={\igrBoxWidth/2,#1}},
+ overlay page number at bottom/.default=1.5cm,
+ no overlay/.style={include command},
+%
+ page,
+ options=,
+ bookmark=,
+ bookmark options=,
+ bookmark heading=,
+ bookmark heading options=,
+ label=,
+ zerofill=0,
+ hyper,
+ disable match,
+ include command,
+ ignore on not found,
+ pagestyle=empty,
+ overlay@code=,
+}
+
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index dcc638b825d..303f1f829eb 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -208,7 +208,7 @@ my @TLP_working = qw(
ijmart ijqc
imac image-gallery imakeidx impatient impatient-fr
impnattypo import imsproc imtekda
- inconsolata index inlinebib inlinedef inputtrc insbox installfont
+ incgraph inconsolata index inlinebib inlinedef inputtrc insbox installfont
interactiveworkbook interfaces interpreter intro-scientific
inversepath invoice
ionumbers iopart-num ipaex iso
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index ad14827ddac..0ed5ae0b575 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -351,6 +351,7 @@ depend ifthenx
depend image-gallery
depend imakeidx
depend import
+depend incgraph
depend inlinedef
depend inputtrc
depend interactiveworkbook
diff --git a/Master/tlpkg/tlpsrc/incgraph.tlpsrc b/Master/tlpkg/tlpsrc/incgraph.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/incgraph.tlpsrc