-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MDPI issue with equation numbering #326
Comments
Using output:
bookdown::pdf_book:
base_format: rticles::mdpi_article But $$
(\#eq:eq2)
a = c \cdot b
$$ is still rendered to \[
\label{eq:eq2}
a = c \cdot b
\] But I guess it's an issue for |
Hi @etiennebr, this is indeed the official way for now to add bookdown features to any other format. It is document in the book:
we may in the future move the referencing feature in rmarkdown directly to make it available more broadly without doing this. So you just need to change the
Pandoc will not do the conversion. It will transform And it seems for bookdown referencing of equation you need to explicitly use It seems |
Also, bookdown features is to provided same referencing mechanism for different type of output. With rticles, the output format is only tex for now so I think it is expected that reference mechanism from tex be used directly maybe. This is an equation
\begin{equation} \label{eq:1}
c = a \cdot b
\end{equation}
see \ref{eq:1} But I can see the advantage of having one syntax, and that the equation preview in rstudio works. |
@cderv, thanks for all the pointers.
Is there an issue I can track?
Opened #959 |
Not yet. It is just an idea for now. Nothing yet planned. I am referencing issues that points toward that being a good idea. And testing the idea in the wild ! 😉 |
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
Equation labels are not translated
\label{eq:eq}
when knitting withmdpi_article
, but they are withbookdown::pdf_document2
.Here's the
Rmd
Knit with
![image](https://user-images.githubusercontent.com/393576/94274301-83dd4780-ff13-11ea-937c-b34dc163102c.png)
bookdown::pdf_document2
Knit with
![image](https://user-images.githubusercontent.com/393576/94274428-b38c4f80-ff13-11ea-9b9f-7ce5a3ec7482.png)
rticles::mdpi_article
It seems like there is some processing not happening. I don't have a deep knowledge of
knitr
, so I suspect it might simply be that themdpi_article
andpdf2_document
are unrelated, andmdpi
in fact usespdf_document
for rendering, but in any case, I'd like to reference equations in amdpi
paper, so this might be a feature request. Also, per rstudio/bookdown#190 (comment), it seems like the second equation should also be translated to\begin{equation} ... \end{equation}
(at least for ebooks), so I wondered if one of my packages was outdated, but apparently not (see session info below, but knitr_1.30, rmarkdown_2.3, bookdown_0.20, rticles_0.16.1 all seemed fine).Here are the rendered
.tex
With
bookdown::pdf_document2
yields in.tex
With
rticles::mdpi_article
, thetex
is:@dleutnant, any idea? @cderv, I'm happy to dive a bit deeper in
rticles
/knitr
if you can point me in a general direction where this could be fixed, or how to have a step-by-step look at the knitting process because I'm completely new to this code.session info
By filing an issue to this repo, I promise that
xfun::session_info('rticles')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('rstudio/rticles')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: