Table of Contents

How to work with teachpress

Template

You can find a template for the weekly assignments here.

Highlight code syntax

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

For Python code use “Python” instead of <language>.

For R code use “R” instead of <language>.

Example for Python:

This is some text and now you want to enter code.
[code lang="Python"]
print "Hello"
for i in range[0,10]:
print i
[/code]
This is more text.
Everything from “[code lang…” to “…/code]” must be formated as “preformatted”

Include Rmd content

If you want to add html content created by the R markdown language to teachpress, one option would be the use of the RWordPress package. Since this package is (at the time of this writing) not available for the latest R version and to easy things up a little bit, we just go for the copy/paste approach.