Skip to content

Instantly share code, notes, and snippets.

@melitanick
Last active October 15, 2018 13:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melitanick/49dbd024ef4d34a6354cd86bedc581a6 to your computer and use it in GitHub Desktop.
Save melitanick/49dbd024ef4d34a6354cd86bedc581a6 to your computer and use it in GitHub Desktop.
missing croatian character in pdf produced from rnw
---
title: "test.croatian"
output: pdf_document
---
đ Đ
š Š
č Č
ć Ć
\documentclass[utf8]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
% default font cmr10 suports croatian caracters, I checked
\begin{document}
\dj \DJ \v{s} \v{S} \v{c} \v{C} \'c \'C \v{z} \v{Z}
đ Đ
š Š
č Č
ć Ć
\end{document}
@melitanick
Copy link
Author

Here is a problem in producing Croatian character, capital Đ, from Rnw. Producing the same from Rmd is correct, but I need Sweave functionality to produce nicer presentations than it is possible from Rmd presentations. I need to produce pdf. and R compile to pdf with sweave and pdflatex.

@melitanick
Copy link
Author

This is corrected rnw and the solution for all the characters to display correct in pdf is simple: set in RStudio Tools/Global Options/Sweawe to weave using knitr! Remove all the lines in rnw that mention sweave option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment