From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Macro question Date: Sat, 24 Oct 2015 11:53:59 +0200 Message-ID: <87a8r8y4lk.fsf@nicolasgoaziou.fr> References: <87fv11z5h3.fsf@nicolasgoaziou.fr> <871tclz0t4.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56871) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpvUo-00043s-VT for emacs-orgmode@gnu.org; Sat, 24 Oct 2015 05:52:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpvUn-0001QP-T9 for emacs-orgmode@gnu.org; Sat, 24 Oct 2015 05:52:18 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:33223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpvUn-0001QI-MU for emacs-orgmode@gnu.org; Sat, 24 Oct 2015 05:52:17 -0400 In-Reply-To: (Fabrice Popineau's message of "Sat, 24 Oct 2015 11:39:24 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Fabrice Popineau Cc: "emacs-orgmode@gnu.org" Fabrice Popineau writes: > 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. 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:
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,