Skip to content

Displaying section number in posts #106

Closed
wenshan-willowit opened this Issue Jan 24, 2013 · 5 comments

4 participants

@wenshan-willowit

Hi,

Thanks for this great Emacs plugin, it is very powerful and helpful.

Just wondering if it is possible to display section number in the blogs published by org2blog.
For example:

  • Hello ** World
  • Emacs
  • Is ** Powerful

-->

1 Hello
1.1 World
2 Emacs
3 Is
3.1 Powerful

I can see HTML labels like

@yam61
yam61 commented Feb 18, 2013

I face the same problem too.
Even with the #+options: toc:t num:t , the section number can only display in the table of contents.

I think that beacuse of the function 'org-export-as-html' org2blog use. When it returns a string insead of exporting a html file, the result are different. The html string dos not have section number in.

I am new to emacs-lisp and do not know to fix it by myself :( Maybe you can add it by hand, just like me :)

@RenWenshan
Collaborator

Hi aozhouyang, I fixed this problem by adding a custom elisp function, this is a sample blog generated by the modified code http://wenshanren.org/?p=111

My solution is very naive, you can get it from here:
RenWenshan@08318bc

@yam61
yam61 commented Feb 19, 2013

It woks.
Maybe there are some people do not like the org-mode generated postamble part in the end of the article.
er ... never mind, I like it :+1:
And, thanks.

@RenWenshan
Collaborator

@aozhouyang I made it this way by intention because I'd like let everyone know my blogs are written in Emacs :)

You can modify the function I wrote to get rid of the postamble (and the title).

@punchagan
Owner

This should be fixed with latest org-mode on org-8-experimental branch.

@punchagan punchagan closed this Sep 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.