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

Issues with yml example in Readme (with some suggestions) #2

Open
eeholmes opened this issue Aug 3, 2022 · 3 comments
Open

Issues with yml example in Readme (with some suggestions) #2

eeholmes opened this issue Aug 3, 2022 · 3 comments

Comments

@eeholmes
Copy link

eeholmes commented Aug 3, 2022

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 eeholmes changed the title Issues with yml example in Readme Issues with yml example in Readme (with some suggestions) Aug 3, 2022
@dragonstyle
Copy link
Collaborator

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?

@eeholmes
Copy link
Author

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.

@dragonstyle
Copy link
Collaborator

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

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

2 participants