diff options
-rw-r--r-- | Master/texmf-dist/doc/latex/copyrightbox/README | 28 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/copyrightbox/coin.jpg | bin | 0 -> 1384092 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/copyrightbox/copyrightbox.pdf | bin | 0 -> 1734497 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/copyrightbox/copyrightbox.tex | 259 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/copyrightbox/copyrightbox.sty | 87 | ||||
-rwxr-xr-x | Master/tlpkg/bin/tlpkg-ctan-check | 2 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc | 1 | ||||
-rw-r--r-- | Master/tlpkg/tlpsrc/copyrightbox.tlpsrc | 0 |
8 files changed, 376 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/copyrightbox/README b/Master/texmf-dist/doc/latex/copyrightbox/README new file mode 100644 index 00000000000..d925012629f --- /dev/null +++ b/Master/texmf-dist/doc/latex/copyrightbox/README @@ -0,0 +1,28 @@ +C O P Y R I G H T B O X . S T Y ver 0.1 (Nov 27, 2011) + +Copyright (C) 2010-2011 + +Thomas Fischer <thomas.fischer@t-fischer.net> + and +Ives van der Flaas <ives.vdf@gmail.com> + +This software is released under the terms of the LaTeX Project +public license. + +The copyrightbox package defines a command that places a copyright notice near +an image. + +For a full manual, see copyrightbox.pdf, but the short version is + +\copyrightbox[<placement>]{<image>}{<text>} + +where <placement> is either + r (Default) Text to the right of the image + l Text to the left of the image + b Text below the image + +which puts <text> positioned according to <placement> near <image>. E.g. + +\copyrightbox[b] + {\includegraphics[scale=0.5]{coin}} + {Image put in the public domain by the U.S. Mint.} diff --git a/Master/texmf-dist/doc/latex/copyrightbox/coin.jpg b/Master/texmf-dist/doc/latex/copyrightbox/coin.jpg Binary files differnew file mode 100644 index 00000000000..fc85804f635 --- /dev/null +++ b/Master/texmf-dist/doc/latex/copyrightbox/coin.jpg diff --git a/Master/texmf-dist/doc/latex/copyrightbox/copyrightbox.pdf b/Master/texmf-dist/doc/latex/copyrightbox/copyrightbox.pdf Binary files differnew file mode 100644 index 00000000000..ef348136770 --- /dev/null +++ b/Master/texmf-dist/doc/latex/copyrightbox/copyrightbox.pdf diff --git a/Master/texmf-dist/doc/latex/copyrightbox/copyrightbox.tex b/Master/texmf-dist/doc/latex/copyrightbox/copyrightbox.tex new file mode 100644 index 00000000000..211e7f02bbf --- /dev/null +++ b/Master/texmf-dist/doc/latex/copyrightbox/copyrightbox.tex @@ -0,0 +1,259 @@ +\documentclass[pagesize=auto]{scrartcl} + +\usepackage{fixltx2e} +\usepackage{etex} +\usepackage{lmodern} +\usepackage[T1]{fontenc} +\usepackage{textcomp} +\usepackage{amstext} +\usepackage{array} +\usepackage{xcolor} +\usepackage{tikz} +\usepackage{microtype} +\usepackage{hyperref} +\usepackage{copyrightbox} + +\newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}} +\newcommand*{\pkg}[1]{\textsf{#1}} +\newcommand*{\cls}[1]{\textsf{#1}} +\newcommand*{\cs}[1]{\texttt{\textbackslash#1}} +\makeatletter +\newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}} +\makeatother +\newcommand*{\env}[1]{\texttt{#1}} +\newcommand*{\opt}[1]{\texttt{#1}} +\newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle} +\newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}} +\newcommand*{\oarg}[1]{\texttt{[}\meta{#1}\texttt{]}} + +\addtokomafont{title}{\rmfamily} + +\title{The \pkg{copyrightbox} package\thanks{This manual corresponds to +\pkg{copyrightbox}~v0.1, dated~Nov 27, 2011.}} +\author{Thomas Fischer\thanks{\mail{thomas.fischer@t-fischer.net}}\\Ives van der +Flaas\thanks{\mail{ives.vdf@gmail.com}}} +\date{\today} + + +\begin{document} + +\maketitle + +\noindent +\pkg{copyrightbox.sty} provides the command \cmd{\copyrightbox}, which is used +to put a small amount of text, usually a copyright notice, close to an image. +This text can be either below the image, it can be to the right of the image +(and rotated counterclockwise respective to normal text orientation) and it +can be to the left of the image, also rotated counterclockwise. + + +The command \cmd{\copyrightbox} has two obligatory parameters, the first +being a box (usually an image loaded with the \cmd{\includegraphics} command +from the \pkg{graphicx} package) and the second being the copyright message. +It also has an optional parameter that determines the position of the +copyright notice relative to the image: +\begin{quote} + \verb=\copyrightbox[=\meta{placement}\verb=]{=\meta{image}\verb=}{=\meta{text}\verb=}= +\end{quote} +Like usual the \verb=[=\meta{placement}\verb=]= parameter is optional, so this +command can also be expressed as +\begin{quote} + \verb=\copyrightbox{=\meta{image}\verb=}{=\meta{text}\verb=}= +\end{quote} +In which case the copyright notice will be placed to the right of the image. + +Allowed \meta{placement}s are +\begin{description} + \item[\texttt{l}]The copyright notice is placed to the left of the image. + \item[\texttt{r}](Default) The copyright notice is placed to the right of the image. + \item[\texttt{b}]The copyright notice is placed below the image. +\end{description} + +A \cmd{\copyrightbox} will be bigger than the image it encompasses, since it +will also fit the copyright text. + +\clearpage +\section{Examples} +\subsection{Example 1} +The command + +\begin{verbatim} + \copyrightbox + {\includegraphics[scale=0.5]{coin}} + {Image put in the public domain by the U.S. Mint.} +\end{verbatim} +produces: +\begin{center} + \copyrightbox + {\includegraphics[scale=0.5]{coin}} + {Image put in the public domain by the U.S. Mint.} +\end{center} + +\subsection{Example 2} +The command + +\begin{verbatim} + \copyrightbox[b] + {\includegraphics[scale=0.5]{coin}} + {Image put in the public domain by the U.S. Mint.} +\end{verbatim} +produces: +\begin{center} + \copyrightbox[b] + {\includegraphics[scale=0.5]{coin}} + {Image put in the public domain by the U.S. Mint.} +\end{center} + + +\subsection{Example 3} +The command + +\begin{verbatim} + \copyrightbox[l] + {\includegraphics[scale=0.5]{coin}} + {Image put in the public domain by the U.S. Mint.} +\end{verbatim} +produces: +\begin{center} + \copyrightbox[l] + {\includegraphics[scale=0.5]{coin}} + {Image put in the public domain by the U.S. Mint.} +\end{center} + + +\subsection{Example 4} +\cmd{\copyrightbox} does not require \cmd{\includegraphics} images, you can +just as easily generate your own images with something like \pkg{TikZ} or the +\LaTeX\ \env{picture} environment. + +For example, the command + +\begin{verbatim} +\copyrightbox[r] { \tikz \filldraw[fill=green] (0,0) circle (2); } +{Image created by the author.} +\end{verbatim} +produces: +\begin{center} +\copyrightbox[r] { \tikz \filldraw[fill=green] (0,0) circle (2); } +{Image created by the author.} +\end{center} + +\section{Notes} + +\subsection{Changing the Font} +It's possible to change every aspect of the font used in the copyright message +by renewing the command \cmd{\CRB$@$setcopyrightfont}, for example: + +\begin{verbatim} +\makeatletter +\renewcommand{\CRB@setcopyrightfont}{% + \footnotesize + \color{red!33} + \sc +} +\makeatother + +\copyrightbox[r] { \tikz \filldraw[fill=green] (0,0) circle (2); } +{Image created by the author.} +\end{verbatim} +can be placed anywhere in your .tex file and will generate the copyright notice in small caps in a reddish tint: +\begin{center} +\makeatletter +\renewcommand{\CRB@setcopyrightfont}{% + \footnotesize + \color{red!33} + \sc +} +\makeatother + +\copyrightbox[r] { \tikz \filldraw[fill=green] (0,0) circle (2); } +{Image created by the author.} +\end{center} + +Ofcourse, it's also possible to select a font using the New Font Selection +System in \LaTeX{}2e, for example, to select Helvetica\footnote{This font might not be available on your system. } size +4: + +\begin{verbatim} +\makeatletter +\renewcommand{\CRB@setcopyrightfont}{% +\usefont{T1}{phv}{m}{n}\fontsize{4}{4}\selectfont +} +\makeatother + +\copyrightbox[r] { \tikz \filldraw[fill=green] (0,0) circle (2); } +{Image created by the author.} +\end{verbatim} + +\begin{center} +\makeatletter +\renewcommand{\CRB@setcopyrightfont}{% +\usefont{T1}{phv}{m}{n}\fontsize{4}{4}\selectfont +} +\makeatother + +\copyrightbox[r] { \tikz \filldraw[fill=green] (0,0) circle (2); } +{Image created by the author.} +\end{center} + +\subsection{Justification} +Although it's not exactly recommended, it is possible to place relatively +large amounts of text near images. Long amounts of text are usually nicer to +look at when justified, and to do so \cmd{\renewcommand} +\cmd{\CRB@setcopyrightparagraphstyle} to something other than +\cmd{\raggedright}, which is the default. + +Place + +\begin{verbatim} +\makeatletter +\renewcommand{\CRB@setcopyrightparagraphstyle}{% +% Return to justifying text +\setlength{\rightskip}{0pt} +\setlength{\leftskip}{0pt} +} + +\makeatother +\begin{center} + \copyrightbox[r] + {\includegraphics[scale=0.5]{coin}} + {This here image was put in the public domain some time ago by the U.S. Mint.} +\end{center} +\end{verbatim} + +anywhere in your .tex file to produce: +\makeatletter +\renewcommand{\CRB@setcopyrightparagraphstyle}{% +% Return to justifying text +\setlength{\rightskip}{0pt} +\setlength{\leftskip}{0pt} +} + +\makeatother +\begin{center} + \copyrightbox[r] + {\includegraphics[scale=0.5]{coin}} + {This here image was put in the public domain some time ago by the U.S. Mint.} +\end{center} + +instead of + +\makeatletter +\renewcommand{\CRB@setcopyrightparagraphstyle}{% +% Return to justifying text +\raggedright +} + +\makeatother +\begin{center} + \copyrightbox[r] + {\includegraphics[scale=0.5]{coin}} + {This here image was put in the public domain some time ago by the U.S. Mint.} +\end{center} + +\section{Bugs and Suggestions} +Bugreports, suggestions and patches are welcome and can be emailed to +\mail{ives.vdf@gmail.com}, or you can fork +\url{https://github.com/Ivesvdf/copyrightbox} and send me a pull request +through Github. +\end{document} diff --git a/Master/texmf-dist/tex/latex/copyrightbox/copyrightbox.sty b/Master/texmf-dist/tex/latex/copyrightbox/copyrightbox.sty new file mode 100644 index 00000000000..7f413987f3e --- /dev/null +++ b/Master/texmf-dist/tex/latex/copyrightbox/copyrightbox.sty @@ -0,0 +1,87 @@ +% C O P Y R I G H T B O X . S T Y ver 0.1 (Nov 27, 2011) +% +% Copyright (C) 2010-2011 +% +% Thomas Fischer <thomas.fischer@t-fischer.net> +% and +% Ives van der Flaas <ives.vdf@gmail.com> +% +% This software is released under the terms of the LaTeX Project +% public license. +% + +\RequirePackage{tikz} +\RequirePackage{ifthen} +\usetikzlibrary{positioning} + + +%%%%% ----- Begin definitions ----- %%%%% +\newdimen\tu@tmpa% +\newdimen\CRB@ydiffl% +\newdimen\CRB@xdiffl% +\newcommand\CRB@ydiff[2]{% + \coordinate (tmpnamea) at (#1);% + \coordinate (tmpnameb) at (#2);% + \pgfextracty{\tu@tmpa}{\pgfpointanchor{tmpnamea}{center}}% + \pgfextracty{\CRB@ydiffl}{\pgfpointanchor{tmpnameb}{center}}% + \advance\CRB@ydiffl by -\tu@tmpa% +} +\newcommand\CRB@xdiff[2]{% + \coordinate (tmpnamea) at (#1);% + \coordinate (tmpnameb) at (#2);% + \pgfextractx{\tu@tmpa}{\pgfpointanchor{tmpnamea}{center}}% + \pgfextractx{\CRB@xdiffl}{\pgfpointanchor{tmpnameb}{center}}% + \advance\CRB@xdiffl by -\tu@tmpa% +} + +\newcommand{\CRB@setcopyrightfont}{% +\footnotesize +\color{black!33} +\sf +} + +\newcommand{\CRB@setcopyrightparagraphstyle}{\raggedright} + +\newcommand{\copyrightbox}[3][r]{% +\begin{tikzpicture}% +\node[inner sep=0pt,minimum size=2em](ciimage){#2}; +\CRB@setcopyrightfont +\CRB@ydiff{ciimage.south}{ciimage.north} +\CRB@xdiff{ciimage.west}{ciimage.east} +\ifthenelse{\equal{#1}{r}}{% +\node[inner sep=0pt,right=1ex of ciimage.south east,anchor=north west,rotate=90]% +{\raggedleft\parbox{\the\CRB@ydiffl}{\CRB@setcopyrightparagraphstyle{}#3}};% +}{% +\ifthenelse{\equal{#1}{l}}{% +\node[inner sep=2ex,right=1ex of ciimage.south west,anchor=south west,rotate=90] +% Separation needed to be 2ex otherwise letters like j would +% cross into the image +{\raggedleft\parbox{\the\CRB@ydiffl}{\CRB@setcopyrightparagraphstyle{}#3}};% +}{% +\node[inner sep=0pt,below=1ex of ciimage.south west,anchor=north west]% +{\raggedleft\parbox{\the\CRB@xdiffl}{\CRB@setcopyrightparagraphstyle{}#3}};% +} +} +\end{tikzpicture} +} + +\ProvidesPackage{copyrightbox}[2011/11/27 \space v 0.1] +\endinput + +%%%%% ----- End definitions ----- %%%%% + +%%%%% ----- Begin Instructions ----- %%%%% +See copyrightbox.pdf, but the short version is + +\copyrightbox[<placement>]{<image>}{<text>} + +where <placement> is either + r (Default) Text to the right of the image + l Text to the left of the image + b Text below the image + +which puts <text> positioned according to <placement> near <image>. E.g. + +\copyrightbox[l] + {\includegraphics[scale=0.5]{coin}} + {Image put in the public domain by the U.S. Mint.} diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check index 490ec522241..3e6f84d565f 100755 --- a/Master/tlpkg/bin/tlpkg-ctan-check +++ b/Master/tlpkg/bin/tlpkg-ctan-check @@ -110,7 +110,7 @@ my @TLP_working = qw( context-typearea context-typescripts context-vim contour cooking cookingsymbols cookybooky cool coollist coolstr cooltooltips - coordsys coseoul + coordsys copyrightbox coseoul courier-scaled courseoutline coursepaper coverpage covington cprotect crbox crop crossreference crossword crosswrd cryst csbulletin diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc index d61bc2891f5..c1679b5e15b 100644 --- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc +++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc @@ -132,6 +132,7 @@ depend coollist depend coolstr depend cooltooltips depend coordsys +depend copyrightbox depend coseoul depend courseoutline depend coursepaper diff --git a/Master/tlpkg/tlpsrc/copyrightbox.tlpsrc b/Master/tlpkg/tlpsrc/copyrightbox.tlpsrc new file mode 100644 index 00000000000..e69de29bb2d --- /dev/null +++ b/Master/tlpkg/tlpsrc/copyrightbox.tlpsrc |