05-08-2013, 02:27 AM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: May 2013
Location: Brussels, Belgium
Device: Arnova 10
|
Css media="screen" and media="print"
Hi,
An idea I have is create a single ePub with different css to read it on a screen or print on paper or transparencies. I use Sigil to create the ePub. First questions:
When I use Calibre to convert from ePub to .pdf, the css media="print" does not work, Calibre use the media="screen" css. What do I wrong? (english is not my native language, so apologize for the errors) .xhtml files <head> <title>JustScan pour gestionnaires</title> <link href="../Styles/Style0000.css" rel="StyleSheet" type="text/css" /> <link href="../Styles/Style0001.css" media="screen, handled" rel="StyleSheet" type="text/css" /> <link href="../Styles/Style0002.css" media="print" rel="StyleSheet" type="text/css" /> </head> .css media="print" (extract, not all) @page { size: portrait; } @page paysage { size:landscape; } @page:left { margin-left:3cm; margin-right:4cm; } @page:right { margin-left:4cm; margin-right:3cm; } body { font-family:"Arial"; font-size:12pt; } h1 { page-break-before:right; font-family:"ArialBold"; font-size:200%; margin:8cm 6cm auto 6cm; text-align:center; border: 1px solid; box-shadow: 10px 12px 5px #888888; } |
05-08-2013, 03:49 AM | #2 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Media queries are not really supported. It seems to be better in ePUB3, but that is not widespread. The format is meant for electronic reading. You can print it of course (although that can be quite a challenge), but it is meant as end-state.
|
Advert | |
|
05-08-2013, 08:01 AM | #3 | |
Junior Member
Posts: 6
Karma: 10
Join Date: May 2013
Location: Brussels, Belgium
Device: Arnova 10
|
Not really, I've seen that.
page-break-befor:right; is supported but font-size:12pt; is not. Why ? I don't know and I can't understand the choice. Sigil is a mix of ePub2 and ePub3. source : http://code.google.com/p/sigil/wiki/EPUB3SupportIssues Quote:
Dommage, je l'espérais. Merci pour ta réponse, thanks for your answer. Christian |
|
05-08-2013, 09:35 AM | #4 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I am actually a bit surprised that page-break-before: right is supported for some font sizes. The fact is, we are not really working with pages here, but reflowing data. How to determine when to hit a white page on the right side? Most of the readers do support 'page-break-before: always'.
Just a quick remark, try to refrain in defining sizes in pt. Main reason for that is that those cannot be changed by the readers. If you keep it in em or %, the users can use a larger font or smaller font if they desire. Sigil is not a mix of ePUB2 and ePUB3. You misread the source. Sigil is an 100% ePUB2 editor. However, it will not automatically delete some ePUB3 elements like audio and video. That is a big difference. Regarding printing, that is why I say that printing can be a challenge. The format is not intended to be printed. |
05-08-2013, 10:22 AM | #5 | |
Junior Member
Posts: 6
Karma: 10
Join Date: May 2013
Location: Brussels, Belgium
Device: Arnova 10
|
I misunderstand it, I'm french speaking and never learned english at school (I leave school in 1975). I do my best, but...
Quote:
google trad (adpted) says : It's a shame / it's a pity, a closer version of the recommendations CSS3 would permit to use one editor (Sigil) and one utility (Calibre) to get multiple output formats, including paper, from a single HTML file. |
|
Advert | |
|
05-08-2013, 11:01 AM | #6 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
But it would not change millions of epub2 readers into epub3 readers. Epub is supposed to gracefully ignore things, but there is no reader even now that is 100% epub2 compatible.
I think that there is a feeling that Sigil should not try to be all things to all people. In part that is because I understand it is written in C, in contrast to Calibre which is written in Python. It is more work and not so modular, though not being a programmer I can not say with any certainty. Sigil produces simple code if that is what is fed into it. Calibre produces useable code which is hard to understand and full of css classes the purpose of which is only understood by Calibre itself. |
05-08-2013, 03:12 PM | #7 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Also, CSS3 is part of the ePUB3 specifications, not the ePUB2 specification...
|
Tags |
css, pdf, print |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"On The Media" review of the publishing industry | JonathanH | News | 1 | 04-23-2012 10:43 AM |
"Distance" digital media libraries | 1611mac | General Discussions | 3 | 03-12-2011 11:32 AM |
Springer Science+Business Media bringt "MyCopy" nach Europa | beachwanderer | Deutsches Forum | 0 | 05-17-2010 06:25 AM |
Call "print newspapers" as "snailpapers" because they arrive with news is 12 hrs old | taglines | Lounge | 4 | 02-05-2010 10:01 AM |