summaryrefslogtreecommitdiff
path: root/incantesimi.cmd.tex
blob: 75b9c610cd82d279ca662728f2efdaae399073ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
\documentclass[a4paper,10pt,landscape]{article}
\usepackage[empty,cm]{fullpage}
\usepackage[latin1]{inputenc}
\usepackage[italian]{babel}
\usepackage[T1]{fontenc}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{pgfkeys}
 
%%%% fullpage
\setlength{\headheight}{0pt}
\setlength{\headsep}{0pt}
\setlength{\footskip}{0pt}
\setlength{\textwidth}{\paperwidth}
\setlength{\oddsidemargin}{-2.68cm}
\setlength{\evensidemargin}{\oddsidemargin}
\setlength{\textheight}{\paperheight}
\setlength{\topmargin}{0pt}
\addtolength{\topmargin}{-2.68cm}
\addtolength{\oddsidemargin}{0.45cm} % per centrare le etichette
\addtolength{\evensidemargin}{0.45cm} % per centrare le etichette
%%%%
\setlength{\parindent}{0pt}
 
\tikzstyle{carta}=[rectangle,minimum width=4.8cm,minimum height=7cm,outer sep=0,use as bounding box]
\tikzstyle{small label}=[rectangle,text=red,minimum height=0.5cm,font=\tiny,inner sep=1mm]
\tikzstyle{medium label}=[rectangle,text=blue,minimum height=0.5cm,font=\footnotesize,inner sep=1mm]
\tikzstyle{side label}=[rectangle,rotate=90,text=green,minimum height=0.3cm,font=\tiny,inner sep=1mm]
\tikzstyle{center label}=[rectangle,text=magenta,font=\tiny,inner sep=1mm,text width=3.9cm,align=justify]
 
\pgfkeys{/spells/.unknown/.code = {\pgfkeyssetvalue{\pgfkeyscurrentpath/\pgfkeyscurrentname}{#1}}}
\pgfkeyssetvalue{/spells/type}{spell}
\pgfkeyssetvalue{/spells/st}{None}
\pgfkeyssetvalue{/spells/sr}{No}
\pgfkeyssetvalue{/spells/tempo}{1a}
 
\newcommand{\incantesimo}[1]{%
%\begin{scope}[every node/.style={draw},/spells/.cd,#1]
\begin{scope}[/spells/.cd,#1]
\node[carta] (card) {};
 
\node [anchor=north east,side label] (type) at (card.north west)
      {\pgfkeysvalueof{/spells/type}};
\node [anchor=north,medium label] (name) at (card.north)
      {\pgfkeysvalueof{/spells/name}};
\node [anchor=north,small label] (scuola) at (name.south)
      {\pgfkeysvalueof{/spells/scuola}};
\node [anchor=north east,medium label] (lvl) at ($(card.north east) - (0,1cm)$)
      {lvl \pgfkeysvalueof{/spells/level}};
 
\node [anchor=north east,side label] (range) at (type.north west)
      {rng: \pgfkeysvalueof{/spells/range}};
 
\node [anchor=north east,small label] (target) at (lvl.north west)
      {\pgfkeysvalueof{/spells/target}};
 
\node [anchor=south west,small label] (st) at (card.south west)
      {ST:\pgfkeysvalueof{/spells/st}};
 
\node [anchor=south west,small label] (sr) at (st.north west)
      {SR:\pgfkeysvalueof{/spells/sr}};
\node [anchor=south east,small label] (durata) at (card.south east)
      {\pgfkeysvalueof{/spells/durata}};
\node [anchor=south east,small label] (tempo) at (durata.north east)
      {\pgfkeysvalueof{/spells/tempo}};
 
\node [anchor=south east,side label] (ref) at (lvl.south east)
      {\pgfkeysvalueof{/spells/ref}};
 
\node [anchor=north west,center label] (components) at (range.south |- target.south)
      {\pgfkeysvalueof{/spells/components}};
 
\node [anchor=north west,center label] (description) at ($(components.south west) - (0,1mm)$)
      {\pgfkeysvalueof{/spells/descrizione}};
 
\node [anchor=north west,center label] (notes) at ($(description.south west) - (0,1mm)$)
      {\pgfkeysvalueof{/spells/note}};
 
\end{scope}%
}