Giter Site home page Giter Site logo

Comments (4)

zeigerpuppy avatar zeigerpuppy commented on September 18, 2024 3

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.

yihui avatar yihui commented on September 18, 2024 2

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.

zeigerpuppy avatar zeigerpuppy commented on September 18, 2024

Thank you, that worked well. It makes sense now that I know the options get overridden!

from tufte.

github-actions avatar github-actions commented on September 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.