Restructered text syntax example¶
Please have alook at the rwa code to see how these examples are implemented.
Table¶
One way of making a table (csv table). There are others…
Example table¶ xmin xmax xsteps state battery 0 3 4 heat-storage 0 5 2
Math¶
..note: Make sure you added sphinx.ext.mathjax extension to your conf.py. See Extension .
In line math code \(S^\text{M}\) example
Or like this:
Hyperlinks¶
This is how you link to a website
If you have created a reference before a section headr, figure, table, etc., you can link to it. This works acroos all files in your docs folder.
This is how you create the reference (for a section here)
.. _my-reference-label:
Section to cross-reference
--------------------------
This is how you link to it
:ref:`my-reference-label`
This is how you change the link title:
:ref:`Link title <my-reference-label>`
Link to the figure in this chapter: Figure Caption
Link to the first section header in the index.rst file (we defined index as reference): Documetation with sphinx and readthedocs
Same link but we change the title to display here: New Name
Code¶
Restructured text¶
Example section
----------------
Java¶
public class HelloWorld
{
public static void main (String[] args)
{
// Ausgabe Hello World!
System.out.println("Hello World!");
}
}
R¶
myString <- "Hello, World!"
print ( myString)
