From: "Pierre-François Bonnefoi" <bonnefoi@unilim.fr>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: ConTeXt gobble my mind
Date: Fri, 7 Nov 2014 11:59:51 +0100 [thread overview]
Message-ID: <EA6DDBEE-E20D-4213-B8C7-57959EEC81D8@unilim.fr> (raw)
In-Reply-To: <9867F244-A5E5-4D2D-BC87-837AA8F2BBD6@web.de>
[-- Attachment #1.1: Type: text/plain, Size: 2708 bytes --]
Hello Keith and Luigi,
On 06 Nov 2014, at 17:57, Keith J. Schultz <keithjschultz@web.de> wrote:
> Hi Pierre,
>
> I think you are approaching your problem from the wrong direction!
>
> The way I understand your problem is that you have certain criteria in your slides
> when encountered decides whether it should be output or not.
Yes.
>
> If this is the case then what you have is a classical parsing problem.
>
> That is you start parsing the content of the slide, until you find the criteria
> that excludes it or come to the end of the slide.
> If you find the criteria then you just continue reading to the end of the slide and not output it,
> otherwise send the gathered content to be output.
>
Yes, beautifully expressed.
> That would be the most elegant way and can be used for dynamic content.
>
Yes, but my current solution brakes on crossing the path of C code : I use \gobbleinput that is defined as (according to some documentation) :
\def\gobbleuntil#1%
{\long\def\next##1#1{}\next}
As I understand this code, the "goblling" is made as enclosing the text that you dan't want to be added to the output as the body of a function.
If the text contains some restricted characters as the "%", this proposition brakes.
> Now, If you already know if the level is know a head of time the slides can be given a level and you can use
> a custom mode that only outputs the slides to this level.
>
This is what I've made : I express a list of numbered slides and check if each slide has to be outputted or not into the final document.
> Another way is to build a database or table which is processed from which to choose your slides!
>
This is the path I've followed so far with success for some of my lectures.
But, when I've applied the same process to slides containing C code, this process brakes.
I've tried yesterday evening to modify my slide definition to use the solution provided by Luigi, but I've failed.
> Or define a start/stop command that has a user level parameter and use mode to decide output or not!
> this approach should not interfere with other macros you are using.
>
How do you make this ?
Please save my remaining hairs on my head !
> Hope this helps
>
> regards
> Keith.
>
Thank you very much for sparing some time to express so efficiently my problem.
best regards,
Pierre-François.
--
Bonnefoi Pierre-Francois | E-mail : bonnefoi@unilim.fr http://libpfb.so/
Universite de Limoges, Laboratoire XLIM | Tel : 06 28 18 03 38
123 av Albert Thomas | Mrs. Peel, we're needed...
87060 Limoges CEDEX - FRANCE | The Avengers.
[-- Attachment #1.2: Type: text/html, Size: 13124 bytes --]
[-- Attachment #2: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
prev parent reply other threads:[~2014-11-07 10:59 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-06 9:35 Pierre-François Bonnefoi
2014-11-06 11:16 ` luigi scarso
2014-11-06 12:36 ` Pierre-François Bonnefoi
2014-11-06 12:46 ` luigi scarso
2014-11-06 13:00 ` Herbert Voss
2014-11-06 13:30 ` Pierre-François Bonnefoi
2014-11-06 12:12 ` Wolfgang Schuster
2014-11-06 12:59 ` Pierre-François Bonnefoi
2014-11-06 13:12 ` luigi scarso
2014-11-06 13:29 ` Pierre-François Bonnefoi
2014-11-07 11:38 ` Hans Hagen
2014-11-07 13:26 ` Pierre-François Bonnefoi
2014-11-07 15:17 ` Hans Hagen
2014-11-07 23:00 ` Pierre-François Bonnefoi
2014-11-08 11:08 ` Wolfgang Schuster
2014-11-09 13:34 ` Pierre-François Bonnefoi
2014-11-09 14:17 ` Hans Hagen
2014-11-06 16:57 ` Keith J. Schultz
2014-11-07 10:59 ` Pierre-François Bonnefoi [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=EA6DDBEE-E20D-4213-B8C7-57959EEC81D8@unilim.fr \
--to=bonnefoi@unilim.fr \
--cc=ntg-context@ntg.nl \
/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).