\index inserts whitespace
Hi, the \index command creates additional whitespace in the output. \starttext \section{Knuth} \input knuth \page \section{Tufte}\index{tufte} \input tufte \stoptext Wolfgang
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 -----------------------------------------------------------------
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
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 -----------------------------------------------------------------
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
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 -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Wolfgang Schuster