Ehyaei/RTLNotes

Problem with Latex

Opened this issue · 7 comments

I tried to run the rmarkdown file, but I get the following error:

! LaTeX Error: Command \XeTeX already defined. Or name \end... illegal, see p.192 of the manual.
I even commented all the rmarkdown file except the yaml header, but the error still remains. I'll attach the log file.

It creates the .tex file but the .tex file does not run. I thought the problem would be from Latex engine. So, I tried using different engine like lualatex or xelatex (it seem the code uses pdflatex by default, but I am not sure) with the following code:

pandoc RTLNotes.tex -o RTLNotes.pdf --latex-engine xelatex
it did not give any error, but the result was not desirable either. Here is what the result looks like.

image

Any thoughts?

Thanks

RTLNotes.log

Dear Taha,

I searched this error and found this stackoverflow question. I changed the RTL Report latex template and removed the loading fontspec. Please reinstall the RTLNotes package and try rendering the report again.

I am afraid you forgot to republish the package. As the problem still persists.

(I tried to do as the stackoverflow answer said, but I could not solve the issue either. Sorry, I am not good with Latex :') )

You are right. I just updated the project. Please check the problem again.

Sorry again,

It seems there is a problem with publishing package.

Besides, I tried commenting out the line \usepackage{fontspec} myself, but the problem still persists and I cannot compile PDF.

First please run devtools::install_github("Ehyaei/RTLNotes", force=TRUE)
After that send me Latex error Log.

Here it is. Thanks

RTLNotes.log

I tested the RTLNotes package again on Win and Linux os. I did not encounter your reported problems. I think it is better to update tinytex.

update.packages(ask = FALSE, checkBuilt = TRUE)
tinytex::tlmgr_update()

Then you restart Rstuio. If your problem is not solved, try to reinstall tinytex

tinytex::reinstall_tinytex()

Again restart Rstudio. I hope it works. This page, contains some tricks to debug Tex codes in the Rstudio environment.