ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Procházka Lukáš Ing." <LPr@pontex.cz>
To: "mailing list for ConTeXt users" <ntg-context@ntg.nl>
Subject: Re: Parallel output of source data
Date: Tue, 03 Jul 2018 08:52:25 +0200	[thread overview]
Message-ID: <op.zlkddnvf62epfj@lpr> (raw)
In-Reply-To: <5841C5D8.4090201@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1304 bytes --]

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


-- 
Ing. Lukáš Procházka | mailto:LPr@pontex.cz
Pontex s. r. o.      | mailto:pontex@pontex.cz | http://www.pontex.cz | IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

[-- Attachment #2: t.mkiv --]
[-- Type: application/octet-stream, Size: 717 bytes --]

\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
\let\eX=\stopcontentexport

\starttext

  A

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

  B

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

\stoptext

[-- Attachment #3: Type: text/plain, Size: 492 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2018-07-03  6:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-02  7:10 Procházka Lukáš Ing.
2016-12-02 19:04 ` Wolfgang Schuster
2016-12-05  7:26   ` Procházka Lukáš Ing.
2018-07-03  6:52   ` Procházka Lukáš Ing. [this message]
2018-07-03  7:07     ` Wolfgang Schuster
2018-07-03 14:39       ` Procházka Lukáš Ing.
2018-07-03  7:11     ` Hans Hagen

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=op.zlkddnvf62epfj@lpr \
    --to=lpr@pontex.cz \
    --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).