Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 11-18-2016, 03:40 AM   #46
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
The correct place for that is in the Check Book tool: https://github.com/kovidgoyal/calibr...8301e8bf1c881d
kovidgoyal is offline   Reply With Quote
Old 11-18-2016, 05:17 AM   #47
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
Good point to have this information available.
Is it maybe thinkable to have this information via command line tools available too?
Divingduck is offline   Reply With Quote
Advert
Old 11-18-2016, 05:29 AM   #48
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
If someday I create a command line interface for check book, sure.
kovidgoyal is offline   Reply With Quote
Old 11-18-2016, 06:06 AM   #49
Divingduck
Wizard
Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.Divingduck ought to be getting tired of karma fortunes by now.
 
Posts: 1,166
Karma: 1410083
Join Date: Nov 2010
Location: Germany
Device: Sony PRS-650
+1
Divingduck is offline   Reply With Quote
Old 11-18-2016, 06:23 AM   #50
jbacelar
Interested in the matter
jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.jbacelar ought to be getting tired of karma fortunes by now.
 
jbacelar's Avatar
 
Posts: 421
Karma: 426094
Join Date: Dec 2011
Location: Spain, south coast
Device: Pocketbook InkPad 3
jbacelar is offline   Reply With Quote
Advert
Old 11-25-2016, 10:17 AM   #51
hidden.platypus
Connoisseur
hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.
 
hidden.platypus's Avatar
 
Posts: 89
Karma: 190508
Join Date: May 2014
Device: Android
Quote:
Originally Posted by kovidgoyal View Post
Just use it and let me know if it does something unexpected
So I ran into another issue I either wasn't seeing, or was unaware of earlier.

When converting from docx, even after embedding the font, Calibre doesn't appear to reference the base font in stylesheet.css.

To be clear the only font it doesn't reference in that way appears to be the "base font" or body text font. I use the term "base font" because that's the nomenclature the conversion tools use. Even if I specify, during the conversion, that Arial is the base font it does not reference Arial.

It does not do this for other headings. So, in this same document, the headings are Arial, and they are referenced.

It doesn't matter whether the font is embedded in the docx file or not.

The font gets embedded now, and there is a font-face definition, but it isn't referenced in the stylesheet.

Calibre generates this code:

Code:
.block_5 {
    color: black;
    display: block;
    margin: 0 0 12pt;
    padding: 0
    }
Why doesn't it do this:

Code:
.block_5 {
    font-family: "Arial", sans-serif;
    color: black;
    display: block;
    margin: 0 0 12pt;
    padding: 0
    }

For the heading Calibre generates:

Code:
.block_11 {
    color: #2E74B5;
    display: block;
    font-family: "Arial", sans-serif;
    font-size: 2em;
    font-weight: normal;
    line-height: 1.08;
    page-break-after: avoid;
    page-break-inside: avoid;
    text-align: center;
    padding: 0;
    margin: 12pt 0 0
    }

Why the disparity?
hidden.platypus is offline   Reply With Quote
Old 11-25-2016, 09:58 PM   #52
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I need a sample docx file to tell you more.
kovidgoyal is offline   Reply With Quote
Old 11-26-2016, 11:47 AM   #53
hidden.platypus
Connoisseur
hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.
 
hidden.platypus's Avatar
 
Posts: 89
Karma: 190508
Join Date: May 2014
Device: Android
Quote:
Originally Posted by kovidgoyal View Post
I need a sample docx file to tell you more.
Hi Kovid,


I've attached one here.

(FYI, the file I attached is a docx file. The forum doesn't like me uploading a docx file, so I renamed to doc. You should rename to docx before you start tinkering I think.)

In this Word file the heading is Cochin LT.

Calibre generates this css for the heading:

Code:
.block_ {
    display: block;
    font-family: "Cochin LT", serif;
    font-size: 2em;
    font-weight: normal;
    line-height: 1.2;
    page-break-after: avoid;
    page-break-inside: avoid;
    text-align: center;
    padding: 0;
    margin: 12pt 0 0 28.8pt
    }

The base font / body text is supposed to be Arial

Calibre generates this:

Code:
.block_1 {
    color: black;
    display: block;
    line-height: 1.2;
    padding: 0;
    margin: 0 0 12pt
    }
I have one more style in the document. Indented, and in a different font just to test.

Calibre generates this:
Code:
.block_4 {
    color: black;
    display: block;
    font-family: "URW Palladio L", serif;
    font-size: 0.75em;
    padding: 0;
    margin: 0 0 8pt 28.8pt
    }

I am not even sure I understand how Calibre gets the blue color to show in headings, when the CSS doesn't specify a color.

The only color reference is waaay down in the stylesheet:

Code:
.calibre {
  color: #2E74B5;
  display: block;
  font-family: "Arial", sans-serif;
  font-size: 1em;
  padding-left: 0;
  padding-right: 0;
  margin: 0 5pt;
}
But this doesn't seem to be referenced anywhere.

Although, if I remove it, the heading loses its blue color, and the base font is no longer Arial.

Curiouser and curiouser.
Attached Files
File Type: doc Fishing - Unknown.doc (17.6 KB, 191 views)

Last edited by hidden.platypus; 11-26-2016 at 11:49 AM. Reason: Typo
hidden.platypus is offline   Reply With Quote
Old 11-26-2016, 03:14 PM   #54
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,732
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@hidden.platypus - if you look at the Live CSS Panel in the editor, it will show the styles that are used to create the 'final style'.

I imported your docx into editor, here are a couple of examples of what I'm seeing in Live CSS.

Click image for larger version

Name:	1.jpg
Views:	212
Size:	262.9 KB
ID:	153242 Click image for larger version

Name:	2.jpg
Views:	209
Size:	250.1 KB
ID:	153243

I don't see the problem - the final styles have a font specified. And what I see in Word, the editor preview, and the ebook viewer, look pretty much the same to me.

Here is the style sheet the DOCX import generated

Spoiler:
body {
font-family: "Arial", sans-serif;
font-size: 13pt;
color: #2E74B5;
}
/* In word all paragraphs have zero margins unless explicitly specified in a style */
p, h1, h2, h3, h4, h5, h6, div {
margin: 0;
padding: 0;
}
/* In word headings only have bold font if explicitly specified */
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
}
/* Setting padding-left to zero breaks rendering of lists, so we only set the other values to zero and leave padding-left for the user-agent */
ul, ol {
margin: 0;
padding-top: 0;
padding-bottom: 0;
padding-right: 0;
}
/* The word hyperlink styling will set text-decoration to underline if needed */
a {
text-decoration: none;
}
sup.noteref a {
text-decoration: none;
}
h1.notes-header {
page-break-before: always;
}
dl.notes dt {
font-size: large;
}
dl.notes dt a {
text-decoration: none;
}
dl.notes dd {
page-break-after: always;
}
dl.notes dd:last-of-type {
page-break-after: avoid;
}
span.tab {
white-space: pre;
}
p.index-entry {
text-indent: 0;
}
p.index-entry a:visited {
color: blue;
}
p.index-entry a:hover {
color: red;
}
.block_1 {
padding-top: 0;
margin-bottom: 12pt;
color: black;
}
.block_2 {
page-break-inside: avoid;
page-break-after: avoid;
margin-left: 28.8pt;
margin-top: 12pt;
padding-bottom: 0;
margin-bottom: 0;
font-family: "Cochin LT", serif;
font-size: 24pt;
text-align: center;
}
.block_3 {
padding-top: 0;
padding-bottom: 0;
margin-bottom: 12pt;
color: black;
}
.block_4 {
padding-top: 0;
padding-bottom: 0;
margin-bottom: 12pt;
font-family: serif;
font-size: 10pt;
color: black;
}
.block_5 {
margin-left: 28.8pt;
padding-top: 0;
padding-bottom: 0;
margin-bottom: 8pt;
font-family: "URW Palladio L", serif;
font-size: 12pt;
color: black;
}
.block_6 {
page-break-inside: avoid;
page-break-after: avoid;
margin-left: 28.8pt;
padding-top: 0;
margin-top: 12pt;
padding-bottom: 0;
margin-bottom: 0;
font-family: "Cochin LT", serif;
font-size: 24pt;
text-align: center;
}


BR

Last edited by BetterRed; 11-26-2016 at 03:48 PM. Reason: added style sheet
BetterRed is offline   Reply With Quote
Old 11-26-2016, 08:21 PM   #55
hidden.platypus
Connoisseur
hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.
 
hidden.platypus's Avatar
 
Posts: 89
Karma: 190508
Join Date: May 2014
Device: Android
Hi Red,

Thanks for showing me a new tool.

Was not aware there was a live CSS preview.


The stuff that you have in the spoiler text includes a few comments.

Are those comments yours, or were they generated in the stylesheet.

If they are not yours, mine definitely does not generate that way.

I do not have a body style in my stylesheet.

I see you have the do not split on page breaks option enabled.

Even when I convert like that, I don't get a body style.

Are you on a PC?
hidden.platypus is offline   Reply With Quote
Old 11-26-2016, 10:06 PM   #56
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@hp: BetterRed is showing you the result of directly importing the docx file into the editor rather than first converting to EPUB Use File->Import a DOCX or HTML file as a new book to get the same result. This is a better route to go if you intend to edit the epub, as the conversion flattens the css making it harder to edit it.
kovidgoyal is offline   Reply With Quote
Old 11-26-2016, 10:08 PM   #57
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,359
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
And as for your question,

the .calibre style is what is used for the body via the class attribute. (conversion, as I mentioned before, flattens all CSS, converting it into classes). Use the Live CSS tool in the editor as BR showed you to see the effective styles that apply to any element.
kovidgoyal is offline   Reply With Quote
Old 11-27-2016, 02:20 AM   #58
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,732
Karma: 29711016
Join Date: Mar 2012
Location: Sydney Australia
Device: none
@hp - my "I imported your docx into editor" and "style sheet the DOCX import generated" were intended as subtle hints you should use the same approach

The CSS is what the import produced, so the comments are Kovid's.

I can't recalling seeing a split on breaks option for DOCX import. Many of my DOCX imports/converts are relatively short, so I prefer to start with one file, and then if needs be, split it myself.

Yes on a PC.

BR
BetterRed is offline   Reply With Quote
Old 02-04-2017, 09:16 AM   #59
hidden.platypus
Connoisseur
hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.hidden.platypus can program the VCR without an owner's manual.
 
hidden.platypus's Avatar
 
Posts: 89
Karma: 190508
Join Date: May 2014
Device: Android
I neglected to say Thank you to both of you before you.

I apologize.

Thank you both.
hidden.platypus is offline   Reply With Quote
Old 07-08-2017, 12:40 PM   #60
renefomby
Junior Member
renefomby began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Jul 2017
Device: Kindle fire
Calibre epub to Nook not showing specialized fonts

I am trying to use Calibre to convert my book into epub, then upload to Nook. The conversion worked great creating an ebook that I then used Kindle Previewer to convert to mobi, then uploaded to Amazon. But the epub version shows the fonts correctly, but when it uploads to Nook they disappear. I have selected embedded fonts in the editor, but still no luck. Any ideas, anyone?
renefomby is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can it embed fonts? chalimac Kobo Reader 1 06-27-2017 05:46 PM
How to embed fonts in ePub after Calibre fiery ePub 79 12-05-2016 02:18 AM
Is it possible to really embed fonts yet? LaurelRusswurm ePub 25 11-17-2011 10:25 PM
Is it possible to UN embed fonts? lmronan Sigil 14 06-04-2010 09:26 AM


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


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