"Error: caption Outside float" in R Markdown

Asked

Viewed 857 times

1

When I try to compile my Markdown R code, I get the following error:

! Package caption Error: caption Outside float.

See the caption package Documentation for Explanation. Type H for immediate help.
...
l.336 caption

pandoc.exe: Error producing PDF Error: pandoc Document Conversion failed with error 43 Also: Warning message: command execution '"C:/Users/araujoic/Appdata/Local/Pandoc/pandoc" +RTS -K512m -RTS rmarkdown.utf8.Md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash -output rmarkdown.pdf --template "C: Users araujoic Documents R win-library 3.4 rmarkdown rmd latex default-1.17.0.2. tex" --Highlight-style tango --latex-engine pdflatex --variable Graphics=yes --include-in-header "C: Users araujoic Appdata Local Temp Rtmpqxmi4e file21b83d93844"' status 43 Execution interrupted

How can I fix it?

  • 4

    It would be interesting for the passage where this occurs. Take a look at this topic: https://tex.stackexchange.com/questions/111791/caption-outside-float-error

1 answer

2

You need to use a \caption{} within a table environment (\being{table} ... \end{table} or figures \begin{figure} ... \end{figure}.

Otherwise, you will have trouble compiling.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.