Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-08-2013, 02:27 AM   #1
BrisChri
Junior Member
BrisChri began at the beginning.
 
BrisChri's Avatar
 
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:
  • Why does css media="print" not work correctly ? (ignore margin-top for the first page for example)
  • Is it possible to print the entire project?

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;
}
BrisChri is offline   Reply With Quote
Old 05-08-2013, 03:49 AM   #2
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,960
Karma: 3363559
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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.
Toxaris is offline   Reply With Quote
Old 05-08-2013, 08:01 AM   #3
BrisChri
Junior Member
BrisChri began at the beginning.
 
BrisChri's Avatar
 
Posts: 6
Karma: 10
Join Date: May 2013
Location: Brussels, Belgium
Device: Arnova 10
Quote:
Originally Posted by Toxaris View Post
Media queries are not really supported.
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.
Quote:
Originally Posted by Toxaris View Post
It seems to be better in ePUB3, but that is not widespread.
Sigil is a mix of ePub2 and ePub3.
source : http://code.google.com/p/sigil/wiki/EPUB3SupportIssues
Quote:
Originally Posted by Toxaris View Post
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.
Print result is strange. Big letters, one or two, if short, sentences on a page. Nope, I can't print an eBook using Calibre or a page using Sigil...

Dommage, je l'espérais.
Merci pour ta réponse, thanks for your answer.

Christian
BrisChri is offline   Reply With Quote
Old 05-08-2013, 09:35 AM   #4
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,960
Karma: 3363559
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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.
Toxaris is offline   Reply With Quote
Old 05-08-2013, 10:22 AM   #5
BrisChri
Junior Member
BrisChri began at the beginning.
 
BrisChri's Avatar
 
Posts: 6
Karma: 10
Join Date: May 2013
Location: Brussels, Belgium
Device: Arnova 10
Quote:
Originally Posted by Toxaris View Post
You misread the source.
I misunderstand it, I'm french speaking and never learned english at school (I leave school in 1975). I do my best, but...
Quote:
Originally Posted by Toxaris View Post
Regarding printing, that is why I say that printing can be a challenge. The format is not intended to be printed.
C'est dommage, une version plus proche des recommandations CSS3 permettrait d'utiliser un éditeur (Sigil) et un utilitaire (Calibre) pour sortir plusieurs formats de sortie, dont le format papier, d'un seul fichier HTML.

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.
BrisChri is offline   Reply With Quote
Old 05-08-2013, 11:01 AM   #6
mrmikel
Book Twiddler
mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.mrmikel ought to be getting tired of karma fortunes by now.
 
Posts: 2,029
Karma: 1424487
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.
mrmikel is offline   Reply With Quote
Old 05-08-2013, 03:12 PM   #7
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 2,960
Karma: 3363559
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Also, CSS3 is part of the ePUB3 specifications, not the ePUB2 specification...
Toxaris is offline   Reply With Quote
Reply

Tags
css, pdf, print

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 08:15 PM.


MobileRead.com is a privately owned, operated and funded community.