-
-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorder references and appendices #27
Comments
So one easy, albeit slightly hacky, way to achieve this:
Go to templates/template.tex and delete or comment out this section at the end of the file, which inserts the bibliography section: %%%%% REFERENCES
$if(use-biblatex)$
\setlength{\baselineskip}{0pt} % JEM: Single-space References
% we are setting the title for the references section in front-and-back-matter/99-references_heading.Rmd
{\renewcommand*\MakeUppercase[1]{#1}%
\printbibliography[heading=none]}
$endif$
$if(use-natbib)$
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
$endif$
Go to the .Rmd file that has your last chapter (e.g. 07-conclusion.Rmd). If you are using biblatex for references (the default), add this at the end of the file: ```{=latex}
\setlength{\baselineskip}{0pt}
\renewcommand*\MakeUppercase[1]{#1}
\printbibliography[heading=bibintoc,title={References}]
``` Alternatively, if you are using natbib for references, add this: ```{=latex}
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
``` This will place the reference section after the last chapter: |
Hey Ulrik, again me -- submitting in ten days, so it will be less of me soon, but apologies for the time being :-) Is there another way to do this? Per your instruction for biblatex, I get the following error:
I've tried to knit with a minimal biblatex file, a single reference that seemed properly structured, and I get the same result. Is there another way to go about it? As I use pandoc and zotero, I'm not sure if natbib is an option at all. Thanks |
Can you clarify what citation package you are using? i.e. in index.Rmd do you have If you've got nothing, i.e. citations are inserted as CSL references, then this stack overflow answer should work: https://stackoverflow.com/questions/16427637/pandoc-insert-appendix-after-bibliography |
I had neither selected, then did as instructed for biblatex and again I get the same error:
I can add this bit of code to the last chapter .Rmd and it will generate the bibliography in that chapter or I can add it as a separate .Rmd chapter file. The only problem is that it's numbered as a separate chapter -- is there a way to suppress a chapter from being numbered? Using that route, the front and back matter file for references heading should be deleted. |
The I just updated the instructions -- can you try if they work now? |
When following instructions, adding the code-chunk at the end of the last chapter, allowing use-biblatex in index.Rmd and commenting out REFERENCES section in template.tex, it works as per usual. Appendices are generated before references. |
The pandoc ref-placement div (https://pandoc.org/MANUAL.html) is now included in front-and-back-matter/99-references_heading.Rmd, so in order to reorder the appendices and references, just reorder those two files (by default, the files are put together in alphabetical order, so you can simply rename to 98-references_heading.Rmd and 99-appendices.Rmd) |
This seems to work, the only issue I have is that the following piece of
code
# `r params$referenceHeading` {-}
creates a "References" heading at the beginning of the bibliography, yet
the header throughout the bibliography pages remains from the previous
chapter "8. Conclusions". If I change the variable for just # References it
works as expected.
In template.txt I have the following code:
%%%%% REFERENCES
$if(use-biblatex)$
\setlength{\baselineskip}{0pt} % JEM: Single-space References
% we are setting the title for the references section in
front-and-back-matter/99-references_heading.Rmd
{\renewcommand*\MakeUppercase[1]{#1}%
\printbibliography[heading="References"]}
$endif$
$if(use-natbib)$
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
$endif$
% set the section header to the references heading
\markboth{$params.referenceHeading$}{}
…On Sun, Sep 18, 2022 at 11:11 PM Ulrik Lyngs ***@***.***> wrote:
The pandoc ref-placement div (https://pandoc.org/MANUAL.html) is now
included in *front-and-back-matter/99-references_heading.Rmd*, so in
order to reorder the appendices and references, just reorder those two
files (by default, the files are put together in alphabetical order, so you
can simply rename to 98-references_heading.Rmd and 99-appendices.Rmd)
—
Reply to this email directly, view it on GitHub
<#27 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHGME3A5UWTM2OBBDC3ITPTV66APHANCNFSM5AJF3MRA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
This worked for me. Thanks |
I am having a hard time reordering references and appendices sections. Since the citation format my discipline uses is APA, the bibliography/references section needs to appear between main chapters and the appendices, rather than after the appendices as in the original Oxford thesis template. The appendices seem to be linked to the "body" Rmd files and thus immediately follow the main chapters in appearance. So I tried to delink appendices from the "body" by changing the file name to "_appendices.Rmd." The pdf built after this tweak does place the appendices after bibliography but as subsections of bibliography (and takes on line spacing format of front/back matter) rather than as a separate section. Is there a way to make the appendices appear after bibliography but in the same format as the body chapters? Any help is appreciated.
The text was updated successfully, but these errors were encountered: