10.7 Convert Markdown to PDF - Video Tutorials & Practice Problems
Video duration:
1m
Play a video:
Video transcript
<v Voiceover>Sometimes you</v> want to output PDF documents, but you don't want to go through the trouble of writing LaTex code. Fortunately, RStudio can convert Markdown to PDF. Let's go back to our gear. We'll change output format from HTML to PDF. And here we can check things, such as Include a table of contents, Number section headings. We can change a syntax highlighter. We can change options with figures. Now we come to Advanced and choose a LaTex engine. It is important though that if you're going to do this, you need to have LaTex installed on your computer. It can't do this without LaTex. Let's click OK. And let's get rid of the HTML section. I got rid of that and I will click Knit PDF. That goes through, converts to Markdown, and creates out the LaTex, and then compiles a PDF. You can see that's happening right now. And we now have a beautiful PDF document as if you wrote it in LaTex. Generating professionally looking types of reports has never been easier thanks to the deep integration of R Markdown in RStudio.