summaryrefslogtreecommitdiff
path: root/inventario.cmd.tex
diff options
context:
space:
mode:
Diffstat (limited to 'inventario.cmd.tex')
-rw-r--r--inventario.cmd.tex94
1 files changed, 94 insertions, 0 deletions
diff --git a/inventario.cmd.tex b/inventario.cmd.tex
new file mode 100644
index 0000000..0a599da
--- /dev/null
+++ b/inventario.cmd.tex
@@ -0,0 +1,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}}