[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Proposal for images in markdown export (ox-md)

From: John Hendy
Subject: Re: [O] Proposal for images in markdown export (ox-md)
Date: Mon, 10 Feb 2014 11:03:53 -0600

On Mon, Feb 10, 2014 at 10:43 AM, Nicolas Goaziou <address@hidden> wrote:
> Hello,
> Bastien <address@hidden> writes:
>>> So, my proposal would be that if either are present, Org could
>>> (should?) use html image specifications instead of markdown.
>> I'll let Nicolas decide on this.
> FWIW, I think it makes sense to switch to HTML when attributes are
> given. Though, I don't use Markdown, so I may overlook something.

As I was thinking more about this (of course, right after sending),
I'm not sure it's the best idea, since markdown is like org: one
syntax that can flexibly be exported into numerous other formats.
Thus, I realized that for *me*, I'll either use Org -> LaTeX or Org ->
md -> html (via ox-ravel, knitr, or pandoc), but probaly *not* Org ->
md -> LaTeX (via knitr or pandoc).

Others, however, might want Org -> md -> LaTeX, so assuming that html
image tags are desired might be the wrong assumption and cause issues.
Perhaps a variable would be the way to go? This way, one could have
something like org-md-final-format (you get the idea) that could
provide different results:

- (setq org-md-final-format nil): ignores everything, including
#+begin/end_center and just outputs

- (setq org-md-final-format "html"): converts attr_html or attr_md and
#+begin/end_center to either inline styles with <img style="..."
src="path/to/img.png" />, or surrounds with a classed div tag and does
the appropriate styling via CSS (similar to current html export with
img.figure { ...style... }

- (setq org-md-final-format "latex"): converts attr_latex and
centering straight to LaTeX code. I have caution on this one as I
haven't actually looked into how knitr or pandoc work with md -> latex
and if it accepts raw LaTeX. I'm figuring it does, but just wanted to
mention that.

So, that would be one idea of how to deal with this. I'd love for
other markdown users to comment, as I'm not really sure how it's used
by the majority.


> Regards,
> --
> Nicolas Goaziou

reply via email to

[Prev in Thread] Current Thread [Next in Thread]