emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Myles English <mylesenglish@gmail.com>
To: mohamed <mohamed.hibti@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bibtex export
Date: Wed, 19 Dec 2012 12:40:34 +0000	[thread overview]
Message-ID: <87ehimmczh.fsf@gmail.com> (raw)
In-Reply-To: <loom.20121218T214049-811@post.gmane.org>


Hi Mohamed,

mohamed writes:
> Usually I write
> ---------------------------
> * Section a
>
>  ...
>

* Bibliograpy       :noheading:

>
> \clearpage
> \bibliographystyle{acm}
> \bibliography{biblio.bib}
>

If you use this function then the Bibliography heading won't be
duplicated:

#+begin_src emacs-lisp
(defun my-export-delete-headlines-tagged-noheading (backend)
  (dolist (hl (nreverse (org-element-map (org-element-parse-buffer 'headline)
                                         'headline
                                         'identity)))
    (when (member "noheading" (org-element-property :tags hl))
      (goto-char (org-element-property :begin hl))
      (delete-region (point) (progn (forward-line) (point))))))
#+end_src

You need to be a bit careful because the Bibliography section will then
inherit any properties from the section above so if you then do:

* Section a                :noexport:

then both that section and the Bibliography section would not be
exported.

Myles

> Regards,
> Mohamed

  reply	other threads:[~2012-12-19 12:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-17 15:41 Bibtex export mohamed
2012-12-18 11:52 ` Bastien
2012-12-18 20:47   ` mohamed
2012-12-19 12:40     ` Myles English [this message]
2012-12-20 10:08       ` mohamed
2012-12-20 14:31         ` Myles English
2012-12-20 15:13           ` Mohamed HIBTI
2012-12-20 16:41             ` Bastien
2012-12-20 16:54             ` Myles English
2012-12-20 17:04               ` Mohamed HIBTI

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=87ehimmczh.fsf@gmail.com \
    --to=mylesenglish@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mohamed.hibti@gmail.com \
    /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).