ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Thomas A. Schmitz via ntg-context" <ntg-context@ntg.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Cc: "Thomas A. Schmitz" <thomas.schmitz@uni-bonn.de>
Subject: Re: Code document and simpleslides and create in one go the document with simpleslides added
Date: Sat, 31 Jul 2021 16:19:07 +0200	[thread overview]
Message-ID: <c1fbf402-d760-251b-2470-19e8899de9ac@uni-bonn.de> (raw)
In-Reply-To: <CAPtmdbN4Kg9-h8JDSR6iuwYuMXh1z_7ggrjbj-dCHS6qOzrAeA@mail.gmail.com>


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
___________________________________________________________________________________

      parent reply	other threads:[~2021-07-31 14:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-31 13:27 Jeroen via ntg-context
2021-07-31 14:00 ` Henning Hraban Ramm via ntg-context
2021-07-31 14:06 ` Pablo Rodriguez via ntg-context
2021-07-31 14:22   ` Thomas A. Schmitz via ntg-context
2021-07-31 20:23     ` Jeroen via ntg-context
2021-08-01 11:56       ` Hans Hagen via ntg-context
2021-08-01 13:02         ` Wolfgang Schuster via ntg-context
2021-08-01 13:44           ` Hans Hagen via ntg-context
2021-08-01 16:03       ` Pablo Rodriguez via ntg-context
2021-08-06 17:02         ` Jeroen via ntg-context
2021-07-31 14:19 ` Thomas A. Schmitz via ntg-context [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c1fbf402-d760-251b-2470-19e8899de9ac@uni-bonn.de \
    --to=ntg-context@ntg.nl \
    --cc=thomas.schmitz@uni-bonn.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).