ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Jano Kula <jano.kula@tiscali.cz>
To: ntg-context@ntg.nl
Subject: Re: register sorting
Date: Sat, 30 Oct 2010 02:33:46 +0200	[thread overview]
Message-ID: <iafp5b$i93$1@dough.gmane.org> (raw)
In-Reply-To: <19A7AFF2-CEC9-4FDD-AFD3-7700ED7F6D41@st.estfiles.de>

Hi Steffen,

On 10/29/2010 10:39 PM, Steffen Wolfrum wrote:
> Hi,
>
> I just installed todays beta and I am not sure if regoster sorting is working properly.
>
> Eg. I modify (see below) the example from tricky-002.tex and I would like to achieve ...
>
> accession
> Action Plan
> association
>
> But none of the four methods (before, after, first, last) gives this result!!
>
> What is wrong?

Methods were rewritten to give more flexibility. From the Hans' explanation:

\startquote

[pzm][mc] = [plus|zero|minus offsets][mapping|cases]

uc == unicode order

ok, a bit cryptic but one can now choose methods more explicitly (with 
the four predefined)

cases   : lowercasing with shapebased pre/post injection
mapping : given language mapping with shapebased pre/post injection

Not all combinations make sense so we might need to figure out which 
ones to document. With too much simplification (shape based) the sorter 
will not sort right as there always need to be some distinction.

\stopquote

Bellow is the example with possible combinations, so try which one suits 
you best.

At least method={zm,mc,uc} gives what you want, but I don't know your 
border cases.

Jano



% tricky-006.tex
\setuplayout[topspace=1cm,height=middle]

\setupbodyfont[11pt]

\starttext

\def\Test#1%
 
{\vbox{{\bf#1}\blank\placeregister[index][language=cz,n=1,method={#1}]}\blank}

wanted result: oá öb Oč Öď Oo Öo oo öo Öq öř Oš oů \blank

\startcolumns[n=3]
     \Test{mc,mm,uc} \Test{mc,zm,uc} \Test{mc,pm,uc}
     \Test{zc,mm,uc} \Test{zc,zm,uc} \Test{zc,pm,uc}
     \Test{pc,mm,uc} \Test{pc,zm,uc} \Test{pc,pm,uc}
\stopcolumns

\page

wanted result: oá öb Oč Öď Oo Öo oo öo Öq öř Oš oů \blank

\startcolumns[n=3]
     \Test{mm,mc,uc} \Test{zm,mc,uc} \Test{pm,mc,uc}
     \Test{mm,zc,uc} \Test{zm,zc,uc} \Test{pm,zc,uc}
     \Test{mm,pc,uc} \Test{zm,pc,uc} \Test{pm,pc,uc}
\stopcolumns

\page

\dorecurse {2} {
    \page \recurselevel:
         \index{oá}  \index{öb}  \index{Oč}  \index{Öď}
         \index{oo}  \index{öo}  \index{Oo}  \index{Öo}
         \index{Öq}  \index{öř}  \index{Oš}  \index{oů}
    done
}












___________________________________________________________________________________
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:[~2010-10-30  0:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29 20:39 Steffen Wolfrum
2010-10-30  0:33 ` Jano Kula [this message]
2010-11-04  9:46   ` Steffen Wolfrum
2016-05-24 11:33 Manuel Conzelmann

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='iafp5b$i93$1@dough.gmane.org' \
    --to=jano.kula@tiscali.cz \
    --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).