b-ber extends Markdown with custom directives that are based off the EPUB 3 Structural Semantics Vocabulary. We selected a sub-set of terms from that vocabulary that allows for a rich markup language that is still easily readable for writers and editors but contains the majority of structural elements required for a published work. In addition to the directives based off the EPUB 3 Semantic Vocabulary, and following the same principles of readability, we developed an additional set of directives for handling different media layouts and interactive paradigms.
Directives are broken down into three categories: block, inline, and miscellaneous. Information as well as supported attributes are listed below. The id attribute is required on all directives and immediately follows a colon after the directive name.
::: chapter:my-chapter-id
Some content
::: exit:my-chapter-id
Block directives
Block directives act as containers for other content and give the markup semantic structure. Block directives must be exited with an exit tag with the corresponding directive id.
::: chapter:chapter-one classes:"class-one class-two" title:"My First Chapter"
# Chapter One
::: exit:chapter-one
Inline directives
Inline directives are for presentational data like images, audio, and video. They are typically written on a single line, unless they support a caption. Each inline directive supports slightly different attributes.
Directive names
figure
figure-inline
video
video-inline
audio
audio-inline
iframe
iframe-inline
logo