R bookdown - custom title page
I ended up editing the _output.yml
file to reference a copy of default-1.17.0.2.tex
template in my R project directory using yaml template tag.
bookdown::gitbook:
css: style.css
config:
toc:
before: |
<li><a href="./">A Minimal Book Example</a></li>
after: |
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li>
edit: https://github.com/rstudio/bookdown-demo/edit/master/%s
download: ["pdf", "epub"]
bookdown::pdf_book:
fig_caption: true
number_sections: yes
includes:
in_header: preamble.tex
latex_engine: xelatex
citation_package: natbib
keep_tex: yes
template: template.tex
bookdown::epub_book: default
For some reason i had an error compiling the pdf (! Undefined control sequence...) so I included a latex command \usepackage{graphicx}
in template.tex
to fix it. Now it is supposed that I am free to customize title page and whatsoever.
Add image before bookdown title
This question was answered here.
The solution is to add a JS codeblock to the end of the index.Rmd
file, such as
```{js, echo = FALSE}
title=document.getElementById('header');
title.innerHTML = '<img src="/path/to/img.png" alt="Test Image">' + title.innerHTML
```
Related Topics
How to Calculate Euclidean Distance Between Two Matrices in R
Leaflet Not Rendering in Dynamically Generated R Markdown HTML Knitr
Prevent Selectinput from Wrapping Text
Data.Table Objects Aren't Updated in Rstudio Environment Panel
How to Apply Histogram on Dependent Data in R
Tidyr Spread Function Generates Sparse Matrix When Compact Vector Expected
Loop Linear Regression and Saving Coefficients
Evaluate Different Logical Conditions from String for Each Row
Classification Functions in Linear Discriminant Analysis in R
Quantiles by Factor Levels in R
Create Group Based on Fuzzy Criteria
How to Split a Dataframe Column by The First Instance of a Character in Its Values
How to Rotate 3D Plotly Continuous for R Shiny App
How to Split a Dataframe Column by The First Instance of a Character in Its Values