Comments (4)
As a note to anyone also having this problem,
I have temporarily worked around it by pulling in a preamble using the following in the YAML header.
It's still using pdflatex
but at least the greek characters work...
header-includes:
- \input{preamble.tex}
and preamble.tex
% set font encoding for PDFLaTeX or XeLaTeX
\usepackage{ifxetex}
\ifxetex
\usepackage{fontspec}
\else
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{lmodern}
\usepackage[greek,english]{babel}
\usepackage{textgreek}
\fi
from tufte.
Use
rmarkdown::render("Protocol.Rmd", "tufte::tufte_handout")
instead of
rmarkdown::render("Protocol.Rmd", tufte::tufte_handout(toc = TRUE))
And setting latex_engine
is enough:
output:
tufte::tufte_handout:
latex_engine: xelatex
There is no need to use pandoc_args
.
The reason that you got pdflatex
all the time because you called the function tufte::tufte_handout()
to return the output format (which overrides your YAML settings), and the default value for latex_engine
is pdflatex
in the function.
FWIW, I used xelatex
in the default template in this package, so xelatex
definitely should work:
https://github.com/rstudio/tufte/blame/master/inst/rmarkdown/templates/tufte_html/skeleton/skeleton.Rmd#L10
BTW, I can only handle Github issues for bug reports and feature requests, and usually I don't have time to answer general questions. Please ask future questions on StackOverflow instead, so you won't have to wait for me. Thanks!
from tufte.
Thank you, that worked well. It makes sense now that I know the options get overridden!
from tufte.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
from tufte.
Related Issues (20)
- Fix issue with recent Pandoc HOT 3
- pass an offset value to \marginnote{} with tufte::margin_note()
- Undefined control sequence when using pandoc grid tables in pdf output HOT 5
- Tufte pdf documents fail to compile with `vadjust` error HOT 2
- nul file HOT 7
- Sidenotes show up as footnotes HOT 6
- Release tufte 0.12.0 HOT 1
- Upkeep for tufte HOT 1
- Broken citation formats in html HOT 4
- Register tufte engines in .onLoad()? HOT 4
- Upkeep for tufte HOT 1
- References not formatted properly (and text in italics) on the Tufte Rmd template out-of-the-box HOT 2
- words pasted together in longish html table captions HOT 4
- Release tufte 0.13 HOT 1
- Issue with reference parsing with Pandoc 2.11+ when multiple reference in same line HOT 7
- Strange rendering of Rmarkdown to HTML for tufte_html when using knitr/RStudio HOT 2
- Fullscreen-width figure HOT 2
- Side notes from tables and block quotes HOT 1
- Suggested feature: code folding
- Move `master` branch to `main` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tufte.