summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/incgraph
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/incgraph')
-rw-r--r--Master/texmf-dist/tex/latex/incgraph/incgraph.sty209
1 files changed, 169 insertions, 40 deletions
diff --git a/Master/texmf-dist/tex/latex/incgraph/incgraph.sty b/Master/texmf-dist/tex/latex/incgraph/incgraph.sty
index a7c6bbe7c0a..5020e69c43f 100644
--- a/Master/texmf-dist/tex/latex/incgraph/incgraph.sty
+++ b/Master/texmf-dist/tex/latex/incgraph/incgraph.sty
@@ -1,4 +1,4 @@
-%% The LaTeX package incgraph - version 1.02 (2012/07/06)
+%% The LaTeX package incgraph - version 1.10 (2012/09/28)
%% incgraph.sty: Graphics inclusion page
%%
%% -------------------------------------------------------------------------------------------
@@ -18,7 +18,7 @@
%% This work consists of all files listed in README
%%
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{incgraph}[2012/07/06 version 1.02 LaTeX special graphics inclusion]
+\ProvidesPackage{incgraph}[2012/09/28 version 1.10 LaTeX special graphics inclusion]
\DeclareOption{pgf}{\def\igrreq@pgf{\RequirePackage{pgf}[2008/01/15]\RequirePackage{pgffor}}}%
\DeclareOption{nopgf}{\def\igrreq@pgf{}}%
@@ -50,11 +50,11 @@
}
\def\igr@target@auto{%
- \edef\igrAutoTarget{igr-\theigrtarget}%
+ \xdef\igrAutoTarget{igr-\theigrtarget}%
}
\def\igr@target@user{%
- \edef\igrAutoTarget{\igr@usertarget}%
+ \xdef\igrAutoTarget{\igr@usertarget}%
\global\let\igr@target@next=\igr@target@auto%
}
@@ -83,6 +83,7 @@
\edef\igrBoxHeight{\the\igr@length}%
}
+
\def\igr@hyper{\hypertarget{\igrAutoTarget}{}}
\def\igr@empty{}
@@ -94,7 +95,6 @@
\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%
@@ -114,7 +114,8 @@
\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%
+ \kern\igr@offy@top\hbox{\kern\igr@offx@left\igr@hypertarget\hss}%
+ \nointerlineskip\kern\igr@offy@abs%
\hbox to \hsize{\kern\igr@offx\box\igrbox\hss}%
\vss}%
\break%
@@ -131,45 +132,100 @@
\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) {};%
+ \edef\igrBoxWidth{\the\pdfpagewidth}%
+ \edef\igrBoxHeight{\the\pdfpageheight}%
+ \node[minimum width=\igrBoxWidth,minimum height=\igrBoxHeight,line width=0mm,inner sep=0mm,above right] (page) at (0,0) {};%
}
-\long\def\igrpage#1{%
- \def\igr@mode{page}%
- \igrboxset{#1}%
+\def\igr@overlay@on{%
+ \igrboxset{\begin{tikzpicture}\igrboxtikzcenter\igr@tikz@hook\end{tikzpicture}}}
+
+\def\igr@overlay@off{}
+
+\let\igr@overlay=\igr@overlay@off
+
+% Output macros
+
+\def\igr@out@resize#1#2{%
+ \edef\igrCurrentPageWidth{\the\pdfpagewidth}%
+ \edef\igrCurrentPageHeight{\the\pdfpageheight}%
\eject%
- \pdfpagewidth=\igrBoxWidth%
- \pdfpageheight=\igrBoxHeight%
+ \pdfpagewidth=#1%
+ \pdfpageheight=#2%
+ \igr@overlay%
\edef\theigrpage{\thepage}%
\igrboxcenter%
- \pdfpagewidth=\igrOrginalPageWidth%
- \pdfpageheight=\igrOrginalPageHeight%
+ \pdfpagewidth=\igrCurrentPageWidth%
+ \pdfpageheight=\igrCurrentPageHeight%
}
-\long\def\igrcenter#1{%
- \def\igr@mode{center}%
- \igrboxset{#1}%
+\def\igr@out@center@fit@port{%
+ \igr@out@resize{\igr@target@width}{\igr@target@height}%
+}
+
+\def\igr@out@center@fit@land{%
+ \igr@out@resize{\igr@target@height}{\igr@target@width}%
+}
+
+\def\igr@out@center@fit{%
+ \csname igr@out@center@fit@\igr@turn\endcsname%
+}
+
+\def\igr@out@page{%
+ \igr@out@resize{\igrBoxWidth}{\igrBoxHeight}%
+}
+
+\def\igr@out@center@port{%
\clearpage%
+ \igr@overlay%
\edef\theigrpage{\thepage}%
\igrboxcenter%
}
+\def\igr@out@center@land{%
+ \edef\igr@temp@w{\the\pdfpagewidth}\edef\igr@temp@h{\the\pdfpageheight}%
+ \igr@out@resize{\igr@temp@h}{\igr@temp@w}%
+}
+
+\def\igr@out@center{%
+ \csname igr@out@center@\igr@turn\endcsname%
+}
+
+% Toolbox output
+
+\long\def\igrcenterfit#1#2#3{%
+ \igrboxset{#3}%
+ \igr@out@resize{#1}{#2}%
+}
+
+\long\def\igrpage#1{%
+ \igrboxset{#1}%
+ \igr@out@page%
+}
+
+\long\def\igrcenter#1{%
+ \igrboxset{#1}%
+ \igr@out@center@port%
+}
+
+
+% include macros
+
\def\incgraph{%
- \@ifnextchar[{\inc@incgraph}{\inc@incgraph[]}}
+ \@ifnextchar[{\inc@graph}{\inc@graph[]}}
-\def\inc@incgraph[#1]{%
- \@ifnextchar[{\inc@@incgraph[#1]}{\inc@@incgraph[#1][]}}
+\def\inc@graph[#1]{%
+ \@ifnextchar[{\inc@@graph[#1]}{\inc@@graph[#1][]}}
-\long\def\inc@@incgraph[#1][#2]#3{%
+\long\def\inc@@graph[#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}%
+ \igrboxset{\igr@incgraph{\nt}\ifx\igr@label@text\igr@empty\else\label{\igr@label@text}\fi}%
+ \igr@output%
\ifx\igr@bookmark@text\igr@empty\else%
\edef\igr@bookmark{\noexpand\bookmark[\igr@bookmark@options,dest=\noexpand\igrAutoTarget]}%
\igr@bookmark{\igr@bookmark@text}\fi%
@@ -186,12 +242,12 @@
}
\def\incmultigraph{%
- \@ifnextchar[{\inc@incmultigraph}{\inc@incmultigraph[]}}
+ \@ifnextchar[{\inc@multigraph}{\inc@multigraph[]}}
-\def\inc@incmultigraph[#1]{%
- \@ifnextchar[{\inc@@incmultigraph[#1]}{\inc@@incmultigraph[#1][]}}
+\def\inc@multigraph[#1]{%
+ \@ifnextchar[{\inc@@multigraph[#1]}{\inc@@multigraph[#1][]}}
-\long\def\inc@@incmultigraph[#1][#2]#3#4{%
+\long\def\inc@@multigraph[#1][#2]#3#4{%
\begingroup%
\igrset{#1}%
\ifx\igr@label@text\igr@empty\global\let\igr@process@label=\igr@empty\else%
@@ -203,7 +259,8 @@
\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}%
+ \igrboxset{\igr@incgraph{\nt}\igr@process@label}%
+ \igr@output%
\igr@process@bookmark@heading%
\ifx\igr@bookmark@text\igr@empty\else%
\edef\igr@bookmark{\noexpand\bookmark[\igr@bookmark@options,dest=\noexpand\igrAutoTarget]}%
@@ -211,6 +268,29 @@
}{}}\endgroup%
}
+
+\newenvironment{inctext}[1][]{%
+ \igrset{#1}%
+ \igr@match@hook%
+ \igr@nextAutoTarget%
+ \begin{lrbox}{\igrbox}%
+}{%
+ \unskip\ifx\igr@label@text\igr@empty\else\label{\igr@label@text}\fi\end{lrbox}%
+ \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}%
+ \igr@output%
+ \ifx\igr@bookmark@text\igr@empty\else%
+ \edef\igr@bookmark{\noexpand\bookmark[\igr@bookmark@options,dest=\noexpand\igrAutoTarget]}%
+ \igr@bookmark{\igr@bookmark@text}\fi%
+}
+
+
\def\igr@make@zerofill#1#2#3#4#5#6#7#8#9{%
\def\igr@zerofill##1{%
\ifnum##1<10 #1%
@@ -262,16 +342,8 @@
\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}%
@@ -298,16 +370,70 @@
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/.code={\let\igr@overlay=\igr@overlay@on\igrset{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},
+ no overlay/.code={\let\igr@overlay=\igr@overlay@off},
+ portrait/.code={\def\igr@turn{port}},
+ landscape/.code={\def\igr@turn{land}},
+ paper size/.code args={#1:#2}{\edef\igr@target@width{#1}\edef\igr@target@height{#2}\let\igr@output=\igr@out@center@fit},
+ a0paper/.style={paper size=841mm:1189mm},
+ a1paper/.style={paper size=594mm:841mm},
+ a2paper/.style={paper size=420mm:594mm},
+ a3paper/.style={paper size=297mm:420mm},
+ a4paper/.style={paper size=210mm:297mm},
+ a5paper/.style={paper size=148mm:210mm},
+ a6paper/.style={paper size=105mm:148mm},
+ a7paper/.style={paper size=74mm:105mm},
+ a8paper/.style={paper size=52mm:74mm},
+ a9paper/.style={paper size=37mm:52mm},
+ a10paper/.style={paper size=26mm:37mm},
+ b0paper/.style={paper size=1000mm:1414mm},
+ b1paper/.style={paper size=707mm:1000mm},
+ b2paper/.style={paper size=500mm:707mm},
+ b3paper/.style={paper size=353mm:500mm},
+ b4paper/.style={paper size=250mm:353mm},
+ b5paper/.style={paper size=176mm:250mm},
+ b6paper/.style={paper size=125mm:176mm},
+ b7paper/.style={paper size=88mm:125mm},
+ b8paper/.style={paper size=62mm:88mm},
+ b9paper/.style={paper size=44mm:62mm},
+ b10paper/.style={paper size=31mm:44mm},
+ c0paper/.style={paper size=917mm:1297mm},
+ c1paper/.style={paper size=648mm:917mm},
+ c2paper/.style={paper size=648mm:917mm},
+ c3paper/.style={paper size=324mm:458mm},
+ c4paper/.style={paper size=229mm:324mm},
+ c5paper/.style={paper size=162mm:229mm},
+ c6paper/.style={paper size=114mm:162mm},
+ c7paper/.style={paper size=81mm:114mm},
+ c8paper/.style={paper size=57mm:81mm},
+ c9paper/.style={paper size=40mm:57mm},
+ c10paper/.style={paper size=28mm:40mm},
+ d0paper/.style={paper size=771mm:1091mm},
+ d1paper/.style={paper size=545mm:771mm},
+ d2paper/.style={paper size=385mm:545mm},
+ d3paper/.style={paper size=272mm:385mm},
+ d4paper/.style={paper size=192mm:272mm},
+ d5paper/.style={paper size=136mm:192mm},
+ d6paper/.style={paper size=96mm:136mm},
+ d7paper/.style={paper size=68mm:96mm},
+ executivepaper/.style={paper size=7.25in:10.5in},
+ letterpaper/.style={paper size=8.5in:11in},
+ legalpaper/.style={paper size=8.5in:14in},
+ ledgerpaper/.style={paper size=17in:11in},
+ currentpaper/.code={\let\igr@output=\igr@out@center},
+ documentpaper/.style={paper size=\igrOrginalPageWidth:\igrOrginalPageHeight},
+ graphicspaper/.code={\let\igr@output=\igr@out@page},
+ paper/.style={#1paper},
+ center/.style=currentpaper,
+ page/.style=graphicspaper,
%
- page,
+ graphicspaper,
options=,
bookmark=,
bookmark options=,
@@ -321,5 +447,8 @@
ignore on not found,
pagestyle=empty,
overlay@code=,
+ no overlay,
+ portrait,
}
+