On 11/4/2013 10:00 AM, Wolfgang Schuster wrote:

Am 04.11.2013 um 09:43 schrieb Peter Münster <pmli...@free.fr>:

On Sun, Nov 03 2013, Wolfgang Werners-Lucchini wrote:

\in{Kapitel}[chap:vorwort with space at the end ],
\in{Kapitel}[chap:vorwort2 with space at the end ],
\in{Kapitel}[chap:vorwort3 with space at the end ],
\in{Kapitel}[chap:vorwort without space at the end] and
\in{Kapitel}[chap:vorwort2 without space at the end]

Only the last two are working! Not the second!!!
Not very intuitive at all.

The first 3 are almost the same.
If you really want a space at the end, then you could add a feature
request to http://tracker.luatex.org/

I’n not sure is going to change this because the reference parser
removes trailing/leading spaces in references. One shouldn’t forgot
the reference commands accept more than simple references to
a section, float etc. but also hyperlinks to other pages (first, last etc.)
or external documents.

BTW: The code which removes the space in reference is on strc-rsc.lua

Also, one can pass multiple references as in:

\startchapter[reference={foo,bar},...]

Anyhow, as an experiment I've added a space stripper to the 'definition' part of references

\starttext

\startsection [title=Test 1, reference=ref 1]              \stopsection
\startsection [title=Test 2, reference={ref 2}]            \stopsection
\startsection [title=Test 3, reference= {ref 3}]           \stopsection
\startsection [title=Test 4, reference={ref 4} ]           \stopsection
\startsection [title=Test 5, reference= {ref 5} ]          \stopsection
\startsection [title=Test 6, reference={ ref 6 , ref 7 }] \stopsection

\dorecurse{7}{
    \in{ref}[ref #1]
    \in{ref}[ ref #1]
    \in{ref}[ref #1 ]
    \in{ref}[ ref #1 ]
    \par
}

\stoptext

This all works ok but someone needs to document it at the wiki. Of course one can come up with yet another 'wanted tolerance' but we shouldn't become to fuzzy.

Hans


-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
    tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to