From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: emacs-orgmode@gnu.org
Subject: Re: exporting drawers: odt versus LaTeX
Date: Mon, 30 Apr 2018 13:46:10 +0200 [thread overview]
Message-ID: <87k1sonchp.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <871sf3olml.fsf@gmail.com> (Eric S. Fraga's message of "Wed, 25 Apr 2018 07:17:38 +0100")
Hello,
Eric S Fraga <esflists@gmail.com> 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
next prev parent reply other threads:[~2018-04-30 11:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-23 16:05 exporting drawers: odt versus LaTeX Eric S Fraga
2018-04-23 21:26 ` Nicolas Goaziou
2018-04-24 5:37 ` Eric S Fraga
2018-04-24 7:36 ` Nicolas Goaziou
2018-04-24 8:34 ` Eric S Fraga
2018-04-24 21:43 ` Nicolas Goaziou
2018-04-25 6:17 ` Eric S Fraga
2018-04-30 11:46 ` Nicolas Goaziou [this message]
2018-04-30 13:36 ` Eric S Fraga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k1sonchp.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.