07-13-2011, 04:33 AM | #16 | ||
Wizard
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
Quote:
Quote:
* kerning should, of course, always be set to metrics (!), but this isn't really relevant to ebooks |
||
07-13-2011, 04:51 AM | #17 |
Wizard
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
|
07-13-2011, 06:02 AM | #18 |
Junior Member
Posts: 9
Karma: 10
Join Date: Jul 2011
Device: iPad / iPhone
|
Adding <span> & </span>
I use Notepad++ to edit my XHTML and CSS. Today I did a very similar thing you are asking about I think.
I did a find and replace search like this. FIND: <p>(.*)</p> REPLACE: <p><span>\1</span></p> The (.*) is a wildcard search I believe so it found every instance in my XTHML page that started with <p> had text in between and then ended with </p> and replaced it with the <p><span> and </span></p>. If you use them, don't forget to add the class after the p, for example <p class="bodytext">(.*)</p> It worked for me and 99 changes were done in a little under a minute. |
07-20-2011, 09:46 PM | #19 |
Zealot
Posts: 107
Karma: 1000
Join Date: Sep 2010
Location: Melbourne, Australia
Device: iPad2, Kindle
|
Fantastic, I will try this out.
On a related issue, when my * is centered, spacing above is not working as it should. My CSS is: p.asterisk { font-family : Georgia, serif; font-weight : normal; font-style : normal; font-size : 1em; text-decoration : none; font-variant : normal; line-height : 1.2; text-align : center; color : #000000; text-indent : 0px; margin : 8px 0px; } I have tried editing this line, as: margin : 8px 0px 8px 0px; But it didn't make any difference. |
07-21-2011, 01:42 AM | #20 | |
Zealot
Posts: 107
Karma: 1000
Join Date: Sep 2010
Location: Melbourne, Australia
Device: iPad2, Kindle
|
Quote:
<p class="bodycenter"><span>text text text</span></p> Is there a way to adjust and use this find/replace methodology? |
|
07-22-2011, 12:18 AM | #21 | |
Junior Member
Posts: 9
Karma: 10
Join Date: Jul 2011
Device: iPad / iPhone
|
Quote:
<p class="bodycenter"><span>(.*)</span></p> I just tried it in Notepad++ and it worked. Basically you are just telling it to find each individual instance of code that starts with <p class="bodycenter"><span> and ends with </span></p>. So I guess could say it is a more refined search than the original one I posted up and probably a good thing to remember. Otherwise if you already had a line of code like you suggested, the original find and replace method would produce the following result: <p class="bodycenter"><span><span>text text text</span></span></p> Does this help you out? |
|
08-29-2011, 04:28 AM | #22 |
Wizard
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
I know this is a relatively old thread, but rather than start another may I ask whether you have found a solution?
|
08-29-2011, 04:45 AM | #23 |
Zealot
Posts: 107
Karma: 1000
Join Date: Sep 2010
Location: Melbourne, Australia
Device: iPad2, Kindle
|
I was doing a conversion today and didn't require a span around my centered asterisk. As there was only one in the book, I'm not convinced that ibooks have fixed the problem (I'd had some text center correctly before). I added a span just in case.
Not really an answer, but I haven't needed to revisit this for a while. I'm hoping coldplayplayers tip will work. |
08-31-2011, 06:27 AM | #24 | |
Wizard
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
I've just started trying to produce ebooks for the iPad, and am running into many problems - mainly centering text but some others. Something which is driving me frantic at the moment is that I have produced several ePub ebooks using a template. Some of them when read on an iPad centre the text where I have required that, and some of them, using the same template, do not. And I don't know why. Also, some of the images show on an iPad the same as they do on my Sony, and some do not. For example I use a logo for myself which I set to 25% of the screen width, and it looks the same on the iPad as it does on the Sony. Some images are floated to the right side of the screen and set to 50% width, and look the same on the iPad as on the Sony. But another image which is centred and set to 50% width looks much wider on the iPad than it does on the Sony. And I don't know why, nor how to make look the same on the iPad as on the Sony. It seems to my jaundiced eye that Apple ePub is only a loose approximation of real ePub. If ever I find out why these difference occur and how to fix them I'll ask the Moderator to start a sticky so we can all add explanations and fixes. |
|
Tags |
alignment, centering, epub |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
need help on how to align a table to the right | NASCARaddicted | ePub | 6 | 02-18-2011 01:46 PM |
I can not align the text...help please! XD | derfel_spain | ePub | 17 | 12-18-2010 09:45 AM |
Can you delete div with align=center | mufc | Recipes | 4 | 12-10-2010 06:23 PM |
ePub files do not center a custom <hr /> tag! | Haidon | ePub | 2 | 08-21-2010 04:29 AM |
Text becomes center-aligned when converting | Alfy | Calibre | 12 | 01-19-2009 12:41 AM |