【发布时间】:2021-05-04 16:25:37
【问题描述】:
我正在用 R markdown 写我的 Ms 论文,但附录部分有问题。我需要在附录部分中放置一些表格,但是当我渲染它时,该小节的标题出现在表格下方。像这样:
我想知道有没有办法解决这个问题。
我写代码的方式是:
# Appendix {-}
## Subsection title
chunk with table
R-markdown 块:
title: "Title of my thesis"
subtitle:
author:
- "Student :"
- "Director: "
output:
pdf_document:
number_sections: true
latex_engine: xelatex
template: NULL
word_document: default
degree: Ms Biology
field: Experimental biology
year: 2021
geometry: left=2cm,right= 2 cm,top=2 cm, bottom=2 cm
papersize: a4
header-includes:
- \usepackage{amsmath}
- \usepackage{booktabs}
- \usepackage{pdflscape}
- \usepackage[justification=raggedright,labelfont=bf,singlelinecheck=false]{caption}
- \usepackage{setspace}
bibliography: library.bib
csl: apa7.csl
fontsize: 11 pt
indent: true
spacing: 1.5
和块选项
knitr::opts_chunk$set(
echo = FALSE,
warning = FALSE,
message = FALSE,
error =FALSE)
【问题讨论】:
-
能否包含 rmarkdown 块的详细信息,包括您正在使用的块选项;大概输出是pdf?表是如何创建的?
-
尝试在小节标题前添加
\clearpage。 -
仍然无法正常工作:c
标签: r r-markdown