diff --git a/doc.zih.tu-dresden.de/README.md b/doc.zih.tu-dresden.de/README.md index bf81e772683de7ce9348756551142f54f3d2819b..4c87fa1d93ea1cec14583d7ad6b7d1b439faa296 100644 --- a/doc.zih.tu-dresden.de/README.md +++ b/doc.zih.tu-dresden.de/README.md @@ -400,6 +400,44 @@ rules have to be followed. * No output: Omit prompt (copy-paste) * With Output: Add prompt (make clear what is the command and what is the output) +#### Code Blocks and Syntax Highlighting + +This project makes use of the extension +[pymdownx.highlight](https://squidfunk.github.io/mkdocs-material/reference/code-blocks/) for syntax +highlighting. + +There is complete list of supported [language short codes](https://pygments.org/docs/lexers/). +Use the following short codes within this project for consistency: + +* `{bash}` for shell scripts +* `{shell-session}` for command lines including prompt +* `{python}` for Python source code + +Line numbers can be added via + +```bash linenums="1" +#!/bin/bash + +#SBATCH -N 1 +#SBATCH -n 23 +#SBATCH -t 02:10:00 + +srun a.out +``` + +and specific Lines can be highlighted by using + +```bash hl_lines="2 3" +#!/bin/bash + +#SBATCH -N 1 +#SBATCH -n 23 +#SBATCH -t 02:10:00 + +srun a.out +``` + + ### Data Privacy and Generic User Name Where possible, replace login, project name and other private data with clearly arbitrary placeholders. @@ -418,7 +456,7 @@ If showing only a snippet of a long output, omissions are marked with `[...]`. ### Mark Placeholders -Stick to the Unix rules on optional and required arguments, and seclection of item sets. +Stick to the Unix rules on optional and required arguments, and selection of item sets. * `<required argument or value>` * `[optional argument or value]`