Closed matskober closed 6 years ago
@matskober The list-style-type-none
class is defined like this in your EPUB:
<style type="text/css" xml:space="preserve">
.list-style-type-none {
list-style-type:none;
}
</style>
You may have to set the attribute media="embossed"
on the style element to make the CSS take effect.
For reference, here's the relevant input HTML in Mats' job:
<head>
<style type="text/css" xml:space="preserve">
.list-style-type-none {
list-style-type:none;
}
</style>
</head>
<body>
<ol id="list_1" class="list-style-type-none">
<li id="li_1">Aegis: et skjold som Thalia Grace bruker, og som har et fryktinngytende bilde av Medusa foran. Det forvandler seg til et sølvarmbånd når hun ikke bruker det</li>
<li id="li_2">Agamethus: sønn av kong Erginus, halvbror av Trophonios, som hogg hodet av ham for å unngå å bli oppdaget etter plyndringstoktet i kong Hyrieus’ skattkammer</li>
<li id="li_3">Akefaloer: en stamme med hodeløse folk med ansiktet på brystet</li>
<li id="li_4">Amasoner: et folk bestående av kvinnelige krigere</li>
<li id="li_5">Amfora: en høy vinkrukke av keramikk</li>
<li id="li_6">Ares: den greske krigsguden. Sønn av Zevs og Hera, og halvbror til Athene. Romersk motstykke: Mars</li>
<!-- ... -->
</ol>
</body>
And here's the PEF output rows:
<row>⠀⠀⠀⠀⠀⠀⠼⠁⠀⠠⠁⠑⠛⠊⠎⠒⠀⠑⠞⠀⠎⠅⠚⠕⠇⠙⠀⠎⠕⠍</row>
<row>⠀⠀⠀⠀⠠⠞⠓⠁⠇⠊⠁⠀⠠⠛⠗⠁⠉⠑⠀⠃⠗⠥⠅⠑⠗⠂⠀⠕⠛</row>
<row>⠀⠀⠀⠀⠎⠕⠍⠀⠓⠁⠗⠀⠑⠞⠀⠋⠗⠽⠅⠞⠊⠝⠝⠛⠽⠞⠑⠝⠙⠑</row>
<row>⠀⠀⠀⠀⠃⠊⠇⠙⠑⠀⠁⠧⠀⠠⠍⠑⠙⠥⠎⠁⠀⠋⠕⠗⠁⠝⠄</row>
<row>⠀⠀⠀⠀⠠⠙⠑⠞⠀⠋⠕⠗⠧⠁⠝⠙⠇⠑⠗⠀⠎⠑⠛⠀⠞⠊⠇⠀⠑⠞</row>
<row>⠀⠀⠀⠀⠎⠪⠇⠧⠁⠗⠍⠃⠡⠝⠙⠀⠝⠡⠗⠀⠓⠥⠝⠀⠊⠅⠅⠑</row>
<row>⠀⠀⠀⠀⠃⠗⠥⠅⠑⠗⠀⠙⠑⠞</row>
<row>⠀⠀⠀⠀⠀⠀⠼⠃⠀⠠⠁⠛⠁⠍⠑⠞⠓⠥⠎⠒⠀⠎⠪⠝⠝⠀⠁⠧</row>
<row>⠀⠀⠀⠀⠅⠕⠝⠛⠀⠠⠑⠗⠛⠊⠝⠥⠎⠂⠀⠓⠁⠇⠧⠃⠗⠕⠗⠀⠁⠧</row>
<row>⠀⠀⠀⠀⠠⠞⠗⠕⠏⠓⠕⠝⠊⠕⠎⠂⠀⠎⠕⠍⠀⠓⠕⠛⠛⠀⠓⠕⠙⠑⠞</row>
<row>⠀⠀⠀⠀⠁⠧⠀⠓⠁⠍⠀⠋⠕⠗⠀⠡⠀⠥⠝⠝⠛⠡⠀⠡⠀⠃⠇⠊</row>
<row>⠀⠀⠀⠀⠕⠏⠏⠙⠁⠛⠑⠞⠀⠑⠞⠞⠑⠗⠀⠏⠇⠽⠝⠙⠗⠊⠝⠛⠎⠤</row>
<row>⠀⠀⠀⠀⠞⠕⠅⠞⠑⠞⠀⠊⠀⠅⠕⠝⠛⠀⠠⠓⠽⠗⠊⠑⠥⠎⠐</row>
<row>⠀⠀⠀⠀⠎⠅⠁⠞⠞⠅⠁⠍⠍⠑⠗</row>
<row>⠀⠀⠀⠀⠀⠀⠼⠉⠀⠠⠁⠅⠑⠋⠁⠇⠕⠑⠗⠒⠀⠑⠝⠀⠎⠞⠁⠍⠍⠑</row>
<row>⠀⠀⠀⠀⠍⠑⠙⠀⠓⠕⠙⠑⠇⠪⠎⠑⠀⠋⠕⠇⠅⠀⠍⠑⠙</row>
<row>⠀⠀⠀⠀⠁⠝⠎⠊⠅⠞⠑⠞⠀⠏⠡⠀⠃⠗⠽⠎⠞⠑⠞</row>
<row>⠀⠀⠀⠀⠀⠀⠼⠙⠀⠠⠁⠍⠁⠎⠕⠝⠑⠗⠒⠀⠑⠞⠀⠋⠕⠇⠅⠀⠃⠑⠤</row>
<row>⠀⠀⠀⠀⠎⠞⠡⠑⠝⠙⠑⠀⠁⠧⠀⠅⠧⠊⠝⠝⠑⠇⠊⠛⠑</row>
<row>⠀⠀⠀⠀⠅⠗⠊⠛⠑⠗⠑</row>
<row>⠀⠀⠀⠀⠀⠀⠼⠑⠀⠠⠁⠍⠋⠕⠗⠁⠒⠀⠑⠝⠀⠓⠪⠽⠀⠧⠊⠝⠤</row>
<row>⠀⠀⠀⠀⠅⠗⠥⠅⠅⠑⠀⠁⠧⠀⠅⠑⠗⠁⠍⠊⠅⠅</row>
<row>⠀⠀⠀⠀⠀⠀⠼⠋⠀⠠⠁⠗⠑⠎⠒⠀⠙⠑⠝⠀⠛⠗⠑⠎⠅⠑</row>
<row>⠀⠀⠀⠀⠅⠗⠊⠛⠎⠛⠥⠙⠑⠝⠄⠀⠠⠎⠪⠝⠝⠀⠁⠧⠀⠠⠵⠑⠧⠎</row>
<row>⠀⠀⠀⠀⠕⠛⠀⠠⠓⠑⠗⠁⠂⠀⠕⠛⠀⠓⠁⠇⠧⠃⠗⠕⠗⠀⠞⠊⠇</row>
<row>⠀⠀⠀⠀⠠⠁⠞⠓⠑⠝⠑⠄⠀⠠⠗⠕⠍⠑⠗⠎⠅⠀⠍⠕⠞⠤</row>
<row>⠀⠀⠀⠀⠎⠞⠽⠅⠅⠑⠒⠀⠠⠍⠁⠗⠎</row>
But do you want PIP to generate list styles (number/bullets/etc) at all? Seems wrong as long as the bullets and numbers from the visual versions are present in the EPUB.
Your example is an ordered list, and it's not preformatted (i.e. no "•" or similar characters inline at the start of each <li>
). The list-style-type
CSS property can be used to change if and how the list is numbered/bulleted.
For testing, you could also try setting the attribute style="list-style-type: none;"
on the <li>
elements explicitly. Maybe there's an issue with priorities when using the NLB stylesheet as well as <style>
elements.
The indentation of the first line of list items is specified with text-indent
property and is independent of the list-style-type
attribute. It is set to 2
in NLBs default stylesheet. If you think the whole list item should be indented and not just the first line, we could maybe use margin-left: 2;
instead.
However, if this is an issue specific to how NLB should render braille, then you can open an issue on nlbdev/pipeline instead.
Actually, I think maybe you've placed the class attribute in your EPUB wrong. I think you should put the list-style-type-none
class on each <li>
element instead. Or you can change the CSS rule to:
li {
list-style-type:none;
}
Well, I haven't done anything in the EPUB; it is generated from the DTBook's list type="pl"
Side note: list-style
is an alias of list-style-type
.
@bertfrees aha, I didn't know that.
@matskober Ok, then I suppose the input DTBook was a preformatted list and the CSS rule in the output is maybe wrong. In any case the CSS generated by the nordic migrator when converting a dtbook to epub is not intended to be used when embossing braille.
OK, I thought it would be similar to the one I started out with; that EPUB3 to DTBook and back to EPUB3 would be a kind of a "round trip". And why does it matter, what the EPUB-css looks like; I thought the main css in PIP was in charge?
Yes it is supposed to be a round trip, so that the EPUB3 you put in and get out are essentially the same. But the DTBook to EPUB 3 script has not been used as much as the EPUB 3 to DTBook script, so maybe there are bugs in that script still.
It shouldn't matter what the EPUB CSS looks like, no. Practically all of the CSS is in NLBs stylesheet, we don't have some shared CSS across organizations.
Is this a real issue in pipeline-mod-braille?
Not sure what you are asking, @bertfrees
Just trying to find out whether this is an issue specific to NLB, or if there's a bug in the Pipeline according to you, or something else.
So if I understand correctly your issue is that the CSS list-style-type:none;
embedded in your EPUB has no effect in the resulting PEF? Have you got the option "Apply document-specific CSS" enabled? (see http://daisy.github.io/pipeline/modules/braille/epub3-to-pef)
Ok. The problem, as far as I remember, was that PIP generated list numbering when I didn't expect it. The list-style-type: none was present in the xhtml, I believe.
The CSS in the xhtml is expected to be ignored when the "Apply document-specific CSS" option is not enabled.
OK. Is it only ol and ul in xhtml? How should the EPUB be marked up, if there is not to be applied any list marks, neither number nor bullets? If the EPUB is based upon a PDF, specially a scanned PDF, the list marks are already there. So maybe the default should be not to add any list style?
On 19 December 2017 at 17:14, Bert Frees notifications@github.com wrote:
The CSS in the xhtml is expected to be ignored when the "Apply document-specific CSS" option is not enabled.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/daisy/pipeline-mod-braille/issues/167#issuecomment-352825350, or mute the thread https://github.com/notifications/unsubscribe-auth/AHpMMlysHJ-a7avurnCPtlaHkGAFXjTuks5tB-7wgaJpZM4PzwRN .
Yes, it's only ol and ul, XHTML hasn't got an element specially for preformatted lists. The default in CSS is numbers for ol and bullets for ul, which matches the semantics. I try to stay as faithful as possible to the CSS standard. So the default should stay like it is now I think.
But it isn't hard to apply a different style. If I understand correctly you already mark up preformatted lists with the class "list-style-type-none" today, and you even have the right CSS embedded in the EPUB 3. All you need to do is either enable the "Apply document-specific CSS" option, or provide the style via an external style sheet. If you are afraid that enabling the "Apply document-specific CSS" option would mess things up because there are also rules that should not be applied, you can split up the embedded style sheet in a "screen" part and an "embossed" part.
<link rel="stylesheet" type="text/css" media="screen" href="main.xsl"/>
<link rel="stylesheet" type="text/css" media="embossed" href="braille-specific.xsl"/>
Thanks, Bert, that was informativ!
On 20 December 2017 at 10:34, Bert Frees notifications@github.com wrote:
Yes, it's only ol and ul, XHTML hasn't got an element specially for preformatted lists. The default in CSS is numbers for ol and bullets for ul, which matches the semantics. I try to stay as faithful as possible to the CSS standard. So the default should stay like it is now I think.
But it isn't hard to apply a different style. If I understand correctly you already mark up preformatted lists with the class "list-style-type-none" today, and you even have the right CSS embedded in the EPUB 3. All you need to do is either enable the "Apply document-specific CSS" option, or provide the style via an external style sheet. If you are afraid that enabling the "Apply document-specific CSS" option would mess things up because there are also rules that should not be applied, you can split up the embedded style sheet in a "screen" part and an "embossed" part.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/daisy/pipeline-mod-braille/issues/167#issuecomment-353027146, or mute the thread https://github.com/notifications/unsubscribe-auth/AHpMMrEr_eAqkR81u838LTRKSKvddrxEks5tCOKdgaJpZM4PzwRN .
see job#1010, volume 19; "Ordliste". The list is not correct rendered:
@josteinaj @bertfrees