Skip to content

Conversation

@wklimowicz
Copy link

@wklimowicz wklimowicz commented May 22, 2023

Description

Adds title-short option for PDF documents. This option is supported by some LaTeX classes, such as beamer or amsart, by adding square brackets after title:

\title[Short Title]{Long Title}

As per #5620, this syntax is consistent with what's already in the acs quarto journal template. There is a question whether this should be upstream in pandoc.

Smoke tests might be overkill so feel free to delete.

Checklist

I have (if applicable):

  • filed a contributor agreement.
  • referenced the GitHub issue this PR closes
  • updated the appropriate changelog

@cscheid
Copy link
Collaborator

cscheid commented May 22, 2023

Thanks for the PR!

If we're going to change this, we also need to change the schemas so that YAML validation and auto-completion in IDEs work.

I also wonder if we should be doing something a bit different with the supported yaml syntax. Instead of title and title-short, I wonder if we should be doing

title: Full title

and

title:
  long: Full title
  short: Short title

This schema is consistent with the pandoc syntax for long and short captions. @dragonstyle @jjallaire what do you think?

@wklimowicz
Copy link
Author

wklimowicz commented May 23, 2023

That does look neater IMO. Although relevant here is that this option breaks some (most?) PDF formats, like the default scrartcl and article. So to knit to beamer and default pdf simultaneously you would need:

---
title:
  long: Full title
format:
  pdf:
    output-file: article.pdf
  beamer:
    title:
      short: Short title
---

So if you were rendering multiple pdf formats (or switching frequently between them), I think title-short is neater:

---
title: Full title
format:
  pdf:
    output-file: article.pdf
  beamer:
    title-short: Short title
---

Also, would this show up in any other formats like html?

@ghost ghost assigned cscheid May 23, 2023
@jjallaire
Copy link
Collaborator

We would normalize the title before Pandoc sees it (just as we do with author now) so the variance in format treatment wouldn't be an issue.

@cscheid cscheid added this to the v1.4 milestone Aug 31, 2023
@dragonstyle dragonstyle modified the milestones: v1.4, v1.5 Jan 25, 2024
@cscheid cscheid modified the milestones: v1.5, Future Jun 27, 2024
@raffaem
Copy link

raffaem commented Sep 8, 2024

So what we have decided?

@raffaem
Copy link

raffaem commented Oct 1, 2024

This was implemented upstream (#5620 (comment)).

I think we can close this.

@cscheid
Copy link
Collaborator

cscheid commented Oct 1, 2024

This is a very stale PR, but the issue has only been solved in beamer, and not in general. For folks only sporadically reading these: please do make sure to read the issues carefully in order to not add to the confusion.

@cscheid cscheid modified the milestones: Future, v1.8 Apr 7, 2025
@cscheid
Copy link
Collaborator

cscheid commented Apr 24, 2025

Hello! We're looking to clean up some of Quarto's open PRs. If we're going to support this, we need to add support to other formats as well: our typical "minimal format set" is Typst, HTML (websites and books), PDF and (ideally) docx.

As our new PR template requests, we would also need

  • a documentation PR (written against quarto-cli/quarto-web)
  • tests

We appreciate the proposal in this PR, and I'm happy to have a discussion if there's interest in making those additions. I will wait a bit of time for a response, but I will otherwise start closing these. Thanks again for your interest in Quarto.

@wklimowicz
Copy link
Author

Happy for this to be closed. The core team would need to make some design decisions about how to extend this to other formats, where it's not as clear cut as with beamer (which has already been added to pandoc anyway).

@wklimowicz wklimowicz closed this Apr 24, 2025
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

Successfully merging this pull request may close these issues.

5 participants