首页 > 解决方案 > Rmarkdown中重叠的子图标题

问题描述

我正在使用Rmakrdown 中bookdown的包来输出和说明我的 pdf 输出中的数字。subfig但是,如底部图像所示,子图标题重叠 - 我的 YAML 标头和块描述如下详述 - 有人对如何解决这个问题有建议吗?

YAML 标头:

author: "MM"
date: "25/02/2021"
output:
  bookdown::pdf_document2:
    template: default
    toc: yes
    number_sections: yes
linestretch: '1.5'
fontsize: '12pt'
header-includes: 
  - \usepackage{booktabs}
  - \usepackage{subfig}
csl: harvard-imperial-college-london.csl
link-citations: true
bibliography: jabref_dissertation_bibliography.bib
linkcolor: red

块头和图:

{r homelessownerratesincomeshock, fig.cap = "Homelessness and home-ownership rates are less affected initially with MPIs in place. These charts show the difference between the run with an income shock and the control run with no income shock for each MPI paradigm.", echo=FALSE, 
fig.show="hold", out.width="50%", 
fig.subcap=c("Homelessness in the 'no limits' and 'dual-limits' runs increase the most for different reasons, the former due to poor household finances and the latter due to exclusion from the market.", "The number of homeowners in the market compared to the control run is shown here. Again, dual-limits are overly punitive and keep households out of the ownership market for an extended period. With just one of the measures in place, household finances are healthy enough to gradually return to trend.")}
plot(chart1)
plot(chart2)

谢谢你的帮助!

重叠子图

标签: rggplot2r-markdownbookdown

解决方案


推荐阅读