knitr and LATEX
Philippe De Brouwer · 2020
LATEX is a markup language (just as R-Markdown itself for that matter) that is extremely versatile and Turing complete. It is often said that LATEX produces neat and professional looking output without any effort but that producing a confusing document requires effort in LATEX. This chapter provides a flavour to the reader of how easy LATEX can be and how straightforward it is to make professional documents that include R-code and the results of that code. LATEX uses normal text files that follow a specific syntax and grammar. So, it is not necessary to use a specific text editor. However, a text editor that understands the mark-up language is easier to work with as it will help by auto-completing commands and highlighting keywords. The chapter illustrates how LATEX works with knitr package that provides two methods to include R-code in the LATEX file: long code and short code.