summaryrefslogtreecommitdiff
path: root/stuff
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2011-10-23 13:06:04 +0100
committerdakkar <dakkar@thenautilus.net>2011-10-23 13:06:04 +0100
commit0465d36acc48f9ecd0604ed23fce8b2ba2e4343b (patch)
tree6062544e622f77d621bca220b904017520624efd /stuff
parentscript per creare fogli di incantesimi (diff)
downloadinventario-0465d36acc48f9ecd0604ed23fce8b2ba2e4343b.tar.gz
inventario-0465d36acc48f9ecd0604ed23fce8b2ba2e4343b.tar.bz2
inventario-0465d36acc48f9ecd0604ed23fce8b2ba2e4343b.zip
spostiamo roba
Diffstat (limited to 'stuff')
-rw-r--r--stuff/tabella.pl31
-rw-r--r--stuff/test.tex21
2 files changed, 52 insertions, 0 deletions
diff --git a/stuff/tabella.pl b/stuff/tabella.pl
new file mode 100644
index 0000000..93c1123
--- /dev/null
+++ b/stuff/tabella.pl
@@ -0,0 +1,31 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+
+my @lineterm=qw(& & \\\\);
+my $state=0;my $mline=0;
+while (my $line=<>) {
+ if ($state==0) {
+ if ($line=~/matrix/) {$state=1};
+ }
+ if ($state==1) {
+ if ($line=~/{/) {$state=2};
+ }
+ if ($line=~/\\end/) {$state=3}
+ if ($state==2) {
+ $line=~s[}\s*(&|\\\\|)\s*(%.*)?$][} $lineterm[$mline%3] $2\n]
+ and ++$mline;
+ }
+ print $line;
+ if ($mline==18) {
+ $mline=0;
+ print <<'EOM';
+};
+\end{tikzpicture}
+
+\begin{tikzpicture}
+\matrix
+{
+EOM
+ }
+}
diff --git a/stuff/test.tex b/stuff/test.tex
new file mode 100644
index 0000000..eb319dd
--- /dev/null
+++ b/stuff/test.tex
@@ -0,0 +1,21 @@
+\documentclass[a4paper,10pt]{article}
+\usepackage[latin1]{inputenc}
+\usepackage[italian]{babel}
+\usepackage[T1]{fontenc}
+\usepackage{pslatex}
+\usepackage{tikz}
+\usepackage{pgfkeys}
+
+\pgfkeyssetvalue{/dnd/item/acp}{0}
+\pgfkeyssetvalue{/dnd/item/name}{test}
+\newcommand{\Item}[1]{%
+\pgfqkeys{/dnd/item}{acp=0,name=test,#1}%
+Name: \pgfkeysvalueof{/dnd/item/name}
+ACP: \pgfkeysvalueof{/dnd/item/acp}
+}
+
+\begin{document}
+\Item{name=prova}
+
+\Item{name=altro,acp=12}
+\end{document}