Re: [NTG-context] Runaway argument with \stoptabulate in a macro

2011-08-03 Thread Aditya Mahajan

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
}
___
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
___

Re: [NTG-context] Runaway argument with \stoptabulate in a macro

2011-08-03 Thread Cecil Westerhof
2011/8/3 Wolfgang Schuster 

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

Re: [NTG-context] Runaway argument with \stoptabulate in a macro

2011-08-03 Thread Wolfgang Schuster

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
___


[NTG-context] Runaway argument with \stoptabulate in a macro

2011-08-03 Thread Cecil Westerhof
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 ...




\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
___
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
___