* function that purges 8 bit text?
@ 2005-01-05 21:57 Henning Hraban Ramm
2005-01-06 11:56 ` Hans Hagen
0 siblings, 1 reply; 6+ messages in thread
From: Henning Hraban Ramm @ 2005-01-05 21:57 UTC (permalink / raw)
Hi there!
I try to typeset a roleplaying character sheet as PDF form;
it contains a table of skills, each line is a \SkillField after this
def:
\def\SkillField#1#2{\bTR\bTD #1\hfill (#2) \eTD \bTD
\definefield[#1][line][SkillSetup][#2]\field[#3]\eTD\eTR}
e.g.
\SkillField{Climbing}{+8}
becomes a table line like:
Climbing (+8) [+8]
Now there are a lot of skills that contain e.g. umlauts, so that
\definefield[#1] fails.
I don't like to introduce a third parameter.
Is there a possibility to strip all invalid chars from a string, so that
\SkillField{Erzählen}{0} can define a field named "Erzaehlen" or
"Erzhlen" or "Erzahlen"?
(Sorry, I can't program in TeX.)
If this is not possible, I'll try an optional parameter.
Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: function that purges 8 bit text?
2005-01-05 21:57 function that purges 8 bit text? Henning Hraban Ramm
@ 2005-01-06 11:56 ` Hans Hagen
2005-01-06 13:17 ` Henning Hraban Ramm
0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2005-01-06 11:56 UTC (permalink / raw)
Henning Hraban Ramm wrote:
> Is there a possibility to strip all invalid chars from a string, so that
> \SkillField{Erzählen}{0} can define a field named "Erzaehlen" or
> "Erzhlen" or "Erzahlen"?
> (Sorry, I can't program in TeX.)
just make me s small test file
there is lots of sanitizing code/trickery out there, but need a simple self
contained example
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: function that purges 8 bit text?
2005-01-06 11:56 ` Hans Hagen
@ 2005-01-06 13:17 ` Henning Hraban Ramm
2005-01-06 16:18 ` Hans Hagen
0 siblings, 1 reply; 6+ messages in thread
From: Henning Hraban Ramm @ 2005-01-06 13:17 UTC (permalink / raw)
Am 06.01.2005 um 12:56 schrieb Hans Hagen:
>> Is there a possibility to strip all invalid chars from a string, so
>> that
>> \SkillField{Erzählen}{0} can define a field named "Erzaehlen" or
>> "Erzhlen" or "Erzahlen"?
>
> just make me s small test file
> there is lots of sanitizing code/trickery out there, but need a simple
> self contained example
Hm, it doesn't really have anything to do with my application (defining
widget fields), so...
\starttext
\def\MyIndex#1{\index[\CLEAN{#1}]{#1}}
\MyIndex{Ätsch} % should expand to \index[Atsch]{Ätsch} or
\index[Aetsch]{Ätsch}
\stoptext
Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: function that purges 8 bit text?
2005-01-06 13:17 ` Henning Hraban Ramm
@ 2005-01-06 16:18 ` Hans Hagen
2005-01-06 18:28 ` Henning Hraban Ramm
0 siblings, 1 reply; 6+ messages in thread
From: Hans Hagen @ 2005-01-06 16:18 UTC (permalink / raw)
Henning Hraban Ramm wrote:
> Am 06.01.2005 um 12:56 schrieb Hans Hagen:
>
>>> Is there a possibility to strip all invalid chars from a string, so that
>>> \SkillField{Erzählen}{0} can define a field named "Erzaehlen" or
>>> "Erzhlen" or "Erzahlen"?
>>
>>
>> just make me s small test file
>> there is lots of sanitizing code/trickery out there, but need a simple
>> self contained example
>
>
> Hm, it doesn't really have anything to do with my application (defining
> widget fields), so...
>
> \starttext
>
> \def\MyIndex#1{\index[\CLEAN{#1}]{#1}}
>
> \MyIndex{Ätsch} % should expand to \index[Atsch]{Ätsch} or
> \index[Aetsch]{Ätsch}
>
> \stoptext
it's a three line macro to do this kind of things; however, i decided to install
yet another expansion handler,
\enableregime[windows] \setupregister[index][keyexpansion=strict]
\starttext
\index[Ätsch]{Ätsch} test \index{QÄtsch} test \index[ratsch]{RÄtsch} test
\placeindex
\stoptext
those who really want to know the details can look into the source and grep for
strict in core-sys.tex
think of something: \reduceargument an accented mess\to \ascii
I will upload a new alpha version in a few hours
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: function that purges 8 bit text?
2005-01-06 16:18 ` Hans Hagen
@ 2005-01-06 18:28 ` Henning Hraban Ramm
2005-01-07 8:34 ` Hans Hagen
0 siblings, 1 reply; 6+ messages in thread
From: Henning Hraban Ramm @ 2005-01-06 18:28 UTC (permalink / raw)
Am 06.01.2005 um 17:18 schrieb Hans Hagen:
> it's a three line macro to do this kind of things; however, i decided
> to install yet another expansion handler,
> \enableregime[windows] \setupregister[index][keyexpansion=strict]
> \starttext
> \index[Ätsch]{Ätsch} test \index{QÄtsch} test \index[ratsch]{RÄtsch}
> test \placeindex
> \stoptext
Thank you!
Will this also work with field names ( \definefield[Übelkübel]... )?
Grüßlis vom Hraban!
---
http://www.fiee.net/texnique/
http://contextgarden.net
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: function that purges 8 bit text?
2005-01-06 18:28 ` Henning Hraban Ramm
@ 2005-01-07 8:34 ` Hans Hagen
0 siblings, 0 replies; 6+ messages in thread
From: Hans Hagen @ 2005-01-07 8:34 UTC (permalink / raw)
Henning Hraban Ramm wrote:
> Will this also work with field names ( \definefield[Übelkübel]... )?
no, what happens when you do that?
(i can of course add such code in more places)
Hans
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-01-07 8:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-05 21:57 function that purges 8 bit text? Henning Hraban Ramm
2005-01-06 11:56 ` Hans Hagen
2005-01-06 13:17 ` Henning Hraban Ramm
2005-01-06 16:18 ` Hans Hagen
2005-01-06 18:28 ` Henning Hraban Ramm
2005-01-07 8:34 ` 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).