0

I receive the following error when attempting to compile a LaTeX document:

Package inputenc Error: Unicode character \GenericError {(inputenc)}{Package inputenc Error: Unicode character (U+2069)

The cause of this error is a pdf image that I created in R. The title of the figure contains greek letters and subscripts. I have changed the pdf compiler from pdfLaTex to xeLaTeX and have included \usepackage[utf8]{inputenc}, but neither works.enter image description here

Has anyone had this issue and if so, how did you fix it?

Thanks, Nate

Example Code: (test.Rnw)

\documentclass{article}
\usepackage{hyperref}
\usepackage{amsmath, bm, multirow,booktabs,mathtools}
\usepackage{setspace, relsize, booktabs, needspace, epic}
\usepackage{longtable, color, colortbl, lscape, dcolumn}
\usepackage[table]{xcolor}  

\begin{document}
<<fig_test,eval=TRUE>>=
pdf("test_fig.pdf")
par(las=1, cex.axis=1.5,cex.lab=1.5,cex.main=1.5)
plot(x=c(1,5.1), y=c(0.75,3), typ='n',
main=expression(paste('X(',alpha[1],')',sep='')),ylab='',xlab='')
graphics.off()
@

\begin{figure}
\caption{Caption}
\centering
\includegraphics[scale=0.5]{"test_fig"}⁩
\end{figure}

\end{document}
2
  • Could you please include your code for us to help you?
    – zyy
    Commented Nov 16, 2018 at 19:45
  • off-topic: you should load hyperref after your other packages and you don't need color and colortbl because you load xcolor with the table option Commented Nov 16, 2018 at 20:29

1 Answer 1

2

The error is unrelated to the pdf insertion or Greek, you have a BIDI control character U+2069 POP DIRECTIONAL ISOLATE after test_fig"} in your source, if you retype that line just with ASCII it should be fine.

  U+0074 LATIN SMALL LETTER T     t
  U+0065 LATIN SMALL LETTER E     e
  U+0073 LATIN SMALL LETTER S     s
  U+0074 LATIN SMALL LETTER T     t
  U+005f LOW LINE     &lowbar; &UnderBar; \_
  U+0066 LATIN SMALL LETTER F     f
  U+0069 LATIN SMALL LETTER I     i
  U+0067 LATIN SMALL LETTER G     g
  U+0022 QUOTATION MARK     &quot; &QUOT; "
  U+007d RIGHT CURLY BRACKET     &rcub; &rbrace; \rbrace
  U+2069 POP DIRECTIONAL ISOLATE
1
  • Hello David, that worked great -- thank you! Commented Nov 16, 2018 at 21:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .