2016-07-14 3 views
1

JSS 템플릿을 사용할 때 이상한 점이 있습니다. 이 템플릿은 다른 것들과 등 로고, 저자, 함께 잘 작동하지만 것 같다 : 코드 블록 내부JSS 템플릿이 제대로 작동하지 않습니다.

  • 없음 프롬프트 'R>은'JSS 스타일의 지침에 따라하지 나타납니다.
  • 특정 저널의 볼륨 번호는 스타일 지침에 따라 다시 굵게 표시되지 않습니다.
  • 제휴에서 "첫 번째 줄"과 "두 번째 줄"이 나란히 배치됩니다.

감사합니다. 감사합니다.

sessionInfo() 

R version 3.3.1 RC (2016-06-17 r70798) 

Platform: x86_64-suse-linux-gnu (64-bit) 

Running under: openSUSE Leap 42.1 (x86_64) 

locale: 
[1] LC_CTYPE=es_ES.UTF-8  LC_NUMERIC=C  LC_TIME=es_ES.UTF-8  LC_COLLATE=es_ES.UTF-8  LC_MONETARY=es_ES.UTF-8 
[6] LC_MESSAGES=es_ES.UTF-8 LC_PAPER=es_ES.UTF-8  LC_NAME=C     LC_ADDRESS=C    LC_TELEPHONE=C    
[11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C  

attached base packages: 
[1] stats  graphics grDevices utils  datasets methods base  

other attached packages: 
[1] rticles_0.2  knitr_1.13  rmarkdown_0.9.6 

loaded via a namespace (and not attached): 
[1] htmltools_0.3.5 tools_3.3.1  Rcpp_0.12.4  digest_0.6.9 

당신은 rticles 패키지 (https://github.com/rstudio/rticles)에서 JSS 템플릿을 찾을 수 있습니다.

test.Rmd 파일 : 나는 또한 참고 문헌을 컴파일하는 간단한 턱받이 파일을 추가


author: 
    - name: FirstName LastName 
    affiliation: University/Company 
    address: > 
     First line 
     Second line 
    email: [email protected] 
    url: http://rstudio.com 
    - name: Second Author 
    affiliation: Affiliation 
title: 
    formatted: "A Capitalized Title: Something about a Package \\pkg{foo}" 
    # If you use tex in the formatted title, also supply version without 
    plain:  "A Capitalized Title: Something about a Package foo" 
    # For running headers, if needed 
    short:  "\\pkg{foo}: A Capitalized Title" 
abstract: > 
    The abstract of the article. 
keywords: 
    # at least one keyword must be supplied 
    formatted: [keywords, not capitalized, "\\proglang{Java}"] 
    plain:  [keywords, not capitalized, Java] 
preamble: > 
    \usepackage{amsmath} 
output: rticles::jss_article 
bibliography: biblio.bib 
--- 

# Introduction 

This template demonstrates some of the basic latex you'll need to know to create a JSS  article.  

*A citation* [see @rtip2016; and @Hadley2011] 

## Code formatting 

Don't use markdown, instead use the more precise latex commands: 

* \proglang{Java} 
* \pkg{plyr} 
* \code{print("abc")} 

# R code 

Can be inserted in regular R markdown blocks. 

```{r, prompt=TRUE} 
x <- 1:10 
x 
``` 

#References 

및 biblio.bib 파일 : 프롬프트 문제는 버그가 있었다

@Manual{rtip2016, 
    title = {rtip: Inequality, Welfare and Poverty Indices and Curves using 
    the EU-SILC Data}, 
    author = {Angel Berihuete and Carmen Dolores Ramos and Miguel Angel Sordo}, 
    year = {2016}, 
    note = {R package version 1.0.0}, 
    url = {https://CRAN.R-project.org/package=rtip}, 
    } 

@Article{Hadley2011, 
    title = {The Split-Apply-Combine Strategy for Data Analysis}, 
    author = {Hadley Wickham}, 
    journal = {Journal of Statistical Software}, 
    year = {2011}, 
    volume = {40}, 
    number = {1}, 
    pages = {1--29}, 
    url = {http://www.jstatsoft.org/v40/i01/}, 
} 
+0

최소한의 재현 가능한 예를 게시하면 사람들이 쉽게 이용할 수 있습니다. – user2554330

+0

친애하는 user2554300 님, 기본 템플릿 만 사용하고 있습니다. 내 게시물을 편집하여 코드를 공유합니다. –

+0

첫 번째 문제는 확실히 버그처럼 보입니다. knitr은 코드를 강조 표시 할 때 프롬프트에 넣지만이 스타일에서는 강조 표시가 없으므로 프롬프트가 표시되지 않습니다. – user2554330

답변

1

rticlesjss_article에 대한 설정입니다. 당신은 추가

devtools::install_github("rstudio/rticles") 

편집에 의해 고정 된 버전을 시도 할 수 있습니다 :

인용문 스타일의 문제가 비교적 쉽게 고정됩니다. 그냥 문서의 YAML 헤더에

output: 
    rticles::jss_article: 
    citation_package: natbib 

output: rticles::jss_article 

을 변경합니다. 이것은 아마도 rticle의 기본값으로 수행 할 수 있지만 어떤 변경이 필요한지는 알 수 없습니다.

+0

예! 인용 스타일 문제가 해결되었습니다. 또한 "R>"프롬프트에서 자식 청크를 통해 코드를 호출하지 않으면 프롬프트는 ">"이됩니다. 마지막으로 제휴 관계가 여전히 잘못되었지만 (한 줄 대신 두 줄),이 문제는 생성 된 TeX 파일을 복구하여 해결할 수 있습니다. –

관련 문제