luigi scarso wrote:
On Fri, May 22, 2009 at 8:11 PM, Hans Hagen <pra...@wxs.nl> wrote:

Peter Münster wrote:

Hello,

I would like to activate a remapper in a style or module file. How could
this be done?

I tried this without success:

\defineremapper[filterItem]
\remapcharacter[filterItem][`•]{\item}
\appendtoks \startfilterItem \to \everystarttext
\prependtoks \stopfilterItem  \to \everystoptext


kep in mind that the remapper is just a hack and will not be extended etc
etc; i'm not going to handle interferences with other mechanisms


Hans



I think the point is this :
in some situations one find useful to convert things like • in macros like
\item .
Of course, it can be done with  preprocessing , or with some ad-hoc macros
in lua code , etc
So, apart \remapcharacter, are there  any other safe ways to "remap
character" ?

one solution mentioned was making that character active and then do an unexpanded def which makes it roundtrip safe; of course we should leave characters like : untouched

the remapper works on all input and it might result in unwanted side effects .. imagine that someone defines symbol 1 as • and gets \item instead

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
-----------------------------------------------------------------
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to