Edit online

The front matter is a series of topics that are usually placed after the cover page and before the TOC or the content.

The back matter is a series of topics that are usually placed after the content of the book.

Edit online

In the merged map file, the frontmatter topics are wrapped in an <oxy:front-matter> element that has the class bookmap/frontmatter (it is a clone of the original <frontmatter> element from the map):

<bookmap xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" ...>
    <oxy:front-page xmlns:oxy="http://www.oxygenxml.com/extensions/author" 
                    class=" front-page/front-page ">
       ...
    </oxy:front-page>
    <oxy:front-matter xmlns:oxy="http://www.oxygenxml.com/extensions/author" 
                  class="- map/topicref bookmap/frontmatter ">
        <concept xmlns:dita-ot="http://dita-ot.sourceforge.net/ns/201007/dita-ot" 
                  class="- topic/topic concept/concept "
            id="unique_1" oid="concept-1">
          ...
    </oxy:front-matter>

For the DITA Map PDF - based on HTML5 & CSS transformation type, the merged map is further processed resulting in a collection of HTML5 <div> elements. These elements preserve the original DITA @class attribute values and add a new value derived from the DITA element name.

<div xmlns:ditaarch="http://dita.oasis-open.org/architecture/2005/" ...>
    <div class=" front-page/front-page front-page">
       ...
    </div>
    <div class="- map/topicref bookmap/frontmatter frontmatter">
        <div class="- topic/topic concept/concept " id="unique_1" oid="concept-1">
        ...
    </div>

Edit online

The built-in CSS rules are in [PLUGIN_DIR]/css/print/p-bookmap-frontmatter-backmatter.css. By default, it associates the top-level topics that do not represent chapters to a matter-page style of page layout. Each child topic starts on a new page.

Edit online

If you do not like the fact that all the topics that enter a bookmap frontmatter start on a new page, you can disable this by using the following rules in your customization CSS:
*[class ~= "map/map"] > *[class ~= "topic/topic"]:not([is-chapter]){
   page-break-before: auto;
}

Edit online

Style all the Topics with the Same Aspect

All the topics referenced from the <frontmatter> and <backmatter> bookmap elements are formatted using the matter-page as defined in Default Page Definitions. In the merged file, the <backmatter> and <frontmatter> elements are omitted, and their child topic content is matched using a CSS rule like the one below:

*[class ~= "map/map"] > *[class ~= "topic/topic"]:not([is-chapter]){
  page: matter-page;
  ...
}

Style the Topics Depending on Their Role

There might be cases when you need to distinguish between different topics having different roles in your publication:
  • Preface
  • Notice
  • Abstract
  • Copyright
These are referenced from the DITA map by specialized <topicref> elements, with different class attribute values.

The class attribute values are then passed by the transformation process onto the corresponding topic elements from the merged map content. For example, a topic that was referenced by a <preface> map element now has a " bookmap/preface " value in its @topicrefclass attribute:

<topic 
	class="- topic/topic " 
	id="unique_1" 
	topicrefclass="- map/topicref bookmap/preface " .. >
...
</topic>

This can be used to match and apply different styling, or even a different page layout:

@page preface-page {
	background-color:silver;
	@top-center{
		content: "Custom Preface Header";
	}
}
*[class ~= "topic/topic"][@topicrefclass ~= "bookmap/preface"] {
	page: preface-page;
}