So I think I found a solution for my problem which seems to work. Thanks for listening and your input of ideas. What I did was to follow this idea:
I am thinking of introducing a modifier, say § to switch the html entity encoding for another one which I of course have to implement on my own. The end result would be:
{{ myObject }}    to encoe with HTML entities for all things (X)HTML {{& myObject }}    to not encode at all (e.g. when I need & as & in the resulting String) {{§ myObject }}   for an individually added encoding (tbd - for my LaTeX needs)
It turns out is was easy to implement a prototype of this (20 minutes?) There is only one tiny hole in this implementation: If I want to fill in a table body with Text that includes an &. I need to think about it later. Maybe I'll have to come back to the catcode thingie and choose some unlikely character for column separation and use my newly implemented {{§ encoding... All that's needed to implement the above idea were these changes (VA Smalltalk Fileout Format): !Character publicMethods ! asLaTeXString    "substitute characters like & into LaTex compliant elements"    "For protoytpe just encode &"    (Dictionary with: $& -> '\&')       keysAndValuesDo: [:k :v | self = k ifTrue: [^v]].    ^String with: self! ! !String publicMethods ! asLaTeXString    "substitute the < & > into LaTeX compliant elements"    "'<&>' asLaTeXString"    ^ self class new: self size streamContents: [ :s|       self do: [:c | s nextPutAll: c asLaTeXString ]]! ! MustacheToken subclass: #MustacheLaTeXEscapedToken  instanceVariableNames: ''  classVariableNames: ''  poolDictionaries: ''! !MustacheLaTeXEscapedToken publicMethods ! accept: aVisitor    aVisitor visitLaTeXEscapedToken: self! valueInContext: anObject    ^(super valueInContext: anObject)asLaTeXString ! ! !MustacheParser publicMethods ! buildDelimiterExtensions    ^Dictionary new       at: $# put: [self startSection: #MustacheSection abrAsClass];       at: $/ put: [self endSection];       at: ${ put: [self readDefaultUnescapedToken];       at: $& put: [self readUnescapedToken];       at: $!! put: [self readComment];       at: $^ put: [self startSection: #MustacheInvertedSection abrAsClass];       at: $= put: [self readChangeDelimiter];       at: $> put: [self readPartial];       at: $§ put: [self readLaTeXEscapedToken];       yourself! !MustacheVisitor publicMethods ! visitLaTeXEscapedToken: aToken ! ! !MustacheWriteVisitor publicMethods ! visitLaTeXEscapedToken: aToken    self addString: (aToken valueInContext: context)! ! So what do people think about this? Is this a worthwhile extension? Do you see problems on the horizon that I cannot see? Joachim -- ----------------------------------------------------------------------- Objektfabrik Joachim Tuchel mailto:jtuchel@objektfabrik.de Fliederweg 1 http://www.objektfabrik.de D-71640 Ludwigsburg http://joachimtuchel.wordpress.com Telefon: +49 7141 56 10 86 0 Fax: +49 7141 56 10 86 1