Max Nikulin writes: >> the user should expect something like &foo{...} to produce \foo{...} or >> <span class=foo>...</span>, etc. The only difference is that there would >> be an anonymous variant &_{...}. > > I do not try to dispute \foo and class="foo" as default behavior. I > suggest to implement possibility to override default behavior of > &foo{text} to \bar{text} and <bar>text</bar>. The same is applicable > for anonymous objects > > &_[:latex_command bar :html_element bar]{text}
Maxim, I insist that I follow the logic of the "large" special blocks. Anyway, I think your example only makes sense in HTML, or at least I can't make sense of it in LaTeX. Why would anyone want &foo{text} to be passed to LaTeX as \bar{text}, instead of just &bar{text}? In HTML it does seem sensible to me that someone would want to change the tags. Maybe with a :html-tag, or something like that. As for :latex-command, if I understand it correctly, I don't quite see how useful this could be: &foo[:latex-command bar]{text} == LaTeX ==> \bar{text} when it is simpler to put: &bar{text} The same thing happens with the anonymous variant: &_[:latex-command foo]{text} == LaTeX ==> \foo{text} which is identical to putting &foo{text} The anonymous variant would be equivalent in LaTeX to a \begingroup...\endgroup, or rather to {...}. One could add all the commands one wants within the group simply with :prelatex: &_[:prelatex \foo\bar\vaz\blah{}]{text} ==> {\foo\bar\vaz\blah{}text} I'm not opposed to your ideas, I just can't find a use case for it. In LaTeX, I mean. In the case of HTML I find it useful, indeed, to have more control over the tags: <foo></foo>, <bar></bar>, etc. In any case, I think that my implementation leaves open the possibility of extending it with everything you mentioned, or anything else. -- Juan Manuel Macías -- Composición tipográfica, tratamiento de datos, diseño editorial y ortotipografía