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

Subtitle missing #4

Closed
bearloga opened this issue Jul 6, 2018 · 4 comments
Closed

Subtitle missing #4

bearloga opened this issue Jul 6, 2018 · 4 comments

Comments

@bearloga
Copy link
Contributor

bearloga commented Jul 6, 2018

Well this is weird! Even though memor.tex includes a bit about including subtitles, for some reason they don't make it into the output.

---
title: "Title"
subtitle: "Subtitle"
author: 
- You Name
- Second Author
date: "`r Sys.Date()`"
output: memor::pdf_memo
---

Text.

Example of missing subtitle

@haozhu233
Copy link
Collaborator

Hmm, did we accidentally removed that from the template? I will look into that.

@bearloga
Copy link
Contributor Author

bearloga commented Jul 8, 2018

Nope, the other subtitle stuff is still in there (memor.tex vs rmarkdown/default.tex) so you didn't accidentally get rid of it.

The only difference I found that might be the cause is the \runtitle stuff, but I have no idea how to go about fixing it if that's the case.

haozhu233 added a commit that referenced this issue Jul 9, 2018
@haozhu233
Copy link
Collaborator

haozhu233 commented Jul 9, 2018

Thanks, @bearloga! After digging into the problem for a while, I think I found out where the problem is. After we defined the page logo, we redefined \pretitle and \posttitle for those formatting

\pretitle{
$if(logo)$
\begin{flushright}
\includegraphics[height=$logo_height$, keepaspectratio]{$logo$}
\end{flushright}
$endif$
% \vskip 5em
\begin{flushleft}\LARGE}
\posttitle{\end{flushleft}}
\preauthor{\par\begin{flushleft}\large\vskip -.5em}
\postauthor{\end{flushleft}}
\predate{\par\begin{flushleft}\large\vskip -1em}
\postdate{\end{flushleft} }

At the same time, rmarkdown or pandoc sort of defined \subtitle on its own using the posttitle command. As a result, the original posttitle got overwritten and we lost that subtitle.

I tried to fix it in the latest version. Please check it out! :)

@bearloga
Copy link
Contributor Author

bearloga commented Jul 9, 2018

Yup, it works now! Thanks!

@bearloga bearloga closed this as completed Jul 9, 2018
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