elsevier icon indicating copy to clipboard operation
elsevier copied to clipboard

Issues with yml example in Readme (with some suggestions)

Open eeholmes opened this issue 3 years ago • 3 comments

This is in the Readme:

  elsevier-pdf:
    journal:
      formatting: preprint
      model: 3p
      layout: twocolumn
      cite-style: numbered
      graphical-abstract: "![](abstract.png)"
      highlights:
        - Highlight 1
        - Highlight 2 
        - Highlight 3

Issues:

  • cite-style: numbered needs to be cite-style: number (as suggested by error msg)
  • graphical abstract doesn't really work with layout: twocolum. Way too much spacing. Works normally with onecolumn layout. This is a cls issue, but maybe not best example yaml since it looks awful.
  • Same with highlights. Looks very bad w twocolumn layout.

Suggestion, these examples yamls to help folks get started customizing?


Two column format; note per Elsevier's instructions both model: 3p and layout: twocolumn should be specified for proper two column layout.

  elsevier-pdf:
    journal:
      formatting: preprint
      model: 3p
      layout: twocolumn
      cite-style: number

Include a graphical abstract and highlights.

  elsevier-pdf:
    journal:
      cite-style: authoryear
      graphical-abstract: "![](abstract.png)"
      highlights:
        - Highlight 1
        - Highlight 2 
        - Highlight 3

Put the title and abstract on their own page.

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

Pass in class options to the elsevier cls. See elsdoc.pdf for available options. Note this doesn't actually work for all the options. Seems like there is overriding happening since options like review and endfloat did nothing. but lefttitle works.

  elsevier-pdf:
    journal:
      cite-style: number
    include-in-header: 
      text: |
        \newpageafter{author}
    classoption: [lefttitle]

Customizing the frontmatter. In elsdoc.pdf, it is shown how to customize the frontmatter (title, authors, abstract, keywords) for different title author formats. The frontmatter for the template is specified in the folder partials in the file before-body.tex. Edit this file to change your frontmatter format.

eeholmes avatar Aug 03 '22 15:08 eeholmes

Thank you! I've made some changes to the readme to address the feedback and suggestions. I've omitted the class option customization - in general I think we're trying to expose the meaningful options via from matter (some options already support this, others don't yet). I was sort of waiting to hear what options were important to people - it is pretty easy to add them to front matter... Does that make sense?

dragonstyle avatar Sep 10 '22 16:09 dragonstyle

Thanks, the main issue was just making the demo example.qmd output look pretty. Everything actually worked fine.

Oh no! please don't omit class option customization! That makes latex extensions very hard to use. Users might do many different things with the extension and elsevier might change what they want for different journals. Obviously

FYI in case it's helpful. Here is my approach for a latex extension that I am working on

  • Did the user pass in a class option that conflicts with not passed in yaml variable? Respect the user request and override the default as if the yaml variable had been passed in.
  • Did the user pass in a class option that conflicts with a passed in yaml variable? Throw an error since the user intent is unclear.

eeholmes avatar Sep 12 '22 14:09 eeholmes

Your approach sounds pretty reasonable. I'll leave this open to adding that approach to this extension as well.

dragonstyle avatar Sep 12 '22 16:09 dragonstyle