From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Charles C. Berry" Subject: Re: two simple derived backend questions Date: Wed, 14 Oct 2015 20:35:50 -0700 Message-ID: References: <87k2qphxh2.fsf@gmx.us> Mime-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="0-926984887-1444880151=:901" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmZKl-0002Q3-65 for emacs-orgmode@gnu.org; Wed, 14 Oct 2015 23:36:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmZKg-000219-3E for emacs-orgmode@gnu.org; Wed, 14 Oct 2015 23:36:03 -0400 Received: from iport-bcv2-out.ucsd.edu ([132.239.0.73]:58498) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmZKf-0001z1-MX for emacs-orgmode@gnu.org; Wed, 14 Oct 2015 23:35:58 -0400 In-Reply-To: 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: Matt Price Cc: Org Mode , Rasmus This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-926984887-1444880151=:901 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Wed, 14 Oct 2015, Matt Price wrote: > On Wed, Oct 14, 2015 at 6:55 PM, Rasmus wrote: > >> Hi Matt, >> >> Matt Price writes: >> >>> a) add a horizontal rule >>> >>> pandoc expects a horizontal rule at each slide division. So, if >> possible, >>> I would like to add an hhr element at the end of every headline. >> >> What’s a hhr element? >> >>
, I meant > >> Can you just use something like >> --------------------------- >> >> for a horizontal rule? AFAIK, it’s inserted as "---". >> >> yes. but then I will have to take out all the "---------------------" > elements if I want to go back to using my original org documents again. > The point is that I have lots of these lecture notes, and would prefer not > to alter them too severely if possible. Err, what about --8<---------------cut here---------------start------------->8--- #+MACRO: hhr #+MD: --- * abc first slide {{{hhr}}} * def second slide {{{hhr}}} --8<---------------cut here---------------end--------------->8--- > >> b) speaker notes >>> >>> More importantly, org-reveal allows the use of speaker notes, thus: >>> >>> #+BEGIN_NOTES >>> >>> whatever I put here >>> >>> #+ END_NOTES >>> >>> is exported as: >>> >>> >> >> For me it’s inserted as >> >> >>
>> whatever I put here >> >>
>> >> > yes, that's right, I was being hasty. In any case, what I would like to do > is reproduce this behaviour in the markdown export; I have tried modifying > the md export but I am doing something wrong, clearly, and had hoped to get > some hints from the list... > > Ok here is a hint. You can add a menu item if you really need it. --8<---------------cut here---------------start------------->8--- #+BEGIN_SRC emacs-lisp (org-export-define-derived-backend 'md-plus 'md :translate-alist '( (export-block . org-md-plus-export-block)) :export-block '("NOTES")) (defun org-md-plus-export-block (export-block contents info) "Transcode a EXPORT-BLOCK NOTES element from Org to md-plus. CONTENTS is nil. INFO is a plist holding contextual information." (if (equal (org-element-property :type export-block) "NOTES") (concat "\n") (let ((parent-backend (org-export-backend-parent backend))) (if parent-backend (org-export-with-backend parent-backend export-block contents info))))) #+END_SRC #+BEGIN_NOTES just for the note takers... #+END_NOTES : Run like this : M-x (org-export-to-buffer 'md-plus "***md-plus-out***") --8<---------------cut here---------------end--------------->8--- HTH, Chuck --0-926984887-1444880151=:901--