2016-12-17 9 views
0

RStudio에서 Rmd로 ioslides 프리젠 테이션을 만들려고하지만 이탤릭체 및 굵은 체가 작동하지 않는 것 (별표와 이중 별표). HTML로 렌더링하면 작동합니다.Rstudio를 통해 Rmd에서 HTML 문서를 렌더링 할 때 문제가 발생한다

CSS를 사용하여 텍스트 색상을 변경할 수 있지만 텍스트를 굵게 또는 기울임 꼴로 변경할 수 없습니다. 아래의 코드에서 두 경우 모두 (ioslides_presentation과 html_document) "Markdown"이라는 단어가 오렌지색으로 나오지만 html_document의 경우에만 이탤릭체로 표시됩니다.

저는 최신 버전의 RStudio가 설치된 Mac에서 실행됩니다.

CSS 파일 :

.mystuff { 
    color: orange; 
} 

RMD 파일 :

--- 
title: "Untitled" 
output: 
    ioslides_presentation: 
    css: styles.css 
date: "12/16/2016" 
--- 


## R Markdown 

This is an R *<span class="mystuff">Markdown</span>* document. 
Markdown is a simple formatting syntax for authoring HTML, PDF, 
and MS Word documents. For more details on using R Markdown see 
<http://rmarkdown.rstudio.com> 

답변

0

여기서 문제, 저는 믿습니다, <em> 텍스트 스타일을 기본 ioslides 실제로 그것을 이탤릭체하지 않습니다. 기본 ioslides 스타일링이 있습니다

html, body, div, span, applet, object, iframe, 
h1, h2, h3, h4, h5, h6, p, blockquote, pre, 
a, abbr, acronym, address, big, cite, code, 
del, dfn, em, img, ins, kbd, q, s, samp, 
small, strike, strong, tt, var, 
b, u, i, center, 
dl, dt, dd, ol, ul, li, 
fieldset, form, label, legend, 
table, caption, tbody, tfoot, thead, tr, th, td, 
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary, 
time, mark, audio, video { 
    margin: 0; 
    padding: 0; 
    border: 0; 
    font: inherit; 
    font-size: 100%; 
    vertical-align: baseline; 
} 

그리고, 특히 font: inherit; 비트는 일반적으로 <em> 요소에 적용되는 기본 font-style: italic; CSS 스타일을 재정의합니다.

클래스의 명시적인 font-style: italic;으로 해결해야합니다.

+0

감사합니다 사용자 정의에 기울임 꼴 강제로. –

0

같은 생각, 그냥 고정하는, 을 styles.css

em { 
    font-style: italic !important; 
}