From 1635574bd2aa87d8905acf345214d0a6ee0d4d91 Mon Sep 17 00:00:00 2001 From: Hanson Char Date: Mon, 24 Jun 2024 19:35:27 -0700 Subject: [PATCH] Provide background color on test images similar to the one in the manual --- doc/generic/pgf/lib/utils.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/doc/generic/pgf/lib/utils.lua b/doc/generic/pgf/lib/utils.lua index 7d8898e32..df7dbd089 100644 --- a/doc/generic/pgf/lib/utils.lua +++ b/doc/generic/pgf/lib/utils.lua @@ -183,8 +183,12 @@ function u.walk(sourcedir, targetdir, finder) local newname = finder.get_name() .. "-" .. name .. "-" .. n .. ".tex" local examplefile = io.open(targetdir .. newname, "w") - examplefile:write "\\documentclass{standalone}\n" - examplefile:write "\\usepackage{fp,pgf,tikz,xcolor}\n" + examplefile:write [[ +\documentclass{standalone} +\usepackage{fp,pgf,tikz,xcolor} +\definecolor{bgcolor}{RGB}{245, 245, 204} +\pagecolor{bgcolor} +]] examplefile:write(options["preamble"] and options["preamble"] .. "\n" or "") examplefile:write "\\begin{document}\n"