From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/89190 Path: news.gmane.org!not-for-mail From: =?iso-8859-1?Q?Pierre-Fran=E7ois_Bonnefoi?= Newsgroups: gmane.comp.tex.context Subject: Re: ConTeXt gobble my mind Date: Sun, 9 Nov 2014 14:34:01 +0100 Message-ID: References: <9B029B7D-7988-401E-8C9E-E97E2367F464@gmail.com> <10473267-C1C4-49CF-B26B-78679D53C5CB@unilim.fr> <545CAF44.2070908@wxs.nl> <114DDC9F-21C9-4B72-8F07-D71F3428C54F@unilim.fr> <545CE270.5090700@wxs.nl> <295DD760-4376-49B6-AA16-9E643D0B11A5@unilim.fr> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: multipart/mixed; boundary="===============1937212592==" X-Trace: ger.gmane.org 1415540092 5184 80.91.229.3 (9 Nov 2014 13:34:52 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 9 Nov 2014 13:34:52 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Nov 09 14:34:47 2014 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([5.39.185.229]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XnSdj-0006aK-2H for gctc-ntg-context-518@m.gmane.org; Sun, 09 Nov 2014 14:34:47 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 6D719101E7 for ; Sun, 9 Nov 2014 14:34:46 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id YTnaBcamqVyI for ; Sun, 9 Nov 2014 14:34:45 +0100 (CET) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 22F8A10231 for ; Sun, 9 Nov 2014 14:34:14 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id F0442101E7 for ; Sun, 9 Nov 2014 14:34:09 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ljmuW_kg9Fx4 for ; Sun, 9 Nov 2014 14:34:08 +0100 (CET) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by balder.ntg.nl (Postfix) with ESMTP id 9FF3C101E3 for ; Sun, 9 Nov 2014 14:34:08 +0100 (CET) Original-Received: from smtp.unilim.fr (mail.unilim.fr [164.81.1.78]) by filter1-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id sA9DY73E020533 for ; Sun, 9 Nov 2014 14:34:07 +0100 Original-Received: from [192.168.0.100] (home.libpfb.so [109.190.20.216]) (authenticated bits=0) by smtp.unilim.fr (8.13.1/8.13.1) with ESMTP id sA9DY2tt010175 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Sun, 9 Nov 2014 14:34:04 +0100 In-Reply-To: X-Mailer: Apple Mail (2.1878.6) X-Univ-Limoges-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.3 (smtp.unilim.fr [164.81.1.45]); Sun, 09 Nov 2014 14:34:05 +0100 (CET) X-Univ-Limoges-MD: Pas de virus trouve X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 X-Scanned-By: MIMEDefang 2.67 on 164.81.1.45 X-Univ-Limoges-MailScanner-Information: Serveur Anti-virus Please contact postmaster@unilim.fr for more information X-Univ-Limoges-MailScanner-ID: sA9DY2tt010175 X-Univ-Limoges-MailScanner: Found to be clean X-Univ-Limoges-MailScanner-Envelope-From: bonnefoi@unilim.fr X-Bayes-Prob: 0.0001 (Score 0, tokens from: ntg-context@ntg.nl, base:default, @@RPTN) X-CanIt-Geo: ip=164.81.1.78; country=FR; region=Haute-Vienne; city=Limoges; latitude=45.8315; longitude=1.2578; http://maps.google.com/maps?q=45.8315,1.2578&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0RNdpy7wM - e74a70faf621 - 20141109 (trained as not-spam) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:89190 Archived-At: --===============1937212592== Content-Type: multipart/alternative; boundary="Apple-Mail=_87EEE566-55BF-4E03-8092-A6EC83D8C514" --Apple-Mail=_87EEE566-55BF-4E03-8092-A6EC83D8C514 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Hello Wolfgang, thank you very much for all these solutions. Do you have any recommendations about using one over the others ? Currently, the conditional selection of my slides works pretty good : I = have created the following macros : \courseSlideList[resavi][1-10,20-30,34,37-40], this macro allows me to = activate all the slides given by their number in a list defined in the = current file ; \includeSelectionFrom{adressage_groupe_utf8}{1-100} this macro allows = me to include some slides given by a list of number from an external = file ; \skipSlide that can suppress the process of the following slide. Of course, all of theses macros work beautifully recursively with files = using them (the numbering macro work nicely on currently defined slides = as included slides). This is why I use only ConTeXt for all my work ! Cheers ! Pierre-Fran=E7ois. On 08 Nov 2014, at 12:08, Wolfgang Schuster = wrote: >=20 >> Am 08.11.2014 um 00:00 schrieb Pierre-Fran=E7ois Bonnefoi = : >>=20 >> Just before going to bed, I've found a solution with all your help = and the help of Taco Hoekwater through the ntg mail archive : >>=20 >> \def\startSlide% >> = {\def\stopSlide{\checkSlide\doif{\getvariable{temp}{publish}}{yes}{\page\g= etbuffer[Slide]}}% >> \dostartbuffer[Slide][startSlide][stopSlide]} >>=20 >> Let me know if it's my philosopher's stone... >> I've tried it and it works so far. >>=20 >> No more ugly gobbling, my mind is free. >=20 > Below are two other methods. >=20 >=20 > Method 1 > =3D=3D=3D=3D=3D=3D=3D >=20 > \newconditional\SkipSlide \setfalse\SkipSlide >=20 > \definebuffer[Slide] >=20 > \def\stopSlide > {\ifconditional\SkipSlide \else > \page \getbuffer[\thedefinedbuffer{Slide}]% > \fi > \setfalse\SkipSlide} >=20 > \starttext >=20 > \startSlide > First Slide > \stopSlide >=20 > \settrue\SkipSlide > \startSlide > Second Slide > \stopSlide >=20 > \startSlide > Third Slide > \stopSlide >=20 > \stoptext >=20 >=20 > Method 2 > =3D=3D=3D=3D=3D=3D=3D >=20 > \def\startSlide > {\dosingleempty\dostartSlide} >=20 > \def\dostartSlide[#1]% > {\doifelse{#1}{-} > {\let\stopSlide\stopSlideNop} > {\let\stopSlide\stopSlideYes}% > \grabbufferdata[Slide][startSlide][stopSlide]} >=20 > \let\stopSlideNop\relax >=20 > \def\stopSlideYes > {\page > \getbuffer[Slide]} >=20 > \starttext >=20 > \startSlide > First Slide > \stopSlide >=20 > \startSlide[-] > Second Slide > \stopSlide >=20 > \startSlide > Third Slide > \stopSlide >=20 > \stoptext >=20 >=20 > Wolfgang >=20 > = __________________________________________________________________________= _________ > If your question is of interest to others as well, please add an entry = to the Wiki! >=20 > 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 > = __________________________________________________________________________= _________ --=20 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. --Apple-Mail=_87EEE566-55BF-4E03-8092-A6EC83D8C514 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=iso-8859-1 Hello = Wolfgang,

thank you very much for all these = solutions.
Do you have any recommendations about using one = over the others ?

Currently, the conditional = selection of my slides works pretty good : I have created the following = macros :
 \courseSlideList[resavi][1-10,20-30,34,37-40], = this macro allows me to activate all the slides given by their number in = a list defined in the current file = ;
 \includeSelectionFrom{adressage_groupe_utf8}{1-100} = this macro allows me to include some slides given by a list of number = from an external file ;
 \skipSlide that can suppress the = process of the following slide.

Of course, all = of theses macros work beautifully recursively with files using them (the = numbering macro work nicely on currently defined slides as included = slides).

This is why I use only ConTeXt for all = my work !

Cheers = !
Pierre-Fran=E7ois.


On = 08 Nov 2014, at 12:08, Wolfgang Schuster <schuster.wolfgang@gmail.com> wrote:


Am 08.11.2014 um 00:00 = schrieb Pierre-Fran=E7ois Bonnefoi <bonnefoi@unilim.fr>:

Just= before going to bed, I've found a solution with all your help and the = help of Taco Hoekwater through the ntg mail archive = :

\def\startSlide%
{\def\stopSlide{\checkSlide\doif{\getvariable= {temp}{publish}}{yes}{\page\getbuffer[Slide]}}%
\dostartbuffer[Slide][s= tartSlide][stopSlide]}

Let me know if it's my philosopher's = stone...
I've tried it and it works so far.

No more ugly = gobbling, my mind is free.

Below are two other = methods.


Method 1
=3D=3D=3D=3D=3D=3D=3D

\newcondition= al\SkipSlide = \setfalse\SkipSlide

\definebuffer[Slide]

\def\stopSlide
=  {\ifconditional\SkipSlide \else
\page = \getbuffer[\thedefinedbuffer{Slide}]%
  \fi
=   \setfalse\SkipSlide}

\starttext

\startSlide
F= irst = Slide
\stopSlide

\settrue\SkipSlide
\startSlide
Second = Slide
\stopSlide

\startSlide
Third = Slide
\stopSlide

\stoptext


Method = 2
=3D=3D=3D=3D=3D=3D=3D

\def\startSlide
=  {\dosingleempty\dostartSlide}

\def\dostartSlide[#1]%
=  {\doifelse{#1}{-}
=     {\let\stopSlide\stopSlideNop}
=     {\let\stopSlide\stopSlideYes}%
=   \grabbufferdata[Slide][startSlide][stopSlide]}

\let\sto= pSlideNop\relax

\def\stopSlideYes
 {\page
=   \getbuffer[Slide]}

\starttext

\startSlide
Fir= st Slide
\stopSlide

\startSlide[-]
Second = Slide
\stopSlide

\startSlide
Third = Slide
\stopSlide

\stoptext


Wolfgang

__________= _________________________________________________________________________<= br>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.sup= elec.fr/projects/contextrev/
wiki     : http://contextgarden.net
________= __________________________________________________________________________= _

Bonnefoi Pierre-Francois     =            |    E-mail : bonnefoi@unilim.fr http://libpfb.so/
<= font class=3D"Apple-style-span" face=3D"Courier" size=3D"3">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.