From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/101161 Path: news.gmane.org!.POSTED!not-for-mail From: Wolfgang Schuster Newsgroups: gmane.comp.tex.context Subject: Re: Parallel output of source data Date: Tue, 03 Jul 2018 09:07:23 +0200 Message-ID: <5B3B20AB.5080409@gmail.com> References: <5841C5D8.4090201@gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7405217440992741586==" X-Trace: blaine.gmane.org 1530601559 17937 195.159.176.226 (3 Jul 2018 07:05:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 3 Jul 2018 07:05:59 +0000 (UTC) User-Agent: Postbox 5.0.25 (Macintosh/20180328) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Tue Jul 03 09:05:54 2018 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1faFNp-0004Z0-2H for gctc-ntg-context-518@m.gmane.org; Tue, 03 Jul 2018 09:05:53 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 3B2A93C332; Tue, 3 Jul 2018 09:07:39 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QLbNDqbezCoz; Tue, 3 Jul 2018 09:07:38 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id 7CFA33C335; Tue, 3 Jul 2018 09:07:38 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 057113C333 for ; Tue, 3 Jul 2018 09:07:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ij1Jydu8sWGl for ; Tue, 3 Jul 2018 09:07:36 +0200 (CEST) Original-Received: from mail-wr0-f182.google.com (mail-wr0-f182.google.com [209.85.128.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 3614A3C332 for ; Tue, 3 Jul 2018 09:07:26 +0200 (CEST) Original-Received: by mail-wr0-f182.google.com with SMTP id j33-v6so755170wrj.5 for ; Tue, 03 Jul 2018 00:07:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to; bh=2/ng5eVzUzdYOeOR5U1C+63zdcBjrnnQhFde4qwi0E8=; b=Ua+SQsmvynp3kqX47M5vFa+73kgGbXkLHW2MX71+oLBtmSoVDkQl8IHvsYdyttRLju YtMpogy3SzudJ/y3sCm2D+tt6ts2gkbLgWnk3NW4cHh77hmaOkjIZcky/k+2kVm/QnZ3 /LskHpi7TtOlEESjyzmabe9qjKd4itFYteoDRfUvAMTRZJ4Lv9t//O9GMp99nVchIAnV /q9pHgPlp3jehVJ0VrSVmuxoVb1iJnMLe6C7gHWJdO7Ugnw21YUQu5yutfZb9VjA808T 4wbaukyuzvJZPBit13kYLukiAjuReWd17JewnD4PVn1JU/xdZtG+i915Bw6kNmXAxSwW gmfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to; bh=2/ng5eVzUzdYOeOR5U1C+63zdcBjrnnQhFde4qwi0E8=; b=QLyalw9U/0mvwIWPFnhw5YgULy5M9ntDxLS22D8yysLlpQP+8MF2fy3q2uPAxNlqdF LFdGPOTAPeqRwJbMrddpeAWvLMXtWDs/zTcqiRstwrB3oe1TXev8tIRyuSf3kDn4oPkW V3VBczGIKC1AlcxSKUJCIr9Aj/BxOlGM1cNXjWQFLg8j1+SpwccRPs5YmKuQOFMDSg2v vMoJkmQ2DxdljaQK/x8PPETe0Zm8jLR2I+efey78Mk2ZPu1wkVnESxcL7fjWoLLCCYpG quRLYPzX1MSVvocsxNfmChGdKJ266gG3tM4jqMvcfFyuR9Cncx5d3QoKMLXbEp4Xcrwx 5/pA== X-Gm-Message-State: APt69E1Xc7KrkzVNYZqUgagWaL8W2LVuEKcx08uoZ/3ZDdw0J4oHu1ya j6DzBeViJD7QninLEI0OuUzh3Y3n X-Google-Smtp-Source: AAOMgpdYaqdzpr1gp/0wPfcXTUUMb6igSby5ugDoq2jcjWkEKDHr6D7Gyzm/oHXJQ2HUwznJ1Pid3Q== X-Received: by 2002:adf:9a0b:: with SMTP id z11-v6mr21102513wrb.47.1530601645434; Tue, 03 Jul 2018 00:07:25 -0700 (PDT) Original-Received: from [192.168.1.11] (x4dbebde4.dyn.telefonica.de. [77.190.189.228]) by smtp.gmail.com with ESMTPSA id 24-v6sm1475437wrz.94.2018.07.03.00.07.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 03 Jul 2018 00:07:24 -0700 (PDT) In-Reply-To: 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:101161 Archived-At: This is a multi-part message in MIME format. --===============7405217440992741586== Content-Type: multipart/alternative; boundary="------------010707080703040102070202" This is a multi-part message in MIME format. --------------010707080703040102070202 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi Lukas, when you create the buffer with the grabbufferdata-command you already set the delimiter for the environment with the third argument, in the example below this is the \stopcontentexport command. To have different start/stop-commands for your environment means you have to change all names in the implementation of the contentxport-environment. %%%%%% \unexpanded\def\bH{....} \def\dobH[#1]% {... \grabbufferdata[...][bH][eH]} \def\eH {....} %%%%%% Wolfgang > Procházka Lukáš Ing. > 3. Juli 2018 um 08:52 > Hello, > > I tried to \let shortcuts for \startcontentexport and > \stopcontentexport, but Ctx run fails. > > I guess this is a basic misunderstanding, but - why? > > ---- > \unexpanded\def\startcontentexport{\dosingleempty\dostartcontentexport} > > \def\dostartcontentexport[#1]% > {\iffirstargument > \edef\contentexportfile{#1}% > \else > \let\contentexportfile\empty > \fi > \grabbufferdata[contentexport][startcontentexport][stopcontentexport] > } > > \def\stopcontentexport{% > > \doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}% > > \getbufferdata[contentexport] > } > > \let\bX=\startcontentexport % <---- Use of these two "shortcuts" is > not possible, > \let\eX=\stopcontentexport % <---- I'm getting : ! TeX capacity > exceeded, sorry [input stack size=10000] > > \starttext > > A > > \startcontentexport[t~.out.mkiv] > Hello! > \startitemize > \item Item > \stopitemize > \stopcontentexport > > B > > \bX[t2~.out.mkiv] > Ahoj > \eX > > \stoptext > ---- > > HSo how to define "shortcuts" properly? > > Best regards, > > Lukas > > > ___________________________________________________________________________________ > 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 > ___________________________________________________________________________________ --------------010707080703040102070202 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Lukas,

when you create the buffer with the grabbufferdata-command you already set
the delimiter for the environment with the third argument, in the example below
this is the \stopcontentexport command.

To have different start/stop-commands for your environment means you have
to change all names in the implementation of the contentxport-environment.

%%%%%%
\unexpanded\def\bH{....}

\def\dobH[#1]%
   {...
    \grabbufferdata[...][bH][eH]}

\def\eH
  {....}
%%%%%%

Wolfgang
3. Juli 2018 um 08:52
Hello,

I tried to \let shortcuts for \startcontentexport and \stopcontentexport, but Ctx run fails.

I guess this is a basic misunderstanding, but - why?

----
\unexpanded\def\startcontentexport{\dosingleempty\dostartcontentexport}

\def\dostartcontentexport[#1]%
{\iffirstargument
  \edef\contentexportfile{#1}%
  \else
  \let\contentexportfile\empty
  \fi
  \grabbufferdata[contentexport][startcontentexport][stopcontentexport]
}

\def\stopcontentexport{%
  \doifsomething{\contentexportfile}{\savebuffer[list=contentexport,prefix=no,file=\contentexportfile]}%
  \getbufferdata[contentexport]
}

\let\bX=\startcontentexport % <---- Use of these two "shortcuts" is not possible,
\let\eX=\stopcontentexport  % <---- I'm getting : ! TeX capacity exceeded, sorry [input stack size=10000]

\starttext

  A

  \startcontentexport[t~.out.mkiv]
    Hello!
    \startitemize
    \item Item
    \stopitemize
  \stopcontentexport

  B

  \bX[t2~.out.mkiv]
    Ahoj
  \eX

\stoptext
----

HSo how to define "shortcuts" properly?

Best regards,

Lukas


___________________________________________________________________________________
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
___________________________________________________________________________________

--------------010707080703040102070202-- --===============7405217440992741586== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============7405217440992741586==--