User Tools

Site Tools


en:resources:howtos:teachwiki

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:

  1. open the R Markdown generated html file in a text editor
  2. delete the first two lines (i.e. “<!DOCTYPE html>” and “<html xmlns=“http://www.w3.org/1999/xhtml”>”) and insert “<html>” instead
  3. copy everything to the clipboard
  4. 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.
en/resources/howtos/teachwiki.txt · Last modified: 2022/03/13 19:16 by 127.0.0.1