Closed pradyparanjpe closed 3 months ago
I don't think there is anything to fix in org-ref here. You can't export a bibliography in a section tagged :noexport:. That is a feature of org-mode. In this case, you should not put a bibliography link at the end of such a section. You should instead put the bibliography link above this section, and I think the problem is solved right?
You might alternatively make this section an inline task, e.g.
#+TITLE: An included Chapter
* Introduction
Some text with citations such as this [[cite:&dominik-2010-org-mode]] cited by org-ref.
*************** Hidden :noexport:
These are some interesting thoughts, silenced during one of the draft revisions.
We may want to include them in this chapter later.
*************** END
bibliographystyle:unsrt
[[bibliography:/Users/jkitchin/Dropbox/emacs/bibliography/master.bib]]
# Local variables:
# eval: (wc-mode 1)
# End:
Another alternative is to change the bibliography name like this:
#+TITLE: An included Chapter
#+options: num:0
* Introduction
Some text with citations such as this [[cite:&dominik-2010-org-mode]] cited by org-ref.
* Hidden :noexport:
These are some interesting thoughts, silenced during one of the draft revisions.
We may want to include them in this chapter later.
* References
\renewcommand{\section}[2]{}
bibliographystyle:naturemag
[[bibliography:/Users/jkitchin/Dropbox/emacs/bibliography/master.bib]]
# Local variables:
# eval: (wc-mode 1)
# End:
I don't think there is anything to fix in org-ref here. You can't export a bibliography in a section tagged :noexport:. That is a feature of org-mode.
Yes. I guessed that while I was writing the issue description.
I still don't want to include bibliography below each chapter. I want it at the end of the article. So I unfortunately can't follow your suggestions to bibliography in the chapter file.
But well, inspired by your suggestions, I found an easy workaround.
I simply moved my :noexport:
to the head of chapter1.
That solves everythin: the hidden section is retained, bibliography appears at the end of article, and I don't need a separate section * References
before bibliography link.
So now, my included chapter looks like this. (The final section doesn't carry :noexport:
along)
#+TITLE: An included Chapter
* Hidden :noexport:
These are some interesting thoughts, silenced during one of the draft revisions.
We may want to include them in this chapter later.
* Introduction
Some text with citations such as this[[cite:&Dominik201408]] cited by org-ref.
# Local variables:
# eval: (wc-mode 1)
# End:
Thanks for suggestions. In hind-sight, it was foolish on my part to raise this issue here...
No problem, glad you found a solution.
Description
Consider a case where a chapter is included in an article as shown in illustrative files (below). The last heading of chapter1.org is tagged with
:noexport:
. Bibliography never gets exported for article.org, perhaps because the LaTeX exporter never saw the links, thanks to the inherited:noexport:
from* Hidden
heading of chapter1.org. This forces me use one of the following workarounds:* References
before bibliography links in article.org. This is not possible for naturemag see below.#+INCLUDE:
by lines e.g.:lines 3-6
and change the upper bound every time I edit chapter1, defeating the purpose of org's include feature.* Hidden
heading of chapter1.org, which contains author-notes, miscellaneous thoughts, Emacs local variables.Bibliography Style naturemag
The bibliography style naturemag adds the heading References by itself. (There may be other styles that do this as well.) An org heading
* References
placed before org ref'sbibliography links
gets exported as another redundant section named References before the one added by naturemag.Hence, at least when using naturemag style, bibliography links have to be added without their separate org heading.
Illustrative pseudo files
chapter1.org
article.org
Not strictly an
org-ref
issueThis is not strictly an issue.
This hardship has to be dealt with only when
:noexport:
tag.You may close this issue as not worthy if you reckon the fix not useful for sufficiently many.