summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/luatikz/example/stylea.lua
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/luatikz/example/stylea.lua')
-rw-r--r--Master/texmf-dist/doc/latex/luatikz/example/stylea.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/luatikz/example/stylea.lua b/Master/texmf-dist/doc/latex/luatikz/example/stylea.lua
new file mode 100644
index 00000000000..ef3805cdd02
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/luatikz/example/stylea.lua
@@ -0,0 +1,19 @@
+tikz.within( '*' )
+
+local l1 = line{ p{ 0, 0 }, p{ 3, 1 } }
+local l2 = line{ p{ 0, -1 }, p{ 3, 0 } }
+local l3 = line{ p{ 0, -2 }, p{ 3, -1 } }
+
+draw{ arrow, l1 }
+draw{ double_arrow, dashed, l2 }
+draw{ color = purple, line_width = 2, dotted, l3 }
+
+put{ node{
+ at = l3.pc,
+ anchor = center,
+ align = center,
+ color = purple,
+ rotate = l3.phi * 180 / math.pi,
+ text = 'label for purple line',
+ text_width = '2cm',
+} }