:source-highlighter: coderay

Asciidoc(tor) Reference

Syntax HighLighter

Text

Text explaining where the code is located in *+++<span style=“font-family: 'courier new', courier, monospace;”>/directory structure</span>+++*

Instructions of what the code is doing

source, txt, indent=0, subs=“macros”

+++[directory structure]#+++ pass:quotes[*command syntax*]

Remark : Asciidoctor substitution with macros is used

Java

source,java

public class HelloWorld {

public static void main(String[] args) {
    System.out.println(">> Hello Hyla Students");
}

}


Include Java code using snippet tag and include block macro

source,java

include::source/HelloWorld.java


XML

source,xml

<note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Don't forget me this weekend!</body> </note>


Ruby

source,ruby

require 'asciidoctor'

puts Asciidoctor.render_file('sample.adoc', :header_footer => true)