[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Macro question
From: |
Nicolas Goaziou |
Subject: |
Re: [O] Macro question |
Date: |
Sat, 24 Oct 2015 11:53:59 +0200 |
Fabrice Popineau <address@hidden> writes:
> Well, thinking about it, "raw inline html" needs to be clarified for
> me, because even a mere :
>
> @@html:<br/>@@
>
> 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:<br/>@@
>
> 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:<br/>@@
>
> * Section 2
>
> Some text.
>
> {{{newline}}}
>
> Some other text.
>
> #+html: <br/>
> #+latex: \\
>
> Some other other text.
> ------------------------------------------------------------------------------------------
>
> The macro way isn't a proper way: the <br/> will be embedded in a
> paragraph, where it shouldn't.
Exactly. Macros are not a solution for that, which is fine, IMO.
> 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: <br/>
I don't get it.
What about simply writing
Some other text.
\\
?
> 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.
Org already provides various tools. If a macro doesn't fit, you can use
a filter, or Babel, etc.
Regards,
- [O] Macro question, Fabrice Popineau, 2015/10/23
- Re: [O] Macro question, Nicolas Goaziou, 2015/10/23
- Re: [O] Macro question, Fabrice Popineau, 2015/10/23
- Re: [O] Macro question, Nicolas Goaziou, 2015/10/23
- Re: [O] Macro question, Fabrice Popineau, 2015/10/24
- Re: [O] Macro question,
Nicolas Goaziou <=
- Re: [O] Macro question, Fabrice Popineau, 2015/10/24
- Re: [O] Macro question, Nicolas Goaziou, 2015/10/24
- Re: [O] Macro question, Eric S Fraga, 2015/10/24
- Re: [O] Macro question, Fabrice Popineau, 2015/10/25
- Re: [O] Macro question, Eric S Fraga, 2015/10/25