ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Runaway argument with \stoptabulate in a macro
@ 2011-08-03 11:25 Cecil Westerhof
  2011-08-03 12:00 ` Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Cecil Westerhof @ 2011-08-03 11:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3208 bytes --]

I have the following code:
\usemodule[fancybreak]

\definefancybreak[myblank][indentnext=no]

\define[2]\StartWorkTable{
  \myblank[2*big]
  \starttabulate[|w(.1\textwidth)|p(.9\textwidth)|]
  \HL
  \NC #1 \NC #2               \NC\NR
  \HL
  \NC    \NC {\bf Gedaan}     \NC\NR
}

\define[1]\ActivityWorkTable{
  \NC    \NC \bullet\space #1 \NC\NR
}

\define\StopWorkTable{
  \HL
  \stoptabulate
}

\starttext

\StartWorkTable{Huidig}{Senior software engineer bij Artex}
\ActivityWorkTable{Teamleader voor een groep van 5 PHP-programmeurs die
  werken volgens scrum/agile principes. Dit team ontwikkeld
  grootschalige web applicaties met gebruikmaking van PHP/AJAX/Zend en
  HTML5.
}
\ActivityWorkTable{Quality Management}
\ActivityWorkTable{Schrijven documentatie, zowel technische als gebruikers}
\ActivityWorkTable{Definieren nieuwe functionaliteiten}
\ActivityWorkTable{Installeren subversion server en definiëren werkwijze}
\StopWorkTable

\stoptext

When I compile this I get:
compileContextFiles.sh --verbose
* CV.tex was already up to date

mtx-context     | run 1: luatex
--fmt="/home/cecil/ConTeXt/tex/texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en"
--lua="/home/cecil/ConTeXt/tex/texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606/formats/cont-en.lui"
--backend="pdf" "./dummy.tex" \stoptext
This is LuaTeX, Version beta-0.70.1-2011051923 (rev 4277)
 \write18 enabled.
(dummy.tex

ConTeXt  ver: 2011.07.14 16:09 MKIV  fmt: 2011.7.19  int: english/english

system          > cont-new.mkiv loaded
(/home/cecil/ConTeXt/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > beware: some patches loaded from cont-new.mkiv
)
system          > dummy.top loaded
(dummy.top)
fonts           > latin modern fonts are not preloaded
languages       > language en is active
resolvers       > modules > loaded: 'fancybreak'
(/home/cecil/ConTeXt/tex/texmf-modules/tex/context/third/fancybreak/t-fancybreak.mkiv
loading         > ConTeXt User Module / Fancybreak
){/home/cecil/ConTeXt/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
(/home/cecil/ConTeXt/tex/texmf-context/tex/context/base/type-siz.mkiv)
(/home/cecil/ConTeXt/tex/texmf-context/tex/context/base/type-otf.mkiv)
files           > readfile > asked name: 'loc', not found
{/home/cecil/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-math.map}{/home/cecil/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts           > virtual math > unable to resolve name mapsfromchar
fonts           > fallback modern rm 12pt is loaded
)
Runaway argument?
 \HL \NC Huidig \NC Senior software engineer bij Artex \NC \NR \HL \NC \ETC.
! File ended while scanning use of \doprocesscontent.

system          > tex > error on line 0 in file : File ended while scanning
use of \doprocesscontent ...

<empty file>

<inserted text>
                \par
<*> ./dummy.tex
                \stoptext
?

When I put a \stoptabulate after \StopWorkTable it compiles as expected. But
why does the \stoptabulate in \StopWorkTable not work?

-- 
Cecil Westerhof

[-- Attachment #1.2: Type: text/html, Size: 3543 bytes --]

[-- 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] 4+ messages in thread

* Re: Runaway argument with \stoptabulate in a macro
  2011-08-03 11:25 Runaway argument with \stoptabulate in a macro Cecil Westerhof
@ 2011-08-03 12:00 ` Wolfgang Schuster
  2011-08-03 12:40   ` Cecil Westerhof
  2011-08-03 13:50   ` Aditya Mahajan
  0 siblings, 2 replies; 4+ messages in thread
From: Wolfgang Schuster @ 2011-08-03 12:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 03.08.2011 um 13:25 schrieb Cecil Westerhof:

> I have the following code:
> 
> […] 
> 
> When I put a \stoptabulate after \StopWorkTable it compiles as expected. But why does the \stoptabulate in \StopWorkTable not work?

This is a limitation of the way how tabulate is written. When you want to put a table in macros use \starttable or \bTABLE.

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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Runaway argument with \stoptabulate in a macro
  2011-08-03 12:00 ` Wolfgang Schuster
@ 2011-08-03 12:40   ` Cecil Westerhof
  2011-08-03 13:50   ` Aditya Mahajan
  1 sibling, 0 replies; 4+ messages in thread
From: Cecil Westerhof @ 2011-08-03 12:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 491 bytes --]

2011/8/3 Wolfgang Schuster <schuster.wolfgang@googlemail.com>

>
> Am 03.08.2011 um 13:25 schrieb Cecil Westerhof:
>
> > I have the following code:
> >
> > […]
> >
> > When I put a \stoptabulate after \StopWorkTable it compiles as expected.
> But why does the \stoptabulate in \StopWorkTable not work?
>
> This is a limitation of the way how tabulate is written. When you want to
> put a table in macros use \starttable or \bTABLE.
>

Works. Thanks.

-- 
Cecil Westerhof

[-- Attachment #1.2: Type: text/html, Size: 817 bytes --]

[-- 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] 4+ messages in thread

* Re: Runaway argument with \stoptabulate in a macro
  2011-08-03 12:00 ` Wolfgang Schuster
  2011-08-03 12:40   ` Cecil Westerhof
@ 2011-08-03 13:50   ` Aditya Mahajan
  1 sibling, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2011-08-03 13:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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

On Wed, 3 Aug 2011, Wolfgang Schuster wrote:

>
> Am 03.08.2011 um 13:25 schrieb Cecil Westerhof:
>
>> I have the following code:
>>
>> […]
>>
>> When I put a \stoptabulate after \StopWorkTable it compiles as expected. But why does the \stoptabulate in \StopWorkTable not work?
>
> This is a limitation of the way how tabulate is written. When you want to put a table in macros use \starttable or \bTABLE.

An alternative is to capture the content in tokens:

\newtoks\WorkTableToks
\define[2]\StartWorkTable{
   \myblank[2*big]
   \WorkTableToks
   {\starttabulate[|w(.1\textwidth)|p(.9\textwidth)|]
   \HL
   \NC #1 \NC #2               \NC\NR
   \HL
   \NC    \NC {\bf Gedaan}     \NC\NR}
}

\define[1]\ActivityWorkTable{
   \appendtoks
   \NC    \NC \bullet\space #1 \NC\NR
   \to\WorkTableToks
}

\define\StopWorkTable{
   \appendtoks
   \HL
   \stoptabulate
   \to\WorkTableToks
   \the\WorkTableToks
}

[-- 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] 4+ messages in thread

end of thread, other threads:[~2011-08-03 13:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-03 11:25 Runaway argument with \stoptabulate in a macro Cecil Westerhof
2011-08-03 12:00 ` Wolfgang Schuster
2011-08-03 12:40   ` Cecil Westerhof
2011-08-03 13:50   ` Aditya Mahajan

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