summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2023-05-03 20:11:30 +0000
committerKarl Berry <karl@freefriends.org>2023-05-03 20:11:30 +0000
commit383724fa53e42086a4482cb6fdf45a4b73a3a6ff (patch)
tree36ae12bdcf51ebc0c4181d7ebe7d15ac2edfc898
parent7893784523fde373de66425d7311a7099e880f6c (diff)
playcards (3may23)
git-svn-id: svn://tug.org/texlive/trunk@66999 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/playcards/README.md11
-rw-r--r--Master/texmf-dist/doc/latex/playcards/playcards-en.pdfbin304943 -> 275684 bytes
-rw-r--r--Master/texmf-dist/doc/latex/playcards/playcards-en.tex48
-rw-r--r--Master/texmf-dist/doc/latex/playcards/playcards-fr.pdfbin323724 -> 294369 bytes
-rw-r--r--Master/texmf-dist/doc/latex/playcards/playcards-fr.tex32
-rw-r--r--Master/texmf-dist/tex/latex/playcards/playcards.sty20
6 files changed, 67 insertions, 44 deletions
diff --git a/Master/texmf-dist/doc/latex/playcards/README.md b/Master/texmf-dist/doc/latex/playcards/README.md
index 958a6ea032c..0452118cae3 100644
--- a/Master/texmf-dist/doc/latex/playcards/README.md
+++ b/Master/texmf-dist/doc/latex/playcards/README.md
@@ -1,11 +1,10 @@
# Playcards package
Tiny LaTeX package to draw playcards.
## Version
-0.1, 2023/04/29
+0.2, 2023/05/02
## Licence
GNU LGPL v3.0 https://www.gnu.org/licenses/lgpl-3.0.html
-
-
-Author : Clément PAGÈS
-Maintainer: Clément PAGÈS
-E-mail : contact -- arobase -- clementpages point fr
+## Contact
+- Author : Clément PAGÈS
+- Maintainer: Clément PAGÈS
+- E-mail : contact -- arobase -- clementpages point fr
diff --git a/Master/texmf-dist/doc/latex/playcards/playcards-en.pdf b/Master/texmf-dist/doc/latex/playcards/playcards-en.pdf
index 9c95df3a274..81bbfeef9f9 100644
--- a/Master/texmf-dist/doc/latex/playcards/playcards-en.pdf
+++ b/Master/texmf-dist/doc/latex/playcards/playcards-en.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/playcards/playcards-en.tex b/Master/texmf-dist/doc/latex/playcards/playcards-en.tex
index 60ab32903b5..00ffe905d65 100644
--- a/Master/texmf-dist/doc/latex/playcards/playcards-en.tex
+++ b/Master/texmf-dist/doc/latex/playcards/playcards-en.tex
@@ -27,51 +27,59 @@
\begin{document}
\maketitle
-This small package provides commands to draw playcards, with witdh 59 mm and height 89 mm, which are typicall cards dimensions.
+This small package provides commands to draw playcards, with width 59 mm and height 89 mm, which are typicall cards dimensions.
\tableofcontents
\section*{Thanks}
-Thanks to Christophe Poulain for his amazing \href{https://ctan.org/pkg/profcollege}{ProfCollege} package, which source code was useful to design syntax commands we use here. And more generally, thank you you for this amazing package!
+Thanks to Christophe Poulain for his amazing \href{https://ctan.org/pkg/profcollege}{ProfCollege} package, which source code was useful to design syntax commands we use here. And more generally, thank you for this amazing package!
-Also thanks to \href{https://tex.stackexchange.com/users/1948/didest}{didest} who asked a question on \href{https://tex.stackexchange.com/questions/47924/creating-playing-cards-using-tikz}{StackExchange}. I used it to built this package.
+Also thanks to \href{https://tex.stackexchange.com/users/1948/didest}{didest} who asked a question on \href{https://tex.stackexchange.com/questions/47924/creating-playing-cards-using-tikz}{StackExchange}. I used it to build this package.
\section{Download, installation, requirements}
+ \subsection{Automatically loaded packages}
+Package available on CTAN : \href{https://ctan.org/pkg/playcards}{https://ctan.org/pkg/playcards}. It contains one single file: \texttt{playcards.sty}.
-Package available on CTAN. It contains one single file : \texttt{playcards.sty}.
-
-Some package are automatically loaded. They are installed by default on most configurations :
+Some packages are automatically loaded. They are installed by default on most configurations:
\begin{description}
\item[\package{tikz}] and some libraries.
- \item[\package{simplekv}] dot manage optional parameters whit a \kv{key}{value} system.
+ \item[\package{simplekv}] to manage optional parameters with a \kv{key}{value} system.
\item[\package{graphicx}] for pictures.
\item[\package{contour}] for text shadows and borders.
- \item[\package{geometry}] configured to draw 9 cards on an A4 paper.
\end{description}
+
+ \subsection{Recommended packages, not automatically loaded}
+To draw cards one by one, there are nos constraints on margins an paper format.
+
+To get a full page of identical cards, paper has to be A4 format and command \commande{usepackage[scale=0.95]\{geometry\}} is required in preamble.
+
\section{Generalities}
-Commands are based on a key/value system, with model \texttt{\textbackslash command[\kv{key1}{value1}, \kv{key2}{value2}, …,]\{param1\}\{param2\}}.
+Commands are based on a key/value system, with model \texttt{\textbackslash command[\kv{key1}{value1}, \kv{key2}{value2}, …]\{param1\}\{param2\}}.
-All the keys are optional and if one does not fill them, they get a default value.
+All keys are optional and if one does not fill them, they get a default value.
All length are given in millimeters.
\section{Provided commands}
+ \subsection{Package options}
+By default, font for text on cards is the same as document's. You can pass in option the parameter \texttt{anttor} so that cards font will be \href{https://tug.org/FontCatalogue/antykwatorunska/}{Antykwa Toruńska}.
+
\subsection{\commande{drawcardsrecto} command}
This command has one required parameter : text written in the center of the card. It fills an A4 paper with 9 identical cards. This command only draws front side of the card. There is an example figure \ref{fig:recto}.
\begin{figure}[h]\begin{center}
\caption{\commande{drawcardsrecto[trame=false]\{5\}}}
- \includegraphics{screen01.png}\label{fig:recto}
+ \includegraphics{fig01.pdf}\label{fig:recto}
\end{center}\end{figure}
Optional parameters:
\begin{itemize}
\item \key{borders}{true}{Removes borders.}
- \item \key{trame}{true}{If \texttt{true}, fills an A4 paper with cards.. Si \texttt{false}, draws one only card.}
- \item \key{corners}{true}{If \texttt{true}, card contends is reproduced in corners. If \texttt{false}, it is not.}
- \item \key{backgroundImg}{true}{Si \texttt{true}, prints background. If \texttt{false}, no background.}
- \item \key{backgroundColor}{red}{Specifies background color. Ignored if \texttt{backgroundImg=false}. Uses colored defined in the \href{https://www.ctan.org/pkg/xcolor}{xcolor} package.}
- \item \key{contentsFontSize}{120}{Font size (int pt) of text in card center.}
- \item \key{cicleRay}{20}{Ray of the white circle the center of the card. Value \texttt 0 means no circle.}
+ \item \key{trame}{true}{If \texttt{true}, fills an A4 paper with cards. If \texttt{false}, draws one only card. To work properly, \texttt{trame=true} requires A4 paper and \commande{usepackage[scale=0.95]\{geometry\}} in preamble.}
+ \item \key{corners}{true}{If \texttt{true}, card's contents is reproduced in corners. If \texttt{false}, it is not.}
+ \item \key{backgroundImg}{true}{If \texttt{true}, prints background. If \texttt{false}, no background.}
+ \item \key{backgroundColor}{red}{Specifies background color. Ignored if \texttt{backgroundImg=false}. Uses colors defined in the \href{https://www.ctan.org/pkg/xcolor}{xcolor} package.}
+ \item \key{contentsFontSize}{120}{Font size (in pt) of text in card center.}
+ \item \key{circleRay}{20}{Ray of the white circle the center of the card. Value \texttt 0 means no circle.}
\end{itemize}
@@ -81,13 +89,13 @@ It is possible, but not required, to draw card back side. Front sides must be on
To get a correct alignment, place commands in a \verb!\begin{center}...\end{center}! environment.
\begin{figure}[h]\begin{center}
\caption{\commande{drawcardsverso[trame=false,contentsFontSize=40]\{Exemple\}}}
- \includegraphics{screen02.png}\label{fig:verso}
+ \includegraphics{fig02.pdf}\label{fig:verso}
\end{center}\end{figure}
Optional parameters:
\begin{itemize}
- \item \key{backgroundImg}{true}{Si \texttt{true}, prints background. If \texttt{false}, no background.}
- \item \key{trame}{true}{If \texttt{true}, fills an A4 paper with cards.. Si \texttt{false}, draws one only card.}
+ \item \key{backgroundImg}{true}{If \texttt{true}, prints background. If \texttt{false}, no background.}
+ \item \key{trame}{true}{If \texttt{true}, fills an A4 paper with cards. If \texttt{false}, draws one only card. To work properly, \texttt{trame=true} requires A4 paper and \commande{usepackage[scale=0.95]\{geometry\}} in preamble.}
\item \key{contentsFontSize}{120}{Font size (int pt) of text in card center.}
\end{itemize}
diff --git a/Master/texmf-dist/doc/latex/playcards/playcards-fr.pdf b/Master/texmf-dist/doc/latex/playcards/playcards-fr.pdf
index a06a7cc09b9..5f358c557db 100644
--- a/Master/texmf-dist/doc/latex/playcards/playcards-fr.pdf
+++ b/Master/texmf-dist/doc/latex/playcards/playcards-fr.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/playcards/playcards-fr.tex b/Master/texmf-dist/doc/latex/playcards/playcards-fr.tex
index 7860a9b1e56..c807577b6ec 100644
--- a/Master/texmf-dist/doc/latex/playcards/playcards-fr.tex
+++ b/Master/texmf-dist/doc/latex/playcards/playcards-fr.tex
@@ -37,56 +37,64 @@ Je remercie Christophe \bsc{Poulain} pour son génial package \href{https://ctan
Merci également à \href{https://tex.stackexchange.com/users/1948/didest}{didest}, dont la question posée sur \href{https://tex.stackexchange.com/questions/47924/creating-playing-cards-using-tikz}{StackExchange} m'a servi de base.
\section{Téléchargement, installation, prérequis}
-Le package est disponible sur CTAN : <lien à venir>. Il contient un unique fichier : \texttt{playcards.sty}
+Le package est disponible sur CTAN : \href{https://ctan.org/pkg/playcards}{https://ctan.org/pkg/playcards}. Il contient un unique fichier : \texttt{playcards.sty}.
-Certains packages sont chargés automatiquement. Ils sont installés par défaut sur la majorités des installations classiques :
+ \subsection{Packages chargés automatiquement}
+Certains packages sont chargés automatiquement. Ils sont installés par défaut sur la majorités des configurations classiques :
\begin{description}
\item[\package{tikz}] et certaines de ses librairies.
\item[\package{simplekv}] pour gérer les paramètres facultatifs des commandes par système \kv{clé}{valeur}.
\item[\package{graphicx}] pour les images.
\item[\package{contour}] pour les ombres et contours de textes.
- \item[\package{geometry}] configuré pour optimiser l'occupation d'une feuille A4 en la remplissant de cartes convenablement alignées.
\end{description}
+ \subsection{Packages recommandés non chargés automatiquement}
+Pour dessiner les cartes individuellement, il n'y a pas de contraintes sur les marges ou le format de papier.
+
+Pour obtenir des planches de cartes identiques, le format doit être A4 et le package \commande{usepackage[scale=0.95]\{geometry\}} doit être chargé en préambule.
+
\section{Principe général}
-Les principales commandes sont construites sur un système de clés/valeurs, sur le modèle \texttt{\textbackslash commande[\kv{cle1}{valeur1}, \kv{cle2}{valeur2}, …,]\{param1\}\{param2\}}.
+Les principales commandes sont construites sur un système de clés/valeurs, sur le modèle \texttt{\textbackslash commande[\kv{cle1}{valeur1}, \kv{cle2}{valeur2}, …]\{param1\}\{param2\}}.
Toutes les clés sont facultatives et si elles ne sont pas renseignées, il leur est attribué une valeur par défaut.
Sauf précision contraire, les longueurs sont mentionnées en millimètres.
\section{Commandes fournies}
+ \subsection{Options du package}
+Par défaut, la police d'écriture utilisée pour le texte des cartes est la même que celle du document. Il est possible de passer en option le paramètre \texttt{anttor} pour que la police des cartes soit \href{https://tug.org/FontCatalogue/antykwatorunska/}{Antykwa Toruńska}.
+
\subsection{Commande \commande{drawcardsrecto}}
-Cette commande prend un paramètre obligatoire : le texte qui apparaîtra au centre de la carte et remplit une feuille A4 avec 9 cartes identiques. Cette commande trace le recto des cartes. Un exemple est donné figure \ref{fig:recto}.
+Cette commande prend un paramètre obligatoire : le texte qui apparaîtra au centre de la carte. Elle remplit une feuille A4 avec 9 cartes identiques. Cette commande trace le recto des cartes. Un exemple est donné figure \ref{fig:recto}.
\begin{figure}[h]\begin{center}
\caption{\commande{drawcardsrecto[trame=false]\{5\}}}
- \includegraphics{screen01.png}\label{fig:recto}
+ \includegraphics{fig01.pdf}\label{fig:recto}
\end{center}\end{figure}
Paramètres optionnels :
\begin{itemize}
- \item \key{borders}{true}{Retire les bordures.}
- \item \key{trame}{true}{Si \texttt{true}, remplit une feuille A4 avec les cartes. Si \texttt{false}, dessine une seule carte.}
+ \item \key{borders}{true}{Trace les bordures. Si \texttt{false}, les bordures sont retirées.}
+ \item \key{trame}{true}{Si \texttt{true}, remplit une feuille A4 avec les cartes. Si \texttt{false}, dessine une seule carte. Pour fonctionner correctement, la clé \texttt{trame=true} nécessite que le document soit au format A4 et que soit chargé en préambule \commande{usepackage[scale=0.95]\{geometry\}}}.
\item \key{corners}{true}{Si \texttt{true}, le texte de la carte est reporté à l'endroit à et à l'envers dans les coins. Si \texttt{false}, les coins ne sont pas affichés.}
\item \key{backgroundImg}{true}{Si \texttt{true}, affiche l'arrière-plan. Si \texttt{false}, pas d'arrière-plan.}
\item \key{backgroundColor}{red}{Spécifie la couleur de l'arrière-plan. Sera ignoré si \texttt{backgroundImg=false}. Utilise les couleurs du package \href{https://www.ctan.org/pkg/xcolor}{xcolor}.}
\item \key{contentsFontSize}{120}{Taille (en pt) du texte au centre de la carte.}
- \item \key{cicleRay}{20}{Rayon du cercle blanc au centre de la carte. La valeur \texttt 0 équivaut à ne pas tracer le cercle.}
+ \item \key{circleRay}{20}{Rayon du cercle blanc au centre de la carte. La valeur \texttt 0 équivaut à ne pas tracer le cercle.}
\end{itemize}
\subsection{Commande \commande{drawcardsverso}}
-Il est possible, mais ce n'est pas obligatoire, de dessiner le verso des cartes. Les rectos devront être sur une page et les versos sur une autre et d'avoir autant de rectos que de versos. Un exemple est donné figure \ref{fig:verso}.
+Il est possible, mais ce n'est pas obligatoire, de dessiner le verso des cartes. Les rectos devront être sur une page et les versos sur une autre. Il est recommandé d'avoir autant de rectos que de versos pour préserver l'alignement. Un exemple est donné figure \ref{fig:verso}.
Pour avoir le bon alignement, il est recommandé de placer les commandes dans un environnement \verb!\begin{center}...\end{center}!.
\begin{figure}[h]\begin{center}
\caption{\commande{drawcardsverso[trame=false,contentsFontSize=40]\{Exemple\}}}
- \includegraphics{screen02.png}\label{fig:verso}
+ \includegraphics{fig02.pdf}\label{fig:verso}
\end{center}\end{figure}
Paramètres optionnels :
\begin{itemize}
\item \key{backgroundImg}{true}{Si \texttt{true}, affiche l'arrière-plan. Si \texttt{false}, pas d'arrière-plan.}
- \item \key{trame}{true}{Si \texttt{true}, remplit une feuille A4 avec les cartes. Si \texttt{false}, dessine une seule carte.}
+ \item \key{trame}{true}{Si \texttt{true}, remplit une feuille A4 avec les cartes. Si \texttt{false}, dessine une seule carte. Pour fonctionner correctement, la clé \texttt{trame=true} nécessite que le document soit au format A4 et que soit chargé en préambule \commande{usepackage[scale=0.95]\{geometry\}}}.
\item \key{contentsFontSize}{50}{Taille (en pt) du texte au centre de la carte.}
\end{itemize}
diff --git a/Master/texmf-dist/tex/latex/playcards/playcards.sty b/Master/texmf-dist/tex/latex/playcards/playcards.sty
index aa5218f2418..4b5d8fb85b1 100644
--- a/Master/texmf-dist/tex/latex/playcards/playcards.sty
+++ b/Master/texmf-dist/tex/latex/playcards/playcards.sty
@@ -1,6 +1,6 @@
% Clément PAGÈS <contact@clementpages.fr>
%
-% Version 0.1
+% Version 0.2
%
% Draws basic playcards with Tikz. Inspired by https://tex.stackexchange.com/questions/47924/creating-playing-cards-using-tikz
%
@@ -11,13 +11,9 @@
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{playcards}[2023/04/29, Personal commands]
-
-
-\RequirePackage[scale=0.950]{geometry}
+\ProvidesPackage{playcards}[2023/05/02, Personal commands]
\RequirePackage{simplekv}
-\RequirePackage{anttor}
\RequirePackage{graphicx}
\RequirePackage{tikz}
\usetikzlibrary{patterns}
@@ -30,6 +26,12 @@
},
}
+% Check if attor is given a optional parameter
+\newif\if@loadanttorfont\@loadanttorfontfalse
+\DeclareOption{anttor}{\@loadanttorfonttrue}
+\ProcessOptions\relax
+
+
\RequirePackage[outline]{contour}
\pgfmathsetmacro{\cardwidth}{59}
@@ -149,6 +151,9 @@
\newcommand{\drawcardsverso}[2][]{
+ \if@loadanttorfont % Change card font to anttor if parameter antor given
+ \fontfamily{antt}
+ \fi
\useKVdefault[VersoKeys]%
\setKV[VersoKeys]{#1}%
\ifboolKV[VersoKeys]{trame}{%
@@ -163,6 +168,9 @@
}
\newcommand{\drawcardsrecto}[2][] {
+ \if@loadanttorfont % Change card font to anttor if parameter antor given
+ \fontfamily{antt}
+ \fi
\useKVdefault[RectoKeys]%
\setKV[RectoKeys]{#1}%
\ifboolKV[RectoKeys]{trame}{