The fields discussed in this section can be accessed from the Manifold backend by selecting Settings from the main menu and then Ingestion Settings in the submenu.
Only users logged in with Admin credentials can access this view.
Styles entered into this code editor are applied to each new Text at the time of ingestion, regardless of the Text’s source format, and saved to the resulting Text record as a User Created stylesheet labelled “Global Styles” (see Styles).
The “Global” stylesheets that are associated with a Text are updated during the reingest process to match the values saved here. Additional User Created stylesheets saved to Text records maintain their same relative order of precedence and are applied last, unless they are manually reordered.
Using this code editor, it is possible to refine those transformations and map custom Word styles to HTML class attributes, which will then be styled according to the rules defined by the Global Ingestion Styles.
Let’s consider a simple example of a Word document that uses the paragraph style
paft to describe paragraphs that follow headings and the character style
tnw to refer to proper titles or names of works. The Mammoth Style Map would include these two lines:
r at the start of those lines refer to paragraph and character styles (or ”runs”), respectively. They are followed by the name of the style as it is in the Word document, and then by the HTML attribute they are to be mapped, in this case a paragraph with a class value of
paft and a span with a class of
tnw, resulting in HTML that would look like this:
With style rules for
.tnw in the Global Ingestion Styles, the rendering of these elements can be specifically controlled.
See Mammoth’s documentation for more detailed information about the formatting and structure of Style Maps.