blob: 7479e0fc6b91166352c1c29ac38272bfea8b27fb (
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
|
% Version: 0.3
% 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.3 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{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
|