ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \index inserts whitespace
@ 2009-07-09 19:48 Wolfgang Schuster
  2009-07-09 21:16 ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2009-07-09 19:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi,

the \index command creates additional whitespace in the output.

\starttext

\section{Knuth}

\input knuth

\page

\section{Tufte}\index{tufte}

\input tufte

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


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

* Re: \index inserts whitespace
  2009-07-09 19:48 \index inserts whitespace Wolfgang Schuster
@ 2009-07-09 21:16 ` Hans Hagen
  2009-07-10 17:27   ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2009-07-09 21:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster wrote:
> Hi,
> 
> the \index command creates additional whitespace in the output.
> 
> \starttext
> 
> \section{Knuth}
> 
> \input knuth
> 
> \page
> 
> \section{Tufte}\index{tufte}
> 
> \input tufte
> 
> \stoptext

nasty ... the fifth argument must in in the par grabber (it used to be 4 
args so this macro was not adapted which means that no par grabbing 
takes place)

\def\donoregister 
#1#2#3{\doflushatpar{\doprocesspageregister{#1}{}{}{#2}{#3}}}   % 
register key - entry
\def\dodoregister#1#2#3#4{\doflushatpar{\doprocesspageregister{#1}{}{#2}{#3}{#4}}} 
% register key altnum entry

Hans


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \index inserts whitespace
  2009-07-09 21:16 ` Hans Hagen
@ 2009-07-10 17:27   ` Wolfgang Schuster
  2009-07-10 18:03     ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2009-07-10 17:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 09.07.2009 um 23:16 schrieb Hans Hagen:

> \def\donoregister #1#2#3{\doflushatpar{\doprocesspageregister{#1}{}{} 
> {#2}{#3}}}   % register key - entry
> \def\dodoregister#1#2#3#4{\doflushatpar{\doprocesspageregister{#1}{} 
> {#2}{#3}{#4}}} % register key altnum entry

Thanks, this works.

Is there also a way to take care of situations where the \index  
command appear between two vertical skips, a stupid example is

     \starttext

     text
     \blank\index{text}

     \blank
     more text

     \stoptext

In my document this appears in the form

     \setup[commanda]\index{commanda}

     \setup[commandb]\index{commandb}

and

     \setup[commandc]\index{commandc}

     \starttyping
     ...
     \stoptyping

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


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

* Re: \index inserts whitespace
  2009-07-10 17:27   ` Wolfgang Schuster
@ 2009-07-10 18:03     ` Hans Hagen
  2009-07-11  3:44       ` Wolfgang Schuster
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2009-07-10 18:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster wrote:
> 
> Am 09.07.2009 um 23:16 schrieb Hans Hagen:
> 
>> \def\donoregister 
>> #1#2#3{\doflushatpar{\doprocesspageregister{#1}{}{}{#2}{#3}}}   % 
>> register key - entry
>> \def\dodoregister#1#2#3#4{\doflushatpar{\doprocesspageregister{#1}{}{#2}{#3}{#4}}} 
>> % register key altnum entry
> 
> Thanks, this works.
> 
> Is there also a way to take care of situations where the \index command 
> appear between two vertical skips, a stupid example is

no, an index inserts something in the stream (after all it has to be 
anchored); in such a case you can try \EveryPar{\index{...}} (or use the 
delayed flush at par mechanism)

>     \starttext
> 
>     text
>     \blank\index{text}
> 
>     \blank
>     more text
> 
>     \stoptext
> 
> In my document this appears in the form
> 
>     \setup[commanda]\index{commanda}
> 
>     \setup[commandb]\index{commandb}
> 
> and
> 
>     \setup[commandc]\index{commandc}
> 
>     \starttyping
>     ...
>     \stoptyping
> 
> 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________ 
> 


-- 

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: \index inserts whitespace
  2009-07-10 18:03     ` Hans Hagen
@ 2009-07-11  3:44       ` Wolfgang Schuster
  2009-07-11  9:17         ` Hans Hagen
  0 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Schuster @ 2009-07-11  3:44 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 10.07.2009 um 20:03 schrieb Hans Hagen:

> Wolfgang Schuster wrote:
>> Am 09.07.2009 um 23:16 schrieb Hans Hagen:
>>> \def\donoregister #1#2#3{\doflushatpar{\doprocesspageregister{#1}{} 
>>> {}{#2}{#3}}}   % register key - entry
>>> \def\dodoregister#1#2#3#4{\doflushatpar{\doprocesspageregister{#1} 
>>> {}{#2}{#3}{#4}}} % register key altnum entry
>> Thanks, this works.
>> Is there also a way to take care of situations where the \index  
>> command appear between two vertical skips, a stupid example is
>
> no, an index inserts something in the stream (after all it has to be  
> anchored);
> in such a case you can try \EveryPar{\index{...}}

this suppress the extra skip but executes the index at each paragraph  
till the next
\EveraPAr or the end of the document

> (or use the delayed flush at par mechanism)

do you mean \flushatnextpar because this works

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


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

* Re: \index inserts whitespace
  2009-07-11  3:44       ` Wolfgang Schuster
@ 2009-07-11  9:17         ` Hans Hagen
  0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2009-07-11  9:17 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster wrote:

> do you mean \flushatnextpar because this works

yes, that mechanism


-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2009-07-11  9:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-09 19:48 \index inserts whitespace Wolfgang Schuster
2009-07-09 21:16 ` Hans Hagen
2009-07-10 17:27   ` Wolfgang Schuster
2009-07-10 18:03     ` Hans Hagen
2009-07-11  3:44       ` Wolfgang Schuster
2009-07-11  9:17         ` Hans Hagen

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