summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-02-11 19:46:38 +0000
committerKarl Berry <karl@freefriends.org>2011-02-11 19:46:38 +0000
commit510b2e2546fd8769ac33125f9a14cf0c2d898fee (patch)
treed5d9a8a39c12d18b6799be83c7103d9ee8f43b55 /Master
parenta9610f976501f433502791b14cf775eea4f5f4e8 (diff)
new latex package gradientframe (10feb11)
git-svn-id: svn://tug.org/texlive/trunk@21372 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/gradientframe/README8
-rw-r--r--Master/texmf-dist/doc/latex/gradientframe/gradientframe.pdfbin0 -> 201528 bytes
-rw-r--r--Master/texmf-dist/source/latex/gradientframe/gradientframe.dtx358
-rw-r--r--Master/texmf-dist/tex/latex/gradientframe/gradientframe.sty78
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/collection-pictures.tlpsrc1
-rw-r--r--Master/tlpkg/tlpsrc/gradientframe.tlpsrc0
7 files changed, 446 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/gradientframe/README b/Master/texmf-dist/doc/latex/gradientframe/README
new file mode 100644
index 00000000000..c6e3121fa4d
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gradientframe/README
@@ -0,0 +1,8 @@
+LaTeX package gradientframe for simple gradient frames around objects.
+
+Copyright (C) Christian Raue, 2011
+Send feedback to christian°raue@gmail°com (after being exposed to gravity).
+
+This material is subject to the LaTeX Project Public License. See
+http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for the
+details of that license.
diff --git a/Master/texmf-dist/doc/latex/gradientframe/gradientframe.pdf b/Master/texmf-dist/doc/latex/gradientframe/gradientframe.pdf
new file mode 100644
index 00000000000..349f4e6ada9
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/gradientframe/gradientframe.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/gradientframe/gradientframe.dtx b/Master/texmf-dist/source/latex/gradientframe/gradientframe.dtx
new file mode 100644
index 00000000000..f11c2751173
--- /dev/null
+++ b/Master/texmf-dist/source/latex/gradientframe/gradientframe.dtx
@@ -0,0 +1,358 @@
+% \iffalse The license starting three lines down applies to this file.
+%<*batchfile>
+{\obeylines\obeyspaces \gdef\thepreamble{
+
+LaTeX package gradientframe for simple gradient frames around objects.
+
+Copyright (C) Christian Raue, 2011
+Send feedback to christian°raue@gmail°com (after being exposed to gravity).
+
+This file may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either
+version 1.3c 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.3c or later is part of all distributions of
+LaTeX version 2005/12/01 or later.
+
+This work has the LPPL maintenance status 'maintained'.
+
+The Current Maintainer of this work is Christian Raue.
+
+This work consists of gradientframe.dtx and the derived file
+gradientframe.sty.
+
+}}
+
+\begingroup
+\input{docstrip}
+\keepsilent
+\usedir{tex/latex/\jobname}
+\expandafter\preamble\thepreamble\endpreamble
+\askforoverwritefalse
+\generate{\file{\jobname.sty}{\from{\jobname.dtx}{package}}}
+\endgroup
+
+\documentclass{ltxdoc}
+\usepackage[american]{babel}
+\usepackage[T1]{fontenc}
+\usepackage{lmodern}
+\usepackage{charter}
+\usepackage[margin=1.5in]{geometry}
+\usepackage{color}
+\usepackage{graphicx}
+\usepackage[%
+ pdftitle={the \jobname{} package},%
+ pdfauthor={Christian Raue},%
+ pdfsubject={LaTeX package documentation},%
+ pdfkeywords={\jobname{} LaTeX gradient frame border around object table figure},%
+ pdfproducer={LaTeX},%
+ pdfcreator={LaTeX},%
+ pdfborder={0 0 0},%
+ pdfpagemode={UseOutlines},%
+ pdfstartview={FitH},%
+ pdfview={FitH},%
+ pdfdisplaydoctitle=true,%
+ ]{hyperref}
+\usepackage{tabularx}
+\usepackage{listings}
+\definecolor{lightgray}{gray}{.95}
+\lstset{
+ frame=trbl,%
+ framerule=0pt,%
+ basicstyle=\footnotesize\ttfamily,%
+ breaklines=true,%
+ tabsize=4,%
+ numbers=left,%
+ numberstyle=\tiny,%
+ backgroundcolor=\color{lightgray},%
+}
+\usepackage{emp}
+\ifx\pdftexversion\undefined
+ \usepackage[dvips]{graphicx}
+\else
+ \usepackage{graphicx}
+ \DeclareGraphicsRule{*}{mps}{*}{}
+\fi
+\usepackage{\jobname}
+
+\DoNotIndex{\def}
+
+%\CodelineIndex
+%\EnableCrossrefs
+\RecordChanges
+\OnlyDescription
+\setcounter{IndexColumns}{2}
+\GetFileInfo{\jobname.sty}
+
+\newcommand{\supdot}{%
+ \scalebox{1.2}{$\dot{~}$}%
+}
+\newcommand{\package}[1]{%
+ \texttt{#1}%
+}
+\newcommand{\resultarrow}{%
+ \begin{center}
+ \scalebox{2}{%
+ \begin{picture}(9,10)
+ \put(5,10){\vector(0,-4){10}}
+ \end{picture}%
+ }
+ \end{center}%
+}
+\newcommand{\face}{%
+ \fboxsep=5px
+ \scalebox{2}{\fbox{%
+ \Huge
+ $\ddot\smile$%
+ }}%
+}
+
+\title{the \package{\jobname} package\thanks{This document corresponds to \package{\jobname}~\fileversion, dated \filedate.}\\[1em]}
+\author{Christian Raue\\[1em]\texttt{christian\supdot{}raue@gmail\supdot{}com}\\(after being exposed to gravity)\\[2em]}
+\date{\filedate}
+
+\begin{document}
+\maketitle
+
+
+\phantomsection
+\addcontentsline{toc}{section}{\abstractname}
+\begin{abstract}
+\noindent
+The \package{\jobname} package provides a command, |\gradientframe|, for simple discreet grayscale gradient frames
+around objects, such as images or tables, to set them apart from the surrounding text.
+\end{abstract}
+
+
+\phantomsection
+\addcontentsline{toc}{section}{\contentsname}
+\tableofcontents
+\clearpage
+
+
+\section{Introduction}
+The \package{gradientframe} package is loaded in the usual way, i.e. by putting the line
+\begin{quote}
+ |\usepackage{gradientframe}|
+\end{quote}
+in the document's preamble. The \package{gradientframe} package depends on the \package{color} package which is loaded
+by the \package{gradientframe} package if not already done so far in the document's preamble.
+
+
+\section{Usage}
+\DescribeMacro\gradientframe
+To frame an object, such as figure, table, etc., use |\gradientframe{|\meta{object}|}|.
+By using |\gradientframe[|\meta{width}|]{|\meta{object}|}|, a space between the frame and the object (in all four
+directions) can be added.
+
+
+\section{Examples}
+\subsection{Frame surrounding a figure}
+\begin{lstlisting}
+ \begin{center}
+ \gradientframe{\includegraphics{image.jpg}}
+ \end{center}
+\end{lstlisting}
+\resultarrow
+\begin{center}
+ \gradientframe{\face}
+\end{center}
+
+
+\subsection{Frame surrounding a figure with additional space}
+\begin{lstlisting}
+ \begin{center}
+ \gradientframe[5mm]{\includegraphics{image.jpg}}
+ \end{center}
+\end{lstlisting}
+\resultarrow
+\begin{center}
+ \gradientframe[5mm]{\face}
+\end{center}
+
+
+\subsection{Frame surrounding a table}
+\begin{lstlisting}
+ \begin{center}
+ \gradientframe{%
+ \begin{tabular}{r|l}
+ \textbf{column A} & \textbf{column B} \\\hline
+ cell 1A & cell 1B \\\hline
+ cell 2A & cell 2B \\\hline
+ cell 3A & cell 3B \\
+ \end{tabular}%
+ }
+ \end{center}
+\end{lstlisting}
+\resultarrow
+\begin{center}
+ \gradientframe{%
+ \begin{tabular}{r|l}
+ \textbf{column A} & \textbf{column B} \\\hline
+ cell 1A & cell 1B \\\hline
+ cell 2A & cell 2B \\\hline
+ cell 3A & cell 3B \\
+ \end{tabular}%
+ }
+\end{center}
+Be careful not to produce unintentional space when breaking lines. Add comments at line endings if needed to prevent
+this, as shown in lines 2 and 8. Otherwise the result will look like this:
+\begin{center}
+ \gradientframe{
+ \begin{tabular}{r|l}
+ \textbf{column A} & \textbf{column B} \\\hline
+ cell 1A & cell 1B \\\hline
+ cell 2A & cell 2B \\\hline
+ cell 3A & cell 3B \\
+ \end{tabular}
+ }
+\end{center}
+
+
+\clearpage
+\subsection{Frame surrounding a MetaPost figure}
+If you want to draw a frame around a MetaPost (or in the case of this example, MetaUML) generated figure, use the
+|\empuse| command.
+\begin{lstlisting}
+ \begin{center}
+ \begin{empfile}
+ \begin{empcmds}
+ input metauml;
+ \end{empcmds}
+ \begin{empdef}[unique_name](0,0)
+ save start, end;
+ Begin.start;
+ End.end;
+ leftToRight(15)(start, end);
+ drawObjects(start, end);
+ clink(transition)(start, end);
+ \end{empdef}
+ \gradientframe[5mm]{\empuse{unique_name}}
+ \end{empfile}
+ \end{center}
+\end{lstlisting}
+\resultarrow
+\begin{center}
+ \begin{empfile}
+ \begin{empcmds}
+ input metauml;
+ \end{empcmds}
+ \begin{empdef}[unique_name](0,0)
+ save start, end;
+ Begin.start;
+ End.end;
+ leftToRight(15)(start, end);
+ drawObjects(start, end);
+ clink(transition)(start, end);
+ \end{empdef}
+ \gradientframe[5mm]{\empuse{unique_name}}
+ \end{empfile}
+\end{center}
+Alternatively, you could outsource both, the |empdef| environment and the |\empuse| command to a separate file, and use
+|\input{|\meta{filename}|}| as argument to the |\gradientframe| command.
+
+
+\StopEventually{
+ \typeout{****************************************************}
+ \typeout{* To finish the installation, you have to move the}
+ \typeout{* following file into a directory searched by TeX:}
+ \typeout{*}
+ \typeout{* \space\space \jobname.sty}
+ \typeout{*}
+ \typeout{* Documentation is in \jobname.\ifpdf pdf\else dvi\fi.}
+ \typeout{*}
+ \typeout{* Happy TeXing!}
+ \typeout{****************************************************}
+ \end{document}
+}
+
+
+\clearpage
+\DocInput{\jobname.dtx}
+
+
+\clearpage
+\phantomsection
+\addcontentsline{toc}{section}{Change History}
+\PrintChanges
+
+
+%\phantomsection
+%\addcontentsline{toc}{section}{Index}
+%\PrintIndex
+
+
+\Finale
+%</batchfile>
+% \fi
+%
+% \section{Implementation}
+%
+% \changes{v0.1}{2011/02/10}{Initial version.}
+% \changes{v0.1a}{2011/02/10}{Fixed charset encoding issues on CTAN.}
+%
+% \begin{macrocode}
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{gradientframe}[2011/02/10 v0.1a simple gradient frames around objects]
+\RequirePackage{color}
+% \end{macrocode}%^^A must be exactly 4 spaces
+%
+% \begin{macro}{\gradientframe}
+% This command defines the grayscale gradient frame around objects, with variable space between object and frame.
+% \begin{macrocode}
+\newcommand{\gradientframe}[2][0mm]{%
+ % Grayscale colors.
+ \definecolor{gray98}{gray}{.98}%
+ \definecolor{gray96}{gray}{.96}%
+ \definecolor{gray94}{gray}{.94}%
+ \definecolor{gray92}{gray}{.92}%
+ \definecolor{gray90}{gray}{.90}%
+ \definecolor{gray88}{gray}{.88}%
+ \definecolor{gray86}{gray}{.86}%
+ \definecolor{gray84}{gray}{.84}%
+ \definecolor{gray82}{gray}{.82}%
+ \definecolor{gray80}{gray}{.80}%
+ \definecolor{gray78}{gray}{.78}%
+ \definecolor{gray76}{gray}{.76}%
+ \definecolor{gray74}{gray}{.74}%
+ \definecolor{gray72}{gray}{.72}%
+ \definecolor{gray70}{gray}{.70}%
+%
+ % Each color's line width.
+ \newdimen\lineWidth%
+ \lineWidth=0.3px%
+%
+ % Space between object and innermost frame line.
+ \newdimen\borderSpacing%
+ \borderSpacing=#1%
+%
+ \fboxrule=\lineWidth%
+ \fboxsep=\lineWidth%
+ \fcolorbox{gray98}{gray96}{%
+ \fcolorbox{gray94}{gray92}{%
+ \fcolorbox{gray90}{gray88}{%
+ \fcolorbox{gray86}{gray84}{%
+ \fcolorbox{gray82}{gray80}{%
+ \fcolorbox{gray78}{gray76}{%
+ \fcolorbox{gray74}{gray72}{%
+ \fboxrule=\lineWidth%
+ \fboxsep=\borderSpacing%
+ \fcolorbox{gray70}{white}{%
+ #2%
+ }%
+ }%
+ }%
+ }%
+ }%
+ }%
+ }%
+ }%
+}%
+% \end{macrocode}%^^A must be exactly 4 spaces
+% \end{macro}
+%
+\endinput
+% \endinput
diff --git a/Master/texmf-dist/tex/latex/gradientframe/gradientframe.sty b/Master/texmf-dist/tex/latex/gradientframe/gradientframe.sty
new file mode 100644
index 00000000000..fd9d3237599
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/gradientframe/gradientframe.sty
@@ -0,0 +1,78 @@
+%%
+%% This is file `gradientframe.sty',
+%% generated with the docstrip utility.
+%%
+%% The original source files were:
+%%
+%% gradientframe.dtx (with options: `package')
+%%
+%% LaTeX package gradientframe for simple gradient frames around objects.
+%%
+%% Copyright (C) Christian Raue, 2011
+%% Send feedback to christian°raue@gmail°com (after being exposed to gravity).
+%%
+%% This file may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either
+%% version 1.3c 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.3c or later is part of all distributions of
+%% LaTeX version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status 'maintained'.
+%%
+%% The Current Maintainer of this work is Christian Raue.
+%%
+%% This work consists of gradientframe.dtx and the derived file
+%% gradientframe.sty.
+%%
+\NeedsTeXFormat{LaTeX2e}[1999/12/01]
+\ProvidesPackage{gradientframe}[2011/02/10 v0.1a simple gradient frames around objects]
+\RequirePackage{color}
+\newcommand{\gradientframe}[2][0mm]{%
+\definecolor{gray98}{gray}{.98}%
+\definecolor{gray96}{gray}{.96}%
+\definecolor{gray94}{gray}{.94}%
+\definecolor{gray92}{gray}{.92}%
+\definecolor{gray90}{gray}{.90}%
+\definecolor{gray88}{gray}{.88}%
+\definecolor{gray86}{gray}{.86}%
+\definecolor{gray84}{gray}{.84}%
+\definecolor{gray82}{gray}{.82}%
+\definecolor{gray80}{gray}{.80}%
+\definecolor{gray78}{gray}{.78}%
+\definecolor{gray76}{gray}{.76}%
+\definecolor{gray74}{gray}{.74}%
+\definecolor{gray72}{gray}{.72}%
+\definecolor{gray70}{gray}{.70}%
+\newdimen\lineWidth%
+\lineWidth=0.3px%
+\newdimen\borderSpacing%
+\borderSpacing=#1%
+\fboxrule=\lineWidth%
+\fboxsep=\lineWidth%
+\fcolorbox{gray98}{gray96}{%
+\fcolorbox{gray94}{gray92}{%
+\fcolorbox{gray90}{gray88}{%
+\fcolorbox{gray86}{gray84}{%
+\fcolorbox{gray82}{gray80}{%
+\fcolorbox{gray78}{gray76}{%
+\fcolorbox{gray74}{gray72}{%
+\fboxrule=\lineWidth%
+\fboxsep=\borderSpacing%
+\fcolorbox{gray70}{white}{%
+#2%
+}%
+}%
+}%
+}%
+}%
+}%
+}%
+}%
+}%
+\endinput
+%%
+%% End of file `gradientframe.sty'.
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 8d6cf138e90..f2b22a919db 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -165,7 +165,7 @@ my @TLP_working = qw(
gfsporson gfssolomos
gillcm ginpenc gloss glossaries gmdoc gmdoc-enhance gmeometric
gmiflink gmutils gmverb gmverse gnu-freefont gnuplottex gost
- graphics graphics-pln
+ gradientframe graphics graphics-pln
graphicx-psmin greek-inputenc greekdates greenpoint grfpaste
grid gridset grverb gu guitar guitlogo
hands hanging har2nat hardwrap harmony harpoon
diff --git a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
index a797c2db561..ff864f6731c 100644
--- a/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-pictures.tlpsrc
@@ -26,6 +26,7 @@ depend epspdfconversion
depend esk
depend fig4latex
depend gnuplottex
+depend gradientframe
depend here
depend hvfloat
depend knitting
diff --git a/Master/tlpkg/tlpsrc/gradientframe.tlpsrc b/Master/tlpkg/tlpsrc/gradientframe.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/gradientframe.tlpsrc