commit 098aa45e30701e0cc27a635f58777a128f5a9c7d Author: Louis Burke Date: Sat May 13 19:23:58 2017 -0400 Initial commit. Includes basic iditacard latex class file. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..83e3b8c --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.pdf +*.aux +*.log +*.swp +*.swo diff --git a/iditacard.cls b/iditacard.cls new file mode 100644 index 0000000..11f929e --- /dev/null +++ b/iditacard.cls @@ -0,0 +1,74 @@ +\LoadClass{standalone} + +\ProvidesClass{iditacard}[2017/05/12 Class for Iditacard cards] + +\RequirePackage{fontspec} +\RequirePackage{xcolor} + +\RequirePackage{tikz} +\usetikzlibrary{positioning,shapes,shadows,arrows,backgrounds,fit} +\RequirePackage{shapepar} +\RequirePackage{microtype} + +\newfontfamily\bebas{Bebas Neue Regular} +\newfontfamily\alegreya{Alegreya} + +\definecolor{energy}{HTML}{003FFF} +\definecolor{health}{HTML}{FF0000} +\definecolor{risk}{HTML}{000000} + +\definecolor{utility}{HTML}{FFFFFF} + +\definecolor{common}{HTML}{000000} +\definecolor{rare}{HTML}{000077} +\definecolor{epic}{HTML}{007700} +\definecolor{legendary}{HTML}{770077} + +\newcommand{\cardtype}[1]{% + \newcommand{\backgroundcolor}{#1} +} +\newcommand{\utility}{utility} + +\newcommand{\rarity}[1]{% + \newcommand{\edgecolor}{#1} +} + +\newcommand{\energy}[1]{% +\fill [energy] (50.0/300.0,950.0/300.0) rectangle (250.0/300.0,850.0/300.0) node [text=black,pos=0.5] {\bf\fontsize{25}{30}\bebas #1}; +} + +\newcommand{\health}[1]{% +\fill [health] (50.0/300.0,800.0/300.0) rectangle (250.0/300.0,700.0/300.0) node [text=black,pos=0.5] {\bf\fontsize{25}{30}\bebas #1}; +} + +\newcommand{\risk}[1]{% +\fill [risk] (50.0/300.0,650.0/300.0) rectangle (250.0/300.0,550.0/300.0) node [text=white,pos=0.5] {\bf\fontsize{25}{30}\bebas #1}; +} + +\newcommand{\name}[1]{% +% add draw to the node to see its box +\node [rectangle, minimum width=1.5in, minimum height=2.0/3.0in, text centered, text width=1.5in, inner sep=0mm] at (475.0/300.0,850.0/300.0) {\bf\fontsize{25}{30}\bebas#1\par}; +} + +\newcommand{\text}[1]{% +% add draw to the node to see its box +\node [rectangle, minimum width=1.833333in, minimum height=200.0/300.0, text centered, text width=1.833333in, inner sep=1mm, anchor=north west] at (100.0/300.0,550.0/300) {\fontsize{16}{16}\bebas#1\par}; +} + +\newcommand{\flava}[1]{% +% add draw to the node to see its box +\node [rectangle, minimum width=1.833333in, minimum height=100.0/300.0, text centered, text width=1.833333in, inner sep=0mm, anchor=north west] at (100.0/300.0,250.0/300.0) {\fontsize{6}{6}\alegreya"#1"\par}; +} + +\newcommand{\type}[1]{% +\node [rectangle, minimum width=1.833333in, minimum height=100.0/300.0, text centered, text width=1.833333in, inner sep=0mm, anchor=north west] at (100.0/300.0,100.0/300.0) {\fontsize{12}{12}\bebas#1\par}; +} + +\newenvironment{card} +{% Begin +\noindent\begin{tikzpicture}[x=1in,y=1in] +\fill [\edgecolor] (0,0) rectangle (2.5,3.5); +\fill [\backgroundcolor] (50.0/300.0,50.0/300.0) rectangle (700.0/300.0,1000.0/300.0); +} +{% End +\end{tikzpicture}} diff --git a/test.tex b/test.tex new file mode 100644 index 0000000..b9fb536 --- /dev/null +++ b/test.tex @@ -0,0 +1,18 @@ +% Compile with XeLaTeX +\documentclass{iditacard} +% Montage with `montage -tile 3x3 -geometry 750x1050+50+25 in* out.pdf` + +\cardtype{utility} +\rarity{legendary} + +\begin{document} +\begin{card} +\energy{1} +\health{2} +\risk{3} +\name{Example Card} +\text{Move 10 myrameters. Shuffle your discard pile into your deck.} +\flava{What doesn't kill you makes you stronger.} +\type{utility} +\end{card} +\end{document}