emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* problem with markdown exporter
@ 2014-08-20 18:03 Ken Mankoff
  2014-08-21  9:09 ` Nicolas Goaziou
  0 siblings, 1 reply; 2+ messages in thread
From: Ken Mankoff @ 2014-08-20 18:03 UTC (permalink / raw)
  To: Org-Mode Mailing List

I've turn on Markdown exporting with (require 'ox-md). Citations aren't
being exported properly, so I'm trying to customize it. I have the
following setup:

(org-add-link-type
 "textcite"  (lambda (key) (org-open-file cby-references-file t nil key))
 (lambda (path desc format)
   (cond
    ((eq format 'latex) (format "\\textcite{%s}" path))
    ((eq format 'md) (format "[@%s]" path))
    ((eq format 'odt) (format "%s" desc))
    ((eq format 'html) (format "<cite>%s</cite>" path))
    )))

Which works for latex, odt, and hml. But it doesn't appear that the
format string is ever being set to 'md, and so the [[cite:foo][Foo,
YYYY]] in my org file isn't getting converted to [@foo].

Searching online I find many strings matching "(eq format 'odt)" or
'latex but none with 'md. Is there some other way to achieve this?

Thanks,

  -k.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: problem with markdown exporter
  2014-08-20 18:03 problem with markdown exporter Ken Mankoff
@ 2014-08-21  9:09 ` Nicolas Goaziou
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2014-08-21  9:09 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: Org-Mode Mailing List

Hello,

Ken Mankoff <mankoff@gmail.com> writes:

> I've turn on Markdown exporting with (require 'ox-md). Citations aren't
> being exported properly, so I'm trying to customize it. I have the
> following setup:
>
> (org-add-link-type
>  "textcite"  (lambda (key) (org-open-file cby-references-file t nil key))
>  (lambda (path desc format)
>    (cond
>     ((eq format 'latex) (format "\\textcite{%s}" path))
>     ((eq format 'md) (format "[@%s]" path))
>     ((eq format 'odt) (format "%s" desc))
>     ((eq format 'html) (format "<cite>%s</cite>" path))
>     )))
>
> Which works for latex, odt, and hml. But it doesn't appear that the
> format string is ever being set to 'md, and so the [[cite:foo][Foo,
> YYYY]] in my org file isn't getting converted to [@foo].

This should be fixed. Thank you for reporting it.


Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-21  9:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-20 18:03 problem with markdown exporter Ken Mankoff
2014-08-21  9:09 ` Nicolas Goaziou

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).