emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Customizing TOCs in Derived Exporters
@ 2013-09-16 20:11 Josiah Schwab
  2013-09-17 13:49 ` Rasmus
  0 siblings, 1 reply; 5+ messages in thread
From: Josiah Schwab @ 2013-09-16 20:11 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi All,

I'm working on writing a derived exporter and I've been using ox-md.el
as a template/guide.

If I use the markdown exporter to export the following org file


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: example.org --]
[-- Type: text/x-org, Size: 207 bytes --]

* Meeting Notes
** First Topic
*** Subtopic 1
+ a point
+ an *important* point
*** Subtopic 2
+ another point
+ an /interesting/ point
** Second Topic
One long announcement without any particular structure.

[-- Attachment #3: Type: text/plain, Size: 69 bytes --]


an html table of contents appears at the top of the exported file.


[-- Attachment #4: example.md --]
[-- Type: text/plain, Size: 615 bytes --]

<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#sec-1">1. Meeting Notes</a>
<ul>
<li><a href="#sec-1-1">1.1. First Topic</a>
<ul>
<li><a href="#sec-1-1-1">1.1.1. Subtopic 1</a></li>
<li><a href="#sec-1-1-2">1.1.2. Subtopic 2</a></li>
</ul>
</li>
<li><a href="#sec-1-2">1.2. Second Topic</a></li>
</ul>
</li>
</ul>
</div>
</div>
# Meeting Notes

## First Topic

### Subtopic 1

-   a point

-   an **important** point

### Subtopic 2

-   another point

-   an *interesting* point

## Second Topic

One long announcement without any particular structure.

[-- Attachment #5: Type: text/plain, Size: 271 bytes --]


How does one go about overriding org-html-toc, which unlike something
like org-html-bold, does not appear in org-export-define-backend?  I
don't want the TOC not to appear, rather want it to be generated by
another function, org-md-toc or what have you.

Thanks,
Josiah

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

* Re: Customizing TOCs in Derived Exporters
  2013-09-16 20:11 Customizing TOCs in Derived Exporters Josiah Schwab
@ 2013-09-17 13:49 ` Rasmus
  2013-09-18 21:15   ` Josiah Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Rasmus @ 2013-09-17 13:49 UTC (permalink / raw)
  To: emacs-orgmode

Hi Josiah,

Josiah Schwab <jwschwab@berkeley.edu> writes:

> How does one go about overriding org-html-toc, which unlike something
> like org-html-bold, does not appear in org-export-define-backend?  I
> don't want the TOC not to appear, rather want it to be generated by
> another function, org-md-toc or what have you.

I'm not sure whether this would work with md simply 'cause I haven't
worked with the html+friends exporter(s), but perhaps you could
replace the inner-template, i.e. write a replacement for
org-html-inner-template.

–Rasmus

-- 
Together we'll stand, divided we'll fall

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

* Re: Customizing TOCs in Derived Exporters
  2013-09-17 13:49 ` Rasmus
@ 2013-09-18 21:15   ` Josiah Schwab
  2013-09-18 22:12     ` Rasmus
  0 siblings, 1 reply; 5+ messages in thread
From: Josiah Schwab @ 2013-09-18 21:15 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode


Rasmus writes:

> Josiah Schwab writes:
>
>> How does one go about overriding org-html-toc, which unlike something
>> like org-html-bold, does not appear in org-export-define-backend?  I
>> don't want the TOC not to appear, rather want it to be generated by
>> another function, org-md-toc or what have you.
>
> I'm not sure whether this would work with md simply 'cause I haven't
> worked with the html+friends exporter(s), but perhaps you could
> replace the inner-template, i.e. write a replacement for
> org-html-inner-template.

Yes, this suggestion worked for me.  Thank you for the advice.  Little
by little I will come to understand the new exporter (not that I
understood the old one).

Independent of the confusion it caused me while trying to figure out how
things work, it seems strange that the ox-md exporter generates a
non-markdown TOC using org-html-toc.  But I will leave that for those
who really use the markdown exporter, which is neither you or me.

Best,
Josiah

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

* Re: Customizing TOCs in Derived Exporters
  2013-09-18 21:15   ` Josiah Schwab
@ 2013-09-18 22:12     ` Rasmus
  2013-09-18 22:53       ` Josiah Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Rasmus @ 2013-09-18 22:12 UTC (permalink / raw)
  To: jschwab; +Cc: emacs-orgmode

Josiah Schwab <jschwab@gmail.com> writes:

> Rasmus writes:
>
>> Josiah Schwab writes:
>>
>>> How does one go about overriding org-html-toc, which unlike something
>>> like org-html-bold, does not appear in org-export-define-backend?  I
>>> don't want the TOC not to appear, rather want it to be generated by
>>> another function, org-md-toc or what have you.
>>
>> I'm not sure whether this would work with md simply 'cause I haven't
>> worked with the html+friends exporter(s), but perhaps you could
>> replace the inner-template, i.e. write a replacement for
>> org-html-inner-template.
>
> Yes, this suggestion worked for me.  Thank you for the advice.  Little
> by little I will come to understand the new exporter (not that I
> understood the old one).
>
> Independent of the confusion it caused me while trying to figure out how
> things work, it seems strange that the ox-md exporter generates a
> non-markdown TOC using org-html-toc.  But I will leave that for those
> who really use the markdown exporter, which is neither you or me.

Is there a vanilla-markdown TOC-keyword?  My understanding is that
markdown always understand plain html, whence the html-toc is
reusable.  If there is exists a vanilla-markdown TOC perhaps it should
be used.

–Rasmus

-- 
Dung makes an excellent fertilizer

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

* Re: Customizing TOCs in Derived Exporters
  2013-09-18 22:12     ` Rasmus
@ 2013-09-18 22:53       ` Josiah Schwab
  0 siblings, 0 replies; 5+ messages in thread
From: Josiah Schwab @ 2013-09-18 22:53 UTC (permalink / raw)
  To: Rasmus; +Cc: emacs-orgmode


Rasmus writes:

> Josiah Schwab <jschwab@gmail.com> writes:

>> Independent of the confusion it caused me while trying to figure out how
>> things work, it seems strange that the ox-md exporter generates a
>> non-markdown TOC using org-html-toc.  But I will leave that for those
>> who really use the markdown exporter, which is neither you or me.
>
> Is there a vanilla-markdown TOC-keyword?  My understanding is that
> markdown always understand plain html, whence the html-toc is
> reusable.  If there is exists a vanilla-markdown TOC perhaps it should
> be used.

It sounds likely this is simply a confusion about the markdown
specification on my end then.

Thanks,
Josiah

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

end of thread, other threads:[~2013-09-18 22:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-16 20:11 Customizing TOCs in Derived Exporters Josiah Schwab
2013-09-17 13:49 ` Rasmus
2013-09-18 21:15   ` Josiah Schwab
2013-09-18 22:12     ` Rasmus
2013-09-18 22:53       ` Josiah Schwab

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