How to draw the cards from a deck using a Latex package, as TikZ?
How to Draw the Cards of a Deck?
tikz-pgf
Related Solutions
Here's a version with Tikz. As Ignasi, I assumed the number in the title is supposed to increase with each card, so you can do that automatically with a counter.
Output
Code
\documentclass{article}
\usepackage{tikz}
\usepackage{marvosym,fontawesome} % for the symbols
\definecolor{greencard}{RGB}{0,153,99}
\newcounter{cards}
\setcounter{cards}{1}
\newcommand\materialCards[3][.5\textwidth]{%
\tikz{%
\node[draw=greencard, fill=greencard, minimum height=8mm, text width=#1, font=\bfseries\sffamily, text=white, align=left] (title) {\arabic{cards}~\textemdash~#2};
\node[align=left, anchor=north west, text width=#1-2\pgflinewidth, text depth=2cm] (desc) at (title.south west) {#3};
\node[anchor=north west, minimum size=1cm, font=\Large] (symbol1) at (desc.south west) {\faMapMarker};
\node[anchor=north west, minimum size=1cm, font=\Large] (symbol2) at (symbol1.south west) {\Mundus};
%
\node[anchor=west, text width=#1-1cm, minimum height=1cm] (add) at (symbol1.east) {Address};
\node[anchor=west, text width=#1-1cm, minimum height=1cm] (web) at (symbol2.east) {Website};
\draw[gray, ultra thin, dashed] (symbol2.south east) -- (symbol1.north east);
\draw[gray, ultra thin, dashed] (symbol1.south west) -- (add.south east);
\draw[gray, ultra thin, dashed] (desc.south west) -- (desc.south east);
\draw[gray, thin] (title.north west) rectangle (web.south east);
}%
\stepcounter{cards}%
\par%
\vspace{\baselineskip}%
}
\begin{document}
\materialCards[8cm]{Title}{Here will be some kind of description. Just don't mind the text at the moment... Here will be some kind of description. Just don't mind the text at the moment....}
\materialCards[8cm]{Another Title}{Here will be some other kind of description. Just don't mind the text at the moment... Here will be some other kind of description. Just don't mind the text at the moment...}
\end{document}
I don't know too much about security protocols but tikzpeople
package has been designed by its author Nils Fleischhacker with this intention:
The package was originally written to provide me with shapes of people to depict parties in cryptographic protocols and security definitions on beamer slides.
There's no devil
figure, but there exist evil
option which can provide funny results:
\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{positioning}
\usepackage{tikzpeople}
\begin{document}
\begin{tikzpicture}[every node/.style={minimum width=1.5cm}]
\node[alice] (alice) {};
\node[bob, right= 4cm of alice, mirrored] (bob) {};
\draw[->, thick] (alice) -- coordinate[near start] (aux) (bob);
\node[priest, evil, mirrored, above right=-5mm and 1cm of alice] (priest) {};
\draw[->,red, ultra thick] (priest)--(aux);
\end{tikzpicture}
\end{document}
Best Answer
Here is a solution using
SVG-Cards
,inkscape
andPDFLaTEX/graphicx/TikZ
.I provide a
Makefile
:to download and to extract the SVG-Cards archive (via
wget
andtar
),to extract each SVG card from
svg-cards.svg
(viainkscape
)to convert each SVG card into a PDF card (via
inkscape
)to compile
cards.tex
(viapdflatex
)Steps:
Copy the
Makefile
(note: the white spaces at beginning of lines are tabulations) and thecards.tex
below.Run
make
to getcards.pdf
Note: if you can't use this
Makefile
, I provide cards.tgz. This archive contains all extracted PDF cards (needed to compilecards.tex
).The
Makefile
:The
cards.tex
file: