Code

Writing code in Asciidoctor, with callouts and syntax highlighting:

[source,java]
----
from("file:myfolder/input")
  .to("direct:process-file"); <1>

from("direct:process-file")
  .choice()
      .when(simple("${body} contains 'Cilla Black'"))
      .to("file:myfolder/cilla_black");
  .endChoice();
----
<1> a callout goes here
  • Callouts require UTF-8 glyphs that most fonts do not have.
  • So, rendering callouts in PDFs is dependent on the M+ 1mn font. GitHub
  • Or you can copy the relevant number glyphs into the font you want to use, using a tool like fontforge.
  • The Unicode range for the glyphs is U+2460 - U+2473.
  • If you don’t provide the font that contains all the glyphs the content needs, you get a square box (or some other placeholder). GitHub

Syntax examples

Image (block):

image::hello.jpg

Image (inline):

image:hello.jpg

Image (inline, with wrap):

image:hello.jpg[role=left]