Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201867

Horizontal rule in R Markdown / Bookdown causing errors

$
0
0

Suddenly, I run into an error when knitting to PDF in Markdown/Bookdown. Nothing about my system has changed.

The error is being caused by a 'horzontal rule' i.e. --- or *** anywhere in markdown, despite line spaces either side.

I include a simplistic exmaple of the offending --- that will not knit to PDF.

Incidentally, knitting to another format does not cause problems and knitting to PDF without a horizontal rule does not generate an error. Also, swapped --- for *** to explore if this stapped the error. It did not.

Can anyone offer any insight, please?

Using TinyTex and MikteX separately (not installed together). Neither solve the problem. Only just encountered this problem. Files that previously knitted without issue now fail when they encounter --- or ***.


## R Markdown

Some text, then I want horizontal rule

---

Some text after the horizonatal rule.



! Missing number, treated as zero.
<to be read again> 
                   \protect 
l.146 ...nter}\rule{0.5\linewidth}{\linethickness}
                                                  \end{center} 

Error: Failed to compile K.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See K.log for more info.
Execution halted

Viewing all articles
Browse latest Browse all 201867

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>