Is there any way to use lua functions after the pdf is generated or to force generation of the pdf at some point in the tex file and still use lua?
Basically I need to modify the pdf and do this from the tex file.
One way I understand what I want to do would be the hypothetical code
\begin{document}
...
\end{document} % Assume this statement would cause the pdf to be generated and written to disk
\directlua{myfunc()}
where myfunc now could access the most recent version of the pdf
Alternatively is there a way to generate the pdf of an \include
even if it is not a complete tex document(this is effectively what I'm trying to achieve)?
e.g., if I do
\include{mypart}
it will generate mypart.pdf which is just the pages of the mypart.tex and not the complete document.
:-)