summaryrefslogtreecommitdiff
path: root/inventario.cmd.tex
blob: 0a599da296b65acc2d25ef570013e113c35b5180 (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
\documentclass[a4paper,10pt]{article}
\usepackage[empty,cm]{fullpage}
\usepackage[latin1]{inputenc}
\usepackage[italian]{babel}
\usepackage[T1]{fontenc}
\usepackage{pslatex}
\usepackage{tikz}
\usetikzlibrary{backgrounds}
\usetikzlibrary{calc}
\usepackage{pgffor}
 
%%%% 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}
%%%%
\setlength{\parindent}{0pt}
 
\pgfdeclareimage[width=1mm]{empty}{empty}
 
\newcommand{\DDitemhoriz}[7]{%
\begin{scope}
 
\node [draw,ultra thin,dotted,rectangle,minimum height=4.8cm,minimum width=7cm,outer sep=0,use as bounding box] (card) {};
 
\node [anchor=north west,rotate=90] (itemtype) at (node cs:name=card,anchor=south west)
      {#2};
 
\node [anchor=north east,rotate=90] (itemowner) at (node cs:name=card,anchor=north west)
      {#3};
 
\node [anchor=south west,rotate=90] (itemweight) at (node cs:name=card,anchor=south east)
      {#4};
 
\node [anchor=south east,rotate=90] (itemprice) at (node cs:name=card,anchor=north east)
      {#5};
 
\node [anchor=north,inner sep=1mm,text width=4.6cm,rotate=90,text centered]
      (itemname)
      at ($0.5*(node cs:name=itemtype,anchor=south west)+0.5*(node cs:name=itemowner,anchor=south east)$)
      {#6};
 
\node [anchor=north,rotate=90] (itemimage)
      at (node cs:name=itemname,anchor=south)
      {\pgfuseimage{#1}};
 
\node [anchor=south,inner sep=1mm,text width=4.6cm,rotate=90]
      (itemdesc)
      at ($0.5*(node cs:name=itemweight,anchor=north west)+0.5*(node cs:name=itemprice,anchor=north east)$)
      {#7};
 
\end{scope}%
}
 
\newcommand{\DDitem}[7]{\DDitemhoriz{#1}{#2}{#3}{#4}{#5}{#6}{#7}}
 
% proprietari
\newcommand{\group}{Gruppo}
 
% dimensioni
\newcommand{\tinyitem}{Tiny}
\newcommand{\smallitem}{Small}
\newcommand{\mediumitem}{Medium}
\newcommand{\largeitem}{Large}
\newcommand{\hugeitem}{Huge}
 
% prezzi
\newcommand{\mo}[1]{#1 MO}
 
% pesi
\newcommand{\lb}[1]{#1lb}
 
\newcommand{\cariche}[1]{\begin{tikzpicture}[x=0.4cm,y=-0.4cm]
\pgfmathsetmacro{\carichelines}{floor(#1/10)}
\pgfmathsetmacro{\caricherest}{mod(#1,10)}
\ifnum 0<\carichelines
\foreach \line in {1,...,\carichelines} {
 \foreach \col in {0,...,9}
  \draw (\col,\line - 1) circle (0.2cm);
}
\fi
\ifnum 0<\caricherest
\pgfmathsetmacro{\carichelines}{\carichelines + 1}%
\foreach \col in {1,...,\caricherest} {
  \draw (\col - 1,\carichelines) circle (0.2cm);
}
\fi
\end{tikzpicture}}