* problem with umlauts in headers and text length limitation
@ 2002-09-14 8:43 Henning Hraban Ramm
2002-09-14 20:35 ` Hans Hagen
0 siblings, 1 reply; 6+ messages in thread
From: Henning Hraban Ramm @ 2002-09-14 8:43 UTC (permalink / raw)
Ahoi!
There's a problem remaining with my address book: The names in my header
doesn't show special chars like umlauts, but entity names instead.
Here's my setup:
----------------------
\def\RegisterPageMark#1#2% #1=Class #2=Text
{\iftrialtypesetting \else
\doglobal\increment\MNamCounter%
\textreference[#1:t:\MNamCounter]{#2}%
\doifreferencefoundelse{#1:t:\MNamCounter}
{\doifundefined{#1:f:\currentrealreference}%
{\setxvalue{#1:f:\currentrealreference}%
{\noexpand\in[#1:t:\MNamCounter]}}
\setxvalue{#1:l:\currentrealreference}%
{\noexpand\in[#1:t:\MNamCounter]}}%
{}%
\fi}
\def\GetFirstOnPage#1{\getvalue{#1:f:\realfolio}} % #1=Class
\def\GetLastOnPage#1{\getvalue{#1:l:\realfolio}} % #1=Class
\setupheadertexts [][\limitatetext{\GetFirstOnPage{MNam}}{5mm}{}--%
\limitatetext{\GetLastOnPage{MNam}}{5mm}{}]
\def\Name#1{\bf #1\RegisterPageMark{MNam}{#1}}
-----------------------
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) ?)
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.
Grüßlis vom Hraban!
--
http://www.fiee.net
http://www.ramm.ch
---
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with umlauts in headers and text length limitation
2002-09-14 8:43 problem with umlauts in headers and text length limitation Henning Hraban Ramm
@ 2002-09-14 20:35 ` Hans Hagen
2002-09-15 10:58 ` Henning Hraban Ramm
0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2002-09-14 20:35 UTC (permalink / raw)
Cc: ntg-context
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
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with umlauts in headers and text length limitation
2002-09-14 20:35 ` Hans Hagen
@ 2002-09-15 10:58 ` Henning Hraban Ramm
2002-09-15 12:09 ` problem with " Henning Hraban Ramm
2002-09-16 9:40 ` problem with umlauts in headers and " Hans Hagen
0 siblings, 2 replies; 6+ messages in thread
From: Henning Hraban Ramm @ 2002-09-15 10:58 UTC (permalink / raw)
Cc: ntg-context
Am Samstag, 14. September 2002 22:35 schrieb Hans Hagen:
> this. The following 'adaption' will provide more control:
Thank you, but it causes the following error:
systems : beware: some patches loaded from cont-new.tex!
! Missing \endcsname inserted.
<to be read again>
\unhbox
\leavevmode ->\unhbox
\voidb@x
\bottomaccent #1#2#3#4#5->\leavevmode
\vtop {\forgetall \baselineskip
\zerop...
\dohandleaccent ...acterencoding #1\endcsname {#2}
\else \csname
\nocharacter...
<argument> \c !
expansie
\dosetvalue ...!internal!n \ifcsname \k!prefix! #2
\endcsname \let
\c!interna...
...
l.1063 [\c!expansie=\v!nee]
--------------------------------
Grüßlis vom Hraban!
--
http://www.fiee.net
http://www.ramm.ch
---
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with text length limitation
2002-09-15 10:58 ` Henning Hraban Ramm
@ 2002-09-15 12:09 ` Henning Hraban Ramm
2002-09-16 10:01 ` Hans Hagen
2002-09-16 9:40 ` problem with umlauts in headers and " Hans Hagen
1 sibling, 1 reply; 6+ messages in thread
From: Henning Hraban Ramm @ 2002-09-15 12:09 UTC (permalink / raw)
Am Sonntag, 15. September 2002 12:58 schrieb Henning Hraban Ramm:
> Thank you, but it causes the following error:
My fault: I placed it after the \protect. Now *this* works.
But the \FirstNCharacters thing causes (in the second texexec run):
! Argument of \dosplitstring has an extra }.
<inserted text>
\par
<to be read again>
}
\doifelsenothing #1->\edef \!!stringa {#1}
\ifx \!!stringa \empty
\expandafte...
<argument> ...ce \ignorespaces \rightofreference }
{\egroup
\dosymbolreferenc...
\doifreferencefoundelse ...ce \ifreferencefound #2
\else #3\fi \egroup
\dores...
\dododododoinatreference ...eference {#1}{#2}[#3]}
\referentieinfo
<{#3}\glob...
...
l.46 \stoptabulate
----------------------
My setup:
\setupheadertexts [][\limitatetext{\GetFirstOnPage{MNam}}{5mm}{}--%
\limitatetext{\GetLastOnPage{MNam}}{5mm}{}]
%\setupheadertexts [][{\FirstNCharacters{3}{\GetFirstOnPage{MNam}}--%
% \FirstNCharacters{3}{\GetLastOnPage{MNam}}}]
\def\Name#1{\bf #1\RegisterPageMark{MNam}{\FirstNCharacters{3}{#1}}}
I tried to put the command in the headertext definition or in the Name
definition with same result.
First I had your code in my environment, then put it in supp-fun.tex as you
wrote and remade the formats. The same.
Grüßlis vom Hraban!
--
http://www.fiee.net
http://www.ramm.ch
---
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with text length limitation
2002-09-15 12:09 ` problem with " Henning Hraban Ramm
@ 2002-09-16 10:01 ` Hans Hagen
0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2002-09-16 10:01 UTC (permalink / raw)
Cc: ntg-context
At 02:09 PM 9/15/2002 +0200, you wrote:
>Am Sonntag, 15. September 2002 12:58 schrieb Henning Hraban Ramm:
> > Thank you, but it causes the following error:
>
>My fault: I placed it after the \protect. Now *this* works.
>
>But the \FirstNCharacters thing causes (in the second texexec run):
>
>! Argument of \dosplitstring has an extra }.
><inserted text>
can you send me a test file ?
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
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: problem with umlauts in headers and text length limitation
2002-09-15 10:58 ` Henning Hraban Ramm
2002-09-15 12:09 ` problem with " Henning Hraban Ramm
@ 2002-09-16 9:40 ` Hans Hagen
1 sibling, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2002-09-16 9:40 UTC (permalink / raw)
Cc: ntg-context
At 12:58 PM 9/15/2002 +0200, you wrote:
>Am Samstag, 14. September 2002 22:35 schrieb Hans Hagen:
> > this. The following 'adaption' will provide more control:
>
>Thank you, but it causes the following error:
>
>systems : beware: some patches loaded from cont-new.tex!
>! Missing \endcsname inserted.
><to be read again>
> \unhbox
>\leavevmode ->\unhbox
> \voidb@x
>\bottomaccent #1#2#3#4#5->\leavevmode
> \vtop {\forgetall \baselineskip
>\zerop...
>
>\dohandleaccent ...acterencoding #1\endcsname {#2}
> \else \csname
>\nocharacter...
><argument> \c !
well, looks like you put teh patch before \unprotect, i.e. \c ! something
instead of \c!something -)
I'll make a proper new beta later today
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
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-09-16 10:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-14 8:43 problem with umlauts in headers and text length limitation Henning Hraban Ramm
2002-09-14 20:35 ` Hans Hagen
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
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).