| 1 |
\documentclass{article} |
| 2 |
\usepackage{pdfpages,fancyvrb} |
| 3 |
\usepackage{siunitx} |
| 4 |
\title{Petiteannonce package documentation} |
| 5 |
\author{Vincent Bela\"\i che} |
| 6 |
\begin{document} |
| 7 |
|
| 8 |
\maketitle |
| 9 |
\section{Introduction} |
| 10 |
This is the documentation of the petiteannonce package. The aim of this package is to |
| 11 |
make adverts that you would pin down on some notice board in a mall with your |
| 12 |
phone number repeated on strips. This practice is quite common in France as it |
| 13 |
is simple, cheap (no fee for intermediates like eBay\texttrademark), |
| 14 |
and allows you to reach people in the same neighbourhood (so no need for |
| 15 |
postal fee either). |
| 16 |
|
| 17 |
\section{Package options} |
| 18 |
|
| 19 |
There is one single class option \verb!margin!, this is used to set the margin value, by default this is |
| 20 |
\SI{1}{\milli\metre}. For instance use: |
| 21 |
|
| 22 |
\verb!\documentclass[margin=3mm]{petiteannonce}! |
| 23 |
|
| 24 |
\noindent if you want it to be \SI{3}{\milli\metre} instead of \SI{1}{\milli\metre}. |
| 25 |
|
| 26 |
\section{Commands} |
| 27 |
|
| 28 |
There are three commands the \verb!\petiteannonce! command, the \verb!\petiteannoncewidth! |
| 29 |
command, and the \verb!\petiteannonceaddtowidth! command. |
| 30 |
|
| 31 |
\subsection{The \textbackslash petiteannonce command} |
| 32 |
|
| 33 |
The \verb!\petiteannonce! command is used to create the advertisement. It takes two |
| 34 |
mandatory arguments and one optional argument. |
| 35 |
\begin{itemize} |
| 36 |
\item The 1\textsuperscript{st} mandatory argument is the phone number or |
| 37 |
email address where to reach the seller. |
| 38 |
\item The 2\textsuperscript{nd} mandatory argument is the text of the advert itself |
| 39 |
\item The optional argument is a list of comma separated \(<\textit |
| 40 |
key\/>=<\textit{value\/}>\) arguments that allows to configure a number of |
| 41 |
additional things. Absence of the key is equivalent to setting it to its |
| 42 |
default value. The supported keys are the following: |
| 43 |
\begin{list}{}{} |
| 44 |
\item [cols] positive integer with default value 1. Specifies the |
| 45 |
number of columns of the document that is used to compute the width of |
| 46 |
the advert. When the advert is repeated, a new paragraph is generated |
| 47 |
every {\em cols\/} columns. |
| 48 |
\item [count] positive integer with default value 1. Tells the number of |
| 49 |
times the advert is repeated. |
| 50 |
\item [cutvspace] dimension with default value 10pt. Tell the vertical space |
| 51 |
under to horizontal dotted line that is provided for cutting one strip. |
| 52 |
\item [skip] non negative integer with default value 0. The value shall be |
| 53 |
less than {\em cols\/}. Specifies that the first {\em skip\/} |
| 54 |
advert are not generated. This may be useful when you want to make several |
| 55 |
adverts in the same document. |
| 56 |
\item [texthspace] dimension with default value 20pt. This key allows to |
| 57 |
specify the space evenly placed before and after advert text. |
| 58 |
\item [textvspace] dimension with default value 10pt. This key allows to |
| 59 |
specify the space evenly placed above and below text. |
| 60 |
\item [telcolsep] dimension with default value 10pt. This key allows to |
| 61 |
specify the separation between two telephone strips, that is to say the |
| 62 |
horizontal space between the telephone numbers. |
| 63 |
\item [telrulewidth] dimension with default value 0.5pt. Width of the |
| 64 |
vertical rule separating two telephone strips. |
| 65 |
\item [telvspace] dimension with default value 10pt. Vertical space shared |
| 66 |
equally above and below the telephone number in the strip (this space is |
| 67 |
one the before and after the number if you look at the strip horizontally). |
| 68 |
\item [width] dimension with default value \verb!\textwidth!. Overloads the value |
| 69 |
computed with {\em cols\/}. In such a case take care to place the {\em |
| 70 |
width\/} argument after the {\em cols\/} argument. This specifies the advert total width, including the |
| 71 |
frame rule width, rule separator, and all the internal spaces. |
| 72 |
\end{list} |
| 73 |
\end{itemize} |
| 74 |
|
| 75 |
\subsection{The \textbackslash petiteannoncewidth and \textbackslash petiteannonceaddtowidth commands} |
| 76 |
|
| 77 |
The \verb!\petiteannoncewidth! command takes one argument \#1 and expands into \#1 \(\times\) the width of the |
| 78 |
advert text. This is useful when you use a tabular to make the text of the advert like in the example given in |
| 79 |
\S~\ref{sec:sample-code}. |
| 80 |
|
| 81 |
The \verb!\petiteannonceaddtowidth! command takes one argument that is some offset to add to the advert |
| 82 |
textwidth. A use of that is given in example of \S~\ref{sec:sample-code}, where the advert text is within an |
| 83 |
array, and one wants to take into account the \verb!\tabcolsep! half column separation. |
| 84 |
|
| 85 |
\subsection{Changing the outside frame} |
| 86 |
|
| 87 |
The frame around the advert is generated with a standard \verb!\framebox! command, so you can play with it by |
| 88 |
changing \verb!\fboxsep! and \verb!\fboxrule!. |
| 89 |
|
| 90 |
\section{Sample code} |
| 91 |
\label{sec:sample-code} |
| 92 |
|
| 93 |
The following sample code will expand into the advertisement page at the page |
| 94 |
this sample code. |
| 95 |
|
| 96 |
|
| 97 |
\VerbatimInput{petiteannonceexample.tex} |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
\includepdf{petiteannonceexample} |
| 102 |
|
| 103 |
\end{document} |
| 104 |
|
| 105 |
%%% Local Variables: |
| 106 |
%%% mode: latex |
| 107 |
%%% TeX-PDF-mode: t |
| 108 |
%%% TeX-master: t |
| 109 |
%%% End: |