Am 19.04.2014 um 02:11 schrieb Rik Kabel <cont...@rik.users.panix.com>:

> On 2014-04-18 17:36, Aditya Mahajan wrote:
>> On Fri, 18 Apr 2014, Thangalin wrote:
>> 
>>> Hi Rik,
>>> 
>>> The example isn't quite as minimal as it could be... Here is a
>>> simplified version demonstrating the problem:
>>> 
>>> \setuplayout[backspace=4cm]
>>> 
>>> \define[2]\MarginHead{\inmargin{#1 #2}}
>>> 
>>> \setuphead[section][
>>> alternative=text,
>>> command=\MarginHead,
>>> ]
>>> 
>>> \defineitemgroup[itemz]
>>> \setupitemgroup[itemz][each][joinedup]
>>> 
>>> \startbuffer[Item]
>>> \startitemz
>>>   \item Item
>>>   \item Item
>>> \stopitemz
>>> \stopbuffer
>>> 
>>> \starttext
>>> \section{No Whitespace}
>>> No extra whitespace before items.
>>> \getbuffer[Item]
>>> 
>>> \section{Extra Whitespace}
>>> \getbuffer[Item]
>>> Unexpected extra whitespace before items.
>>> \stoptext
>> 
>> Here is one way to get rid of the extra white-space. I could not figure out 
>> a clean way of adding this signal to the setup.
>> 
>> \setuplayout[backspace=6cm, leftmargin=5.5cm]
>> 
>> \define[2]\MarginHead{\inmargin{#1 #2}}
>> 
>> \setuphead[section]
>>  [
>>    command=\MarginHead,
>>    alternative=text,
>>    distance=\zeropoint,
>>  ]
>> 
>> \unprotect
>>  \def\SIGNAL{\hskip\d_strc_itemgroups_signal}
>> \protect
>> \defineitemgroup[itemz]
>> \setupitemgroup[itemz][each][joinedup]
>> 
>> \startbuffer[Item]
>>  \startitemz
>>    \item Item
>>    \item Item
>>  \stopitemz
>> \stopbuffer
>> 
>> \starttext
>>  \section{No Whitespace}
>>  No extra whitespace before items.
>>  \getbuffer[Item]
>> 
>>  \section{Extra Whitespace} \SIGNAL
>>  \getbuffer[Item]
>>  Unexpected extra whitespace before items.
>> \stoptext
> 
> Pretty ugly, but thank you for that, Aditya.
> 
> Is there a similar kludge for tabulate? (That was part of my original 
> problem, removed in the subsequent simplification of the example.)

\setuphead
  [section]
  [alternative=text,
   command=\SectionCommand,
   distance=0pt,
   insidesection={\blank[overlay]}]

\define[2]\SectionCommand
  {\inmargin{#1 – #2}}

\setuplayout[backspace=4cm]

\starttext

\startsection[title={First}]

\input ward

\stopsection

\startsection[title={Second}]

\startitemize
\item One
\item Two
\stopitemize

\stopsection

\startsection[title={Third}]

\starttabulate
\NC Knuth \NC \input{knuth} \NC\NR
\NC Tufte \NC \input{tufte} \NC\NR
\stoptabulate

\stopsection

\stoptext

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
___________________________________________________________________________________

Reply via email to