diff options
author | Karl Berry <karl@freefriends.org> | 2011-12-11 22:47:41 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2011-12-11 22:47:41 +0000 |
commit | ca26f45ec466f61e5ecb17b5756dd8bc2c20be07 (patch) | |
tree | 050c69532668e7f42ddd6c03571f9f63175468aa /Master/texmf-dist/doc/latex/copyrightbox | |
parent | 7158919adc92478a4718547983f2acdb38911965 (diff) |
new latex package copyrightbox (11dec11)
git-svn-id: svn://tug.org/texlive/trunk@24829 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/copyrightbox')
-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 |
4 files changed, 287 insertions, 0 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} |