Hello, On 10/02/2010 19:30, Sietse Brouwer wrote: > Leandro Penz wrote: >>> Could postprocs help?
> Disadvantage: every target has its own escaping rules, so if we use > post-processing we'll need an alternative version for every line with > a sometimes-escape-needing character on it. Raw blocks would also need > alternative versions, but would preserve automatic escaping elsewhere > in the document. > [..] > Plus this second one would have a long list of postprocessing rules at the > top. > Actually, with the *svn* version and the new tagged mark (''), you can do it very simply with a preproc. This is (almost, see later) what I used for my maths typesetting needs %!preproc: "(\$[^$]+\$)" "''\1''" As the '' does not do escaping, you do not need to unescape stuff like \... > Secondary advantage: conditionally skipping the doEscape call makes > for simpler and more future-proof code than calling doEscape and > undoing it in postprocessing. > > So, Leandro, in answer to your question: postprocs could help, but I > think raw blocks would make life simpler. It's not a must-have, but I > thought the devs might like the idea. > But I do agree here. It should be interesting, within this thread and considering the introduction of this third ultraraw mark to discuss more about this. What are the associated use cases for verbatim like mode? What is really needed ?(3 marks for verbatim related operations are maybe too much. And what about escaping?) IMHO, there is need for only two use cases: 1) code listings and the likes 2) target tagged code And so only 2 "verbatim like" tags 1) verbatim inline/block : that *are to be rendered* exactly as formatted, in monospaced font 2) tagged inline/block: that are included verbatim in the target code (*no* escaping, not even conditionally) So that means that the raw inline/block modes should now have no escaping at all (and therefore the semantic of the tagged mark ('') being implemented, this third mark could be silently removed). Actually, I do not see the purpose of escaping for the raw ("") tag. If you need to escape, you probably do not need to put it inside a raw inline/block. What do you think? Do you have use cases where it is actually necessary/useful to have escaping in raw inlines or blocks? I am maybe missing something... Is it to enable/disable beautifiers in monospaced text? Is this a possible use case? Note that, contrary to what is written in the doc, it seems you can no more have beautifiers inside monospaced inlines/blocks in the last versions of txt2tags. And discussing this area of escaping, there are currently some discrepancies in the way the block/inline versions of each raw/verbatim/tagged marks are treated. Just to keep on the LaTeX use case, this is what is escaped (E) or not escaped (N) according to the marks (please correct me if necessary) "" """ `` ``` '' ''' \ E E E N N N _ E N E N E N So, with the current svn revision, you actually have to unescape the "_" symbol if you want to typeset latex maths formulas... Cheers, Emmanuel ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ txt2tags-list mailing list https://lists.sourceforge.net/lists/listinfo/txt2tags-list