From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: exporting drawers: odt versus LaTeX Date: Tue, 24 Apr 2018 09:34:48 +0100 Message-ID: <87bme9dmtz.fsf@delle7240.chemeng.ucl.ac.uk> References: <87bme929jf.fsf@gmail.com> <87wowxobqc.fsf@nicolasgoaziou.fr> <87fu3lyxjn.fsf@ucl.ac.uk> <87efj5njhx.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fAtPb-0003vi-Mc for emacs-orgmode@gnu.org; Tue, 24 Apr 2018 04:34:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fAtPY-0000o9-CI for emacs-orgmode@gnu.org; Tue, 24 Apr 2018 04:34:55 -0400 Received: from mail-wr0-x22d.google.com ([2a00:1450:400c:c0c::22d]:42326) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fAtPY-0000nU-5U for emacs-orgmode@gnu.org; Tue, 24 Apr 2018 04:34:52 -0400 Received: by mail-wr0-x22d.google.com with SMTP id s18-v6so48259003wrg.9 for ; Tue, 24 Apr 2018 01:34:52 -0700 (PDT) In-Reply-To: <87efj5njhx.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Tue, 24 Apr 2018 09:36:42 +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" To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tuesday, 24 Apr 2018 at 09:36, Nicolas Goaziou wrote: > Hello, > > Eric S Fraga writes: > >> this is not quite true; in LaTeX, a blank line (\n\n) indicates a >> paragraph but org does not treat a drawer as starting a paragraph. > > Of course it does. Drawers contains paragraphs, not the opposite way. Hi Nicolas, We may have to agree to disagree here. The export outputs indicate the opposite. I understand your reasoning (as given in the rest of the post) but I think there is a fundamental design issue here. However, I can live with it. So, moving forward, is there an ODT expert that can tell me how to wrap the contents of a drawer so that the background of the drawer contents, which obviously consist of 1 or more paragraphs on ODT export, is a specific colour? I tried: #+begin_src emacs-lisp :results none ;; format note drawers (setq-local org-latex-format-drawer-function (lambda (name contents) (if (string=3D name "note") (progn (format "\\hl{%s}" contents))))) (setq-local org-odt-format-drawer-function (lambda (name contents) (if (string=3D name "note") (progn (format "%s<= /text:span>" contents))))) #+end_src=20 but this leads to malformed XML according to libreoffice. The LaTeX works because I expect note drawers to be short and no more than a single "paragraph". For other drawers, I used mdframed in LaTeX to achieve a similar effect. (ignore the emacs lisp correctness/style issues... e.g. progn and what happens if a different drawer; this is work in progress ;-)) This is all relates to my preemptively moving away from inline tasks for a number of use cases. Thank you. =2D-=20 Eric S Fraga via Emacs 27.0.50, Org release_9.1.7-475-g3ffc7d --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWt7sKAAKCRDIkZPY//z2 fYAxAKCXXMEwQIPicScUsndWLY5rLDeNQACfSie7Arq3o1ttY/TjuWfqLhiyWJI= =Oh/c -----END PGP SIGNATURE----- --=-=-=--