From a67da228089c0fa6d13ad4d1e7d7310826b2350b Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sat, 29 Apr 2023 19:48:57 +0000 Subject: playcards (29apr23) git-svn-id: svn://tug.org/texlive/trunk@66968 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/playcards/README.md | 11 +++ .../doc/latex/playcards/playcards-en.pdf | Bin 0 -> 304943 bytes .../doc/latex/playcards/playcards-en.tex | 94 +++++++++++++++++++++ .../doc/latex/playcards/playcards-fr.pdf | Bin 0 -> 323724 bytes .../doc/latex/playcards/playcards-fr.tex | 93 ++++++++++++++++++++ 5 files changed, 198 insertions(+) create mode 100644 Master/texmf-dist/doc/latex/playcards/README.md create mode 100644 Master/texmf-dist/doc/latex/playcards/playcards-en.pdf create mode 100644 Master/texmf-dist/doc/latex/playcards/playcards-en.tex create mode 100644 Master/texmf-dist/doc/latex/playcards/playcards-fr.pdf create mode 100644 Master/texmf-dist/doc/latex/playcards/playcards-fr.tex (limited to 'Master/texmf-dist/doc') diff --git a/Master/texmf-dist/doc/latex/playcards/README.md b/Master/texmf-dist/doc/latex/playcards/README.md new file mode 100644 index 00000000000..958a6ea032c --- /dev/null +++ b/Master/texmf-dist/doc/latex/playcards/README.md @@ -0,0 +1,11 @@ +# Playcards package +Tiny LaTeX package to draw playcards. +## Version +0.1, 2023/04/29 +## 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 diff --git a/Master/texmf-dist/doc/latex/playcards/playcards-en.pdf b/Master/texmf-dist/doc/latex/playcards/playcards-en.pdf new file mode 100644 index 00000000000..9c95df3a274 Binary files /dev/null and b/Master/texmf-dist/doc/latex/playcards/playcards-en.pdf differ diff --git a/Master/texmf-dist/doc/latex/playcards/playcards-en.tex b/Master/texmf-dist/doc/latex/playcards/playcards-en.tex new file mode 100644 index 00000000000..60ab32903b5 --- /dev/null +++ b/Master/texmf-dist/doc/latex/playcards/playcards-en.tex @@ -0,0 +1,94 @@ +%% Packages indispensables +\documentclass[a4paper, 12pt]{article} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[english]{babel} + +\usepackage[a4paper]{geometry} +\usepackage{graphicx} + +\newcommand{\package}[1]{\texttt{#1}} +\newcommand{\kv}[2]{\textit{<#1>}\texttt=\textit{<#2>}} +\newcommand{\key}[3]{\textbf{\texttt{#1} (default value: \texttt{#2})} #3} +\newcommand{\commande}[1]{\texttt{\textbackslash#1}} + + +\usepackage{hyperref} +\hypersetup{ + colorlinks=true, + linkcolor=blue, + urlcolor=blue, +} + +\title{Package \texttt{playcards.sty} for \LaTeX} +\date{\today} +\author{Clément Pagès \texttt{contact -- arobase -- clementpages point fr}} + +\begin{document} +\maketitle + +This small package provides commands to draw playcards, with witdh 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! + +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. + +\section{Download, installation, requirements} + +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 : +\begin{description} + \item[\package{tikz}] and some libraries. + \item[\package{simplekv}] dot manage optional parameters whit 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} + +\section{Generalities} +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 length are given in millimeters. + +\section{Provided commands} + \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} +\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.} +\end{itemize} + + + \subsection{\commande{drawcardsverso} command} +It is possible, but not required, to draw card back side. Front sides must be on one page and back sides on an other. You must have as many front sides as back sides. There is an example figure \ref{fig:verso}. + +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} +\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{contentsFontSize}{120}{Font size (int pt) of text in card center.} +\end{itemize} + +\end{document} diff --git a/Master/texmf-dist/doc/latex/playcards/playcards-fr.pdf b/Master/texmf-dist/doc/latex/playcards/playcards-fr.pdf new file mode 100644 index 00000000000..a06a7cc09b9 Binary files /dev/null and b/Master/texmf-dist/doc/latex/playcards/playcards-fr.pdf differ diff --git a/Master/texmf-dist/doc/latex/playcards/playcards-fr.tex b/Master/texmf-dist/doc/latex/playcards/playcards-fr.tex new file mode 100644 index 00000000000..7860a9b1e56 --- /dev/null +++ b/Master/texmf-dist/doc/latex/playcards/playcards-fr.tex @@ -0,0 +1,93 @@ +%% Packages indispensables +\documentclass[a4paper, 12pt]{article} +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[francais]{babel} + +\usepackage[a4paper]{geometry} +\usepackage{graphicx} + +\newcommand{\package}[1]{\texttt{#1}} +\newcommand{\kv}[2]{\textit{<#1>}\texttt=\textit{<#2>}} +\newcommand{\key}[3]{\textbf{\texttt{#1} (valeur par défaut : \texttt{#2})} #3} +\newcommand{\commande}[1]{\texttt{\textbackslash#1}} + + +\usepackage{hyperref} +\hypersetup{ + colorlinks=true, + linkcolor=blue, + urlcolor=blue, +} + +\title{Package \texttt{playcards.sty} pour \LaTeX} +\date{\today} +\author{Clément \bsc{Pagès} \texttt{contact -- arobase -- clementpages point fr}} + +\begin{document} +\maketitle + +Ce petit package fournit des commandes pour dessiner des cartes à jouer, de largeur 59 mm et de hauteur 89 mm. Ce sont les dimensions des cartes classiques. + +\tableofcontents + +\section*{Remerciements} +Je remercie Christophe \bsc{Poulain} pour son génial package \href{https://ctan.org/pkg/profcollege}{ProfCollege}, dont le code m'a servi d'inspiration pour la syntaxe des commandes utilisées ici. Et plus globalement pour ce package exceptionnel, devenu indispensable ! + +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 : . 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 : +\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} + +\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\}}. + +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{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}. +\begin{figure}[h]\begin{center} + \caption{\commande{drawcardsrecto[trame=false]\{5\}}} + \includegraphics{screen01.png}\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{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.} +\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}. + +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} +\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{contentsFontSize}{50}{Taille (en pt) du texte au centre de la carte.} +\end{itemize} + +\end{document} -- cgit v1.2.3