Debian Codegraph @

texmf-dist/doc/latex/copyrightbox/copyrightbox.tex

raw
1 \documentclass[pagesize=auto]{scrartcl}
2
3 \usepackage{fixltx2e}
4 \usepackage{etex}
5 \usepackage{lmodern}
6 \usepackage[T1]{fontenc}
7 \usepackage{textcomp}
8 \usepackage{amstext}
9 \usepackage{array}
10 \usepackage{xcolor}
11 \usepackage{tikz}
12 \usepackage{microtype}
13 \usepackage{hyperref}
14 \usepackage{copyrightbox}
15
16 \newcommand*{\mail}[1]{\href{mailto:#1}{\texttt{#1}}}
17 \newcommand*{\pkg}[1]{\textsf{#1}}
18 \newcommand*{\cls}[1]{\textsf{#1}}
19 \newcommand*{\cs}[1]{\texttt{\textbackslash#1}}
20 \makeatletter
21 \newcommand*{\cmd}[1]{\cs{\expandafter\@gobble\string#1}}
22 \makeatother
23 \newcommand*{\env}[1]{\texttt{#1}}
24 \newcommand*{\opt}[1]{\texttt{#1}}
25 \newcommand*{\meta}[1]{\textlangle\textsl{#1}\textrangle}
26 \newcommand*{\marg}[1]{\texttt{\{}\meta{#1}\texttt{\}}}
27 \newcommand*{\oarg}[1]{\texttt{[}\meta{#1}\texttt{]}}
28
29 \addtokomafont{title}{\rmfamily}
30
31 \title{The \pkg{copyrightbox} package\thanks{This manual corresponds to
32 \pkg{copyrightbox}~v0.1, dated~Nov 27, 2011.}}
33 \author{Thomas Fischer\thanks{\mail{[email protected]}}\\Ives van der
34 Flaas\thanks{\mail{[email protected]}}}
35 \date{\today}
36
37
38 \begin{document}
39
40 \maketitle
41
42 \noindent
43 \pkg{copyrightbox.sty} provides the command \cmd{\copyrightbox}, which is used
44 to put a small amount of text, usually a copyright notice, close to an image.
45 This text can be either below the image, it can be to the right of the image
46 (and rotated counterclockwise respective to normal text orientation) and it
47 can be to the left of the image, also rotated counterclockwise.
48
49
50 The command \cmd{\copyrightbox} has two obligatory parameters, the first
51 being a box (usually an image loaded with the \cmd{\includegraphics} command
52 from the \pkg{graphicx} package) and the second being the copyright message.
53 It also has an optional parameter that determines the position of the
54 copyright notice relative to the image:
55 \begin{quote}
56 \verb=\copyrightbox[=\meta{placement}\verb=]{=\meta{image}\verb=}{=\meta{text}\verb=}=
57 \end{quote}
58 Like usual the \verb=[=\meta{placement}\verb=]= parameter is optional, so this
59 command can also be expressed as
60 \begin{quote}
61 \verb=\copyrightbox{=\meta{image}\verb=}{=\meta{text}\verb=}=
62 \end{quote}
63 In which case the copyright notice will be placed to the right of the image.
64
65 Allowed \meta{placement}s are
66 \begin{description}
67 \item[\texttt{l}]The copyright notice is placed to the left of the image.
68 \item[\texttt{r}](Default) The copyright notice is placed to the right of the image.
69 \item[\texttt{b}]The copyright notice is placed below the image.
70 \end{description}
71
72 A \cmd{\copyrightbox} will be bigger than the image it encompasses, since it
73 will also fit the copyright text.
74
75 \clearpage
76 \section{Examples}
77 \subsection{Example 1}
78 The command
79
80 \begin{verbatim}
81 \copyrightbox
82 {\includegraphics[scale=0.5]{coin}}
83 {Image put in the public domain by the U.S. Mint.}
84 \end{verbatim}
85 produces:
86 \begin{center}
87 \copyrightbox
88 {\includegraphics[scale=0.5]{coin}}
89 {Image put in the public domain by the U.S. Mint.}
90 \end{center}
91
92 \subsection{Example 2}
93 The command
94
95 \begin{verbatim}
96 \copyrightbox[b]
97 {\includegraphics[scale=0.5]{coin}}
98 {Image put in the public domain by the U.S. Mint.}
99 \end{verbatim}
100 produces:
101 \begin{center}
102 \copyrightbox[b]
103 {\includegraphics[scale=0.5]{coin}}
104 {Image put in the public domain by the U.S. Mint.}
105 \end{center}
106
107
108 \subsection{Example 3}
109 The command
110
111 \begin{verbatim}
112 \copyrightbox[l]
113 {\includegraphics[scale=0.5]{coin}}
114 {Image put in the public domain by the U.S. Mint.}
115 \end{verbatim}
116 produces:
117 \begin{center}
118 \copyrightbox[l]
119 {\includegraphics[scale=0.5]{coin}}
120 {Image put in the public domain by the U.S. Mint.}
121 \end{center}
122
123
124 \subsection{Example 4}
125 \cmd{\copyrightbox} does not require \cmd{\includegraphics} images, you can
126 just as easily generate your own images with something like \pkg{TikZ} or the
127 \LaTeX\ \env{picture} environment.
128
129 For example, the command
130
131 \begin{verbatim}
132 \copyrightbox[r] { \tikz \filldraw[fill=green] (0,0) circle (2); }
133 {Image created by the author.}
134 \end{verbatim}
135 produces:
136 \begin{center}
137 \copyrightbox[r] { \tikz \filldraw[fill=green] (0,0) circle (2); }
138 {Image created by the author.}
139 \end{center}
140
141 \section{Notes}
142
143 \subsection{Changing the Font}
144 It's possible to change every aspect of the font used in the copyright message
145 by renewing the command \cmd{\CRB$@$setcopyrightfont}, for example:
146
147 \begin{verbatim}
148 \makeatletter
149 \renewcommand{\CRB@setcopyrightfont}{%
150 \footnotesize
151 \color{red!33}
152 \sc
153 }
154 \makeatother
155
156 \copyrightbox[r] { \tikz \filldraw[fill=green] (0,0) circle (2); }
157 {Image created by the author.}
158 \end{verbatim}
159 can be placed anywhere in your .tex file and will generate the copyright notice in small caps in a reddish tint:
160 \begin{center}
161 \makeatletter
162 \renewcommand{\CRB@setcopyrightfont}{%
163 \footnotesize
164 \color{red!33}
165 \sc
166 }
167 \makeatother
168
169 \copyrightbox[r] { \tikz \filldraw[fill=green] (0,0) circle (2); }
170 {Image created by the author.}
171 \end{center}
172
173 Ofcourse, it's also possible to select a font using the New Font Selection
174 System in \LaTeX{}2e, for example, to select Helvetica\footnote{This font might not be available on your system. } size
175 4:
176
177 \begin{verbatim}
178 \makeatletter
179 \renewcommand{\CRB@setcopyrightfont}{%
180 \usefont{T1}{phv}{m}{n}\fontsize{4}{4}\selectfont
181 }
182 \makeatother
183
184 \copyrightbox[r] { \tikz \filldraw[fill=green] (0,0) circle (2); }
185 {Image created by the author.}
186 \end{verbatim}
187
188 \begin{center}
189 \makeatletter
190 \renewcommand{\CRB@setcopyrightfont}{%
191 \usefont{T1}{phv}{m}{n}\fontsize{4}{4}\selectfont
192 }
193 \makeatother
194
195 \copyrightbox[r] { \tikz \filldraw[fill=green] (0,0) circle (2); }
196 {Image created by the author.}
197 \end{center}
198
199 \subsection{Justification}
200 Although it's not exactly recommended, it is possible to place relatively
201 large amounts of text near images. Long amounts of text are usually nicer to
202 look at when justified, and to do so \cmd{\renewcommand}
203 \cmd{\CRB@setcopyrightparagraphstyle} to something other than
204 \cmd{\raggedright}, which is the default.
205
206 Place
207
208 \begin{verbatim}
209 \makeatletter
210 \renewcommand{\CRB@setcopyrightparagraphstyle}{%
211 % Return to justifying text
212 \setlength{\rightskip}{0pt}
213 \setlength{\leftskip}{0pt}
214 }
215
216 \makeatother
217 \begin{center}
218 \copyrightbox[r]
219 {\includegraphics[scale=0.5]{coin}}
220 {This here image was put in the public domain some time ago by the U.S. Mint.}
221 \end{center}
222 \end{verbatim}
223
224 anywhere in your .tex file to produce:
225 \makeatletter
226 \renewcommand{\CRB@setcopyrightparagraphstyle}{%
227 % Return to justifying text
228 \setlength{\rightskip}{0pt}
229 \setlength{\leftskip}{0pt}
230 }
231
232 \makeatother
233 \begin{center}
234 \copyrightbox[r]
235 {\includegraphics[scale=0.5]{coin}}
236 {This here image was put in the public domain some time ago by the U.S. Mint.}
237 \end{center}
238
239 instead of
240
241 \makeatletter
242 \renewcommand{\CRB@setcopyrightparagraphstyle}{%
243 % Return to justifying text
244 \raggedright
245 }
246
247 \makeatother
248 \begin{center}
249 \copyrightbox[r]
250 {\includegraphics[scale=0.5]{coin}}
251 {This here image was put in the public domain some time ago by the U.S. Mint.}
252 \end{center}
253
254 \section{Bugs and Suggestions}
255 Bugreports, suggestions and patches are welcome and can be emailed to
256 \mail{[email protected]}, or you can fork
257 \url{https://github.com/Ivesvdf/copyrightbox} and send me a pull request
258 through Github.
259 \end{document}