90

This question led to a new package:
playcards

I'm creating a card game, specifically a computer science Fluxx variant, and want to generate the cards through *TeX. They should look like this:

example of Fluxx cards

In some of them I want to put some graphics or formulas.

I tried with TikZ but had no luck (but I'm just a newbie). Can you help me?

(I plan to release it under a CC license.)

UPDATE: This is what I have:

\documentclass{minimal}
\usepackage[a4paper,margin=1cm]{geometry}
\usepackage{tikz}
\usepackage{multicol}
\usepackage{amsthm,amsmath,amssymb}
\usepackage[protrusion=true,expansion=true]{microtype}
\usetikzlibrary{positioning,shapes,shadows,arrows,backgrounds,fit}
\usepackage[utf8]{inputenc}
\begin{document}
\tikzstyle{textstyle}=[rectangle, text width=3.5cm, text badly ragged, scale=0.8]
\begin{multicols}{3}
\begin{center}
  \begin{tikzpicture}[background rectangle/.style = {draw=black, fill=white,
        rounded corners}, show background rectangle, node distance=0.3cm]
    \node (side) [textstyle, fill=red, rotate=90, text width=4cm, scale=1.4, text centered] {%
        \begin{tabular}{r}
            TIME
        \end{tabular}
    };
    \node (kind) [textstyle, right=of side, scale=1.5] {\textbf{KEEPER}};
    \node (desckind) [textstyle, below=of kind] {
        When you play this card, bla bla bla.
    };
    \node (title) [textstyle, below=of desckind, scale=1.3] {Time};
    \node (separator) [thick, fill=black, below=of title, text width=3.5cm] {};
    \node (description) [textstyle, below=of separator] {
        The player bla bla bla bla
        \[ H \Psi = \nabla \Psi \]
        \[ J \Phi = \nabla \Phi \]
        and then bla bla bla.
    };
  \end{tikzpicture}
\end{center}
\end{multicols}
\end{document}

a playing card

Niranjan
  • 3,435
didest
  • 1,145
  • 3
    Can you show what you have tried so far, and exactly what you are having difficulty with? Is it the layout, the thick lines, the round edges, the larger font sizes, using colors? – Peter Grill Mar 13 '12 at 21:42
  • @PeterGrill my greatest problem is the layout and fixing card sizes. – didest Mar 13 '12 at 21:59
  • @Diego: Which problems have you solved yet? – doncherry Mar 13 '12 at 22:10
  • @doncherry above is what I have. – didest Mar 13 '12 at 22:32
  • 2
    Maybe ,this could be a good starting point for you: http://tex.stackexchange.com/a/47165/9237 – Speravir Mar 13 '12 at 22:40
  • 4
    Now I was just considering downvoting your question due to you littering the universe with yet another Fluxx version... 15 minutes of fun boiled down to 3 hours... OK, just kidding; but seriously: nice try, though you could choose an actually good game to do a variant of. Anyway, if you post your game on BGG, don't forget to mention TeX! – mbork Mar 13 '12 at 23:55
  • Thanks for this, I working on something similar. Did you put your code into a GitHub repo anywhere?

    I might take what you created, amend it and add to my own repo for people to access.

    – ChrisChinchilla Jul 04 '15 at 16:42
  • Probably a bit late as this thread seems dead now but.. http://tex.stackexchange.com/questions/243740/print-double-sided-playing-cards has some modified code of this thread suitable for double-sided printing and multiple cards per page (with the added benefit of not having errors in the compile). I'm working on finishing some clean-up to make the code more "pretty" but it's functional as.is. – william May 08 '15 at 16:55

4 Answers4

126

Based on the above answers I tried to create some kind of trading card game template with tikz.

This is what the result looks like.

example trading cards made with tikz

The images (out of the last one, so only the first three images) are just google searches. I hopefully don't upset anyone who owns these pictures. I only used them for testing purpose and to show you here.

For the cards' elements (like title box, price box etc.) I made new commands for simplifying usage. This is what to do for generating each card:

\begin{tikzpicture}
    \cardbackground{img/illustration.jpg}
    \cardtypeItem
    \cardtitle{the card's title}
    \cardcontent{fictitious quote for card character}{the card's effect, description or whatever comes to your mind}
    \cardprice{5}
    \cardborder
\end{tikzpicture}

As follows you can see my test scripts for a document with eight test cards. I'm sorry for not translating all my german contents and comments to english. too lazy for that right now. ;-)


cards.tex

\documentclass[a4paper,landscape]{article}

%   Pakete dazuladen
\input{include/libs.tex}
%   Farbdefinitionen laden
\input{include/colors.tex}
%   \card-Commands laden
\input{include/tikzcards.tex}

%   Dummy-Contents
\newcommand{\contentA}{Neunmalkluges Zitat\\mit Bezug zur Karte von einer fiktiven Figur.}
\newcommand{\contentB}{Auswirkungen:\\[5pt]Ziehe 2 Karten, nimm 3 Gold, lege alles ab, lauf weg …}

\begin{document}
\begin{center}
    \pagestyle{empty}

%   V-Space-Korrektur bei langen Titeln
%   \cardtitle{\vspace{-5mm}SEHR LANGER TITEL}

    \begin{tikzpicture}
        \cardbackground{img/scifi.jpg}
        \cardtypeItem
        \cardtitle{Der Schlächter}
        \cardcontent{Sei mein Feind und es ist das Letzte, was du tust.}{\contentB}
        \cardprice{5}
        \cardborder
%       \carddebug
    \end{tikzpicture}
    \hspace{5mm}
    \begin{tikzpicture}
        \cardbackground{img/fantasy.jpg}
%       \carddebug
        \cardtypeAbility
        \cardtitle{Der Wächter}
        \cardcontent{Keine Sorge, ich mache es lang und äußerst schmerzhaft für dich.}{\contentB}
        \cardprice{35}
        \cardborder
    \end{tikzpicture}
    \hspace{5mm}
    \begin{tikzpicture}
        \cardbackground{img/pirate.jpg}
        \cardtypeCharacter
        \cardtitle{Mächtiger Schlächter}
        \cardcontent{Eye, Cäpt'n. Diese Landradd'n werden wir über die Planken schicken!}{\contentB}
        \cardprice{435}
        \cardborder
    \end{tikzpicture}
    \hspace{5mm}
    \begin{tikzpicture}
        \cardbackground{img/moniuser.jpg}
        \cardtypeTest
        \cardtitle{Schlechter Wächter}
        \cardcontent{Sei Gast in meinem bescheidenen Domizil.}{\contentB}
        \cardprice{$\infty$}
        \cardborder
    \end{tikzpicture}

    \vspace{5mm}
    \begin{tikzpicture}
        \cardbackground{img/cat.jpg}
        \cardtypeItem
        \cardtitle{Schmächtiger Wächter}
        \cardcontent{Miau.}{\contentB}
        \cardprice{5}
        \cardborder
    \end{tikzpicture}
    \hspace{5mm}
    \begin{tikzpicture}
        \cardbackground{img/vb.png}
        \cardtypeAbility
        \cardtitle{Gebrechlicher Schlächter}
        \cardcontent{\contentA}{\contentB}
        \cardprice{35}
        \cardborder
    \end{tikzpicture}
    \hspace{5mm}
    \begin{tikzpicture}
        \cardbackground{img/image.png}
        \cardtypeCharacter
        \cardtitle{Gerechter Wächter}
        \cardcontent{\contentA}{\contentB}
        \cardprice{435}
        \cardborder
    \end{tikzpicture}
    \hspace{5mm}
    \begin{tikzpicture}
        \cardtypeTest
        \cardtitle{Welcher Schlächter?}
        \cardcontent{\contentA}{\contentB}
        \cardprice{$\infty$}
        \cardborder
    \end{tikzpicture}

\end{document}

libs.tex

%   VORAUSGESETZTE LIBS
%   ------------------

%   Ränder des Dokuments anpassen
\usepackage[margin=6mm,top=5mm]{geometry}

%   Schriftart der auf den Karten eingesetzten Texte
\usepackage{anttor}

%   UTF-8 Encoding der TeX-Dateien
\usepackage[utf8]{inputenc}

%   deutsches Sprachpaket
\usepackage[german]{babel}

%   optischer Randausgleich
\usepackage{microtype}

%   Einbinden von Grafiken
\usepackage{graphicx}

%   Definieren und Verwenden von Farben
\usepackage{color}

%   TikZ zum "Malen" von Grafiken, in diesem Falle für die Karten
\usepackage{tikz}
\usetikzlibrary{patterns}
\usetikzlibrary{shadows}

%   Symbole dazuladen; Verwendung \ding{<nummer>}
\usepackage{pifont}
%   weitere Symbole
\usepackage{fourier-orns}

colors.tex

%   FARBEN DER ELEMENTE/BESTANDTEILE DER KARTEN
%   -----------------------------------------

%   Hintergrundfarbe für den Titel-Kasten
    \definecolor{titlebg}{RGB}{30,30,30}

%   Farben der "Fähnchen" zur Kennzeichnung der unterschiedlichen Kartentypen
    \definecolor{characterbg}{RGB}{0,100,200}
    \definecolor{abilitybg}{RGB}{80,180,0}
    \definecolor{itembg}{RGB}{200,50,50}
    \definecolor{testbg}{RGB}{180,50,150}

%   Farbe des "Fähnchens" zur Angabe des Preises der Karten
    \definecolor{pricebg}{RGB}{230,180,0}

%   Hintergrundfarbe für den Textbereich
    %\definecolor{content}{RGB}{250,250,245}
    \definecolor{contentbg}{RGB}{255,255,255}

and now the most interesting file for you i guess…

tikzcards.tex

%   COMMANDS ZUM ZUSAMMENBAUEN DER KARTEN
%   ---------------------------------------

%   TikZ/PGF Settings für die Karten
\pgfmathsetmacro{\cardwidth}{6}
\pgfmathsetmacro{\cardheight}{9}
\pgfmathsetmacro{\imagewidth}{\cardwidth}
\pgfmathsetmacro{\imageheight}{0.75*\cardheight}
\pgfmathsetmacro{\stripwidth}{0.7}
\pgfmathsetmacro{\strippadding}{0.2}
\pgfmathsetmacro{\textpadding}{0.1}
\pgfmathsetmacro{\titley}{\cardheight-\strippadding-1.5*\textpadding-0.5*\stripwidth}


%   Formen der einzelnen Kartenelemente/-bestandteile
\def\shapeCard{(0,0) rectangle (\cardwidth,\cardheight)}
\def\shapeLeftStripLong{(\strippadding,-0.2) rectangle (\strippadding+\stripwidth,\cardheight-\strippadding-\strippadding-1)}
\def\shapeLeftStripShort{(\strippadding,\cardheight-\strippadding-1) rectangle (\strippadding+\stripwidth,\cardheight+0.2)}
\def\shapeRightStripShort{(\cardwidth-\stripwidth-\strippadding,\cardheight-\strippadding-1) rectangle (\cardwidth-\strippadding,\cardheight+0.2)}
\def\shapeTitleArea{(2*\strippadding+\stripwidth,\cardheight-\strippadding) rectangle (\cardwidth-2*\strippadding-\stripwidth,\cardheight-2*\stripwidth)}
\def\shapeContentArea{(2*\strippadding+\stripwidth,0.5*\cardheight) rectangle (\cardwidth+0.2,-0.2)}


%   Stylings für die Elemente definieren
\tikzset{
    %   runde Ecken für die Karten
    cardcorners/.style={
        rounded corners=0.2cm
    },
    %   runde Ecken für die "Fähnchen"
    elementcorners/.style={
        rounded corners=0.1cm
    },
    %   Schlagschatten für die "Fähnchen"
    stripshadow/.style={
        drop shadow={
            opacity=.5,
            shadow,
            color=black
        }
    },
    %   Style für die "Fähnchen"
    strip/.style={
        elementcorners,
        stripshadow
    },
    %   Bild für das Kartenmotiv
    cardimage/.style={
        path picture={
            \node[below=-1.5mm] at (0.5*\cardwidth,\cardheight) {
                \includegraphics[width=\imagewidth cm]{#1}
            };
        }
    },
}

%   TikZ-Raster
\newcommand{\carddebug}{
    \draw [step=1,help lines] (0,0) grid (\cardwidth,\cardheight);
}

%   Rahmen der Karte
\newcommand{\cardborder}{
    \draw[lightgray,cardcorners] \shapeCard;
}

%   Hintergrund der Karte
\newcommand{\cardbackground}[1]{
    \draw[cardcorners, cardimage=#1] \shapeCard;
}

%   Kategorie der Karte
\newcommand{\cardtype}[3]{
    %   First we fill the intersecting area
    %   The \clip command does not allow options, therefore 
    %   we have to use a scope to set the even odd rule.
    \begin{scope}[even odd rule]
        %   Define a clipping path. All paths outside shapeCard will
        %   be cut because the even odd rule is set.
        \clip[cardcorners] \shapeCard;
        % Fill shapeLeftStripLong and shapeLeftStripShort.
        %   Since the even odd rule is set, only the card will be filled.
        \fill[strip,#1] \shapeLeftStripLong node[rotate=90,above left=0.9mm,font=\normalsize] {
            \color{white}\uppercase{#2}
        };
        \fill[strip,#1] \shapeLeftStripShort;
    \end{scope}

    \node at (\strippadding+\stripwidth-0.28,\cardheight-\strippadding-\strippadding-0.37) {\color{white}#3};
}
\newcommand{\cardtypeCharacter}{\cardtype{characterbg}{Charaktereigenschaft}{\hspace{-1mm}\LARGE\lefthand}}
\newcommand{\cardtypeAbility}{\cardtype{abilitybg}{Fähigkeit}{\hspace{-1mm}\Large\floweroneright}}
\newcommand{\cardtypeItem}{\cardtype{itembg}{Gegenstand}{\hspace{-1mm}\LARGE\bomb}}
\newcommand{\cardtypeTest}{\cardtype{testbg}{Testkarte}{\hspace{-1.4mm}\huge\ding{78}}}

%   Titel der Karte
\newcommand{\cardtitle}[1]{
    %\draw[pattern=soft crosshatch,rounded corners=0.1cm] \shapeTitleArea;
    \fill[elementcorners,titlebg,opacity=.85] \shapeTitleArea;
    \node[text width=3.75cm] at (0.5*\cardwidth,\titley) {
        \begin{center}
            \color{white}\uppercase{\normalsize #1}
        \end{center}
    };
}

%   Inhalt der Karte
\newcommand{\cardcontent}[2]{
    \begin{scope}[even odd rule]
        \clip[cardcorners] \shapeCard;
        \fill[elementcorners,contentbg] \shapeContentArea;
    \end{scope}
    \node[below right, text width=(\cardwidth-2*\strippadding-\stripwidth-2*\textpadding-0.3)*1cm] at (2*\strippadding+\stripwidth+\textpadding,0.5*\cardheight-\textpadding) {
        \textit{\glqq\normalsize #1\grqq}
    };
    \node[below right, text width=(\cardwidth-2*\strippadding-\stripwidth-2*\textpadding-0.3)*1cm] at (2*\strippadding+\stripwidth+\textpadding,3) {
        \vrule width \textwidth height 2pt \\[-2pt]
        \vspace{0.2cm}
        {\scriptsize #2}
    };
}

%   Preis der Karte
\newcommand{\cardprice}[1]{
    \begin{scope}[even odd rule]
        \clip[cardcorners] \shapeCard;
        \fill[strip,pricebg] \shapeRightStripShort;
    \end{scope}
    \node at (\cardwidth-0.5*\stripwidth-\strippadding,\titley-0.1) {\color{black}#1};
}

Now you only have to include the missing background images for your cards and correct the file paths. I won't upload those. ;-)

Here another example:

another example result

Hope you enjoy my template. Feel free to use it for whatever you want. Thanks to the others who answered above and helped out with some code snippets and stuff! My template is your legacy. ;-)

dexteritas
  • 9,161
Arvid
  • 1,643
  • 1
  • 11
  • 11
  • 1
    Trying that (awesome!) template, tikz keep complaining about opacity: ! Package pgfkeys Error: I do not know the key '/tikz/ opacity' and I am going to ignore it. Perhaps you misspelled it.. Perhaps my tikz is too old? – Bach Jul 04 '14 at 10:40
  • This seems to be my fault. Sorry for that. I also get that one and several other errors. Don't know why but the template still works, even with these errors. Never cared about them because when tex-ing there is a result that looks good for me. Although opacity is an unknown key and throws that error the colored strips on the cards do get shadows somehow that are even transparent. Can't explain that. As I said, I never cared about it. Sorry.

    Maybe you could check the tikzcards.tex file. I guess the "stripshadow" style in line 47 is the one that's reasonable for the logged error message(s).

    – Arvid Jul 07 '14 at 15:38
  • Amazingly useful for me, thanks!

    I will be using a lot of your advice in my open source board game, keep an eye on the _layouts folder - https://github.com/GregariousMammal/Chip-Shop for progress.

    – ChrisChinchilla Jul 04 '15 at 18:14
  • 1
    Amazingly useful indeed. Did anyone find the solution for the errors '/tikz/ opacity'? – Arne Timperman Oct 17 '15 at 12:19
  • 6
    Have you thought about turning this into a package? – Gaussler Nov 11 '15 at 12:00
  • 3
    Not yet. But I indeed thought of making a GitHub or Bitbucket project to make it easier for all of you guys to access and also commit changes to the TeX code above. By the way I (almost) completely re-built the template for a card game I am working on for a while now. (Unfortunately no prgress to show here or anywhere else since I work to much on "real" projects I get paid for and so I can't finish my game… But its code base is even better than the one above! ;)) – Arvid Nov 11 '15 at 16:46
  • 2
    as for the opacity problem.. removing the whitespace before 'opacity' solved it for me.. I think perhaps the copy paste introduces an invisible but non-space character.. – Born2Smile Aug 09 '16 at 03:15
  • @Alojzy and Born2Smile. Thanks for figuring out and editing my post! Many will like it I guess. – Arvid Mar 03 '17 at 14:08
  • 4
    @Arvid No problem - great job, so wanted to contribute somehow. There's still one more thing: drop shadow={ opacity=.5, shadow, color=black }

    I had to delete the second occurrence of "shadow" to make it work. However, I don't know LaTeX well enough in order to say if that's an issue that's local only to my machine.

    – LA.27 Mar 03 '17 at 14:52
  • ... and I thought I am the only crazy person! – hola Aug 15 '17 at 14:46
  • @pushpen.paul definitely not. :D … FYI for all others: Still no progress in publishing my other (better) template I am kinda working on. Too much other things to do, unfortunately. – Arvid Aug 24 '17 at 09:20
  • 4
    Very nice template indeed! I've used it to make my own "Timeline-like" deck of cards https://github.com/romulusFR/timeline_informatique – Romuald Aug 24 '17 at 09:39
  • Thanks @Romuald. Unfortunately I don't speak French, but at least I recognized my name in your README which is not necessary but nice though! I like to see when other people use my template to just play around a bit or to do something funny or even meaningful. Best wishes for your timeline project. (y) – Arvid Aug 24 '17 at 10:12
  • Would you mind creating a complete package? – hola Aug 24 '17 at 18:22
  • 1
    Thanks for this post! If anyone would like to also use this template check this commit from my repo: https://github.com/konserw/warhammer/commit/9033b3ea51673281eeb523d26820ea0530429b54 - it's all modifications needed for pdflatex to actually compile it. I've used this as base for my Warhammer: Age of Sigmar warscreolls cards. – konserw Jun 08 '18 at 11:25
  • @konserw +1 for using GIMP. ;) – Arvid Jun 08 '18 at 12:16
  • What I nice template. I have one question. What should I do if I want the background image to be a link? The cardbackground command should have two arguments (the filename and the link) and then the line \includegraphics[width=\imagewidth cm]{#1} should be something like: \href{#2}{\includegraphics[width=\imagewidth cm]{#1}} but I'm not able to pass two arguments to the cardbackground command. This obviously doesn't work: \draw[cardcorners, cardimage={#1,#2}] \shapeCard;. Thanks in advance! – RAO Jul 12 '20 at 21:45
  • 1
    Solved with this – RAO Jul 15 '20 at 13:54
  • 1
    Compilation returns errors that you can fix by: 1) In cards.tex add \end{center} before \end{document}; 2) Remove shadow from the stripshadow style. – Václav Blažej Nov 09 '22 at 22:47
68

How about this 15-minute mockup (it's far from perfect, but quite ready to be turned into a reusable command):

\documentclass[parskip]{scrartcl}
\usepackage[margin=15mm]{geometry}
\usepackage{tikz}
\usepackage{pifont}

\begin{document}

\pgfmathsetmacro{\cardwidth}{5}
\pgfmathsetmacro{\cardheight}{8}
\newcommand{\stripcolor}{lime}
\pgfmathsetmacro{\stripwidth}{0.7}
\pgfmathsetmacro{\strippadding}{0.1}
\newcommand{\striptext}{INTER ARMA \ding{74}}
\pgfmathsetmacro{\textpadding}{0.3}
\newcommand{\topcaption}{LATIN}
\newcommand{\topcontent}{\textit{''Inter Arma Enim Silent Leges''}}
\newcommand{\bottomcaption}{Inter Arma}
\newcommand{\bottomcontent}{In times of war, the law falls silent.\\ \tikz{\fill[even odd rule] (0,0) circle (0.3) (-0.2,-0.2) rectangle (0.2,0.2);}}
\pgfmathsetmacro{\ruleheight}{0.3}

\begin{tikzpicture}
    \draw[rounded corners=0.2cm] (0,0) rectangle (\cardwidth,\cardheight);
    \fill[\stripcolor,rounded corners=0.1cm] (\strippadding,\strippadding) rectangle (\strippadding+\stripwidth,\cardheight-\strippadding) node[rotate=90,above left,black,font=\LARGE] {\striptext};
    \node[text width=(\cardwidth-\strippadding-\stripwidth-2*\textpadding)*1cm,below right] at (\strippadding+\stripwidth+\textpadding,\cardheight-\textpadding) 
        {\LARGE \topcaption}\\ 
        \topcontent\\
        \tikz{\fill (0,0) rectangle (\cardwidth-\strippadding-\stripwidth-2*\textpadding,\ruleheight);}\\
        {\LARGE \bottomcaption}\\ 
        \bottomcontent\\
    };
\end{tikzpicture}

\end{document}

I used the pifont package for the star symbol (\ding{74}). It has also the other symbols depicted in your photograph, have a look here.

enter image description here


Edit 1: Now with a rotated symbol, and more options are set with keys:

\documentclass[parskip]{scrartcl}
\usepackage[margin=15mm]{geometry}
\usepackage{tikz}
\usepackage{pifont}
\usepackage{graphicx}

\begin{document}

\pgfmathsetmacro{\cardroundingradius}{4mm}
\pgfmathsetmacro{\striproundingradius}{3mm}
\pgfmathsetmacro{\cardwidth}{5}
\pgfmathsetmacro{\cardheight}{8}
\newcommand{\stripcolor}{cyan}
\pgfmathsetmacro{\stripwidth}{1.2}
\pgfmathsetmacro{\strippadding}{0.1}
\newcommand{\striptext}{INTER ARMA \rotatebox[origin=c]{-90}{\ding{49}}}
\pgfmathsetmacro{\textpadding}{0.3}
\newcommand{\topcaption}{LATIN}
\newcommand{\topcontent}{\textit{''Inter Arma Enim Silent Leges''}}
\newcommand{\bottomcaption}{Inter Arma}
\newcommand{\bottomcontent}{In times of war, the law falls silent.\\ \tikz{\fill[even odd rule] (0,0) circle (0.3) (-0.2,-0.2) rectangle (0.2,0.2);}}
\pgfmathsetmacro{\ruleheight}{0.1}
\newcommand{\stripfontsize}{\Huge}
\newcommand{\captionfontsize}{\LARGE}
\newcommand{\textfontsize}{\large}

\begin{tikzpicture}
    \draw[rounded corners=\cardroundingradius] (0,0) rectangle (\cardwidth,\cardheight);
    \fill[\stripcolor,rounded corners=\striproundingradius] (\strippadding,\strippadding) rectangle (\strippadding+\stripwidth,\cardheight-\strippadding) node[rotate=90,above left,black,font=\stripfontsize] {\striptext};
    \node[text width=(\cardwidth-\strippadding-\stripwidth-2*\textpadding)*1cm,below right,inner sep=0] at (\strippadding+\stripwidth+\textpadding,\cardheight-\textpadding) 
    {   {\captionfontsize \topcaption}\\ 
        {\textfontsize \topcontent}\\
        \tikz{\fill (0,0) rectangle (\cardwidth-\strippadding-\stripwidth-2*\textpadding,\ruleheight);}\\
        {\captionfontsize \bottomcaption}\\ 
        {\textfontsize \bottomcontent}\\
    };
\end{tikzpicture}

\end{document}

enter image description here

If the rotated symbol is too big, you may add some "don't size" modifier like \large inside the rotatebox before the \ding{n}.

Tom Bombadil
  • 40,123
  • 4
    +1 for Latin!!11 Feature request: Actually I want to upvote twice. But: Why “Legis”? Is there a philologic edition of Cicero with that reading? Cf. http://en.wikipedia.org/wiki/Inter_arma_enim_silent_leges – Speravir Mar 14 '12 at 00:56
  • No, that's just a spelling mistake. I think I thought about "legislature", so legis felt more natural than leges. – Tom Bombadil Mar 14 '12 at 07:05
  • @TomBombadil thank you! after tweaking it a bit, my only "problem" now is: how can I rotate the symbol? – didest Mar 14 '12 at 09:54
  • @Diego: Go ahead and ask that as a new question. (You can link back to this question.) – doncherry Mar 14 '12 at 12:30
  • @TomBombadil thank you for adding the rotation! – didest Mar 14 '12 at 20:54
  • @doncherry this is the follow up question: http://tex.stackexchange.com/questions/48061/creating-playing-cards-using-tikz-part-2 – didest Mar 14 '12 at 20:54
8

Update on Arvid's template posted above

If one copy pastes everything, a lot of warnings pop up Just hit s+Enter keys to enter scrollmode.

  • A black box is showing in the content area. To solve this comment the following line in tikzcards.tex

    \def\shapeContentArea{(2*\strippadding+\stripwidth,0.5*\cardheight)
      rectangle (\cardwidth+0.2,-0.2)}
    
  • The symbols are not showing up on the top left Add the fourier package in libs.tex

    \usepackage{fourier}
    
Georges
  • 411
8

(Just saw Tom's answer, but since I had begun writing, I'm gonna finish anyways.)

This is a) too long to be a comment and b) an answer without code, perhaps you can translate some of what I'm saying into code yourself or look up how to do it.

Thank you for adding the code, this looks pretty good! I hardly know any TikZ, so I can't tell you what to change in your code, but here are some ideas about the layout:

  • (Not layout-related, actually) Don't use minimal as a document class. Using article instead will get rid of the warnings for you.
  • The real card corners are more rounded, i.e. there's more "cut off".
  • The side ratio of your card is off, they need to be higher (something like width 3 to height 4). An easy way to fix this is increasing the height of the colored box.
  • The text in the colored box actually is right-aligned and bigger; and it is a sans-serif font, just like the other title-y parts.
  • The "Time" above the black bar needs to be bigger.
  • The colored box needs to extend all the way to the top, just as far as it goes to the bottom.
  • After all, adding more text and perhaps a little image will get you closer to the model.

Generally, it's good to break up your problem into tiny parts like these. Then, you can search for something really specific in our question base or in the manual, and ask about it if you couldn't find anything.

doncherry
  • 54,637