From: Markus Brandt <markus.brandt@sit.tu-darmstadt.de>
To: Hans Hagen <j.hagen@xs4all.nl>
Cc: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Incorrect sorting in \completelistofabbreviations for numbers
Date: Thu, 10 Jun 2021 14:10:40 +0200 [thread overview]
Message-ID: <a2527da074e77f6dd71c4472cd5cbf08@sit.tu-darmstadt.de> (raw)
In-Reply-To: <0326f6bd-845f-1707-d02d-a6d37ff7b8ae@xs4all.nl>
On 2021-06-10 13:36, Hans Hagen wrote:
> On 6/10/2021 12:02 PM, Markus Brandt wrote:
>> On 2021-06-10 11:52, luigi scarso wrote:
>>> On Thu, Jun 10, 2021 at 11:39 AM Markus Brandt
>>> <markus.brandt@sit.tu-darmstadt.de> wrote:
>>>
>>>> yes, seems like they are sorted by tag. But that’s not useful,
>>>> since you cannot use numbers in a tag. This tag is just the
>>>> workaround for abbreviations that include numbers.
>>>
>>> \abbreviation[0123]{123}{One, Two, and Three}
>>> \abbreviation{ABC}{A, B, and C}
>>> \abbreviation{ZYX}{Z, Y, and X}
>>>
>>> \starttext
>>> \csname 0123\endcsname
>>> \completelistofabbreviations[criterium=all]
>>> \stoptext
>>> -- luigi
>
>>
>> That works kind of. Now the numbers are at the button.
>
> \completelistofabbreviations[criterium=all,method=first]
>
> I'll add a sortkey as option assuming that you will wikify it:
>
> \abbreviation[OTT]{123}{One, Two, and Three}
>
> \abbreviation[TTO][321]{321}{Three, Two, One}
>
> \abbreviation{ABC}{A, B, and C}
> \abbreviation{ZYX}{Z, Y, and X}
>
> \definesynonym[yes][abbreviation][ZZZ]{PQR}{P, Q or R}
>
> \starttext
>
> \completelistofabbreviations[criterium=all,method=first]
>
> \stoptext
>
> 321 Three, Two, One
> ABC A, B, and C
> 123 One, Two, and Three
> ZYX Z, Y, and X
> PQR P, Q or R
>
>
> -----------------------------------------------------------------
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -----------------------------------------------------------------
Hi,
Thanks. 'method' is missing in the Wiki. It works fine when using it in
combination with \csname to use the abbreviation.
I guess the change you propose would affect \synonym in generell, right?
This change would make code with the sortkey option incompatible with
older versions. Wouldn't adding a sortkey to
completelistofsynonyms/setupsynonyms be a better option? Something like
sortkey = name|text|content. Just asking out of curiosity.
Best,
Markus
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2021-06-10 12:10 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-10 8:59 Markus Brandt
2021-06-10 9:32 ` luigi scarso
2021-06-10 9:39 ` Markus Brandt
2021-06-10 9:52 ` luigi scarso
2021-06-10 10:02 ` Markus Brandt
2021-06-10 11:36 ` Hans Hagen
2021-06-10 12:10 ` Markus Brandt [this message]
2021-06-10 12:37 ` Hans Hagen
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=a2527da074e77f6dd71c4472cd5cbf08@sit.tu-darmstadt.de \
--to=markus.brandt@sit.tu-darmstadt.de \
--cc=j.hagen@xs4all.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).