2015-10-24 0:18 GMT+02:00 Nicolas Goaziou : > Fabrice Popineau writes: > > > I agree that raw html can be output by macros, but it can easily break > > too. > > I think you are missing the "inline part". You cannot use macros to > generate, or even replace a block element in HTML (e.g., a paragraph). > > Well, thinking about it, "raw inline html" needs to be clarified for me, because even a mere : @@html:
@@ is surrounded by a paragraph. My point is that what can be achieved by macros depends on the backend, which defeats part of the purpose of having a high level markup language. #+MACRO: newline @@latex:\\@@ @@html:
@@ This works for LaTeX, because LaTeX has no markup for paragraphs (I agree it is pure luck), but fails for HTML because there is one. OTOH, resorting to babel blocks to insert a newline is not viable option: it takes much more to achieve something very simple. Basically, macros are of no help to solve this : ------------------------------------------------------------------------------------------ #+MACRO: newline @@latex:\\@@ @@html:
@@ * Section 2 Some text. {{{newline}}} Some other text. #+html:
#+latex: \\ Some other other text. ------------------------------------------------------------------------------------------ The macro way isn't a proper way: the
will be embedded in a paragraph, where it shouldn't. Only the second way achieves cleanly the expected effect. Well, not quite because in LaTeX, the \\ should stick to the paragraph. So it should be : Some other text. #+latex: \\ #+html:
If I'm wrong, thanks for pointing me to the right way to use macros. And if I'm right, maybe in the long term, Org needs another, different, macro system to help at this level. Regards, Fabrice