Skip to content
Snippets Groups Projects
Commit 52e0a02a authored by Martin Schroschk's avatar Martin Schroschk
Browse files

Document syntax highlighting

parent 39bd4e50
No related branches found
No related tags found
3 merge requests!322Merge preview into main,!319Merge preview into main,!187Syntax highlighting
...@@ -400,6 +400,44 @@ rules have to be followed. ...@@ -400,6 +400,44 @@ rules have to be followed.
* No output: Omit prompt (copy-paste) * No output: Omit prompt (copy-paste)
* With Output: Add prompt (make clear what is the command and what is the output) * 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 ### Data Privacy and Generic User Name
Where possible, replace login, project name and other private data with clearly arbitrary placeholders. 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 `[...]`. ...@@ -418,7 +456,7 @@ If showing only a snippet of a long output, omissions are marked with `[...]`.
### Mark Placeholders ### 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>` * `<required argument or value>`
* `[optional argument or value]` * `[optional argument or value]`
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment