2015-01-13 6 views
2

Я работаю с R studio markdown и knitr, все вместе замечательные вещи.Как вязать символ греческого языка в R-studio для создания pdf

Кажется, я не могу вязать греческий символ в формате pdf.

же RMD файл:

--- 
title: "Untitled" 
author: "Hugo Koopmans" 
date: "11-01-2015" 
output: pdf_document 
--- 


Test Greek symbol 
---------------- 

P-value 
In statistics, the p-value is a function of the observed sample results (a statistic) that is used for testing a statistical hypothesis. Before performing the test a threshold value is chosen, called the significance level of the test, traditionally 5% or 1% [1] and denoted as α. If the p-value is equal or smaller than the significance level (\alpha) 

Сейчас я нахожусь на Linx мятой 17 texlive 2013 Rstudio Version 0.98.1062

Результат:

|.................................................................| 100% 
    ordinary text without R code 


/usr/lib/rstudio/bin/pandoc/pandoc Preview-25df24aa1731.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures --output Preview-25df24aa1731.pdf --template /home/hugo/R/x86_64-pc-linux-gnu-library/3.0/rmarkdown/rmd/latex/default.tex --highlight-style tango --latex-engine pdflatex --variable 'geometry:margin=1in' 


processing file: Preview-25df24aa1731.Rmd 
output file: Preview-25df24aa1731.knit.md 

! Package inputenc Error: Unicode char \u8:α not set up for use with LaTeX. 

See the inputenc package documentation for explanation. 
Type H <return> for immediate help. 
...            

l.73 denoted as α 

Try running pandoc with --latex-engine=xelatex. 
pandoc: Error producing PDF from TeX source 
Error: pandoc document conversion failed with error 43 
Execution halted 

Результат pandoc жалуетесь альфа-символ. Таким образом, латексные генерироваться, кажется, не быть в состоянии обрабатывать символ ...

Я хотел бы иметь R-студия с этим справиться должным образом, не вдаваясь в изменения файла текс вручную ... в идеале ...

Какие-нибудь советы?

Гуго

ответ

14

Для греческих символов в Rmarkdown вы можете использовать встроенные формулы, обозначенных $ ... $, то есть два $ признаков.

Попробуйте это:

If the p-value is equal or smaller than the significance level $\alpha$

enter image description here

+0

ха я вижу, глупо мне, что я увидел, что я оставил другой альфа в текстах две строки до ... –

+0

@HugoKoopmans Не забудьте принять ответ :) –

 Смежные вопросы

  • Нет связанных вопросов^_^