emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: "Charles C. Berry" <ccberry@ucsd.edu>
Cc: Org Mode <emacs-orgmode@gnu.org>, Rasmus <rasmus@gmx.us>
Subject: Re: two simple derived backend questions
Date: Fri, 23 Oct 2015 14:04:27 -0400	[thread overview]
Message-ID: <CAN_Dec9x_3cn+3va_=WXqXWy8pLMDhv2h=ADESoTj8_Yzg454Q@mail.gmail.com> (raw)
In-Reply-To: <alpine.OSX.2.20.1510142016190.901@charles-berrys-macbook.local>

[-- Attachment #1: Type: text/plain, Size: 3385 bytes --]

Hi, I realize I never responded to say thank you.

This is a big help, and I now have things working the way I like!
matt


On Wed, Oct 14, 2015 at 11:35 PM, Charles C. Berry <ccberry@ucsd.edu> wrote:

> On Wed, 14 Oct 2015, Matt Price wrote:
>
> On Wed, Oct 14, 2015 at 6:55 PM, Rasmus <rasmus@gmx.us> wrote:
>>
>> Hi Matt,
>>>
>>> Matt Price <moptop99@gmail.com> 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?
>>>
>>> <hr>, 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:
>>>>
>>>> <aside class="speaker-notes">
>>>> whaever I put here
>>>> </aside>
>>>>
>>>
>>> For me it’s inserted as
>>>
>>>
>>> <div class="notes">
>>> whatever I put here
>>>
>>> </div>
>>>
>>>
>>> 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 "<aside class=\"speaker-notes\">\n"
>                 (org-element-property :value export-block)
>                 "</aside>\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
>

[-- Attachment #2: Type: text/html, Size: 5227 bytes --]

  reply	other threads:[~2015-10-23 18:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-14 18:22 two simple derived backend questions Matt Price
2015-10-14 22:55 ` Rasmus
2015-10-15  1:59   ` Matt Price
2015-10-15  3:35     ` Charles C. Berry
2015-10-23 18:04       ` Matt Price [this message]
2015-10-15  7:46     ` Rasmus

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='CAN_Dec9x_3cn+3va_=WXqXWy8pLMDhv2h=ADESoTj8_Yzg454Q@mail.gmail.com' \
    --to=moptop99@gmail.com \
    --cc=ccberry@ucsd.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=rasmus@gmx.us \
    /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).