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

company/university name for title #137

Closed
Bolin-Wu opened this issue May 19, 2022 · 5 comments
Closed

company/university name for title #137

Bolin-Wu opened this issue May 19, 2022 · 5 comments

Comments

@Bolin-Wu
Copy link

Hi!

First of all, thank you for creating/maintaining such wonderful RMD formats. I use this template a lot during my work. However, I wonder that is it possible to add a company/university name in the YAML preamble, in addition to "title", "author" and "date"?

I tried to find if there is such closed issue but I can not find any. Thank you for your time regarding my question!

Best,
Bolin

@juba
Copy link
Owner

juba commented May 19, 2022

Hi, do you use a specific template ?

There is an affiliation field, which is a child of the author field that can be used for things like these. But I'm not sure it will be rendered well in the different rmdformats templates.

You can use with something like :

---
author:
  - first_name: "zzz"
    last_name: "zzz"
    affiliation: "zzz"
---

If it is not rendered nicely you can also try to add company or university to the subtitle, author or date field by inserting a line break manually with <br>, I think it should work.

Let me know if you manage to get something suitable with the template you're using...

@Bolin-Wu
Copy link
Author

Bolin-Wu commented May 19, 2022

Hi, Thank you for reply!

I am using downcute.

I ran:

---
title: "Template Title"
author:
  - first_name: "Bolin"
    last_name: "Wu"
    affiliation: "Test"
date: 'YYYY-MM-DD (updated: `r Sys.Date()`) '

output:
  rmdformats::downcute:
    self_contained: true
    thumbnails: true
    lightbox: true
    gallery: false
    highlight: tango
    df_print: paged
    
    
---

But it renders:

image

It seems that the affliation does not work or am I missing anything?

Best,
Bolin

@juba
Copy link
Owner

juba commented May 19, 2022

Ah, sorry, in fact it is supported in downcute but you have to just give a name subfield of author :

---
author:
  - name: "zzz"
    affiliation: "zzz"
---

But it only appends affiliation behind the author name, so I'm not sure it is really interesting...

@Bolin-Wu
Copy link
Author

Ah, sorry, in fact it is supported in downcute but you have to just give a name subfield of author :

---
author:
  - name: "zzz"
    affiliation: "zzz"
---

But it only appends affiliation behind the author name, so I'm not sure it is really interesting...

Ah, sorry, in fact it is supported in downcute but you have to just give a name subfield of author :

---
author:
  - name: "zzz"
    affiliation: "zzz"
---

But it only appends affiliation behind the author name, so I'm not sure it is really interesting...

I see, I though it would give a newline + little nice icon like "name" and "date" but thank you very mcuh for your time!

@juba
Copy link
Owner

juba commented May 19, 2022

I just commited a small change in the development version of rmdformats to do just that : separate name, affiliation and email with newlines and icons.

If you want to test it and give any feedback, don't hesitate to do so !

@juba juba reopened this May 19, 2022
@juba juba closed this as completed May 20, 2022
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