Code FragmentsΒΆ

Code highlighting tags are used to represent source code in texts using pygments.

@code{...}

Highlight a code fragment

contents

A code fragment or a path to a source file.

attributes

language

The language to use in highlighting the source code fragment. See the pygments /docs/lexers/>`_ lexer listing.

examples
@code[python]{print('hello!')}
@dm{...}

Highlight disseminate code fragment

contents

A code fragment or a path to a dm source file.

examples
@dm{@b{hello!')}
@python{...}

Highlight a python code fragment

contents

A code fragment or a path to a python source file.

examples
@python{print('hello!')}
@html{...}

Highlight an html code fragment

contents

A code fragment or a path to a html source file.

examples
@html{<b>hello!</b>}
@ruby{...}

Highlight a ruby code fragment

contents

A code fragment or a path to a ruby source file.

examples
@ruby{print "hello!"}
@java{...}

Highlight a java code fragment

contents

A code fragment or a path to a java source file.

examples
@java{System.out.println("hello!" );}
@javascript{...}

Highlight a javascript code fragment

contents

A code fragment or a path to a javascript source file.

examples
@javascript{alert('Hello!');}