ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
To: ntg-context@ntg.nl
Subject: Re: reference error
Date: Mon, 04 Nov 2013 11:55:35 +0100	[thread overview]
Message-ID: <52777D27.2070304@wxs.nl> (raw)
In-Reply-To: <FCEE7DFA-FF3F-4FD6-96EE-E2D1549229FB@gmail.com>

On 11/4/2013 10:00 AM, Wolfgang Schuster wrote:
>
> Am 04.11.2013 um 09:43 schrieb Peter Münster <pmlists@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	other threads:[~2013-11-04 10:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.116.1383507591.2136.ntg-context@ntg.nl>
2013-11-03 21:03 ` Wolfgang Werners-Lucchini
2013-11-04  8:43   ` Peter Münster
2013-11-04  9:00     ` Wolfgang Schuster
2013-11-04 10:55       ` Hans Hagen [this message]
     [not found] <mailman.1.1383476401.28008.ntg-context@ntg.nl>
2013-11-03 12:38 ` Wolfgang Werners-Lucchini
2013-11-03 13:00   ` Peter Münster
2013-11-02 12:49 Wolfgang Werners-Lucchini
2013-11-02 13:01 ` Mikael P. Sundqvist

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52777D27.2070304@wxs.nl \
    --to=pragma@wxs.nl \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).