From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Hendy Subject: Re: Proposal for images in markdown export (ox-md) Date: Mon, 10 Feb 2014 11:03:53 -0600 Message-ID: References: <87eh3b9w0a.fsf@bzg.ath.cx> <878utincj9.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55677) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCuGx-0002FD-Op for emacs-orgmode@gnu.org; Mon, 10 Feb 2014 12:04:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCuGw-0003dW-OC for emacs-orgmode@gnu.org; Mon, 10 Feb 2014 12:03:55 -0500 In-Reply-To: <878utincj9.fsf@gmail.com> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nicolas Goaziou Cc: Bastien , emacs-orgmode On Mon, Feb 10, 2014 at 10:43 AM, Nicolas Goaziou wrote: > Hello, > > Bastien 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 , 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