From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: exporting drawers: odt versus LaTeX Date: Mon, 30 Apr 2018 13:46:10 +0200 Message-ID: <87k1sonchp.fsf@nicolasgoaziou.fr> References: <87bme929jf.fsf@gmail.com> <87wowxobqc.fsf@nicolasgoaziou.fr> <87fu3lyxjn.fsf@ucl.ac.uk> <87efj5njhx.fsf@nicolasgoaziou.fr> <87bme9dmtz.fsf@delle7240.chemeng.ucl.ac.uk> <874lk0mgb4.fsf@nicolasgoaziou.fr> <871sf3olml.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fD7G6-0005y4-OG for emacs-orgmode@gnu.org; Mon, 30 Apr 2018 07:46:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fD7G2-0001kC-PA for emacs-orgmode@gnu.org; Mon, 30 Apr 2018 07:46:17 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:59211) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fD7G2-0001jk-I6 for emacs-orgmode@gnu.org; Mon, 30 Apr 2018 07:46:14 -0400 Received: from saiph (40-67.ipv4.commingeshautdebit.fr [185.131.40.67]) (Authenticated sender: admin@nicolasgoaziou.fr) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 2C19E60012 for ; Mon, 30 Apr 2018 13:46:11 +0200 (CEST) Received: from ngz by saiph with local (Exim 4.89) (envelope-from ) id 1fD7Fy-0003Ja-C4 for emacs-orgmode@gnu.org; Mon, 30 Apr 2018 13:46:10 +0200 In-Reply-To: <871sf3olml.fsf@gmail.com> (Eric S. Fraga's message of "Wed, 25 Apr 2018 07:17:38 +0100") 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: emacs-orgmode@gnu.org Hello, Eric S Fraga writes: > Yes, I understand. I am definitely not disagreeing about how org parses > the elements, simply how it exports them. Then we agree on this point. Export is different because, well, target languages are also different... Since empty lines are preserved upon exporting documents, Org is /de facto/ nice with formats that separate paragraphs with blank lines, e.g., LaTeX or Texinfo. I.e, it adapts easily to their definition of a paragraph. As you noted, this is not the same for other back-ends, as HTML or ODT. At some point, I wanted to have Org adapt to their own definition of a paragraph. I.e., a parse-tree filter (provided by the back-end) would generate pseudo-elements matching the target's definition of a paragraph. Then, the parse-tree would convert the pseudo-element as a paragraph whereas it would do nothing for a regular paragraph. E,g., the following document Paragraph #+begin_quote Quote #+end_quote Paragraph 2 Paragraph 3 is parsed as (paragraph "Paragraph") (quote-block (paragraph "Quote")) (paragraph "Paragraph 2") (paragraph "Paragraph 3") the HTML parse tree filter would turn it into (html-paragraph (paragraph "Paragraph") (quote-block (html-paragraph (paragraph "Quote"))) (paragraph "Paragraph 2")) (html-paragraph (paragraph "Paragraph 3")) and since regular paragraph converter would be a no-op, this would really become: (html-paragraph "Paragraph" (quote-block (html-paragraph "Quote")) "Paragraph 2") (html-paragraph "Paragraph 3") Some parts of the export framework already implement a similar mechanism, e.g., `org-latex--wrap-latex-matrices'. But there are a some shortcomings. E.g., is an `html-paragraph' nested in an `html-paragraph' still valid? What about the quote block being a table, a plain list? IOW, what is the exact definition of HTML paragraph? Since I couldn't answer those questions, I'm mostly a LaTeX guy, this is not implemented so far. Regards, -- Nicolas Goaziou