What commands with the embedfile package will embed an entire tree of source files into the output from pdfLateX?
The sort of tree, in very simplified form, that I have is as follows, where (d) denotes a directory:
mainsourefile.tex
/ | \
preamble (d) main (d) one.bib,two.bib biblatex.cfg, ...
/ | \
chap1 (d) chap2 (d) chap3 (d)
/ \ : :
sec11.tex sec12.tex
That is, aside from the main .tex file there are individual files in the same top-level directory as mainsourcefile.tex. That top-level directory has several subdirectories (for preamble, frontmatter, mainmatter, backmatter). And the mainmatter subdirectory in turn has subdirectories for individual chapters, each such subdirectory consisting of multiple .tex files (one for each section of the chapter).
The skeleton of the tree structure is also indicated by the form of mainsourcefile.tex:
\documentclass{memoir}
\input{preamble/preamble}
\makeindex
\begin{document}
\include{front/frontmatter}
% frontmatter.tex inputs several files
\tableofcontents
\mainmater
\input{main/mainmatter}
% mainmatter.tex includes main/chap1/chap1.tex;
% chap1.tex inputs sec11.tex, sec12.tex. etc.
% mainmatter.tex includes main/chap2/chap2.tex; etc.
\backmatter
\include{back/backmatter}
% backmatter.tex inputes back/indexes.tex, back/bibs.tex.
\end{document}
In the documentation for embedfile I could not find sufficient examples guiding me how to embed such a tree of files.
snapshotpackage to produce a list of all files used (even though it does nothing likeembedfile. – murray Jun 18 '17 at 14:29\newcommand{\includeFile}[1]{\input{#1}\embedfile{#1}}or use renewcommand – Capt_ May 11 '21 at 10:17