problems with Rmarkdown word document format when rendered from taskscheduleR in Rstudio - r-markdown

I have problems with formatting of my Rmarkdown word documents when I render them as part of an automatic task configured in R studio using taskscheduleR. More precisely, page breaks disappear. Does anyone know how I can solve this problem.

Related

Why flask-pagedown preview is not generating newline while i write a code block

I am using flask-pagedown for my website and in the preview it generates the code is not having newline. Please help to solve problem.
This is the website screenshot

RMarkdown to Word - Page Break

I am using Rmarkdown (notebook) in Rstudio to generate tables and charts, using about 10 code chunks. The R code is running fine. When I knitr to MS-Word (.docx), the results look pretty good, but in some cases I would like to force a page break to improve the appearance, and sometimes to prevent a table from being split across pages (I am using 'flextable' package to create the tables). I tried the ##### page break approach, which involves creating a Word template file and changing the Header 5 properties, but that did not work. I also notice the following post from 7 years ago, which uses a simple Lua filter to allow page breaks in Word. I admit I have not tried that yet. The question is, is there an updated / easier way to control page breaks when outputting to Word in RMarkdown ? It's such a basic part of document control I am surprised how complicated the solutions are (at least based on the older posts).
Pandoc markdown page break
Any suggestions are welcome.

Use markdown syntax in markdown chunks

I'm using bookdown to write my math notes, bookdown provide an feature that one can use
```{theorem}
{theorem content}
```
to write theorems and auto numbered.
However, my preview tool does not realize i'm still wring markdown and the preview will look like
Is there any way to solve it?
Quoting cderv in the issue you reported on GitHub:
There is a new way to write this environment using custom blocks syntax. It is in NEWS but not yet documented in the book. Will do soon.
You can use
::: {.theorem #label name="name"}
<any markdown syntax content>
:::
It works for HTML and PDF output.
I don't know what "other preview tool" you are referring but the content inside this block will be markdown, so I think it will be better for your usage.
The new RStudio Visual Markdown editor helps a lot to write and see those divs !
https://blog.rstudio.com/2020/09/30/rstudio-v1-4-preview-visual-markdown-editing/

How to render LaTeX in local Gorilla worksheet

I am trying to embed LaTeX formulas inside Markdown cell in a locally running Gorilla worksheet. For example, the following Markdown text should render an inline formula and a standalone formula:
This is an inline formula, ##\sin(x)##, and this is on its own line:
$$\int_0^{2\pi}\sin^2(x) \textrm{d}x$$
However, when I run Gorilla locally (using lein gorilla) what I see is the raw code. Markdown itself is rendered absolutely fine. On the other hand, when pushing the worksheet to GitHub and using an online viewer LaTeX formulas are rendered as expected.
Gorilla's documentation is saying the following, which I'm not sure I fully understand:
Note: currently you will need to be online in order for LaTeX to render properly.
What I thought is that it means that I have to have a network connection while trying to render LaTeX, but, if this is indeed the meaning, than I do not understand why it is not working. Another meaning I could think about is that currently LaTeX can only be rendered with the online viewer, but this interpretation dose not make much sense to me.
Any ideas? Thanks to any one pointing me to the right direction!
With some help I have found the solution to this problem—I was using an outdated version of lein-gorilla plugin. With version 0.5.3 LaTeX is rendered just fine[1]. The exact plugins line in project.clj should be similar to
:plugins [[org.clojars.benfb/lein-gorilla "0.5.3"]]
Also, it seems I was not aware that I could use the app-gorilla template for creating gorilla projects (I was using lein new app and then manually edited project.clj to add the plugins line). The command
$ lein new gorilla-app <project-name>
generates a project.clj file with the right version of the lein-gorilla plugin already in the file.
I guess this is the right way for creating gorilla apps, and that it ensures that the plugin will always be up to date.
[1] Some very specific LaTeX formulas seems to have rendering problems, but it needs some more testing and maybe a separate question.

PowerBI api powerbi.js error on firefox

I have a product on Microsoft store (PowerBI Tiles), that use the api powerbi.js from Microsoft to get visuals from logged-in user.
When I try to open the application using PowerPoint online on Firefox, we got some problems.
"The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature."
My team try to solve the problem on our side, but we detect that the problems doesn't come from our code, but from powerbi.js (Microsoft code). Even the demos from Microsoft doesn't work on Firefox.
We create two animated gifs reproducing the problem (on our application and also on the demos from Microsoft)
Microsoft Demos - Running on Firefox
PowerBI Tiles - Running on Firefox
Anyone with this kind of problem? Any solution to this problem.
Many thanks.
João