Leandro Penz wrote:
> > Could postprocs help?
John Plumridge wrote:
> The raw text isn't processed, merely printed, as given.
> Input from file is processed for final export processing to target
> rendering (tex or whatever): eg.
> %%!include(tex): ''../../inserts/livesearch.txt''
>
> post processing could work with a mark for it in your document like #NC,
> eg.,
> %!postproc(tex): '#NC' '\nocite{*} '
This would require a mark for every command, though. A more general
post-processing solution would be to revert every escaped string to
its unescaped source, with rules like:
%!postproc(tex): '\\\$' '$'
%!postproc(tex): '\$\\backslash\$' '$'
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.
Raw blocks version:
Dear diary
Today I earned 7 $ counting grains of sand.
Then I got another 9 $ to stop counting out loud.
I also learned about powers today:
%(tex) ""\(7+9 = 16 = 2^4\)""
%(html) ""7 + 9 = 16 = 2<sup>4</sup>""
Love,
Me.
Post-processing-de-escaping:
Dear diary
%(tex) Today I earned 7 \$ counting grains of sand.
%(html) Today I earned 7 $ counting grains of sand.
%(tex) Then I got another 9 \$ to stop counting out loud.
%(html) Then I got another 9 $ to stop counting out loud.
I also learned about powers today:
%(tex) \(7+9 = 16 = 2^4\)
%(html) 7 + 9 = 16 = 2<sup>4</sup>
Love,
Me.
Plus this second one would have a long list of postprocessing rules at the top.
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.
Cheers,
Sietse
------------------------------------------------------------------------------
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