Skip to content
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

Suppress references title in PDF #15

Open
gregmacfarlane opened this issue Jan 26, 2023 · 1 comment
Open

Suppress references title in PDF #15

gregmacfarlane opened this issue Jan 26, 2023 · 1 comment

Comments

@gregmacfarlane
Copy link

I am building a document that intends to knit to a quarto book and to an Elsevier PDF. I've got it basically working, except that in the PDF output, the References tag prints twice, as shown below.
Screen Shot 2023-01-26 at 10 35 37 AM

I believe that this is because the quarto document prints a header for the references, as does the latex template. I have tried to modify both.

Modify QMD

In the quarto book, the references.qmd file includes only the following:

# References {.unnumbered}

::: {#refs}
:::

If I modify as suggested in the bookdown documentation by saying
r if (knitr::is_html_output()) '# References {}'

then it interferes with Quarto's logic for implementing the header names, giving 'references.html' in the sidebar instead of References, and putting a number on the section even though the .unnumbered flag is turned on.

Screen Shot 2023-01-26 at 10 42 42 AM

In the PDF output, I get a blank numbered section, so this isn't going to work.

Screen Shot 2023-01-26 at 10 49 29 AM

Modify LaTeX

I have attempted to remove the References tag from the PDF output by trying

% this command removes the references title from the PDF, which gets put there
% by both the Elsevier template and the quarto markdown
\usepackage{etoolbox}
\patchcmd{\thebibliography}{\section*{\refname}}{}{}{}
\renewcommand\bibname{}

But this appears to have no effect on either the HTML or PDF outputs

Edit quarto-elsevier?

I think the solution would be to modify the template used by this extension, but the existing partials only apply to the header information, as far as I can tell.

@gregmacfarlane
Copy link
Author

A template repository exhibiting this issue is at https://github.com/byu-transpolab/template_quarto

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant