ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Argument of \startInvoice has an extra }.
@ 2013-11-09 22:07 Peter Münster
  2013-11-09 22:33 ` Aditya Mahajan
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Münster @ 2013-11-09 22:07 UTC (permalink / raw)
  To: ConTeXt users

Hi,

How could I avoid that error here please:

--8<---------------cut here---------------start------------->8---
\def\beginInvoice{\dosingleempty\dobeginInvoice}
\def\dobeginInvoice[#1]{\grabbufferdata[myLetter][beginInvoice][endInvoice]}
\def\startInvoice#1\stopInvoice{bla}
\starttext
\beginInvoice
\startInvoice test \stopInvoice
\endInvoice
\stoptext
--8<---------------cut here---------------end--------------->8---

TIA for any help,
-- 
           Peter
___________________________________________________________________________________
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
___________________________________________________________________________________


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

* Re: Argument of \startInvoice has an extra }.
  2013-11-09 22:07 Argument of \startInvoice has an extra } Peter Münster
@ 2013-11-09 22:33 ` Aditya Mahajan
  2013-11-09 22:54   ` Peter Münster
  0 siblings, 1 reply; 3+ messages in thread
From: Aditya Mahajan @ 2013-11-09 22:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: TEXT/PLAIN, Size: 665 bytes --]

On Sat, 9 Nov 2013, Peter Münster wrote:

> Hi,
>
> How could I avoid that error here please:
>
> --8<---------------cut here---------------start------------->8---
> \def\beginInvoice{\dosingleempty\dobeginInvoice}
> \def\dobeginInvoice[#1]{\grabbufferdata[myLetter][beginInvoice][endInvoice]}
> \def\startInvoice#1\stopInvoice{bla}
> \starttext
> \beginInvoice
> \startInvoice test \stopInvoice
> \endInvoice
> \stoptext

One possibility is to restrict optional arguments to one line:

\def\beginInvoice{\bgroup\obeylines\dosingleempty\dobeginInvoice}
\def\dobeginInvoice[#1]{\egroup\grabbufferdata[myLetter][beginInvoice][endInvoice]}

Aditya

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

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

* Re: Argument of \startInvoice has an extra }.
  2013-11-09 22:33 ` Aditya Mahajan
@ 2013-11-09 22:54   ` Peter Münster
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Münster @ 2013-11-09 22:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, Nov 09 2013, Aditya Mahajan wrote:

> One possibility is to restrict optional arguments to one line:
>
> \def\beginInvoice{\bgroup\obeylines\dosingleempty\dobeginInvoice}
> \def\dobeginInvoice[#1]{\egroup\grabbufferdata[myLetter][beginInvoice][endInvoice]}

Thanks. How did you find the reason for the error (and the solution)?

Is there also a solution with support for multiple lines? Unfortunately
this does not work:

--8<---------------cut here---------------start------------->8---
\def\beginInvoice{\bgroup\obeylines\dosingleempty\dobeginInvoice}
\def\dobeginInvoice[#1]{\egroup\getparameters[PRM][#1]%
  \grabbufferdata[myLetter][beginInvoice][endInvoice]}
\def\endInvoice{\getbuffer[myLetter]}
\def\startInvoice#1\stopInvoice{#1}
\starttext
\beginInvoice[bla=blub,
  blub=bla]
\startInvoice test \PRMblub \stopInvoice
\endInvoice
\beginInvoice
\startInvoice test \stopInvoice
\endInvoice
\stoptext
--8<---------------cut here---------------end--------------->8---

TIA,
-- 
           Peter
___________________________________________________________________________________
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
___________________________________________________________________________________


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

end of thread, other threads:[~2013-11-09 22:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-09 22:07 Argument of \startInvoice has an extra } Peter Münster
2013-11-09 22:33 ` Aditya Mahajan
2013-11-09 22:54   ` Peter Münster

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