emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] two simple derived backend questions


From: Rasmus
Subject: Re: [O] two simple derived backend questions
Date: Thu, 15 Oct 2015 09:46:07 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Hi Matt,

Matt Price <address@hidden> 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.

In that case I would indeed use a filter and run it conditional on the
file path, available through the info plist.

You could can add lines via org-export-before-processing-hook.  Combine,
outline-next-heading (or just re-search-forward and org-heading-regexp),
check with org-element-at-point or org-outline-level and go to the end of
the headline and insert your line (if you use org-element-at-point for
this, remember to skip backwards through the " \n\t").

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

It gives a div already with ox-md, right?  What do you want more?  Do you
want it to be an <aside ...></aside ...> element?  If so, use a filter on
org-export-filter-special-block-functions that does a regexp replacement.

Rasmus

-- 
Don't panic!!!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]