How to work with teachwiki

Highlight code syntax

In order to publish syntax highlighted code in teachpress, type the following in your editor view:

Insert: “<code rsplus>” where you want to insert code

In the next line(s), enter your code or paste it as a whole.

Insert: “>/code>” at the end.

Include Rmd content

If you want to add R Markdown html pages (or any other html content), just do this:

open the R Markdown generated html file in a text editor

delete the first two lines (i.e. “<!DOCTYPE html>” and “<html xmlns=“http://www.w3.org/1999/xhtml”>”) and insert “<html>” instead

copy everything to the clipboard

open a new dokuwiki page, define a headline as usual and paste the text from the html file below the headline

Please note that you should not define a title, author or date in the R Markdown document but define it as headline inside teachwiki (e.g. below the default template). To match the headers of the rest of your teachwiki, using “#####” for first level headlines in the R Markdown file is a good choice.