summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/luatex/lua-visual-debug/lua-visual-debug.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-02-28 00:34:17 +0000
committerKarl Berry <karl@freefriends.org>2012-02-28 00:34:17 +0000
commit3896a3ce963e514325035018b02583376d23aa6c (patch)
treeb846e8081e3808d61fe8cc83f7c52da20cd1b473 /Master/texmf-dist/tex/luatex/lua-visual-debug/lua-visual-debug.sty
parent1c9cfa88a38e47a75fd3a9d1cb19d81330927028 (diff)
lua-visual-debug generic (24feb12)
git-svn-id: svn://tug.org/texlive/trunk@25517 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/luatex/lua-visual-debug/lua-visual-debug.sty')
-rw-r--r--Master/texmf-dist/tex/luatex/lua-visual-debug/lua-visual-debug.sty35
1 files changed, 35 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/luatex/lua-visual-debug/lua-visual-debug.sty b/Master/texmf-dist/tex/luatex/lua-visual-debug/lua-visual-debug.sty
new file mode 100644
index 00000000000..72839e48d93
--- /dev/null
+++ b/Master/texmf-dist/tex/luatex/lua-visual-debug/lua-visual-debug.sty
@@ -0,0 +1,35 @@
+% Version: 0.2
+% see lua file for copyright information (MIT License)
+
+\expandafter\ifx\csname ProvidesPackage\endcsname\relax
+ \input ifluatex.sty\relax
+\else
+ \NeedsTeXFormat{LaTeX2e}
+ \ProvidesPackage{lua-visual-debug}[2012/02/24 v0.2 Visual debugging in LuaLaTeX (PGU)]
+ \RequirePackage{ifluatex}
+\fi
+
+\def\dothings{%
+ \directlua{ lvd = require("lua-visual-debug")}%
+ \AtBeginShipout {\directlua{lvd.show_page_elements(tex.box["AtBeginShipoutBox"])}}%
+}
+
+\expandafter\ifx\csname ProvidesPackage\endcsname\relax
+ \ifluatex
+ \input atbegshi.sty\relax
+ \dothings
+ \AtBeginShipoutInit
+ \else
+ \message{Warning: lua-visual-debug only works with LuaTeX (plain and LaTeX format)}
+ \fi
+\else
+ \ifluatex
+ \RequirePackage{luatexbase,atbegshi}
+ \dothings
+ \else
+ \PackageWarning{lua-visual-debug}{You are using this package without LuaTeX. This is not supported, so you don't get any visual debugging.}
+ \fi
+\fi
+
+
+