I have an module that I want to manage with l3build. Unpacking a docstrip file generates a tex file. l3build doc
typesets that generated tex file. But I can't figure out how to configure build.lua
to enable that process to see any images that should be included.
My MWE is four files (all in a Github repo for ease)
file tree
├── build.lua
├── foo.dtx
├── foo.ins
└── support
└── duck.png
foo.dtx
%<*foo>
\documentclass{article}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\lipsum[1]
\includegraphics[
width=\textwidth,
%<bar>angle=180,
]{duck}
\end{document}
%</foo>
foo.ins
\input docstrip.tex
\askforoverwritefalse
\generate{\file{bar.tex}{\from{\jobname.dtx}{foo,bar}}}
\endbatchfile
So bar.tex
has one extra line, which should rotate the image 180
degrees.
build.lua
module = "foo"
typesetsuppfiles = {"duck.png"}
typesetfiles = {"foo.dtx","bar.tex"}
duck.png
Command:
l3build doc foo
duck.png
is copied intotypesetdir
foo.dtx
is typeset intypesetdir
(I think)- result: success.
foo.pdf
is moved intomaindir
.
Command:
l3build doc bar
bar.tex
is unpacked intounpackdir
tex
is run onbar.tex
inunpackdir
- result: failure because
duck.png
is not found.
duck.png
insupport/
.typesetfiles = {"*.dtx"}
.l3build
to address this.