From: John Hendy <jw.hendy@gmail.com>
To: Nicolas Goaziou <n.goaziou@gmail.com>
Cc: Bastien <bzg@gnu.org>, emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Proposal for images in markdown export (ox-md)
Date: Mon, 10 Feb 2014 11:03:53 -0600 [thread overview]
Message-ID: <CA+M2ft8DWdSAZLKRC4AoYfRTeDgFOJ_jYTX-5wOt_=yUPNzW4g@mail.gmail.com> (raw)
In-Reply-To: <878utincj9.fsf@gmail.com>
On Mon, Feb 10, 2014 at 10:43 AM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Hello,
>
> Bastien <bzg@gnu.org> 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
=![description](path/to/image.png)=
- (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.
John
>
>
> Regards,
>
> --
> Nicolas Goaziou
prev parent reply other threads:[~2014-02-10 17:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-10 0:21 Proposal for images in markdown export (ox-md) John Hendy
2014-02-10 9:07 ` Bastien
2014-02-10 16:43 ` Nicolas Goaziou
2014-02-10 17:03 ` John Hendy [this message]
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+M2ft8DWdSAZLKRC4AoYfRTeDgFOJ_jYTX-5wOt_=yUPNzW4g@mail.gmail.com' \
--to=jw.hendy@gmail.com \
--cc=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).