12.6 Create Word template file

Now, edit your Word file to create a new template. Click on a table. The style should be compact: Right click > Modify… > font size = 9

Alter heading and text styles in the same way as desired. Save this as colonTemplate.docx (avoid underscores in the name). Upload the file to your project folder. Add this reference to the .Rmd YAML heading, as below. Make sure you get the spacing correct.

Also, ensure the plot looks correct and the warning messages is printed. Experiment with fig.width to get it looking right.

Now paste this into your .Rmd file and run:

This is now looking good, and further tweaks can be made if you wish (Figure 12.2B).