# Bookdown Equations

Hi,

I am hoping someone can help me. I am writing equations in Bookdown like the below

e = mc^2

I wish to cross reference it. It works really well but produces the format Equation (1). I was hoping to produce the formula in the APA format of Equation 1

Does anyone know if there is a setting i can set within the chunk or the knitr options to remove the brackets?

Take a look at the bookdown documentation and the following section on theorems. It might be possible to handle this by bringing in a custom \LaTeX style.

1 Like

This will only work for bookdown::pdf_book format, but in the file preamble.tex, you can override the \eqref macro to use \Cref from the cleveref LaTex package, and then just specify the format accordingly. My preamble.tex looks like:

 \usepackage{booktabs}
\usepackage{cleveref}

\renewcommand{\eqref}{\Cref}
\Crefformat{equation}{#2#1#3}


In the Rmarkdown document, the reference is the same: Equation \@ref(eq:"label")

In any other output format, the equation label will still be in parentheses.

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.