daqana / tikzDevice

A R package for producing graphics output as PGF/TikZ code for use in TeX documents.
https://daqana.github.io/tikzDevice
132 stars 26 forks source link

Issue with umlauts again #167

Closed jdeut closed 6 years ago

jdeut commented 6 years ago

Hi all,

it seems that i have the same issue as #166.

After i updated R from version 3.3 to 3.4.2 on my debian machine tikzDevice (version 0.10-3) hangs if the graphics output contains any umlauts.

In the following example code tikzDevice works without any error and the plot is successfully transformed into tikz format.

library(tikzDevice)
library(ggplot2)

tikz(file = "plot.tex", width = 5, height = 5, verbose=TRUE)

umlauts <- 'A'

ggplot(mtcars, aes(mpg)) +
    geom_histogram() +
    labs(x=umlauts)

dev.off() 

But if I set umlauts to Ä or any other non standard ASCII character the R code hangs during execution and no file is written at all.

This is the code tikDevice is unable to process:

library(tikzDevice)
library(ggplot2)

tikz(file = "plot.tex", width = 5, height = 5, verbose=TRUE)

umlauts <- 'Ä'    # No umlauts allowed at the moment :(

ggplot(mtcars, aes(mpg)) +
    geom_histogram() +
    labs(x=umlauts)

dev.off() 

My preliminary workaround is to set umlauts with an umlaut in indirect latex notation like \"a but this is really a workaround.

Would be great if anybody finds the bug and wipe it out :)

Best regards

krlmlr commented 6 years ago

Thanks. Can you please install the development version and show the output of tikzDevice::tikzTest() ?