xml.xproc.__processed__dtbook-to-pef.xpl Maven / Gradle / Ivy
DTBook to PEF (Dedicon)
Transforms a DTBook (DAISY 3 XML) document into a PEF.
Input DTBook
Style sheets
A list of XSLT or CSS/SASS style sheets to apply.
Must be a space separated list of URIs, absolute or relative to the input.
Style sheets can also be associated with the source in other ways: linked (using an
['xml-stylesheet' processing instruction](https://www.w3.org/TR/xml-stylesheet) or a ['link'
element](https://www.w3.org/Style/styling-XML#External)), embedded (using a ['style'
element](https://www.w3.org/Style/styling-XML#Embedded)) and/or inlined (using '[style'
attributes](https://www.w3.org/TR/css-style-attr/)).
Style sheets are applied to the document in the following way: XSLT style sheets are applied before
CSS/SASS style sheets. XSLT style sheets are applied one by one, first the ones specified through
this option, then the ones associated with the source document, in the order in which they are
specified.
All CSS/SASS style sheets are applied at once, but the order in which they are specified (first the
ones specified through this option, then the ones associated with the source document) has an
influence on the [cascading order](https://www.w3.org/TR/CSS2/cascade.html#cascading-order).
CSS/SASS style sheets are interpreted according to [braille
CSS](http://braillespecs.github.io/braille-css) rules.
For info on how to use SASS (Syntactically Awesome StyleSheets) see the [SASS
manual](http://sass-lang.com/documentation/file.SASS_REFERENCE.html).
Include preview
Whether or not to include a preview of the PEF in HTML.
Include plain text file (BRF)
Whether or not to include a plain text ASCII version of the PEF.
Include metadata file
Include OBFL
Keeps the intermediary OBFL-file for debugging.
Add boilerplate text
When enabled, and when the input has a `docauthor` element, will insert boilerplate text such as a title page.
Page layout: Page width
The number of columns available for printing.
Makes the variable `$page-width` available in style sheets and includes the following rule by default:
~~~sass
@page {
size: $page-width $page-height;
}
~~~
See the CSS specification for more info:
- the [`@page`](http://braillespecs.github.io/braille-css/#h4_the-page-rule) rule
- the [`size`](http://braillespecs.github.io/braille-css/#the-size-property) property
Use `-1` to compute this from metadata.
Page layout: Page height
The number of rows available for printing.
Makes the variable `$page-height` available in style sheets and includes the following rule by default:
~~~sass
@page {
size: $page-width $page-height;
}
~~~
See the CSS specification for more info:
- the [`@page`](http://braillespecs.github.io/braille-css/#h4_the-page-rule) rule
- the [`size`](http://braillespecs.github.io/braille-css/#the-size-property) property
Use `-1` to compute this from metadata.
Page layout: Printing
Option `Simplex with extra form feeds` adds extra form feeds to the braille files to enforce single sided printing.
Translation/formatting of text: Hyphenation
When enabled, will automatically hyphenate text.
Makes the variable `$hyphenation` available in style sheets and includes the following rule by
default:
~~~sass
@if $hyphenation {
:root {
hyphens: auto;
}
}
~~~
See the CSS specification for more info:
- the [`hyphens`](http://braillespecs.github.io/braille-css/#the-hyphens-property) property
Translation/formatting of text: Line spacing
Single or double line spacing.
Makes the variable `$line-spacing` available in style sheets and includes the following rule by
default:
~~~sass
@if $line-spacing == double {
:root {
line-height: 2;
}
}
~~~
See the CSS specification for more info:
- the [`line-height`](http://braillespecs.github.io/braille-css/#h3_the-line-height-property)
property
Translation/formatting of text: Capital letters
When enabled, will indicate capital letters.
Makes the variable `$capital-letters` available in style sheets and includes the following rule by
default:
~~~sass
@if $capital-letters != true {
:root {
text-transform: lowercase;
}
}
~~~
Block elements: Include captions
When enabled, will include captions for images, tables, and so on.
Makes the variable `$include-captions` available in style sheets and includes the following rule by
default:
~~~sass
caption {
display: if($include-captions, block, none);
}
~~~
Block elements: Include images
When enabled, will include the alt text of the images. When disabled, the images will be completely removed.
Makes the variable `$include-images` available in style sheets and includes the following rule by
default:
~~~sass
@if $include-images {
img::after {
content: attr(alt);
}
}
~~~
Block elements: Include image groups
**Not implemented**
Block elements: Include line groups
When disabled, lines in a linegroup are joined together to form one block.
Makes the variable `$include-line-groups` available in style sheets and includes the following rule
by default:
~~~sass
linegroup line {
display: if($include-line-groups, block, inline);
}
~~~
Inline elements: Include production notes
When enabled, production notes are included in the content.
Makes the variable `$include-production-notes` available in style sheets and includes the following
rule by default:
~~~sass
prodnote {
display: if($include-production-notes, block, none);
}
~~~
Page numbers: Show braille page numbers
When enabled, will number braille pages.
Makes the variable `$show-braille-page-numbers` available in style sheets. In order to use the
variable include a rule like the following in your custom style sheet:
~~~sass
@if $show-braille-page-numbers {
@page {
@top-right {
content: counter(page);
}
}
}
~~~
This will create a page number in the top right corner of every braille page.
See the CSS specification for more info:
- the [`@page`](http://braillespecs.github.io/braille-css/#h4_the-page-rule) rule
- the
[`counter()`](http://braillespecs.github.io/braille-css/#printing-counters-the-counter-function)
function
Page numbers: Show print page numbers
When enabled, will indicate original page numbers.
Makes the variable `$show-print-page-numbers` available in style sheets and includes the following
rule by default:
~~~sass
@if $show-print-page-numbers {
pagenum {
string-set: print-page content();
}
}
~~~
In order to use the `print-page` string include a rule like the following in your custom style
sheet:
~~~css
@page {
@bottom-right {
content: string(print-page);
}
}
~~~
See the CSS specification for more info:
- the [`string-set`](http://braillespecs.github.io/braille-css/#h4_the-string-set-property) property
- the [`@page`](http://braillespecs.github.io/braille-css/#h4_the-page-rule) rule
- the [`string()`](http://braillespecs.github.io/braille-css/#h4_the-string-function) function
Page numbers: Show inline print page numbers
Page numbers: Force braille page break
Force braille page breaks at print page breaks.
Makes the variable `$force-braille-page-break` available in style sheets and includes the following
rule by default:
~~~sass
@if $force-braille-page-break {
pagenum {
page-break-before: always;
}
}
~~~
See the CSS specification for more info:
- the [`page-break-before`](http://braillespecs.github.io/braille-css/#h4_controlling-page-breaks)
property
Table of contents: Table of contents depth
The depth of the table of contents hierarchy to include. '0' means no table of contents.
A table of contents will be generated from the heading elements present in the document: from `h1`
elements if the specified value for "depth" is 1, from `h1` and `h2` elements if the specified value
is 2, etc. The resulting table of contents has the following nested structure:
~~~xml
<list id="generated-document-toc">
<li>
<a href="#ch_1">Chapter 1</a>
<list>
<li>
<a href="#ch_1_1">1.1</a>
...
</li>
<li>
<a href="#ch_1_2">1.2</a>
...
</li>
...
</list>
</li>
...
</list>
~~~
Another one of these is generated but with ID `generated-volume-toc`. `ch_1`, `ch_1_2` etc. are the
IDs of the heading elements from which the list was constructed, and the content of the links are
exact copies of the content of the heading elements. By default the list is not rendered. The list
should be styled and positioned with CSS. The following rules are included by default:
~~~css
#generated-document-toc {
flow: document-toc;
display: -obfl-toc;
-obfl-toc-range: document;
}
#generated-volume-toc {
flow: volume-toc;
display: -obfl-toc;
-obfl-toc-range: volume;
}
~~~
This means that a document range table of contents is added to the named flow called "document-toc",
and a volume range table of contents is added to the named flow called "volume-toc". In order to
consume these named flows use the function `flow()`. For example, to position the document range
table of contents at the beginning of the first volume, and to repeat the volume range table of
content at the beginning of every other volume, include the following additional rules:
~~~css
@volume {
@begin {
content: flow(volume-toc);
}
}
@volume:first {
@begin {
content: flow(document-toc);
}
}
~~~
See the CSS specification for more info:
- the [`display:
obfl-toc`](http://braillespecs.github.io/braille-css/obfl#extending-the-display-property-with--obfl-toc)
value
- the [`flow`](http://braillespecs.github.io/braille-css/#the-flow-property) property
- the [`flow()`](http://braillespecs.github.io/braille-css/#h4_the-flow-function) function
- the [`@volume`](http://braillespecs.github.io/braille-css/#h3_the-volume-rule) rule
- the [`@begin`](http://braillespecs.github.io/braille-css/#h3_the-begin-and-end-rules) rule
Table of contents: Include document TOC
Whether or not to include a document-level TOC in the last volume.
Table of contents: Include print TOC
Whether or not to include a print TOC.
Include symbols list
When enabled, a list of symbols and their descriptions is included in the first volume.
Symbols list
If left unchanged, the default symbols list will be used.
Symbols list header
Jacket header
Volumes: Move print cover to first volume
When enabled, and when the input has a `level1` element with class `flap`, `jacket_copy` or `jacketcopy`, will move that cover to the first volume.
Volumes: Move print colophon to last volume
When enabled, and when the input has a `level1` element with class `colophon`, will move that colophon to the last volume.
Volumes: Maximum number of sheets
The maximum number of sheets in a volume.
Makes the variable `$maximum-number-of-sheets` available in style sheets and includes the following
rule by default:
~~~sass
@volume {
max-length: $maximum-number-of-sheets;
}
~~~
See the CSS specification for more info:
- the [`@volume`](http://braillespecs.github.io/braille-css/#h3_the-volume-rule) rule
- the [`max-length`](http://braillespecs.github.io/braille-css/#h3_the-length-properties) property
Use `-1` to compute this from metadata.
Volumes: The back cover must be empty
Applies to duplex printing. When enabled, the last page of a printed volume will contain no text and can have pits only. If the number of pages of a volume is a 4-fold and the last page is not empty, an extra page will be appended.
PEF
The PEF.
BRF
A plain text ASCII version of the PEF.
Preview
An HTML preview of the PEF.
Temporary directory
Directory for storing temporary files during conversion.