% $Id: test-graphonly-ltx.tex 1 2021-05-15 22:12:05Z reinhard $
% Copyright (C) 2020 Reinhard Kotucha <reinhard.kotucha@web.de>
%
% You may freely use, modify, and/or distribute this file.
\documentclass{minimal}
\usepackage{luagraphlib}
\luagraphicfile{antpattern.lua}
\usepackage{fontspec}
\setmainfont[Ligatures=TeX,
SmallCapsFont={TeX Gyre Pagella},
SmallCapsFeatures={Letters=SmallCaps}]{TeX Gyre Pagella}
\setsansfont[Scale=MatchLowercase,BoldFont={LM Sans10 Bold}]{LM Sans10 Regular}
\setmonofont[Scale=MatchLowercase]{lmmonolt10-bold.otf}
\canvasrule=0pt
\pdfextension info {
/Author (Reinhard Kotucha)
/Title (SM701 patterns)
/Creator (LuaTeX with luagraphlib)
/Subject (Sinclair SM701 (EXXXX) radiation patterns)
}
\parindent=0pt
\pdfvariable horigin=0pt
\pdfvariable vorigin=0pt
\hoffset=0pt
\voffset=0pt
\pagewidth=9.5cm
\pageheight=\pagewidth
\directlua{default = {
antpattern = {
gainref = 'dipole',
offset = 0,
lambda = function (a) return a[2], a[1] end,
bgcolor = {1, 1, .9},
fillcolor = {0.9, 0.9, 1},
strokecolor = {0.561, 0.078, 0.008},
}
}
}
\begin{document}
\begin{canvas}(\pagewidth, \pageheight)
\at\center{\luagraphic{antpattern('data/ant/sm701_915h.data',
function (a) return a[2], a[1] end )}}
\end{canvas}
\end{document}
% Local Variables:
% mode: TeX
% TeX-master: t
% TeX-engine: luatex
% indent-tabs-mode: nil
% coding: utf-8-unix
% End:
% vim:set tabstop=2 expandtab: