ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Hans Hagen <pragma@wxs.nl>
Cc: ntg-context@ntg.nl
Subject: Re: problem with umlauts in headers and text length limitation
Date: Sat, 14 Sep 2002 22:35:32 +0200	[thread overview]
Message-ID: <5.1.0.14.1.20020914221438.03346350@remote-1> (raw)
In-Reply-To: <200209141043.24044.angerweit@gmx.net>

At 10:43 AM 9/14/2002 +0200, Henning Hraban Ramm wrote:

>Addresses are set as tabulation; every line starts with a \Name{};
>but "Grün" becomes "Grudiaeresisn" etc.;
>input regime is "windows" (is there a better name for iso 8859-1(5) ?)

This is a result of text reference data being 'simplified', a side effect 
that goes unnoticed in most cases because the higher level commands handle 
this. The following 'adaption' will provide more control:

\setupreferencing
   [\c!expansie=\v!nee]

\def\dotextreference[#1]#2%
   {\bgroup
    \def\asciia{#1}%
    \convertexpanded\??rf{#2}\asciib
    \@EA\rawtextreference\@EA\s!txt\@EA\asciia\@EA{\asciib}%
    \egroup}

\def\dopagereference[#1]%
   {\rawpagereference\s!pag{#1}}

\def\doreference[#1]#2%
   {\bgroup
    \def\asciia{#1}%
    \convertexpanded\??rf{#2}\asciib
    \@EA\rawreference\@EA\s!ref\@EA\asciia\@EA{\asciib}%
    \egroup}

now, you'll get your umlauts. For the moment, put this change in 
cont-new.tex since i don't know how it affects other code (well, it demands 
a small change to the line numbering code for instance)

>Further I'd like to limitate the Names to the first couple of chars; but
>\limitatetext uses at least the first word plus comma, not less. Ok, Hans
>wrote that "GetThreeTokens" command for me, but I'd prefer a generic
>solution.

\def\FirstNCharacters#1#2% will go into supp-fun.tex
   {\bgroup
    \scratchcounter\zerocount
    \def\docommando##1%
      {\ifnum\scratchcounter=#1\else
         ##1\relax % catches ##1 = \"e and alike
         \advance\scratchcounter\plusone
       \fi}
    \handletokens#2\with\docommando
    \egroup}

Rhaban likes \FirstNCharacters{3}{fr{\"o}beln}

Hans
-------------------------------------------------------------------------
                                   Hans Hagen | PRAGMA ADE | pragma@wxs.nl
                       Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
                        information: http://www.pragma-ade.com/roadmap.pdf
                     documentation: http://www.pragma-ade.com/showcase.pdf
-------------------------------------------------------------------------


  reply	other threads:[~2002-09-14 20:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-14  8:43 Henning Hraban Ramm
2002-09-14 20:35 ` Hans Hagen [this message]
2002-09-15 10:58   ` Henning Hraban Ramm
2002-09-15 12:09     ` problem with " Henning Hraban Ramm
2002-09-16 10:01       ` Hans Hagen
2002-09-16  9:40     ` problem with umlauts in headers and " 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=5.1.0.14.1.20020914221438.03346350@remote-1 \
    --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).