Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7519659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T01:56:24+00:00 2026-05-30T01:56:24+00:00

When using Org-mode and its LaTeX export BibTeX or Biblatex is often used to

  • 0

When using Org-mode and its LaTeX export BibTeX or Biblatex is often used to handle references. In that case the LaTeX command \printbibliography is often included in the org file. \printbibliography is placed in the org file where LaTeX is supposed to write out the reference list. What \printbibliography does is to insert a LaTeX header along with the reference list. In most cases \printbibliography is placed at the end of the org file simply because in most documents the reference list is to be placed last. This means that \printbibliography will be included under the last heading in the org file, e.g.

* Heading

  \printbibliography

It also means that when that heading is folded the \printbibliography will be swallowed:

* Heading...

But this goes against the meaning of \printbibliography because it includes its own heading in the output. Also, it will be confusing when \printbibliography is swallowed and a new heading is placed after it because then the reference list will no longer appear last in the document.

How can I make it so that \printbibliography is not swallowed by sections in Org-mode? A bonus question: how can I make it so that Org-mode does not create headings after \printbibliography unless C-Ret is pressed when the cursor is after it?

In searching for a solution to this problem I found http://comments.gmane.org/gmane.emacs.orgmode/49545.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T01:56:25+00:00Added an answer on May 30, 2026 at 1:56 am

    The following is lightly tested but works for me using tab and shift-tab to hide and display things. Those are the only hiding and showing commands that I use, so if you use other commands they may have to be advised or fixed in some other way.

    You can of course change org-footer-regexp to anything you want. I was hoping to not have to use any advice, but without advising org-end-of-subtree the last heading never cycles with tab because it thinks it’s not hidden, so it hides it and then org-cycle-hook unhides it. It calls org-end-of-subtree before running org-pre-cycle-hook so that’s not an option either.

    (defvar org-footer-regexp "^\\\\printbibliography\\[.*\\]$"
      "Regexp to match the whole line of the first line of the footer which should always be shown.")
    
    (defun show-org-footer (&rest ignore)
      (save-excursion
        (goto-char (point-max))
        (when (re-search-backward org-footer-regexp nil t)
          (outline-flag-region (1- (point)) (point-max) nil))))
    
    (add-hook 'org-cycle-hook 'show-org-footer)
    (add-hook 'org-occur-hook 'show-org-footer)
    
    (defadvice org-end-of-subtree (after always-show-org-footer
                                         ()
                                         activate)
      (when (>= (point) (1- (point-max)))
        (re-search-backward org-footer-regexp nil t)
        (setq ad-return-value (point))))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using org mode to make a list that I would like exported to
I'm using org-mode and am looking to export my agenda ( example of an
I am using emacs org-mode for managing my notes. Often I wish to use
Maybe it's just the fact that I've been using http://nodejs.org/ lately, but the lack
When using org-mode, I frequently write plain lists using either '-' or numbers. When
In Org-mode I can get headlines wrap with proper indentation by using org-indent-mode .
I have started using emacs org-mode recently to maintain my TODO lists. I have
I've recently started using MobileOrg (through Dropbox) to be able to manage my org-mode
I am trying to put the Microsoft Word document in emacs using org-mode. I
How do you publish the agenda for org mode? I am currently using htmlize

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.