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

LaTeX template: Restrict institute to Beamer #5219

Merged
merged 3 commits into from
Jan 23, 2019
Merged

LaTeX template: Restrict institute to Beamer #5219

merged 3 commits into from
Jan 23, 2019

Conversation

adunning
Copy link
Contributor

Use the etoolbox package (same technique as #5213) to add the institute variable to \maketitle. Verified to work with article, book, report, memoir, scrartcl. Closes #4209.

It's not the prettiest thing ever: the tabular environment of \author and \and is rather inflexible. I'm wondering if the institute variable was intended only to support Beamer users (in which case it could simply be excluded from normal LaTeX output), but the manual indicates that it's supposed to work in both LaTeX and Beamer.

Example:

pandoc -o institute.pdf << EOT

---
title: Test
subtitle: More tests
author:
- Tester 1
- Tester 2
institute:
- University of Testing
- University of Diagnostics
date:
- 2019
---

EOT

screen shot 2019-01-12 at 23 09 27

Use the `etoolbox` package (same technique as #5213) to add the `institute` variable to `\maketitle`. Verified to work with `article`, `book`, `report`, `memoir`, `scrartcl`.
@adunning
Copy link
Contributor Author

It looks slightly better with reduced spacing:

screen shot 2019-01-12 at 23 45 17

@adunning
Copy link
Contributor Author

In case it wasn't clear from the above, I don't necessarily think that accepting this PR is the best approach. I can see at least three ways of approaching this:

  1. Use this PR to render \institute. It might be handy to someone, and would follow what the manual states – but its value is limited given that it doesn't work in any other format, and I doubt that anyone wants to work through all the writers to support it elsewhere.
  2. Include the variable only in Beamer output, which supports it natively.
  3. Drop the variable altogether and expect anyone who wants it to insert it to use header-includes. This would be most consistent in light of the template's exclusion of other non-standard variables, such as the \subject and \publishers commands in KOMA-Script.

The institute variable was originally added to the template in 7688f0f with the intent of using it for articles, but for a journal-specific class that isn't even available through TeX Live, and it doesn't appear that the author realized it could be inserted using header-includes.

@jgm
Copy link
Owner

jgm commented Jan 23, 2019

institute was indeed intended only for beamer. This could be clarified in the docs.
And maybe it should be made conditional on beamer in the template?

The `\institute` command is only standard in the Beamer class. Use a conditional to restrict this to Beamer output rather than output an empty command. To add this information to a LaTeX class providing an `\institute` command, use `header-includes`.
@adunning adunning changed the title LaTeX template: Render institute LaTeX template: Restrict institute to Beamer Jan 23, 2019
@adunning
Copy link
Contributor Author

That's certainly cleaner; I've added another commit for this.

@adunning
Copy link
Contributor Author

Looks like the testing system is having a bad day; this works locally.

@jgm jgm merged commit 673d545 into jgm:master Jan 23, 2019
@adunning adunning deleted the patch-1 branch January 23, 2019 18:32
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.

None yet

2 participants