Skip to content

Error to present two plots in one panel with word_document2 #249

@sammo3182

Description

@sammo3182

I tried to present two plots in one panel using the bookdown::word_document2. The specification are as following:

---
output: bookdown::word_document2
---

```{r fig.cap='A figure example with the specified aspect ratio, width, and alignment.', fig.show="hold"}
plot(pressure, pch = 19, type = 'b')
plot(pressure$temperature)
```

The codes produce the following error of label once I specified fig.show="hold". The same codes work fine in pdf_document2 or without the arugment fig.show="hold".

Error in parse_fig_labels(x, global) : 
  There are multiple labels on one line: (#fig:unnamed-chunk-1), (#fig:unnamed-chunk-1)
Calls: <Anonymous> ... <Anonymous> -> process_markdown -> parse_fig_labels
Execution halted

I'm using the developed version of bookdown (0.2.4).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions