2017-08-19 6 views
2

私は現在、ドイツ語で小さなレポートを書いています。したがって、字幕のタイトルをから図1に、に変更したいと思います。図書1などです。マークダウンで図のタイトルを変更するにはどうすればよいですか?

--- 
title: "Untitled" 
author: "me" 
date: '`r format(Sys.time(), "%d %B, %Y")`' 
output: 
    pdf_document: default 
--- 


```{r iris, fig.cap='Iris sepal lengths'} 
hist(iris$Sepal.Length) 
``` 

質問:はどのようにRマークダウンで(それは実際にそのように呼ばれていますかどうかわからない)デフォルトのフィギュアのタイトルを変更できますか?

+1

ここでの回答ではいくつかの素敵なヒント:https://stackoverflow.com/

\usepackage{caption} \captionsetup[figure]{name=Abbildung} 

これは、メインの.Rmdファイルです質問/ 31182147/suppress-automatic-table-name-and-rmd-file-using-xtable-or-knitr – vestland

答えて

2

this questionの例の後に、図のキャプションのデフォルトを変更できる独自のtexファイルを定義できます。

header.tex:

--- 
title: "Untitled" 
author: "me" 
date: '`r format(Sys.time(), "%d %B, %Y")`' 
output: 
    pdf_document: 
    includes: 
     in_header: header.tex 
--- 


```{r iris, fig.cap='Iris sepal lengths'} 
hist(iris$Sepal.Length) 
``` 

enter image description here

+0

は完全に機能します!私はこれまでLaTexを使っていません。 – andrasz

+0

@andrasz pdf出力を変更したい場合、基本的な構文を学ぶ必要があるかもしれません。詳細については、tex.stackexchange.comを参照してください。 –

関連する問題