ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Buffer within a \def
@ 2018-08-10 11:31 Procházka Lukáš Ing.
  2018-08-10 11:41 ` Wolfgang Schuster
  0 siblings, 1 reply; 2+ messages in thread
From: Procházka Lukáš Ing. @ 2018-08-10 11:31 UTC (permalink / raw)
  To: ConTeXt

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

Hello,

I'm not very familiar with using buffers, so a basic question:

Is it possible to use buffers within a \def?

The following sample doesn't compile:

----
\def\T{
   \startbuffer[Buf]
     a b ccc
     d e f
   \stopbuffer
   \getbuffer[Buf]
}

\starttext
   \T

   A
\stoptext
----

What's wrong?

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: t2.mkiv --]
[-- Type: application/octet-stream, Size: 248 bytes --]

\def\T{
  \startbuffer[Buf]
    a b ccc
    d e f
  \stopbuffer
  \getbuffer[Buf]
}

\starttext
  \startbuffer[BufA]
    A B Ccc
    D E F
  \stopbuffer
  \getbuffer[BufA]

  \T % Works OK with this line commented

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Buffer within a \def
  2018-08-10 11:31 Buffer within a \def Procházka Lukáš Ing.
@ 2018-08-10 11:41 ` Wolfgang Schuster
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Schuster @ 2018-08-10 11:41 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Procházka Lukáš Ing.



Procházka Lukáš Ing. schrieb am 10.08.18 um 13:31:
> Hello,
>
> I'm not very familiar with using buffers, so a basic question:
>
> Is it possible to use buffers within a \def?

No.

> The following sample doesn't compile:
>
> ----
> \def\T{
>   \startbuffer[Buf]
>     a b ccc
>     d e f
>   \stopbuffer
>   \getbuffer[Buf]
> }

\def\T
   {\setbuffer[Buf]a b ccc d e f\endbuffer
    \getbuffer[Buf]}

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-10 11:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-10 11:31 Buffer within a \def Procházka Lukáš Ing.
2018-08-10 11:41 ` Wolfgang Schuster

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).