quarto-journals / elsevier

Quarto template for Elsevier Journals
https://quarto-journals.github.io/elsevier/
MIT License
49 stars 20 forks source link

Put the title and abstract on their own page: does this actually work? #14

Closed presnell closed 1 year ago

presnell commented 1 year ago

I have tried to follow the instructions to put the title and abstract on their own page using

format:
  elsevier-pdf:
    journal:
      cite-style: number
    include-in-header: 
      text: |
        \newpageafter{author}

and as far as I can tell it has no effect at all. Assuming that I'm missing something, could a working template that uses this option be provided?

dragonstyle commented 1 year ago

Hmmm, I'm not sure what is happening- I do see a dedicated title page when I use the following front matter:

---
title: Short Paper
subtitle: A Short Subtitle
author:
  - name: Alice Anonymous
    email: alice@example.com
    affiliations: 
        - id: some-tech
          name: Some Institute of Technology
          department: Department Name
          address: Street Address
          city: City
          state: State
          postal-code: Postal Code
    attributes:
        corresponding: true
    note: This is the first author footnote.
  - name: Bob Security
    email: bob@example.com
    affiliations:
        - id: another-u
          name: Another University
          department: Department Name
          address: Street Address
          city: City
          state: State
          postal-code: Postal Code
    note: |
      Another author footnote, this is a very long footnote and it should be a really long footnote. But this footnote is not yet sufficiently long enough to make two lines of footnote text.
  - name: Cat Memes
    email: cat@example.com
    affiliations:
        - ref: another-u
    note: Yet another author footnote.
  - name: Derek Zoolander
    email: derek@example.com
    affilations:
        - ref: some-tech
abstract: |
  This is the abstract. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum augue turpis, dictum non malesuada a, volutpat eget velit. Nam placerat turpis purus, eu tristique ex tincidunt et. Mauris sed augue eget turpis ultrices tincidunt. Sed et mi in leo porta egestas. Aliquam non laoreet velit. Nunc quis ex vitae eros aliquet auctor nec ac libero. Duis laoreet sapien eu mi luctus, in bibendum leo molestie. Sed hendrerit diam diam, ac dapibus nisl volutpat vitae. Aliquam bibendum varius libero, eu efficitur justo rutrum at. Sed at tempus elit.
keywords: 
  - keyword1
  - keyword2
date: last-modified
bibliography: bibliography.bib
format:
  elsevier-pdf:
    journal:
      cite-style: number
    include-in-header: 
      text: |
        \newpageafter{author}    
---

Please make sure that your manuscript follows the guidelines in the 
Guide for Authors of the relevant journal.

Could you share the document that you're testing with and I'll give it a try with that?

presnell commented 1 year ago

Ok, that helped. I had to remove

  model: 3p

to get it to work. Maybe this should have been obvious from README.md, but it wasn't to me.

Thanks again.

Still very interested in the superscript numerical citations.

Charles Teague @.***> writes:

[External Email]

Hmmm, I'm not sure what is happening- I do see a dedicated title page when I use the following front matter:


title: Short Paper subtitle: A Short Subtitle author:

  • name: Alice Anonymous email: @.*** affiliations:
    • id: some-tech name: Some Institute of Technology department: Department Name address: Street Address city: City state: State postal-code: Postal Code attributes: corresponding: true note: This is the first author footnote.
  • name: Bob Security email: @.*** affiliations:
    • id: another-u name: Another University department: Department Name address: Street Address city: City state: State postal-code: Postal Code note: | Another author footnote, this is a very long footnote and it should be a really long footnote. But this footnote is not yet sufficiently long enough to make two lines of footnote text.
  • name: Cat Memes email: @.*** affiliations:
    • ref: another-u note: Yet another author footnote.
  • name: Derek Zoolander email: @.*** affilations:
    • ref: some-tech abstract: | This is the abstract. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum augue turpis, dictum non malesuada a, volutpat eget velit. Nam placerat turpis purus, eu tristique ex tincidunt et. Mauris sed augue eget turpis ultrices tincidunt. Sed et mi in leo porta egestas. Aliquam non laoreet velit. Nunc quis ex vitae eros aliquet auctor nec ac libero. Duis laoreet sapien eu mi luctus, in bibendum leo molestie. Sed hendrerit diam diam, ac dapibus nisl volutpat vitae. Aliquam bibendum varius libero, eu efficitur justo rutrum at. Sed at tempus elit. keywords:
  • keyword1
  • keyword2 date: last-modified bibliography: bibliography.bib format: elsevier-pdf: journal: cite-style: number include-in-header: text: | \newpageafter{author}

Please make sure that your manuscript follows the guidelines in the Guide for Authors of the relevant journal.

Could you share the document that you're testing with and I'll give it a try with that?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

dragonstyle commented 1 year ago

Ok it wasn't obvious to me at all either - just what I tested! I'll try to add a note about that...

If you have a moment, I did make a change that I think should support what you're looking for as far as numerical citations:

https://github.com/quarto-journals/elsevier/issues/13

presnell commented 1 year ago

Charles Teague @.***> writes:

If you have a moment, I did make a change that I think should support what you're looking for as far as numerical citations:

Ok, I ran quarto update quarto-journals/elsevier and with the following in my yaml header

format: elsevier-pdf: keep-tex: true journal: name: American Journal of Obstetrics and Gynecology biblio-style: model3a-num-names cite-style: super

I am now able to successfully run quarto (no natbib options clash), and (as I said previously) I am getting a correctly formatted bibliography. However, I still do not get the superscript numerical citation style --- instead it still gives me the usual with-brackets numeric style. This is because the latex file produced contains

\documentclass[ number]{elsarticle}

\usepackage[]{natbib}

If instead of (or in addition to) cite-style: super, I insert

natbiboptions: super

anywhere in the yaml, I again get a natbib options clash when I run quarto. This is because the latex file produced now contains

\documentclass[ number]{elsarticle}

\usepackage[super]{natbib}

Note that manually editing the latex file to have

\documentclass{elsarticle}

\usepackage[super]{natbib}

still produces the same latex error because the elsarticle class has already set the number option by default.

If I manually edit the latex file to have

\documentclass[super]{elsarticle}

\usepackage{natbib}

then I get the superscript citations, but the \usepackage{natbib} is redundant and could be removed because the elsarticle class has alreay loaded natbib.

dragonstyle commented 1 year ago

Thank you so much for the detailed response - it made adding support for for what you're looking for very easy. In 0.4.2 you should be able to set cite-style: super in your document front matter to control the citation style and use superscript style notation.

Let me know if this works for you and thanks again for you help narrowing this down!

presnell commented 1 year ago

Thanks very much for this. It seems to be working.

Now if it were only possible to produce similarly formatted docx output for the medical types. Sigh.

Charles Teague @.***> writes:

Thank you so much for the detailed response - it made adding support for for what you're looking for very easy. In 0.4.2 you should be able to set cite-style: super in your document front matter to control the citation style and use superscript style notation.

Let me know if this works for you and thanks again for you help narrowing this down!

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

dragonstyle commented 1 year ago

Ok wonderful to hear, thanks again for your help. Agree that docx would be amazing, but I think we'll have to leave that for the future (at least right now I don't think we have the machinery to do that :( ).

Serenade600 commented 1 year ago

The model: 1p also contradicts with the \newpageafter{author}. I guess it may be also appropriate to put this contradiction in readme.md to reminder others.