Skip to content
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

pandoc error when handling fraction #69

Closed
cardiomoon opened this issue Feb 2, 2022 · 2 comments
Closed

pandoc error when handling fraction #69

cardiomoon opened this issue Feb 2, 2022 · 2 comments

Comments

@cardiomoon
Copy link

cardiomoon commented Feb 2, 2022

Hello !

Package "ftExtra" is very cool. Thanks.

I have a problem to insert fraction in flextable.

Here is reproducible example.

Best regards,

Keon-Woong Moon

library(flextable)
library(ftExtra)
data.frame(math = "$\\frac{1}{2}$",
           stringsAsFactors = FALSE) %>%
  as_flextable() %>%
  colformat_md() 

pandoc: pandoc: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1

I have sample problem when execute simple latex example.

library(flextable)
library(ftExtra)
data.frame(math = "$e^{i}$",
           stringsAsFactors = FALSE) %>%
  as_flextable() %>%
  colformat_md() 

pandoc: pandoc: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory)
Error: pandoc document conversion failed with error 1

@atusy
Copy link
Owner

atusy commented Feb 2, 2022

Thank you for using ftExtra. I'm so glad!!

Unfortunately, I cannot reproduce the issue.
Also, even without the issue, faction cannot be rendered by current implementation (cf. https://ftextra.atusy.net/articles/format_columns.html#math for the reason).
I have an idea to make it happen (#70).

image

colformat_md renders math by a math2html function in a Lua filter.
This function internally calls pandoc again.
This means pandoc executable must be found correctly with a following code.

meta("pandoc_path", rmarkdown::pandoc_exec()),

Would you try what returns by rmarkdown::pandoc_exec()?

@atusy
Copy link
Owner

atusy commented Apr 18, 2022

I am closing this issue as no updaets have been made.
Feel free to re-open if the problem continues.

@atusy atusy closed this as completed Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants