Giter Club home page Giter Club logo

Comments (5)

eddelbuettel avatar eddelbuettel commented on August 17, 2024

I would suggest the following:

  • Look at any other RMarkdown document that does it
  • Carry the change over.

I guess that you probably just need to declare a UTF-8 encoding, possibly via %\VignetteEncoding{UTF-8} in the vignette header.

from pinp.

eddelbuettel avatar eddelbuettel commented on August 17, 2024

There is nothing you need to do. Quick loG:

edd@brad:/tmp$ mkdir other-languages
edd@brad:/tmp$ cd other-languages/
edd@brad:/tmp/other-languages$ Rscript -e 'rmarkdown::draft("quickCheck.Rmd", template="pdf", package="pinp", edit=FALSE)'
edd@brad:/tmp/other-languages$ # edits quickCheck.Rmd
edd@brad:/tmp/other-languages$ Rscript -e 'rmarkdown::render("quickCheck.Rmd")'


processing file: quickCheck.Rmd
  |.................................................................| 100%
  ordinary text without R code


output file: quickCheck.knit.md

/usr/bin/pandoc +RTS -K512m -RTS quickCheck.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output quickCheck.tex --template /usr/local/lib/R/site-library/pinp/rmarkdown/templates/pdf/resources/template.tex --highlight-style tango --latex-engine pdflatex --natbib 
Latexmk: This is Latexmk, John Collins, 1 January 2015, version: 4.41.

Output created: quickCheck.pdf
edd@brad:/tmp/other-languages$ 

using the following near-minimal (?) RMarkdown input file:

---
title: A Quick Test

author:
  - name: First Author
    affiliation: a
address:
  - code: a
    address: Institute of Smoke and Magic, University of Sometown, Sometown, XY, 12345

keywords:
  - one
  - two

output: pinp::pinp
---

## Introduction 

Il fait chaud en été à Paris.

Schöne Grüße.

and it just works as is.

from pinp.

 avatar commented on August 17, 2024

Your example with French works indeed. However, If you use Ελληνικά (Greek), you will get an error.

from pinp.

eddelbuettel avatar eddelbuettel commented on August 17, 2024

I very strongly suspect that if you do whatever you need to do to typset Greek (or other) letters via Markdown and then LaTeX, it will just work. We this in the template.tex file:

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

which means UTF-8 character should be supported. For the rest, i,e., direct input of non latin-1 characters you may need to research how RMarkdown does. There is no fundamental reason why this can't work.

from pinp.

eddelbuettel avatar eddelbuettel commented on August 17, 2024

This tex.stackexchange.com post seems relevant. It may after all we a regular LaTeX issue. But we're not taking any features away...

from pinp.

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.