我在使用乳胶编织的评论中发现了某些与变音符号有关的错误。首先是我的小例子:
\documentclass[12pt, % ß
a4paper % page format
]{scrartcl}
\begin{document}
<<code>>=
rnorm(30)
@
\end{document}
这显示错误:
Error in texi2dvi(file = file, pdf = TRUE, clean = clean, quiet = quiet,: Running 'texi2dvi' on 'minimalexample.tex' failed. LaTeX errors: ! LaTeX Error: Environment knitrout undefined. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... ! Undefined control sequence. l.6 \definecolor {shadecolor}{rgb}{0.969, 0.969, 0.969}\color{fgcolor}\begin{... The control sequence at the end of the top line of your error message was never \def'ed. If you have ! Undefined control sequence. l.6 ...shadecolor}{rgb}{0.969, 0.969, 0.969}\color {fgcolor}\begin{kframe} The control sequence at the end of the top line of your error message was never \def'ed. If you have ! LaTeX Error: Environment kframe undefined. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ... ! LaTeX Error: Environment alltt undefined. See the La Calls: knit2pdf -> <Anonymous> -> texi2dvi In addition: There were 13 warnings (use warnings() to see them)
Execution halted
Process exited with error(s)
我使用Texstudio(V 2.9.4)作为编辑器,我的编织版本是1.12.3。
是否有机会在评论中使用变音符号并避免这些错误?
答案 0 :(得分:1)
好的,最后我得到了解决方案。
它并没有只影响评论。每个变音都会导致错误。该文件在iso-8859-1中编码,R在utf-8下运行。我在R中找到了它:
Sys.getlocale()
[1] "LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=de_DE.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=de_DE.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=de_DE.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=de_DE.UTF-8;LC_IDENTIFICATION=C"