Centering image and text in R Markdown for a PDF report

后端 未结 9 1687
情深已故
情深已故 2020-12-28 12:10

I want to center an image and/or text using R Markdown and knit a PDF report out of it.

I have tried using:

->Text<-

->![](image1.jpg)<-         


        
9条回答
  •  北荒
    北荒 (楼主)
    2020-12-28 12:44

    You can set the center (or other) alignment for the whole document as a Knitr option, using:

    knitr::opts_chunk$set(echo = TRUE, fig.align="center")
    

提交回复
热议问题