# Bug when setting using tikz and setting OutDec option #1081

Closed
opened this Issue Jul 26, 2015 · 4 comments

2 participants

### vitorbaptista commented Jul 26, 2015

 Hi, The following LaTeX file doesn't work: \documentclass{article} \usepackage{tikz} \begin{document} <>= options(OutDec = ",") plot(1:10) @ \end{document} But if I either remove dev='tikz', making it: <<>>= options(OutDec = ",") plot(1:10) @ Or remove the OutDec option, making it: <>= plot(1:10) @ It works fine. The culprint seems to be the getMetricsFromLatex function, as shown on this snippet of the log: ! ==> Fatal error occurred, no output PDF file produced! Quitting from lines 7-9 (teste.Rnw) Error in getMetricsFromLatex(TeXMetrics) : TeX was unable to calculate metrics for the following string or character: 1:10 Common reasons for failure include: * The string contains a character which is special to LaTeX unless escaped properly, such as % or \$. * The string makes use of LaTeX commands provided by a package and the tikzDevice was not told to load the package. The contents of the LaTeX log of the aborted run have been printed above, it may contain additional details as to why the metric calculation failed. Calls: knit ... print.recordedplot -> replayPlot -> -> getMetricsFromLatex 

### vitorbaptista commented Jul 26, 2015

 I've published the full error log at https://gist.github.com/vitorbaptista/5b97f54edee8ad54a93b Not all OutDec values trigger this bug. In my tests, ",", "_" and ";" triggered the bug, while " ", "-" and "+" didn't.

Open

Owner

### yihui commented Aug 11, 2015

 Thanks! I think this is the same issue as daqana/tikzDevice#57 I'll see if I can fix it.

Owner

### yihui commented Aug 12, 2015

 Fixed in the development version of tikzDevice: https://github.com/yihui/tikzDevice

### vitorbaptista commented Aug 12, 2015

 Thanks for the fix, it's working now 🍻 👍