Authors and Instructional Designers,
I have automatic screenshotting of interactive applications working,
so you can populate the print representations in an automated way.
Here is a sketch, see the sample article to reverse-engineer.
If you already have an interactive/@preview then no automatic
screenshot will be attempted for that interactive (since you have
a hand-crafted one already).
Thanks for your patience waiting for this one - it was not easy.
Rob
* Install node.js/npm if you do not have it already.
* "pageres" is the main tool here:
https://github.com/sindresorhus/pageres-cli
Install (as root?) with: npm install --global pageres-cli
I could not get a global install to succeed, so have a user-level
install to use. PhantomJS is a headless web browser, I ended up
getting it via the Ubuntu package manager in the course of sorting
out global v. user.
Then I needed to add the full path on the executable in the
mbx.cfg configuration file.
* You will be happier in the long run if all your "interactive"
have author-specified @xml:id, since these can change and will
also be used to name the screenshots.
* Edit/add docinfo/html/baseurl/@href to be the URL of the directory
your HTML files live in on the server. No trailing slash.
* Rebuild HTML and upload to the server.
* Use something like
/path/to/script/mbx -vv -c preview -f png -d . /path/to/my-book.xml
** I think the -f is ignored.
** pageres writes into the current directory. Should be handled,
but you might want to set the default directory someplace in /tmp
** there is a 5-second delay to let each interactive load,
not yet configurable
* Copy *.png produced to your "images" directory (locally, not on server)
* Build LaTeX to see new images in place.