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 02-04-2013, 03:43 PM   #1
Robert29
Junior Member
Robert29 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2013
Device: none
Font size problem

Help please !

I've just started using Sigil - v 0.6.2 in a windows 7 32 bit machine and have started converting a book into an e-book.
I have got some pages converted into Libre Office Writer (.odt) and have saved them into an html file.

When I open them in the book view of Sigil, some of the paragraphs are in a smaller font than others, despite them being all in the same size in Libre Office.

When I look in the code page, the font sizes are all 4 but the code at the beginning of this paragraph is different to the code in other paragraphs which display correctly. I edited it to follow the pattern of the correctly displayed paragraphs and then in the book view, it was OK.

I don't want to do this throughout the book - any suggestions about what is wrong ?

The original coding is

<p class="first-line-indent" style="font-weight: normal"><font color="#000000"><font face="Times New Roman, serif"><font size="4"><span xml:lang="en-US">A</span></font><font color="#000000"><span xml:lang="en-US">lison</span></font> <font color="#000000"><span xml:lang="en-US">M</span></font><font color="#000000"><span xml:lang="en-US">aclean</span></font><font color="#000000"><span xml:lang="en-US">,</span></font> <font color="#000000"><span xml:lang="en-US">arms tight to her sides</span></font><font color="#000000"><span xml:lang="en-US">, fingers outstretched down her thighs, stood stiffly to attention on the substantial timbers of Mallaig pier, heels close, shapely legs pressed together, skirt gripped fast between her knees, stood and stared stony straight ahead of her at the Lochgarve -through it indeed, might have better described the quality of her regard, had the object been anything less material than the Hebridean mail-steamer. She did not allow her eyes to stray to the bridge, where the young First Officer was admir</span></font><font color="#000000"><span xml:lang="en-US">in</span></font><font color="#000000"><span xml:lang="en-US">g her with frank appreciation, nor to the serried ranks of passengers that lined the rail-</span></font><font color="#000000"><span xml:lang="en-US">-</span></font><font color="#000000"><span xml:lang="en-US">tourists, hikers, Skye-folk, and worse; she glared straight ahead, through number two port hole counting from the bows--and just the tip of the toe of her right brogue tapped the stout beam beneath her incessantly, though not sufficiently of course to loosen the grip of her knees. She ought to have known--to have thought of this. And she ought to have worn slacks, undoubtedly-- even to a christening. Even if she hadn't had stockings on, it wouldn't have been so bad. . . .</span></font></font></font></p>

I took out
<p class="first-line-indent" style="font-weight: normal"><font color="#000000"><font face="Times New Roman, serif"><font size="4"><span xml:lang="en-US">A</span></font><font color="#000000"><span xml:lang="en-US">lison</span></font> <font color="#000000"><span xml:lang="en-US">M</span></font><font color="#000000"><span xml:lang="en-US">aclean</span></font><font color="#000000"><span xml:lang="en-US">,</span></font> <font color="#000000"><span xml:lang="en-US">

and put in "Alison Maclean, " in front of "arms" and all was well.

Robert.
Robert29 is offline   Reply With Quote
Old 02-04-2013, 06:49 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Hi Robert,

Welcome to the forum....and welcome to the world of REALLY BAD html...

I am not familiar with Libre Office...maybe someone else can help there. In general you might try going back into Libre and selecting all of the text (ctrl-a) and then make them all the same size and style and color of font...just keep the bold and italics. Then see if it will allow you to save in a "clean html" or a "filtered html" like Word. If you can do that, it might clean up a lot of that mess.

Another option is to get very familiar with the search and replace functions of Sigil. you will need to find all of the extra tags and replace them with (nothing). You shouls only leave a <p> at the beginning of each paragraph, and a </p> at the end - and the tags for bold and italics. After you have it cleaned up you can select each of your chapter titles and make them a header - click on the "h#" key in sigil. That will leave you with a <h> and an </h> instead of <p></p>.

For the fancy stuff you can go to W3Schools where they have an excellent tutorial for html and css.


Cheers!
Turtle91 is offline   Reply With Quote
Advert
Old 02-04-2013, 07:08 PM   #3
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
If you haven't already done so, install the "Writer2LaTeX" extension in Libre Office. Then, use the Writer2xhtml export filters included in that extension to export clean xhtml or even an epub directly.

Additionally, in your LO document, be sure to use defined styles rather than "direct formatting" -- that is, define a paragraph style and apply it to the paragraphs. Define a character style for bold, italic, etc, and apply them to the bold, italic, etc. text. (You can do this via search and replace.)

Doing so will greatly simplify the xhtml code.

HTH

Albert
st_albert is online now   Reply With Quote
Old 02-04-2013, 07:18 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,845
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Stop using Sigil. If you have an ePub saved, delete it. The code is very poor and it is going to be a huge pain to clean up.

Take the HTML and convert it to ePub with Calibre. Then it will be a lot easier to edit with Sigil.
JSWolf is online now   Reply With Quote
Old 02-05-2013, 07:01 AM   #5
Robert29
Junior Member
Robert29 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2013
Device: none
Thanks for all the advice. Back to the drawing board now !!
I did start with Calibre but got terrible results and Calibre advised using Stigil first.
I also was using styles in LO but without the extension - so I'll try that first.

Robert.
Robert29 is offline   Reply With Quote
Advert
Old 02-05-2013, 08:15 AM   #6
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: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Calibre conversion will give you other HTML issues. This is really a case of the source not being of good quality. There is an extension for OpenOffice, perhaps that one could be used also on LibreOffice.
Toxaris is offline   Reply With Quote
Old 02-05-2013, 09:20 AM   #7
st_albert
Guru
st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'st_albert gives new meaning to the word 'superlative.'
 
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
Quote:
Originally Posted by Toxaris View Post
Calibre conversion will give you other HTML issues. This is really a case of the source not being of good quality. There is an extension for OpenOffice, perhaps that one could be used also on LibreOffice.
yes, quite often the key is to clean up the source document. I work with .doc or .rtf files from individual authors who all seem to have their own idiosyncratic ways of formatting paragraph indents, space afterward, not to mention bold, or italic words here and there. After applying styles to the formatting I want to preserve, in Libre Office, I select all text, right-click and choose "clear direct formatting." This gets rid of lots of hidden problems such as the OP may have encountered with varying font sizes, etc.

Then, using the writer2xhtml export extension one gets fairly clean, rational code. For example,

Code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
  "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
<!-- This file was converted to xhtml by Writer2xhtml ver. 1.2. See http://writer2latex.sourceforge.net for more info. -->

<head>
  <title>Thorne</title>
  <link href="../Styles/styles1.css" rel="stylesheet" type="text/css" />
</head>

<body dir="ltr">
  <h1 id="toc0" style="page-break-before:always">DAY ONE</h1>

  <p class="ttb-bodytext">Addison Thorne stood outside the unimposing apartment building and looked up. Lights were on in the corner apartment on the fourth floor, which meant Carl Foster was home and still awake. Thorne knew Foster was home in any event, but it was better he didn't have to wake the man.</p>

  <p class="ttb-bodytext">He walked up the short flight of steps and entered the complex. It lacked a security system, which was a minor relief, but not insurmountable even if one existed. If necessary, he could have climbed up the side of the building. No one was in the hallway this late in the evening, although the drone of late night television seeped through several doors as he walked down the hall, then up more stairs. Thorne wasn't concerned about waking curious neighbors, but it was best no one see him arrive and leave.</p>

  <p class="ttb-bodytext">The halls on the fourth floor were empty as well. Thorne walked to the door at the end on the right, knocked softly and whispered, "Foster."</p>

  <p class="ttb-bodytext">No one in the neighboring apartments could hear him, but Foster would. He had no choice. Thorne heard the volume from the television dim, then approaching footsteps. "Yes?" Foster asked as he opened the door.</p>

  <p class="ttb-bodytext">Even though Foster outweighed him by over one hundred pounds, Thorne pushed him back with one finger, then closed and locked the door behind him. "You alone?"</p>

  <p class="ttb-bodytext">The accountant's eyes grew large as he nodded.</p>
Compare this to the example shown in the OP.
st_albert is online now   Reply With Quote
Old 02-05-2013, 09:31 AM   #8
Robert29
Junior Member
Robert29 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2013
Device: none
I've installed the writer2xhtml extension and that has fixed it - no problems showing at all - although I haven't looked at the code. Visually, it looks fine.

Thank you very much !

Robert.
Robert29 is offline   Reply With Quote
Old 02-05-2013, 10:20 AM   #9
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
I'm delight to know that writer2xhtml solved your problem. I long ago gave up on the auto-export from Word processing programs to html. Instead, I paste the Word doc or Open Office doc (I believe that's the same as Libre) into word2cleanhtml.com online.

Does writer2xhtml work on Open Office as well?

I have seen many warnings that mobi files created with Calibre can and have been rejected by Amazon's KDP conversion. In contrast, I have had very good results uploading Sigil-generated epubs to the KDP.
Notjohn is offline   Reply With Quote
Old 02-05-2013, 11:06 AM   #10
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: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
For Word I use my own macro's that work fine for me. Solid clean code.
Toxaris is offline   Reply With Quote
Old 02-05-2013, 12:12 PM   #11
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,093
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
+1 for Toxaris' Macros!!
Turtle91 is offline   Reply With Quote
Old 02-06-2013, 06:37 AM   #12
Robert29
Junior Member
Robert29 began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Feb 2013
Device: none
I don't know if writer2xhtml would work in Open Office - presumably it would. I abandoned Open Office some time ago when the split happened and have been very happy with Libre Office. The authors keep pushing out updates and until this happened, I never had a problem with it. It does more than I want.
Now I have writer2xhtml, that problem has gone too !

Robert.
Robert29 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creator problem with font size in captions PeterValentine Kindle Formats 3 12-18-2011 06:59 AM
0.7.58 Mobi Font Size problem Blossom Conversion 15 04-30-2011 09:27 PM
Font-size problem, Kindle 2 hkdorama Kindle Formats 2 11-07-2010 03:57 PM
Problem with epub to lrf with changing font size and line spacing kleinbiker Calibre 4 12-17-2009 08:55 AM
Another font size problem KlondikeGeoff Sony Reader 56 12-30-2006 07:34 PM


All times are GMT -4. The time now is 12:01 PM.


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