1

我正在使用大papaja包来创建手稿。我想将数字放在文本 ( floatsintext: yes) 中,并且我希望它们准确地出现在指定的位置。

为了实现后者,我按照这个建议将以下内容添加到 YAML:

header-includes: #allows you to add in your own Latex packages
- \usepackage{float} #use the 'float' package
- \floatplacement{figure}{H} #make every figure with caption = h

这会将数字放在我想要的位置,但文本间距设置为使用整个页面。我希望前面的文本使用从上到下的空间,在图之前的页面底部留下空白。

在此处输入图像描述

---
title             : "The title"
shorttitle        : "Title"

author: 
  - name          : "First Author"
    affiliation   : "1"
    corresponding : yes    # Define only one corresponding author
    address       : "Postal address"
    email         : "my@email.com"
  - name          : "Ernst-August Doelle"
    affiliation   : "1,2"

affiliation:
  - id            : "1"
    institution   : "Wilhelm-Wundt-University"
  - id            : "2"
    institution   : "Konstanz Business School"

authornote: |
  Add complete departmental affiliations for each author here. Each new line herein must be indented, like this line.

  Enter author note here.

abstract: |

keywords          : "keywords"
wordcount         : "X"

bibliography      : ["r-references.bib"]

floatsintext      : yes
figurelist        : no
tablelist         : no
footnotelist      : no
linenumbers       : yes
mask              : no
draft             : no

documentclass     : "apa6"
classoption       : "man,noextraspace"
header-includes:
  - \usepackage{pdfpages}
  - \usepackage{setspace}
  - \AtBeginEnvironment{tabular}{\singlespacing}
  - \makeatletter\let\expandableinput\@@input\makeatother
  - \interfootnotelinepenalty=10000
  - \usepackage{float} #use the 'float' package
  - \floatplacement{figure}{H} #make every figure with caption = h
output            : papaja::apa6_pdf
---

```{r setup, include = FALSE}
library("papaja")
```

```{r analysis-preferences}
# Seed for random number generation
set.seed(42)
knitr::opts_chunk$set(cache.extra = knitr::rand_seed)
```

# Methods
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce sollicitudin libero id arcu accumsan sagittis. Sed vel rutrum magna, et posuere tellus. Aenean auctor maximus mauris, a dapibus lectus. Sed efficitur ultricies semper. Vestibulum dignissim mollis dui, ut rhoncus urna porttitor id. Vestibulum eget maximus tellus, molestie imperdiet nulla. Phasellus congue, libero quis sagittis porttitor, ex dui posuere leo, eget viverra nisi sapien non arcu. Ut consectetur magna quis sem fringilla, ac elementum risus suscipit. Morbi lobortis sem non ante imperdiet, in faucibus dui lobortis. Nam at lorem erat. Donec nec maximus erat, quis vehicula mi. Sed sed gravida lacus. Nam non elit enim.

Maecenas finibus turpis at lectus convallis, eget congue turpis rutrum. Fusce eleifend tellus turpis, eget egestas odio mattis at. Aenean interdum lectus a orci tempus, eget sodales diam congue. Aenean ac tellus a leo auctor rhoncus. Nam condimentum, diam sit amet iaculis gravida, risus augue aliquam urna, in vestibulum eros ex quis risus. Quisque porta euismod lectus hendrerit sollicitudin. Nulla condimentum est risus, non interdum urna commodo ac.


```{r pressure, echo=FALSE}
plot(pressure)
```
4

1 回答 1

4

您正在使用的文档类似乎已\flushbottom激活,这将确保所有页面都具有相同的 bootom 行。这通常在诸如书籍之类的东西中完成。

如果你不想要这个,你可以使用\raggedbottom宏。

于 2019-03-24T13:48:18.620 回答