When you want to use the same AsciiDoc source document with another backend than Bootstrap, previous version 3 with icon inline macro was a bad strategy. Version 4 uses now the standard image inline macro with additional attributes.

GlyphIcon usage

E.g, this snippet code:

image:./images/icons/glyphicon/glyphicons_045_calendar.png[alt="Calendar",icon="calendar",iconsfont="glyphicon"] 10:44 05/06/2014

Renders:

Calendar 10:44 05/06/2014

Important
We use here the iconsfont attribute, because we have already set it to another value in the header block.

Font-Awesome usage

E.g, this snippet code:

image:./images/icons/font-awesome/calendar.png[alt="Calendar",icon="calendar",iconsfont="font-awesome"] 10:44 05/06/2014

Renders:

Calendar 10:44 05/06/2014

Important
We use here the iconsfont attribute, because we have already set it to another value in the header block.

Ionicons usage

E.g, this snippet code:

image:./images/icons/ionicons/calendar.png[alt="Calendar",icon="calendar",iconsfont="ionicons",width=32,height=32] 10:44 05/06/2014

Renders:

Calendar 10:44 05/06/2014

Important
We use here the iconsfont attribute, because we have already set it to another value in the header block.
Warning
Do not forget attributes width and height with ionicons PNG images because they are defined in 512x512 pixels.

Learn More

Behind the scene

Be sure to have both glyphicon, font-awesome and ionicons font support in your asciidoc-bootstrap.css file.

Have a look in the LESS source file less/asciidoc-bootstrap.less, you should have at least these lines activated :

@import "font-awesome/font-awesome.less";
@import "ionicons/ionicons.less";
@import "asciidoc/iconsfont.less";
html5 backend
$ asciidoc.py
  -b html5
  -a linkcss
  -a stylesdir=./stylesheets
  -a scriptsdir=./javascripts
  {docfile}
bootstrap backend
$ asciidoc.py
  -b bootstrap
  -a linkcss
  -a stylesdir=./stylesheets
  -a scriptsdir=./javascripts
  -a theme=readable
  -a navbar=fixed
  -a totop
  {docfile}
Note
See
[http://asciidoc.org/userguide.html#X60]
for docfile attribute.
Download PNG alternate images
Note
See
[http://asciidoc.org/userguide.html#X88]
for iconsdir attribute.