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

Tgt #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions inst/rmarkdown/templates/memor/resources/memor.tex
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@
\usepackage{fancyvrb}
\VerbatimFootnotes
$endif$
\usepackage{longtable,booktabs}

% \usepackage{longtable,booktabs} - put above; tgt 20190905

$if(graphics)$
\usepackage{graphicx}
\makeatletter
Expand Down Expand Up @@ -203,6 +205,7 @@
\usepackage{tabu}
\usepackage{threeparttable}
\usepackage{threeparttablex}
\usepackage{longtable,booktabs} % tgt added 20190905
\usepackage{makecell}
\usepackage[hang]{footmisc}

Expand All @@ -218,9 +221,8 @@
\robustify\tnote

% table/figure captions (titles and legends)

\usepackage[singlelinecheck=false]{caption} % left justify table captions
\captionsetup{font={color=$if(tabcapcolor)$$tabcapcolor$$else$black$endif$, sf}, skip=$if(tabcapskip)$$tabcapskip$$else$4pt$endif$, size=small, labelfont=sf, labelsep = period} % color and spacing between caption and table proper
\captionsetup{font={color=$if(tabcapcolor)$$tabcapcolor$$else$black$endif$, sf}, skip=$if(tabcapskip)$$tabcapskip$$else$4pt$endif$, size=small, labelfont=sf, labelsep = period} % color and spacing between caption and table proper, updated

\makeatletter
\let\runtitle\@title
Expand Down
2 changes: 1 addition & 1 deletion inst/rmarkdown/templates/memor/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "Title"
author:
- You Name
- Your Name
- Second Author
date: "`r Sys.Date()`"
output: memor::pdf_memo
Expand Down
14 changes: 8 additions & 6 deletions vignettes/test.Rmd
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
---
title: "Title"
author:
- You Name
- Your Name
- Second Author
fontfamily: helvet
libertine: false
mainfont: Arial
date: "`r Sys.Date()`"
tabcapcolor: "orange"
tabcapcolor: "green"
tabcapskip: 4pt
output:
memor::pdf_memo
latex_engine: xelatex
---



```{r setup}
library(knitr)
library(kableExtra)
library(ggplot2)
opts_chunk$set(warning = FALSE, message = FALSE)
opts_chunk$set(warning = FALSE, message = FALSE, tidy = TRUE, width = 80)
```

# Section 1
Here is a table

```{r}
kable(mtcars[1:5, 1:5], booktabs = T, caption = "This is a table where the title is going to justify appropriately.") %>%
kable_styling(latex_options = c("striped", "HOLD_position"), position = "left") %>% footnote(general = "wahoops", threeparttable = TRUE, general_title = "")
kable_styling(latex_options = c("striped", "HOLD_position"), position = "left") %>% footnote(number = c("\\\\setstretch{.835} Here is a long footnote that we want to justify. It should be restricted to table width.", "And another one that we'll add to test it out. It should be restricted to table width."), threeparttable = TRUE, escape = F)
```

```{r}
kable(mtcars[1:5, 1:5], booktabs = T, caption = "This is a table where the title is going to justify appropriately.") %>%
kable_styling(latex_options = c("striped", "HOLD_position"), position = "left") %>% add_footnote(c("Here is a long footnote that we want to justify. It should be restricted to table width.", "And another one that we'll add to test it out. It should be restricted to table width."), threeparttable = T, notation = "number")
```

\clearpage

Expand Down