ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* 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

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).