quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.89k stars 321 forks source link

Add Support for Beamer Template Partials #1658

Open gulinan opened 2 years ago

gulinan commented 2 years ago

Bug description

Hi, I am preparing a Beamer presentation in Quarto which will be rendered into .pdf later. When I include date of the talk and my institute in the YAML, it prints date before the institution in the pdf version. We generally prefer the date after the institution. In the source files of Quarto Beamer presentation, I have seen a source .tex file where the author and date fields are embedded together. I guess, for that reason, they get printed out together. I cannot modify the Quarto source files since they are read-only. I would appreciate if this can be fixed. I have another question on how to break long titles into two lines in the YAML too. I would like to thank you very much in advance.

---
title: "My talk title"
author: "My name"
institute: "My institute"
date: "August 02, 2022"
mathspec: true # for metropolis theme
execute: 
  enabled: true
  warning: false
  error: false
comments:
  hypothesis: 
    theme: clean
format: 
  beamer: 
    aspectratio: 32
    navigation: horizontal
    theme: metropolis
    colortheme: crane
    colorlinks: true
    highlight-style: tango
[question.pdf](https://github.com/quarto-dev/quarto-cli/files/9250720/question.pdf)

editor: visual
---

quarto check Output

No response

quarto tools check Output

No response

Checklist

dragonstyle commented 2 years ago

You can provide a completely custom template using the template option for your document. The template used by default is the pandoc latex template here:

https://github.com/jgm/pandoc-templates/blob/master/default.latex

It is a bit to bite off to replace this, though if you are willing it should work fine. We can do some additional work to make this easier in the future.

Note to self - it would be useful to support template partials for Beamer presentations that would allow users to replace just this sort of thing. Additionally, would be nice to handle and document author/affiliation handling for Beamer in our standard way.

gulinan commented 2 years ago

Thank you very much for your reply. I was thinking that my problem is coming from the lines 428-429 at

https://github.com/jgm/pandoc-templates/blob/master/default.latex

Actually, I am not an expert on latex/pandoc, but will work on it.

Thank you very much.

jjallaire commented 2 years ago

@dragonstyle I'll leave this open for v1.2 as a reminder to support template partials for beamer.