GitHub repository: nlbdev/pipeline

Issues:
issue_231: state: open
title: Book with lots of notes will not be converted
body: [180917._noter.zip](https://github.com/nlbdev/pipeline/files/5865328/180917._noter.zip)
Book with many notes will not be converted. 
user: KariRudjord
issue_230: state: open
title: Be able to use the latest version in production
body: The current version has quirks to it that prevents us from using it in production. The version we use in production is not running as a Docker container.

The specifics of why the latest version is not usable, I'm not sure of. @KariRudjord will have to explain it.

I'm not sure about when we'll have time to work more on this, and whether or not it makes sense to wait for a new version of PIP (based on the work done with/by Dedicon++), but not being able to run the system in Docker is making things a bit more difficult when integrating with the rest of our systems, so I'm opening this as an issue.
user: josteinaj
labels: M: Medium size job
issue_229: state: open
title: Problems with footnotes markup
body: (Reported by @KariRudjord)

In braille, we some times have problems producing books with footnotes. This might be because footnotes are not always marked up the same way.
 
Books where footnotes works: 120581/563381

In the content:

```html
<a epub:type="noteref" class="noteref" href="#fnt1-1">1</a>
```
 
In the note list at the back:

```html
<h1 id="d1e7339">Noter</h1>
         <ol class="list-style-type-none">
            <li class="notebody" epub:type="footnote" id="fnt1-1">1 Først i januar 1996, åtte måneder etter drapet, undersøkte politiet med Telenor
               hvorvidt det var mulig å spore samtaler fra telefonkiosken i Kopervik. Svaret var
               negativt.
            </li>
```

Footnotes that does not work in PIP: 122695/565495

In the content:

```html
<a class="noteref" epub:type="noteref" href="#f01001">1</a></p>
```

In the note list at the back:

```html
<section epub:type="bodymatter footnotes" id="level1_19">
            <li class="notebody" epub:type="footnote" id="c03001">1 Dette avsnitt er en fullstendig omarbeidelse av O. Ryghs tillegg til 2nen utgave
               med samme tittel fogsa utgitt som eget skrift).
            </li>
```

I've also seen a production where the notes themselves were placed chapterwise, and had to be moved to the back manually (not sure what the book identifier was).
user: josteinaj
labels: M: Medium size job
issue_228: state: open
title: Why does the word AV become AT?
body: (I've had this flagged in my inbox since January 2019. I haven't had time to follow up on it and now I'm moving it here as an issue. Reported by @Yazazie)

On the front page of an automatically produced book:

```
  *HEFTE #1*AT D#10 
⠠⠓⠑⠋⠞⠑⠀⠼⠁⠠⠁⠞⠀⠙⠼⠁⠚⠀ 
```
 
On the front page of a manually produced book:

```
  ,Hefte #1 av #10  
⠠⠓⠑⠋⠞⠑⠀⠼⠁⠀⠁⠧⠀⠼⠁⠚
```

Why does the word AV become AT?
user: josteinaj
labels: Punktskrift: Braille
M: Medium size job
issue_227: state: open
title: "pf:text-transform failed" on <p><sup>rs</sup>4954</p>
body: 
When there's no whitespace after `</sup>`, we get a RuntimeException. Seems to be from liblouis (CC @bertfrees @egli).


To reproduce:

1. Input document:

```html
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="no" lang="no">
    <head>
        <meta charset="utf-8"/>
        <title>TEST</title>
        <meta name="dc:identifier" content="TEST"/>
    </head>
    <body>
        <section epub:type="bodymatter chapter" id="section1">
            <h1 id="h1">TEST</h1>
            <p><sup>rs</sup>4954</p>
        </section>
    </body>
</html>
```

2. Run through "HTML to PEF (NLB)"

3. Exception

```
2019-12-05 14:55:24,978 [ERROR] o.d.p.b.c.s.i.TextTransformDefinition - pf:text-transform failed
java.lang.RuntimeException: null
	at org.liblouis.TranslationResult.<init>(TranslationResult.java:29) ~[na:na]
	at org.liblouis.Translator.translate(Translator.java:95) ~[na:na]
	at org.daisy.pipeline.braille.liblouis.impl.LiblouisTranslatorJnaImplProvider$LiblouisTranslatorImpl.transform(LiblouisTranslatorJnaImplProvider.java:1188) ~[na:na]
	at org.daisy.pipeline.braille.liblouis.impl.LiblouisTranslatorJnaImplProvider$LiblouisTranslatorImpl.transform(LiblouisTranslatorJnaImplProvider.java:995) ~[na:na]
	at org.daisy.pipeline.braille.liblouis.impl.LiblouisTranslatorJnaImplProvider$LiblouisTranslatorImpl.transform(LiblouisTranslatorJnaImplProvider.java:927) ~[na:na]
	at org.daisy.pipeline.braille.liblouis.impl.LiblouisTranslatorJnaImplProvider$LiblouisTranslatorImpl.access$600(LiblouisTranslatorJnaImplProvider.java:263) ~[na:na]
	at org.daisy.pipeline.braille.liblouis.impl.LiblouisTranslatorJnaImplProvider$LiblouisTranslatorImpl$2.transform(LiblouisTranslatorJnaImplProvider.java:329) ~[na:na]
	at no.nlb.pipeline.braille.impl.NLBTranslator$Provider$HandleComputerAndUncontracted$1.transform(NLBTranslator.java:408) ~[na:na]
	at no.nlb.pipeline.braille.impl.NLBTranslator$Provider$HandleComputerAndUncontracted$1.transform(NLBTranslator.java:349) ~[na:na]
	at no.nlb.pipeline.braille.impl.NLBTranslator$Provider$TransformImpl$1.transform(NLBTranslator.java:218) ~[na:na]
	at no.nlb.pipeline.braille.impl.NLBTranslator$Provider$TransformImpl$1.transform(NLBTranslator.java:212) ~[na:na]
	at org.daisy.pipeline.braille.common.saxon.impl.TextTransformDefinition$1.call(TextTransformDefinition.java:128) ~[na:na]
	at net.sf.saxon.functions.IntegratedFunctionCall.iterate(IntegratedFunctionCall.java:268) ~[na:na]
	at net.sf.saxon.expr.instruct.Choose.iterate(Choose.java:944) ~[na:na]
	at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:112) ~[na:na]

(…)

	at com.xmlcalabash.runtime.XCompoundStep.run(XCompoundStep.java:262) ~[na:na]
	at com.xmlcalabash.runtime.XTry.run(XTry.java:98) ~[na:na]
	at com.xmlcalabash.runtime.XPipeline.doRun(XPipeline.java:236) ~[na:na]
	at com.xmlcalabash.runtime.XPipeline.run(XPipeline.java:136) ~[na:na]
	at org.daisy.common.xproc.calabash.impl.CalabashXProcPipeline.run(CalabashXProcPipeline.java:242) ~[na:na]
	at org.daisy.pipeline.job.Job.run(Job.java:216) ~[na:na]
	at org.daisy.pipeline.job.impl.DefaultJobExecutionService$1.run(DefaultJobExecutionService.java:115) ~[na:na]
	at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_222]
```

Full log: [job-5056.log](https://github.com/nlbdev/pipeline/files/3927128/job-5056.log)

4. Insert a space after `</sup>` and try again, and it will succeed.

user: josteinaj
labels: Punktskrift: Braille
M: Medium size job
issue_226: state: open
title: Newline in title element causes "Too many nested function calls" error
body: ```html
<html>
    <head>
        <!-- works -->
        <title>Test test</title>

        <!-- does not work -->
        <title>Test
               test</title>
    </head>
    <body>…</body>
</html>
```

We can fix this during preprocessing but it seems like a bug that should be fixed in dotify (presumably) at some point.
user: josteinaj
labels: Punktskrift: Braille
L: Large size job
issue_225: state: open
title: Move as much code as possible from book-to-pef to pipeline-modules
body: ### Hyphenation

- [ ] Produce the hyphenation files in a separate project, deploy it somewhere (e.g. in Maven Central in a ZIP) and import it in libhyphen-utils.

  Some useful work has been done in this repository: https://github.com/nlbdev/spell-no (the "norsk/patterns" subdirectory). It includes a build script for the patterns file and a [UI](https://nlbdev.github.io/spell-no/norsk/patterns/norsk.words.html) for viewing the input words (that are used to build the patterns file) and hyphenations.
  
  In progress: see https://github.com/nlbdev/spell-no/pull/1.

### Script options

- [ ] The script options that are generic enough can be moved to xml-to-pef. This is linked to the "Style sheets" section below because most of the script options are implemented using style sheets. Note that, just like the "Style sheets" section, this is not an essential item because options that are solely used to set Sass variables can now be handled with the "Style sheet parameters" option.
- [ ] The Norwegian translations can also be moved once we have support for internationalization. This is only relevant for manual productions.
- [ ] ~(What would be really nice, but probably out of scope, is if we would be able to analyze a provided style sheet and based on this dynamically compute the relevant options and present only these to the user.)~

### Translator features

- [x] Recognizing the CSS property `text-transform: uncontracted`: could be made into a generic feature: done in https://github.com/daisy/pipeline-modules/issues/9
- [x] Selecting sub-translators for different languages: should be moved to liblouis-utils (https://github.com/daisy/pipeline-mod-braille/issues/196).
- [x] Overriding how undefined characters should be handled: could be made into a translator option. Either just via an argument in the constructor of `LiblouisTranslatorImpl`, or it could be configurable via a "query feature". See https://github.com/daisy/pipeline-mod-braille/issues/206.
- [ ] Handling of `@text-transform strong { system: -nlb-indicators; open: '⠠⠄'; close: '⠠⠄'; }` etc.: can possibly be generalized, although I would much prefer to do this via Liblouis. For this, we need to be able to control the order of the begin/end marks (https://github.com/nlbdev/pipeline/issues/217#issuecomment-462799510, https://github.com/liblouis/liblouis/issues/922).
- [ ] Marking of URLs and e-mail addresses. This should be done by Liblouis. ~Unfortunately Liblouis doesn't have any opcodes to insert indicators to announce and close a computer braille string, but I think it should be possible to accomplish.~ The default Liblouis table for Norwegian uses `begcomp` and `endcomp` (which are undocumented opcodes) to insert indicators to announce and close a computer braille string, but the NLB version of the table for some reason has disabled this and it has been implemented in Java.

  This is "on hold" because Dawn and Lars are figuring out whether the requirement needs to be updated.
- [x] `px:nfc` should be moved to liblouis-utils, but not as a separate XProc step. Instead Liblouis tables could contain metadata about which Unicode variants are supported (NFC and/or NFD) (https://github.com/liblouis/liblouis/issues/923), and liblouis-utils should then do the conversion if needed (https://github.com/daisy/pipeline-mod-braille/issues/197). Ideally this should be handled within Liblouis itfself (https://github.com/liblouis/liblouis/issues/98). Other related issues: https://github.com/nlbdev/pipeline/issues/4, https://github.com/nlbdev/pipeline/issues/21.

### Style sheets

The items below are not essential because style sheets are considered just another input for Pipeline. They don't need to be included inside the pipeline-mod-nlb module. With some small modifications, the existing style sheets should still work with the latest version. The benefit of porting CSS code is that it becomes available for everyone.

- [ ] We can select bits of CSS code around certain elements, make it more configurable (less NLB specific) and move them to pipeline-modules, just like we did for the [volume-breaking.scss](http://daisy.github.io/pipeline/modules/braille/dtbook-to-pef/src/main/resources/css/volume-breaking.scss/) module. Candidates are:
  - [ ] Captions
    - configurable prefix for image captions
    - configurable formatting of captions
    - option to omit captions
  - [ ] Images
    - configurable prefix/suffix for image descriptions
    - configurable formatting of images
    - option to omit images
    - option to omit image groups
  - [x] Notes: done: see the "Notes placement" option (http://daisy.github.io/pipeline/Get-Help/User-Guide/Scripts/html-to-pef/)
    - configurable formatting of noterefs
    - configurable formatting of notes
    - configurable position of notes: bottom of page, end of volume, end of book, end of chapter, bottom of page with fallback to end of volume, beneath paragraph/table/verse
    - different positioning for different classes of notes
    - configurable footnotes page area
    - configurable title of endnotes section
    - configurable page style of endnotes section
    - configurable definition of "chapter" (for chapter notes)
    - configurable "on-volume-start" of end-of-book notes section
    - option to omit note references
  - [ ] Print page break indication
    - option to put page break marker in left margin
    - option to put page break marker in header/footer if print page break coincides with braille page break
    - option to render line across width of page
    - option to render print page number (at the position of the break)
    - option to render print page (range) in header/footer
    - configurable format of print page range
  - [x] Tables: done: see http://daisy.github.io/pipeline/modules/braille/html-to-pef/src/main/resources/css/tables.html
    - table layout classes: matrix, simple list, nested list
    - option to transpose tables
    - option dynamically choose table layout based on certain parameters
    - configurable formatting of different table classes
    - configurable formatting of table captions
  - [x] Definition lists: done: see http://daisy.github.io/pipeline/modules/braille/html-to-pef/src/main/resources/css/definition-lists.html
    - option to group `dt` element with following `dd` elements (this is not something that can be done with plain CSS)
user: bertfrees
labels: Punktskrift: Braille
L: Large size job
Ytelse og stabilitet: Performance and stability
issue_224: state: open
title: Numbered notes each chapter
body: 563313 have numbered notes for each chapter. Chapters are small and notes from chapter 1 and 2 end up in the same volume numbered 1-2-3-1-2. Confusing.

It seems that only notes marked * is handled after the main rule in PIP (number the notes and put in end of volume). I therefore had to move all notes to end of book and rename them with * to get the automathed work to function (then they became number 1 ... 45 in braille) - using the tag:

```xml
<section epub:type="backmatter footnotes" id="level1_60">
<ol class="list-style-type-none" style="list-style-type: none;">
<li class="notebody" epub:type="rearnote" id="c04001">* Under Reform 27 ble alle videregående skoler i landet.</li>
```

Lots of work. Is there a way to override the counting in notes so that they always count from 1-2-3-4 ... through the entire book? Notes are also marked (1), 1) and otherwise, sometimes with a picture (I've been told). I want them to be counted 1-2-3-4 always.
user: KariRudjord
labels: Punktskrift: Braille
M: Medium size job
issue_221: state: open
title: Consider removing modules that are not being worked on by NLB
body: We use the latest released versions of most modules. Maybe it would be better to remove the source code for those modules from this repo, both to avoid clutter, but also because we don't really keep them in sync with the official repo anyway.

If there's any of the braille modules we could do this with, that would be great too. Ideally everything NLB-specific should go into NLB-specific modules, and not a fork of shared modules.
user: josteinaj
labels: L: Large size job
Ytelse og stabilitet: Performance and stability
issue_218: state: open
title: Conversion fails with some definition lists
body: ```
[262.7964s] 2019-03-08 10:56:24,038 [ERROR] o.d.c.x.c.steps.Message$MessageStep - A sequence of more than one item is not allowed as the first argument of string() (text("loo"), text("(uformelt):...")) 
```

"loo" and "uformelt" occurs in two places in the book:

```xhtml
<section id="ch1-5">
<h3 id="d1e1786">At the Customs</h3>
…
<p>Page 13:</p>
<dl>
<dt><strong>relax:</strong> </dt>
<dd xml:lang="no" lang="no">slappe av</dd>
<dt><strong>flight:</strong> </dt>
<dd xml:lang="no" lang="no">flygning</dd>
<dt><strong>suddenly:</strong> </dt>
<dd xml:lang="no" lang="no">plutselig</dd>
<dt><strong>crowd:</strong> </dt>
<dd xml:lang="no" lang="no">folkemengde</dd>
<dt><strong>loo</strong> (uformelt): </dt>
<dd xml:lang="no" lang="no">do</dd>
<dt><strong>escalator:</strong> </dt>
<dd xml:lang="no" lang="no">rulletrapp</dd>
<dt><strong>security checkpoint:</strong> </dt>
<dd xml:lang="no" lang="no">sikkerhetskontroll</dd>
<dt><strong>finally:</strong> </dt>
<dd xml:lang="no" lang="no">til slutt</dd>
<dt><strong>carry:</strong> </dt>
<dd xml:lang="no" lang="no">her: ha med seg</dd>
</dl>
<p>Page 14:</p>
…
</section>
```

...and...

```xhtml
<section id="ch1-36">
<h2 id="d1e6502">Word Quest</h2>
<dl>
<dt><strong>abolish</strong> (v) [əˈbɒlɪʃ]: </dt>
<dd xml:lang="no" lang="no">avskaffe</dd>
<dt><strong>across</strong> (adv.) [əˈkrɒs]: </dt>
<dd xml:lang="no" lang="no">over</dd>
<dt><strong>advantage</strong> (s) [ədˈvαːntɪdʒ]: </dt>
<dd xml:lang="no" lang="no">fordel</dd>
<dt><strong>agree</strong> (v) [əˈgriː]: </dt>
<dd xml:lang="no" lang="no">her: bli enige</dd>
<dt><strong>aisle</strong> (s) [aɪl]: </dt>
<dd xml:lang="no" lang="no">midtgang</dd>
<dt><strong>altogether</strong> (adv.) [ɔːltəˈgeðə]: </dt>
<dd xml:lang="no" lang="no">til sammen</dd>
<dt><strong>amazed</strong> (adj.) [əˈmeːzd]: </dt>
<dd xml:lang="no" lang="no">forbløffet</dd>
<dt><strong>ancient</strong> (adj.) [ˈeɪnʃnt]: </dt>
<dd xml:lang="no" lang="no">veldig gammel</dd>
<dt><strong>arrive</strong> (v) [əˈraɪv]: </dt>
<dd xml:lang="no" lang="no">ankomme</dd>
<dt><strong>baseball pitch</strong> (s) [ˈbeɪsbɔːl pɪtʃ]: </dt>
<dd xml:lang="no" lang="no">baseballbane</dd>
<dt><strong>bench</strong> (s) [bentʃ]: </dt>
<dd xml:lang="no" lang="no">benk</dd>
<dt><strong>blizzard</strong> (s) [ˈblɪzəd]: </dt>
<dd xml:lang="no" lang="no">snøstorm</dd>
<dt><strong>board</strong> (v) [ˈbɔːd]: </dt>
<dd xml:lang="no" lang="no">her: gå om bord</dd>
<dt><strong>boarding school</strong> (s) [ˈbɔːdɪŋ]: </dt>
<dd xml:lang="no" lang="no">skuːl] internatskole</dd>
<dt><strong>borough</strong> (s) [ˈbʌrə]: </dt>
<dd xml:lang="no" lang="no">bydel</dd>
<dt><strong>botany</strong> (s) [ˈbɒtnɪ]: </dt>
<dd xml:lang="no" lang="no">plantelære</dd>
<dt><strong>breed</strong> (s) [briːd]: </dt>
<dd xml:lang="no" lang="no">rase</dd>
<dt><strong>brief</strong> (adj.) [briːf]: </dt>
<dd xml:lang="no" lang="no">kort</dd>
<dt><strong>brim</strong> (s) [brɪm]: </dt>
<dd xml:lang="no" lang="no">brem</dd>
<dt><strong>calm</strong> (adj.) [kαːm]: </dt>
<dd xml:lang="no" lang="no">rolig</dd>
<dt><strong>capture</strong> (v) [ˈkaeptʃə]: </dt>
<dd xml:lang="no" lang="no">fanget</dd>
<dt><strong>caribou</strong> (s) [ˈkærɪbuː]: </dt>
<dd xml:lang="no" lang="no">nordamerikansk reinsdyr</dd>
<dt><strong>carry</strong> (v) [ˈkærɪ]: </dt>
<dd xml:lang="no" lang="no">her: ha med seg</dd>
<dt><strong>carry out</strong> [kærɪ ˈaʊt]: </dt>
<dd xml:lang="no" lang="no">utføre</dd>
<dt><strong>cattle</strong> (s) [kætl]: </dt>
<dd xml:lang="no" lang="no">kveg</dd>
<dt><strong>civil war</strong> (s) [sɪvl ˈwɔː]: </dt>
<dd xml:lang="no" lang="no">borgerkrig</dd>
<dt><strong>civilian</strong> (s) [sɪˈvɪlɪən]: </dt>
<dd xml:lang="no" lang="no">sivilperson<span epub:type="pagebreak" class="page-normal" id="Page_60" title="60"></span></dd>

<dt><strong>crime rate</strong> (s) [ˈkraɪm reɪt]: </dt>
<dd xml:lang="no" lang="no">hvor mye kriminalitet det er</dd>
<dt><strong>crowd</strong> (s) [kraʊd]: </dt>
<dd xml:lang="no" lang="no">folkemengde</dd>
<dt><strong>damn</strong> (adj.) [dæm]: </dt>
<dd xml:lang="no" lang="no">fordømt</dd>
<dt><strong>day care centre</strong> (s) [ˈdeɪ kеǝ sentə]: </dt>
<dd xml:lang="no" lang="no">barnehage/-park</dd>
<dt><strong>delicious</strong> (adj.) [dɪˈlɪʃəs]: </dt>
<dd xml:lang="no" lang="no">deilig</dd>
<dt><strong>description</strong> (s) [dɪˈskrɪpʃn]: </dt>
<dd xml:lang="no" lang="no">beskrivelse</dd>
<dt><strong>desert</strong> (s) [ˈdezət]: </dt>
<dd xml:lang="no" lang="no">ørken</dd>
<dt><strong>different</strong> (adj.) [ˈdɪfrənt]: </dt>
<dd xml:lang="no" lang="no">forskjellig</dd>
<dt><strong>disadvantage</strong> (s) [dɪsədˈvαːntɪd3]: </dt>
<dd xml:lang="no" lang="no">ulempe</dd>
<dt><strong>disguised as</strong> [dɪsˈgaɪzd əz]: </dt>
<dd xml:lang="no" lang="no">kledd ut som</dd>
<dt><strong>dive</strong> (v) [daɪv]: </dt>
<dd xml:lang="no" lang="no">stupe</dd>
<dt><strong>elect</strong> (v) [ɪˈlekt]: </dt>
<dd xml:lang="no" lang="no">velge</dd>
<dt><strong>emergency</strong> (s) [ɪˈm3ːd3ənsɪ]: </dt>
<dd xml:lang="no" lang="no">nødstilfelle</dd>
<dt><strong>escalator</strong> (s) [ˈeskəleɪtə]: </dt>
<dd xml:lang="no" lang="no">rulletrapp</dd>
<dt><strong>exit</strong> (s) [ˈeksɪt]: </dt>
<dd xml:lang="no" lang="no">utgang</dd>
<dt><strong>face</strong> (v) [ˈfeɪs]: </dt>
<dd xml:lang="no" lang="no">her: være vendt mot</dd>
<dt><strong>feast</strong> (n) [fɪːst]: </dt>
<dd xml:lang="no" lang="no">fest, høytid</dd>
<dt><strong>fight</strong> – fought (v) [faɪt – fɔːt]: </dt>
<dd xml:lang="no" lang="no">kjempe</dd>
<dt><strong>fight off</strong> [faɪt ˈɒf]: </dt>
<dd xml:lang="no" lang="no">kjempe mot og vinne over</dd>
<dt><strong>finally</strong> (adv.) [ˈfaɪnlɪ]: </dt>
<dd xml:lang="no" lang="no">til slutt</dd>
<dt><strong>firearm</strong> (s) [ˈfaɪərαːm]: </dt>
<dd xml:lang="no" lang="no">skytevåpen</dd>
<dt><strong>flight</strong> (s) [fɪaɪt]: </dt>
<dd xml:lang="no" lang="no">flygning</dd>
<dt><strong>flood</strong> (s) [flʌd]: </dt>
<dd xml:lang="no" lang="no">oversvømmelse</dd>
<dt><strong>form</strong> (s) [fɔːm]: </dt>
<dd xml:lang="no" lang="no">skjema</dd>
<dt><strong>grab</strong> (v) [græb]: </dt>
<dd xml:lang="no" lang="no">slå kloa i, gripe tak i</dd>
<dt><strong>gradually</strong> (adv.) [ˈgræd3ʊǝlɪ]: </dt>
<dd xml:lang="no" lang="no">gradvis</dd>
<dt><strong>harvest</strong> (s) [ˈhαːvɪst]: </dt>
<dd xml:lang="no" lang="no">innhøsting</dd>
<dt><strong>head</strong> (s) [hed]: </dt>
<dd xml:lang="no" lang="no">her: overhode</dd>
<dt><strong>hopefully</strong> (adv.) [ˈhəʊpflɪ]: </dt>
<dd xml:lang="no" lang="no">forhåpentligvis</dd>
<dt><strong>housing</strong> (s) [ˈhaʊzɪŋ]: </dt>
<dd xml:lang="no" lang="no">boforhold</dd>
<dt><strong>hurricane</strong> (s) [ˈһʌɪkǝn]: </dt>
<dd xml:lang="no" lang="no">orkan</dd>
<dt><strong>independent</strong> (adj.) [ɪndɪˈpendənt]: </dt>
<dd xml:lang="no" lang="no">uavhengig</dd>
<dt><strong>Inuit</strong> (s) [ˈɪnʊɪt]: </dt>
<dd xml:lang="no" lang="no">inuitt</dd>
<dt><strong>land</strong> (v) [ˈlænd]: </dt>
<dd xml:lang="no" lang="no">her: gå i land</dd>
<dt><strong>landmark</strong> (s) [lændmaːk]: </dt>
<dd xml:lang="no" lang="no">landemerke</dd>
<dt><strong>leather</strong> (s) [ˈleðə]: </dt>
<dd xml:lang="no" lang="no">skinn</dd>
<dt><strong>less than</strong> [ˈles ðən]: </dt>
<dd xml:lang="no" lang="no">mindre enn</dd>
<dt><strong>loaded with</strong> [ˈləʊdɪd wɪð]: </dt>
<dd xml:lang="no" lang="no">lastet med</dd>
<dt><strong>loo</strong> (uformelt) (s) [luː]: </dt>
<dd xml:lang="no" lang="no">do</dd>
<dt><strong>major</strong> (adj.) [ˈmeɪd3ə]: </dt>
<dd xml:lang="no" lang="no">her: viktigst</dd>
<dt><strong>map</strong> (v) [mæp]: </dt>
<dd xml:lang="no" lang="no">her: kartlegge</dd>
<dt><strong>marsh</strong> (s) [maːʃ]: </dt>
<dd xml:lang="no" lang="no">myr</dd>
<dt><strong>match</strong> (v) [mætʃ]: </dt>
<dd xml:lang="no" lang="no">sette sammen noe som passer</dd>
<dt><strong>measurement</strong> (s) [ˈme3əmənt]: </dt>
<dd xml:lang="no" lang="no">mål</dd>
<dt><strong>minority</strong> (s) [maɪˈnɒrətɪ]: </dt>
<dd xml:lang="no" lang="no">mindretall</dd>
<dt><strong>mountain range</strong> (s) [ˈmauntɪn reɪndʒ]: </dt>
<dd xml:lang="no" lang="no">fjellkjede</dd>
<dt><strong>multicultural</strong> (adj.) [mʌltɪˈkʌltʃərəl]: </dt>
<dd xml:lang="no" lang="no">flerkulturell</dd>
<dt><strong>multi-ethnic</strong> (adj.) [mʌltɪеθnɪk]: </dt>
<dd xml:lang="no" lang="no">flerkulturelt</dd>
<dt><strong>navigator</strong> (s) [ˈnævɪgeɪtǝ]: </dt>
<dd xml:lang="no" lang="no">sjøfarer</dd>
<dt><strong>negotiate</strong> (v) [nɪˈgəʊjɪeɪt]: </dt>
<dd xml:lang="no" lang="no">forhandle</dd>
<dt><strong>nickname</strong> (s) [ˈnɪkneɪm]: </dt>
<dd xml:lang="no" lang="no">kallenavn<span epub:type="pagebreak" class="page-normal" id="Page_61" title="61"></span></dd>
<dt><strong>origin</strong> (s) [ˈɒrədʒɪn]: </dt>
<dd xml:lang="no" lang="no">opprinnelse</dd>
<dt><strong>otherwise</strong> (adv.) [ˈʌðəwaɪz]: </dt>
<dd xml:lang="no" lang="no">ellers</dd>
<dt><strong>packed</strong> (adj.) [pækt]: </dt>
<dd xml:lang="no" lang="no">her: helt fullt</dd>
<dt><strong>paw prints</strong> (s) [ˈpɔː prɪnts]: </dt>
<dd xml:lang="no" lang="no">fotspor (dyr)</dd>
<dt><strong>plains</strong> (s) [pleɪnz]: </dt>
<dd xml:lang="no" lang="no">prærie</dd>
<dt><strong>pleasant</strong> (adj.) [pleznt]: </dt>
<dd xml:lang="no" lang="no">behagelig</dd>
<dt><strong>population</strong> (s) [pɒpjəˈleɪjn]: </dt>
<dd xml:lang="no" lang="no">befolkning</dd>
<dt><strong>powerful</strong> (adj.) [ˈpaʊəful]: </dt>
<dd xml:lang="no" lang="no">med mye makt</dd>
<dt><strong>powwow</strong> (s) [ˈpaʊwaʊ]: </dt>
<dd xml:lang="no" lang="no">indiansk seremoni</dd>
<dt><strong>prefer</strong> (v) [prɪˈf3ː]: </dt>
<dd xml:lang="no" lang="no">foretrekke</dd>
<dt><strong>prove</strong> (v) [pruːv]: </dt>
<dd xml:lang="no" lang="no">bevise</dd>
<dt><strong>punish</strong> (v) [ˈрʌnɪʃ]: </dt>
<dd xml:lang="no" lang="no">straffe</dd>
<dt><strong>purpose</strong> (s) [ˈpɜːpəs]: </dt>
<dd xml:lang="no" lang="no">formål</dd>
<dt><strong>quite similar</strong> [kwaɪt ˈsɪmɪlə]: </dt>
<dd xml:lang="no" lang="no">nokså lik</dd>
<dt><strong>rafter</strong> (s) [ˈrαːftə]: </dt>
<dd xml:lang="no" lang="no">en som driver med rafting</dd>
<dt><strong>really</strong> (adv.) [ˈrɪəlɪ]: </dt>
<dd xml:lang="no" lang="no">egentlig</dd>
<dt><strong>reduce</strong> (v) [rɪˈdjuːs]: </dt>
<dd xml:lang="no" lang="no">sette ned</dd>
<dt><strong>re-elect</strong> (v) [,rɪːɪlekt]: </dt>
<dd xml:lang="no" lang="no">gjenvelge</dd>
<dt><strong>relatively</strong> (adv.) [ˈrelətɪvlɪ]: </dt>
<dd xml:lang="no" lang="no">relativt</dd>
<dt><strong>return</strong> (v) [rɪˈtːn]: </dt>
<dd xml:lang="no" lang="no">vende tilbake</dd>
<dt><strong>roast duck</strong> (s) [rəʊst ˈdʌk]: </dt>
<dd xml:lang="no" lang="no">stekt and</dd>
<dt><strong>scarf</strong> (s) [skαːf]: </dt>
<dd xml:lang="no" lang="no">tørkle</dd>
<dt><strong>scat</strong> (s) [skæt]: </dt>
<dd xml:lang="no" lang="no">avføring (bjørn)</dd>
<dt><strong>scenery</strong> (s) [ˈsiːnrɪ]: </dt>
<dd xml:lang="no" lang="no">landskap, natur</dd>
<dt><strong>separate</strong> (v) [ˈsepəreɪt]: </dt>
<dd xml:lang="no" lang="no">her: skille</dd>
<dt><strong>serve</strong> (v) [sɜːv]: </dt>
<dd xml:lang="no" lang="no">servere</dd>
<dt><strong>set off</strong> [set ˈɒf]: </dt>
<dd xml:lang="no" lang="no">dra av gårde</dd>
<dt><strong>seulement</strong> (s) [ˈsetlmənt]: </dt>
<dd xml:lang="no" lang="no">bosetning</dd>
<dt><strong>settler</strong> (s) [ˈsetlə]: </dt>
<dd xml:lang="no" lang="no">kolonist, nybygger</dd>
<dt><strong>shortly</strong> (adv.) [ˈʃɔːtlɪ]: </dt>
<dd xml:lang="no" lang="no">om kort tid</dd>
<dt><strong>sign</strong> (v) [saɪn]: </dt>
<dd xml:lang="no" lang="no">undertegne</dd>
<dt><strong>six-shooter</strong> (s) [ˈsɪks Juːtə]: </dt>
<dd xml:lang="no" lang="no">en type revolver</dd>
<dt><strong>skating rink</strong> (s) [ˈskeɪtɪŋ) rɪŋk]: </dt>
<dd xml:lang="no" lang="no">skøytebane</dd>
<dt><strong>skiing resort</strong> (s) [ˈskiːɪŋ rɪzɔːt]: </dt>
<dd xml:lang="no" lang="no">skisted</dd>
<dt><strong>stampede</strong> (s) [stæmˈpiːd]: </dt>
<dd xml:lang="no" lang="no">vill flukt</dd>
<dt><strong>stand</strong> (v) [stænd]: </dt>
<dd xml:lang="no" lang="no">her: tåle</dd>
<dt><strong>stewardess</strong> (s) [ˈstjuːədɪs]: </dt>
<dd xml:lang="no" lang="no">flyvertinne</dd>
<dt><strong>stirrup</strong> (s) [ˈstɪrəp]: </dt>
<dd xml:lang="no" lang="no">stigbøyle</dd>
<dt><strong>stretch</strong> (v) [ˈstretʃ]: </dt>
<dd xml:lang="no" lang="no">strekke seg</dd>
<dt><strong>suddenly</strong> (adv.) [ˈsʌdnlɪ]: </dt>
<dd xml:lang="no" lang="no">plutselig</dd>
<dt><strong>swamp</strong> (s) [swɒmp]: </dt>
<dd xml:lang="no" lang="no">våtmark</dd>
<dt><strong>tax</strong> (s) [tæks]: </dt>
<dd xml:lang="no" lang="no">skatt</dd>
<dt><strong>tennis court</strong> (s) [ˈtenɪs kɔːt]: </dt>
<dd xml:lang="no" lang="no">tennisbane</dd>
<dt><strong>the opposite</strong> [ðɪ ˈɒpəsɪt]: </dt>
<dd xml:lang="no" lang="no">det motsatte</dd>
<dt><strong>throw</strong> – threw (v) [θrǝʊ – θruː]: </dt>
<dd xml:lang="no" lang="no">kaste</dd>
<dt><strong>torn</strong> (adj.) [tɔːn]: </dt>
<dd xml:lang="no" lang="no">revet i stykker</dd>
<dt><strong>tribal culture</strong> [ˈtraɪbl kʌltʃǝ]: </dt>
<dd xml:lang="no" lang="no">stammekultur</dd>
<dt><strong>tribe</strong> (s) [traɪb]: </dt>
<dd xml:lang="no" lang="no">stamme</dd>
<dt><strong>unemployment</strong> (s) [ʌnɪmˈplɔɪmənt]: </dt>
<dd xml:lang="no" lang="no">arbeidsledighet</dd>
<dt><strong>unexpected</strong> (adj.) [ʌnɪkˈspektɪd]: </dt>
<dd xml:lang="no" lang="no">uventet</dd>
<dt><strong>valid</strong> (adj.) [ˈvælɪd]: </dt>
<dd xml:lang="no" lang="no">gyldig</dd>
<dt><strong>wetland area</strong> (s) [ˈwetlənd eərɪə]: </dt>
<dd xml:lang="no" lang="no">våtmark</dd>
</dl>
<div epub:type="pagebreak" class="page-normal" id="Page_62" title="62"></div>
</section>
```
user: josteinaj
labels: Punktskrift: Braille
M: Medium size job
issue_217: state: open
title: Web UI handling of em and strong
body: I would like an option that leave out strong i a production and an option that leave out em in production. E.g. under Tekstelementer. Nice to use in cooking books who always have a lot of em and strong that is only related to layout.
user: KariRudjord
labels: Punktskrift: Braille
M: Medium size job
issue_216: state: open
title: Add extra style sheet 
body: I tried to add extra style sheet to a book to put one sentence on each page (like an easy reader). 
It won't go through PIP - says Validation failed. 

I got the extra CSS from Jostein, and opploaded it together with the file. Then I went to the option Layout and selected the CSS file. Something you can look at, Bert?

[120902.zip](https://github.com/nlbdev/pipeline/files/2769120/120902.zip)

[ensetningperside.zip](https://github.com/nlbdev/pipeline/files/2769121/ensetningperside.zip)

user: KariRudjord
labels: Punktskrift: Braille
M: Medium size job
issue_215: state: open
title: Book with two sets of notes
body: Here is a book that stops in PIP, and we think the reason is the way footnotes are handled. Something you can look at, Bert?

In this book, 120854, there are two sets of footnotes. 
In set 1 the reference is 1  
In set 2 the reference is [1]
All notes are placed in end of the chapter they appear, not in end of book.

The book won't go through PIP even when I choose to exclude notes.
[120854.zip](https://github.com/nlbdev/pipeline/files/2764110/120854.zip)


user: KariRudjord
labels: Punktskrift: Braille
M: Medium size job
issue_214: state: open
title: Two or more capitals
body: Can we implement this new OUP rule for sequences of captial letters (not acronyms)?

When two or more capitals appears in text - in headlines, the first three words in a chapter etc. - use 3 x dot 6 (6-6-6) before (Oh, scary!) and 1 x dot 6 (6) after. This shall include space so that there is only one (6-6-6) in front of the capital words and one (6) after the last word with capitals.

![bilde](https://user-images.githubusercontent.com/12409918/51174064-3643b700-18b7-11e9-9b26-f34dba98f01f.png)

(Today there are 2 x dot 6 (6-6) before capitals, and the (6-6) is repeatet after every space.)
user: KariRudjord
labels: Punktskrift: Braille
M: Medium size job
issue_212: state: open
title: Include subtitle and series title on titlepage
body: I think we have some CSS already for subtitle on titlepage. Would like to implement it in PIP. 
- Like main title: with rules that put the whole title in Om boka if it doesn't fit on titlepage

Would also like to include series title on titlepage.  After title and any subtitle with an empty row before series title.
user: KariRudjord
labels: Punktskrift: Braille
M: Medium size job
issue_209: state: open
title: Volume break - sections
body: Avoid volume break in the middle of list, blockquote.

Also table, sidebar and poem if possible.
user: KariRudjord
issue_208: state: open
title: Hyphenation exeption list
body: 
Make a solution for hyphen exeptions, e.g. (never to hyphenate the word)
de-tte
de-nne
di-sse
kj-eks


user: KariRudjord
issue_207: state: open
title: Fallback mechanism for matrix tables that can not be rendered as matrix tables
body: There shouldn't be an exception if matrix tables can not be rendered as matrix tables. It should rather fall back to render as a list, and print a warning.
user: josteinaj
issue_206: state: open
title: Add DP2 build date to metadata in PEF
body: Maybe something like this in the resulting PEF:

```xml
<nlbprod:daisy-pipeline-build-date>2018-10-12T13:50:12</nlbprod:daisy-pipeline-build-date>
```

```xml
<nlbprod:daisy-pipeline-source-commit>5b6cafa849bcc5ed1210f616a33d472a5a4a76b3</nlbprod:daisy-pipeline-source-commit>
```
user: josteinaj
issue_204: state: open
title: Preserve metadata, and use nlbprod-namespace for sheet-count
body: - [ ] metadata from the input should be preserved, as long as it is possible to determine the namespace for the prefix that is used (we include the namespace for the metadata properties in our books).
- [ ] the `dc:identifier` is buggy: it is currently always set to "`identifier?`"
- [ ] use `<nlbprod:sheet-count xmlns="http://www.nlb.no/production"/>` instead of `<nlb:sheet-count xmlns="http://www.nlb.no/ns/pipeline/xproc"/>`.
- use `<nlbprod:content-type/>` (or something like that) to declare what types of content were present in the input:
  - [ ] `tables`
  - [ ] `notes`
  - ...anything else that is somewhat complicated

user: josteinaj
issue_203: state: open
title: Processing terminated by xsl:message at line 2137 in css-to-obfl.xsl
body: This started happening [between 3ea2d35 and b8a23ea](https://github.com/nlbdev/pipeline/compare/3ea2d353592bc4cc0c0ce83f49035cd7850c13a3...nlbdev:b8a23eaa6ec894a1d37a2724b7f8e5f14317f825). Those two commits have been built and are available under http://repo.nlb.no/pipeline/ using the updater, but not the intermediate commits. I haven't tried building the commits between them yet to determine which commit caused the issue.

The bug does not occur in all books, but it does happen with the book we use for system testing in our production system (which I can provide upon request). I have not yet tried to determine whether there is some specific part of the book that causes this issue.

I don't see an easy way to create a regression test for this issue. I can get the input for `css-to-obfl.xsl` which causes the error, but `css-to-obfl.xsl` depends on some Java stuff. The NLB translator is used, which is not available from the xprocspec tests in dotify-formatter. I don't think there's an easy way to import for instance `css-to-obfl.xpl` for use in a xprocspec test in mod-nlb either.

The tests in dotify-formatter has been disabled (presumably by mistake) since 039bbe2872b as a result of adding a `focus` attribute to one of the tests. Three of the tests in `test_format.xprocspec` fail if that `focus` attribute is removed:
- 92: Tests combination of manual and automatic volume breaking.
- 93: Tests `volume-break-inside: -obfl-keep(...)`
- 107: Tests keeping blocks in the same volume.
user: josteinaj
issue_199: state: open
title: Notes
body: Check with some ordinary books how foot notes/end notes behaves when rendered

- on bottom of page OK
- in end of volume OK
- in end of book - not OK

E.g. it seems that the page with h1 Footnotes is rendered also when notes don't appear in the text.
user: KariRudjord
issue_198: state: open
title: Poem
body: Check how poem is rendered in ordinary text (without headline). Do we need an open cell between ordinary text and poem?
user: KariRudjord
issue_197: state: open
title: Epigraph
body: Works fine with DTBook but don't seem to work with HTML.

Make a few tests and see how it behaves.
user: KariRudjord
issue_196: state: open
title: List with dots and dl
body: List with dots
there are some irregularities in HTML test book. regarding pl-lists with * as dot markup. Check what can be done.

List with numbers
have a last check here as well.

dl-list
Check if definition list is working well 

Check how it is supposed to be handled in Dokumentasjon
[Dokumentasjon.Kari.xlsx](https://github.com/nlbdev/pipeline/files/2360861/Dokumentasjon.Kari.xlsx)

user: KariRudjord
issue_195: state: open
title: Check for tables
body: Check some ordinary books with tables and if they are handled in a good way.

How can we make a good routine for tables?

- Can we get a report on all books that have tables so we can check how they are handled?
- Can we have standard CSS based on elements that is like Table-to-list and Table-matrix?
- Can we have a standard way to leave out tables that is not working in braille?

user: KariRudjord
issue_194: state: open
title: Image and imagedescription
body: Check with a ordinary book that the behaviour is like described in Dokumentasjon.
[Dokumentasjon.Kari.xlsx](https://github.com/nlbdev/pipeline/files/2360836/Dokumentasjon.Kari.xlsx)

user: KariRudjord
issue_193: state: open
title: Sidebar behaviour
body: Ask Liv Kristin if we should keep "Margtekst:" or make a new behaviour, e.g. a lime of c (14) to seprarate from ordinary text.
user: KariRudjord
issue_192: state: open
title: CSS: Headlines h4-h6
body: Found faults in h1-h6 in testbook. Check if it is only the testbook or if irregularities also happens in ordinary books.

Check also that h1s in frontmatter is handled correct (colophone should be placed in back of book, quotes and dedications in front of book after TOC, the rest in frontmatter should be removed).
user: KariRudjord
issue_191: state: open
title: IllegalArgumentException: Braille pattern '2' not found
body: For book 562231:

```
2018-09-03 13:27:17,310 [INFO ] o.d.p.b.p.calabash.impl.ValidateStep - Error at line 20882, column 43: character content of element "row" invalid; must be a string matching the regular expression "([⠀-⣿])*"
2018-09-03 13:27:17,323 [DEBUG] o.d.c.x.c.steps.Message$MessageStep - bundle://104.0:1/xml/xproc/message.xpl:116:29:Storing PEF as 'file:/home/jostein/Skrivebord/daisy-pipeline/data/jobs/4e925931-c929-4dd3-87fe-fe9b2c1271a6/output/pef-output-dir//562231.pef'
2018-09-03 13:27:17,325 [DEBUG] o.d.c.x.c.steps.Message$MessageStep - bundle://104.0:1/xml/xproc/message.xpl:116:29:Not storing as BRF
2018-09-03 13:27:17,328 [DEBUG] o.d.c.x.c.steps.Message$MessageStep - bundle://104.0:1/xml/xproc/message.xpl:116:29:Converting PEF to HTML preview using the BRF table '(locale:no)'
2018-09-03 13:27:17,330 [DEBUG] o.d.c.x.c.steps.Message$MessageStep - bundle://104.0:1/xml/xproc/message.xpl:116:29:Copying braille font file (odt2braille8.ttf) to HTML preview directory
2018-09-03 13:27:18,531 [ERROR] o.d.p.b.p.s.impl.EncodeDefinition - pef:encode failed
java.lang.IllegalArgumentException: Braille pattern '2' not found.
    at org.daisy.braille.impl.table.EmbosserBrailleConverter.toText(EmbosserBrailleConverter.java:151) ~[na:na]
    at org.daisy.braille.impl.table.EmbosserBrailleConverter.toText(EmbosserBrailleConverter.java:162) ~[na:na]
    at org.daisy.pipeline.braille.pef.saxon.impl.EncodeDefinition$1.call(EncodeDefinition.java:108) ~[na:na]
    at net.sf.saxon.functions.IntegratedFunctionCall.iterate(IntegratedFunctionCall.java:268) ~[na:na]
    at net.sf.saxon.expr.Expression.evaluateItem(Expression.java:457) ~[na:na]
    at net.sf.saxon.expr.Expression.process(Expression.java:579) ~[na:na]
    at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:662) ~[na:na]
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138) ~[na:na]
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:431) ~[na:na]
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:373) ~[na:na]
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138) ~[na:na]
    at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:479) ~[na:na]
    at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:660) ~[na:na]
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138) ~[na:na]
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:431) ~[na:na]
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:373) ~[na:na]
    at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:660) ~[na:na]
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138) ~[na:na]
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:431) ~[na:na]
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:373) ~[na:na]
    at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:660) ~[na:na]
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138) ~[na:na]
    at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:479) ~[na:na]
    at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:613) ~[na:na]
    at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:660) ~[na:na]
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138) ~[na:na]
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:431) ~[na:na]
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:373) ~[na:na]
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138) ~[na:na]
    at net.sf.saxon.expr.LetExpression.process(LetExpression.java:463) ~[na:na]
    at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:479) ~[na:na]
    at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:613) ~[na:na]
    at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:660) ~[na:na]
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138) ~[na:na]
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:431) ~[na:na]
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:373) ~[na:na]
    at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:660) ~[na:na]
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138) ~[na:na]
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:431) ~[na:na]
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:373) ~[na:na]
    at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:660) ~[na:na]
    at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:138) ~[na:na]
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:431) ~[na:na]
    at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator.java:373) ~[na:na]
    at net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:239) ~[na:na]
    at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:1057) ~[na:na]
    at net.sf.saxon.Controller.transformDocument(Controller.java:2080) ~[na:na]
    at net.sf.saxon.Controller.transform(Controller.java:1903) ~[na:na]
    at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:450) ~[na:na]
    at com.xmlcalabash.library.XSLT.run(XSLT.java:251) ~[na:na]
    at com.xmlcalabash.runtime.XAtomicStep.run(XAtomicStep.java:389) ~[na:na]
    at com.xmlcalabash.runtime.XPipeline.doRun(XPipeline.java:236) ~[na:na]
    at com.xmlcalabash.runtime.XPipeline.run(XPipeline.java:136) ~[na:na]
    at com.xmlcalabash.runtime.XPipelineCall.run(XPipelineCall.java:94) ~[na:na]
    at com.xmlcalabash.runtime.XCompoundStep.run(XCompoundStep.java:262) ~[na:na]
    at com.xmlcalabash.runtime.XChoose.run(XChoose.java:135) ~[na:na]
    at com.xmlcalabash.runtime.XPipeline.doRun(XPipeline.java:236) ~[na:na]
    at com.xmlcalabash.runtime.XPipeline.run(XPipeline.java:136) ~[na:na]
    at com.xmlcalabash.runtime.XPipelineCall.run(XPipelineCall.java:94) ~[na:na]
    at com.xmlcalabash.runtime.XCompoundStep.run(XCompoundStep.java:262) ~[na:na]
    at com.xmlcalabash.runtime.XChoose.run(XChoose.java:135) ~[na:na]
    at com.xmlcalabash.runtime.XPipeline.doRun(XPipeline.java:236) ~[na:na]
    at com.xmlcalabash.runtime.XPipeline.run(XPipeline.java:136) ~[na:na]
    at com.xmlcalabash.runtime.XPipelineCall.run(XPipelineCall.java:94) ~[na:na]
    at com.xmlcalabash.runtime.XPipeline.doRun(XPipeline.java:236) ~[na:na]
    at com.xmlcalabash.runtime.XPipeline.run(XPipeline.java:136) ~[na:na]
    at com.xmlcalabash.runtime.XPipelineCall.run(XPipelineCall.java:94) ~[na:na]
    at com.xmlcalabash.runtime.XCompoundStep.run(XCompoundStep.java:262) ~[na:na]
    at com.xmlcalabash.runtime.XChoose.run(XChoose.java:135) ~[na:na]
    at com.xmlcalabash.runtime.XCompoundStep.run(XCompoundStep.java:262) ~[na:na]
    at com.xmlcalabash.runtime.XTry.run(XTry.java:98) ~[na:na]
    at com.xmlcalabash.runtime.XPipeline.doRun(XPipeline.java:236) ~[na:na]
    at com.xmlcalabash.runtime.XPipeline.run(XPipeline.java:136) ~[na:na]
    at org.daisy.common.xproc.calabash.impl.CalabashXProcPipeline.run(CalabashXProcPipeline.java:242) ~[na:na]
    at org.daisy.pipeline.job.Job.run(Job.java:216) ~[na:na]
    at org.daisy.pipeline.job.impl.DefaultJobExecutionService$1.run(DefaultJobExecutionService.java:115) ~[na:na]
    at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_181]
2018-09-03 13:27:18,532 [ERROR] o.d.c.x.c.steps.Message$MessageStep - pef:encode failed
2018-09-03 13:27:18,532 [DEBUG] o.e.persistence.logging.default - Connection(1897233565)--Thread(Thread[Thread-102,5,main])--INSERT INTO PERSISTENTMESSAGE (jobId, sequence, col, file, LEVEL, line, text, throwable, timestamp) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
    bind => [9 parameters bound]
2018-09-03 13:27:18,534 [ERROR] o.d.c.x.c.steps.Message$MessageStep - pef:encode failed
2018-09-03 13:27:18,534 [DEBUG] o.e.persistence.logging.default - Connection(752784359)--Thread(Thread[Thread-102,5,main])--INSERT INTO PERSISTENTMESSAGE (jobId, sequence, col, file, LEVEL, line, text, throwable, timestamp) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
    bind => [9 parameters bound]
2018-09-03 13:27:18,537 [ERROR] o.d.c.x.c.steps.Message$MessageStep - pef:encode failed
2018-09-03 13:27:18,537 [DEBUG] o.e.persistence.logging.default - Connection(1104370864)--Thread(Thread[Thread-102,5,main])--INSERT INTO PERSISTENTMESSAGE (jobId, sequence, col, file, LEVEL, line, text, throwable, timestamp) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
    bind => [9 parameters bound]
2018-09-03 13:27:18,539 [ERROR] o.d.c.x.c.steps.Message$MessageStep - pef:encode failed
2018-09-03 13:27:18,539 [DEBUG] o.e.persistence.logging.default - Connection(1490044429)--Thread(Thread[Thread-102,5,main])--INSERT INTO PERSISTENTMESSAGE (jobId, sequence, col, file, LEVEL, line, text, throwable, timestamp) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
    bind => [9 parameters bound]
```
user: josteinaj
issue_189: state: open
title: Content on empty back of sheets inconsistent
body: Sometimes the page is completely empty, for example at the transition of the title page to the about page. But in most cases the page has a footer with page numbers.

If this inconsistency causes confusion with users, we should make it possible to specify in OBFL to include page numbers on all pages.
user: bertfrees
issue_185: state: open
title: Possibility to provide only temp-dir to scripts
body: It would be allowed to not specify pef-output-dir when temp-dir is specified. In this case pef-output-dir will then be computed from temp-dir. The same goes for brf-output-dir when include-brf is true, preview-output-dir when include-preview is true, and obfl-output-dir when include-obfl is true.

This will reduce the boiler plate in our tests.

This:
```xml
<x:option name="pef-output-dir" select="resolve-uri('1/pef-output-dir',$temp-dir)"/>
<x:option name="preview-output-dir" select="resolve-uri('1/preview-output-dir',$temp-dir)"/>
<x:option name="temp-dir" select="resolve-uri('1/temp-dir',$temp-dir)"/>
```

could be replaced with:
```xml
<x:option name="temp-dir" select="resolve-uri('1',$temp-dir)"/>
```

Note that the generated directory names should be predictable.
user: bertfrees
issue_168: state: open
title: Contracted braille - hyphenation
body: Contracted braille get hyphenation, but it's unclear if the rules are good enough. 
user: KariRudjord
issue_167: state: open
title: Contracted braille - capital letters bugs
body: Grade 2, from Oddvar Øyan:
1. I forbindelse med store bokstaver ser det ut som systemet sliter med å gjengi riktig. F.eks. dersom det kommer en Ø (stor ø) inne i et ord med store bokstaver blir punkt 6-6 gjentatt etter ø-en også.
Det var også flere bokstaver med aksent først i ordet, altså med storboksatvtegn der det først kom punkt 6 deretter punkt 4 og så bokstaven i uksentert form.

2. Et annet problem var der en bokstaforkortelse med store bokstaver ble etterfulgt av et bindestrek og et nytt ord. I slike tilfeller ble ikke ordet etter bindestreken forkortet. Eksempler: AGA-komfyrene og FNL-flagget. Her ble altså ikke forkortelsen for «ne» og «et» brukt.

user: KariRudjord
issue_160: state: open
title: Single quotation mark messes up capitalized word
body: From EPUB:
'WHAT HAVE I TOLD YOU,' thundered his uncle, spraying spit over the table, 'ABOUT SAYING THE M WORD IN OUR HOUSE?'

From the pef:
⠄⠠⠠⠺⠓⠁⠞⠀⠠⠠⠠⠓⠁⠧⠑⠀⠊⠀⠞⠕⠇⠙ ⠽⠕⠥⠂⠄⠠⠄⠀⠞⠓⠥⠝⠙⠑⠗⠑⠙⠀⠓⠊⠎⠀⠥⠝⠉⠇⠑⠂ ⠎⠏⠗⠁⠽⠊⠝⠛⠀⠎⠏⠊⠞⠀⠕⠧⠑⠗⠀⠞⠓⠑⠀⠞⠁⠃⠇⠑⠂⠄⠠⠠⠁⠃⠕⠥⠞⠀⠠⠠⠠⠎⠁⠽⠊⠝⠛⠀⠞⠓⠑⠀⠍⠀⠺⠕⠗⠙⠀⠊⠝⠀⠕⠥⠗⠀⠓⠕⠥⠎⠑⠦⠄⠠⠄

The problem is the first word, WHAT, that is preceded by doble dot 6 and the triple dot 6 in front of the second word, HAVE. The same thing is also happening after the next singular upper quotation mark ABOUT SAYING.

job#1916, by the way ...
user: matskober
issue_149: state: open
title: No table could be found for query 'contraction:no locale:el '
body: Job #1648

English book, with some greek text marked up with xml:lang="el".
This is the same title that produced 8-dots (when the greek parts was without markup)
user: matskober
issue_141: state: open
title: Print page number is only displayed on braille pages where print page break occurs
body: Reported by @matskober.

@KariRudjord what is the desired behavior? Should print page number be displayed on all pages or only on the pages where the print page break occurs?
user: josteinaj
issue_125: state: open
title: epub-nav-utils: add option to rename headline elements based on nav doc
body: In EPUBs following the nordic markup guidelines, all documents starts with a h1, regardless of the actual depth. When doing a simple concatenation of all the documents in spine order, as is currently done in the EPUB3-to-PEF script, information about sectioning depth is lost.

Edit: this could maybe be done with a
```xml
<p:choose>
    <p:when test="//meta[@property='nordic:guidelines']/text()='2015-1' and
                  p:step-available('px:nordic-epub3-to-html')">
        <px:nordic-epub3-to-html/>
```
to conditionally invoke the nordic migrator.
user: josteinaj
issue_117: state: open
title: Music braille
body: *from Karis google sheet*
user: josteinaj
issue_107: state: open
title: Superscript and subscript
body: *from Karis google sheet:*

```
CO<sub>2</sub> cm<sup>2</sup>
```
user: josteinaj
issue_103: state: open
title: Bibliography and index
body: *Moved from Karis google sheet*:

What to do with these? Make an option to include/exclude? Are they marked up so that it is possible to do that?
user: josteinaj
issue_101: state: open
title: New table for sami languages
body: Might not be needed. Maybe it's fine to use the same table for both norwegian and sami. Nevertheless, adding as an issue so that we remember it and can discuss it in the future.
user: josteinaj
issue_98: state: open
title: New table for Old West Norse ("norrønt") or Old Norwegian ("gammelnorsk")
body: [job972.zip](https://github.com/nlbdev/pipeline/files/1344349/job972.zip)
 
I put the norse alphabet in a p (in a file with "dc:Language" content="no"), and once more in a p with 
 xml:lang="non" ( that is the code for norse, right?). Both p-s where rendered equally ; both seem to be wrong - according to OUPs Håndbok.

@josteinaj @KariRudjord @bertfrees @usama49 
user: matskober
issue_87: state: open
title: remove any <strong> or <em> tags from all-capital words/sentences before converting
body: From https://github.com/nlbdev/pipeline/issues/74#issuecomment-312568408
user: josteinaj
issue_44: state: open
title: braille: consider custom options for each patron / Se om man kan åpne for individuelle valg for den enkelte låner
body: (norwegian)

*from Trello-board:*

Se om man kan åpne for individuelle valg for den enkelte låner: f.eks. fullskrift/kortskrift, enkel/dobbel linjeavstand, (e-punkt, e-bøker?). Et knippe standardvalg. Inkluderer tilpasning i bibliofil og nettside (ses i sammenheng med øvrige bestillinger til Bibliofil, f.eks. e-bøker)
user: josteinaj
issue_34: state: open
title: CSS templates: books, periodicals, and braille clubs
user: josteinaj
issue_30: state: open
title: Create xprocspec tests based on snaekobbi acceptance tests
body: https://github.com/snaekobbi/testing/tree/master/Test%20data
user: josteinaj
issue_9: state: open
title: Title page and colophon should never have double line spacing
body: _From @bertfrees on May 10, 2016 9:19_

The NLB CSS currently looks like this:

``` css
@if $line-spacing == double {
   @page:left  {
      margin-top: 1; 
   }      
}
```

and in the generic dtbook-to-pef CSS we have:

``` css
@if $line-spacing == double {
   :root {
      line-height: 2;
   }   
}
```

I guess the NLB CSS should have something like this instead (not verified!):

``` css
@if $line-spacing == double {
   :root {
      line-height: 1; /* to cancel out generic rule*/
   }   
   bodymatter, level1[epub|type~='bodymatter'] {
      line-height: 2;
   }
   @page body:left  {
      margin-top: 1; 
   }      
}
```


_Copied from original issue: nlbdev/pipeline-mod-nlb#41_
user: josteinaj
issue_5: state: open
title: Don't break lines after opening quote or before ellipsis or closing quote
body: _From @bertfrees on March 2, 2016 13:11_

For example, like this:

```
Lisa gikk langt til
sk…

«Lisa gikk til til gikk
til …»

Dette tror faktisk jeg 
også …

«Nå er det nok forfo i dag,»
sa hun.
```

and not like this:

```
Lisa gikk langt til sk
…

«Lisa gikk til til gikk til
…»

Dette tror faktisk jeg også
…

«Nå er det nok forfo i dag,
» sa hun.
```


_Copied from original issue: nlbdev/pipeline-mod-nlb#23_
user: josteinaj
issue_4: state: open
title: Full support for combining marks
body: _From @josteinaj on September 14, 2015 10:9_

Many of the diacritic letters can also be written by using combining marks:
http://unicode-table.com/en/search/?q=combining

For instance: "å" (U+61 U+030A) and "å" (U+E5).

Many diacritic letters, such as e̊, can only be written by using these combining marks.

We could generate a table (or extend the existing one) for these diacritics where we include all combinations of the letters a-z with all the combining marks (or at least the relevant combining marks). At most, this means 12896 new definitions, but we could drop most of the rules if that makes it inefficient.

Alternatively, we could do some preprocessing to replace the trailing combining marks with dot 4 before the character.

In any case, these marks seem to be rare so this is not a high priority.


_Copied from original issue: nlbdev/pipeline-mod-nlb#7_
user: josteinaj
issue_3: state: open
title: For e-mails and URLs, use mathematical hyphenation when splitting over two lines
body: _From @josteinaj on September 11, 2015 7:25_

Also, the normal hyphenation rules should not be applied as those might insert additional characters.

<!---
@huboard:{"order":5.229594535194337e-12}
-->


_Copied from original issue: nlbdev/pipeline-mod-nlb#5_
user: josteinaj