Advanced elements
Alerts
You can use so called alerts to draw the reader's attention to important details. For example
%alert% '''Important!''' There is no lecture on the 31st of September.
will render like this:
Important! There is no lecture on the 31st of September.
There are different types of alerts, and they can also be applied to other elements (e.g. lists) not just paragraphs.
%green-alert% '''Look here!''' Another important point.
Look here! Another important point.
>>blue-alert<< * Important point 1 * Important point 2 * Important point 3 >><<
- Important point 1
- Important point 2
- Important point 3
%red-alert% '''Attention!''' Some very important and crucial point.
Attention! Some very important and crucial point.
Code
You can display highlighted code in your wiki if you want. See this example:
(:codestart python:)
def fib(n):
""" Finds the n'th Fibonacci number in linear time. """
f1 = 0; f2 = 1
for i in range(0, n):
f2 = f1 + f2
f1 = f2 - f1
return f1
print(fib(8))
(:codeend:)
def fib(n):
""" Finds the n'th Fibonacci number in linear time. """
f1 = 0; f2 = 1
for i in range(0, n):
f2 = f1 + f2
f1 = f2 - f1
return f1
print(fib(8))
You can also disable the linenumbers using
(:codestart java gutter='false':)
public class Program {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
(:codeend:)
public class Program {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
Following languages can be specified: bash, java, python, sql and xml.