On 7/31/21 3:27 PM, Jeroen via ntg-context wrote:
Is there an easy way to write a Context document and also code simpleslides
in the same document so that the simpleslides are automatically added to
the document as for example an appendix? Ie one tex document with Context
code, perhaps with some \input and something like a two-pass job. I was
thinking if the simpleslides could be saved as a number of png images and
then with the recurse add them to the document with placefigure.
"Easy" is an ambiguous term... I can tell you how I do this (I use xml,
but with a bit of code, this can be adapted to TeX documents): I have
the code for the slides and my own comments in the same documents; I
pass a --mode to the compilation to filter and select content. When I
have my presentation as a file "presentation.pdf," I save it and then
have the slides included automatically via a counter, like this:
function xml.functions.combined_slide(t)
i = i + 1
local textwidth = tex.dimen.textwidth
context.page()
context.framed( { width=number.todimen(textwidth), frame="off",
align="middle", height="10cm" },
function() context.externalfigure( { "presentation.pdf" }, { page=i,
width="13cm" } ) end )
context.blank { "line" }
end
So, as others have said: no need to convert to png. Setting up a
workflow takes some time and thought, but once it's in place, it works
very well; I have now used my xml-based workflow for 12 years or so, for
all my university lectures and talks.
Thomas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________