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-14-2015, 05:37 PM   #1
shootist
Zealot
shootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned off
 
Posts: 115
Karma: 97138
Join Date: Jul 2010
Device: nook, prs-650, prs-350, galaxy tab 2
Css code to indent first paragraph?

With the help of some I figured out my problem with the oversize first letter of each chapter, however when I resize the letter there is no indention for the first paragraph. Can anyone advise me the code to make an indention for that paragraph?
shootist is offline   Reply With Quote
Old 11-14-2015, 06:07 PM   #2
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: 74,044
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Normally, the first paragraph of a chapter or first paragraph after a section break isn't indented. if this is what's happening, then just leave it be.
JSWolf is online now   Reply With Quote
Advert
Old 11-14-2015, 09:33 PM   #3
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: 20,590
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by shootist View Post
With the help of some I figured out my problem with the oversize first letter of each chapter, however when I resize the letter there is no indention for the first paragraph. Can anyone advise me the code to make an indention for that paragraph?
@shootist - if my memory serves me right, you convert Word DOCX to EPUB, if so, do it in there via a Word Style and calibre will honor it.

But as JSWolf says its traditional to not indent the first paragraph in a chapter or scene - not sure what the rational for that is. I suspect it harks back to the likes of King Ælfred the Great writing illuminated manuscripts on vellum

BR
BetterRed is offline   Reply With Quote
Old 11-14-2015, 10:22 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: 74,044
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by BetterRed View Post
But as JSWolf says its traditional to not indent the first paragraph in a chapter or scene - not sure what the rational for that is. I suspect it harks back to the likes of King Ælfred the Great writing illuminated manuscripts on vellum

BR
From what I suspect, it stems from wanting to show that you are at a new chapter or section. To me, it just looks odd with indents where we would normally have no indents.
JSWolf is online now   Reply With Quote
Old 11-14-2015, 10:22 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,818
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by shootist View Post
With the help of some I figured out my problem with the oversize first letter of each chapter, however when I resize the letter there is no indention for the first paragraph. Can anyone advise me the code to make an indention for that paragraph?
When the first letter receives special treatment (big or Drop), it is usually NOT indented

Another visual treatment is to use a Larger Left Margin and do a Hanging Indent (text-indent: -2em; )
theducks is offline   Reply With Quote
Advert
Old 11-14-2015, 10:31 PM   #6
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: 74,044
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post
Another visual treatment is to use a Larger Left Margin and do a Hanging Indent (text-indent: -2em; )
But that does look awful.
JSWolf is online now   Reply With Quote
Old 11-15-2015, 01:11 PM   #7
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,818
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by JSWolf View Post
But that does look awful.
Technique not Critique
theducks is offline   Reply With Quote
Old 11-15-2015, 08:28 PM   #8
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,078
Karma: 412718
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
Quote:
Originally Posted by BetterRed View Post
But as JSWolf says its traditional to not indent the first paragraph in a chapter or scene - not sure what the rational for that is. I suspect it harks back to the likes of King Ælfred the Great writing illuminated manuscripts on vellum
He was before my time, but I was taught that paragraphs should be styled either with an (a) indent, OR (b) a line before, but not both. Since the first paragraph has a header or break before it, I always assumed that counted as a line before (b) so it didn't get an indent (a).

For my personal reading, I use a line before for every paragraph since I find it easier to read that way.

Last edited by phossler; 11-15-2015 at 08:30 PM.
phossler is offline   Reply With Quote
Old 11-18-2015, 11:55 AM   #9
Sam Sahara
Connoisseur
Sam Sahara doesn't litterSam Sahara doesn't litterSam Sahara doesn't litter
 
Posts: 79
Karma: 228
Join Date: Aug 2014
Device: lambda k21
Quote:
Originally Posted by shootist View Post
With the help of some I figured out my problem with the oversize first letter of each chapter, however when I resize the letter there is no indention for the first paragraph. Can anyone advise me the code to make an indention for that paragraph?
If you are speaking about drop-caps this article can be useful.
Sam Sahara is offline   Reply With Quote
Old 12-24-2015, 10:39 AM   #10
shootist
Zealot
shootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned off
 
Posts: 115
Karma: 97138
Join Date: Jul 2010
Device: nook, prs-650, prs-350, galaxy tab 2
Can anyone post the code to change the size of the first letter that in the dropcaps?
shootist is offline   Reply With Quote
Old 12-24-2015, 11:16 AM   #11
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: 74,044
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by shootist View Post
Can anyone post the code to change the size of the first letter that in the dropcaps?
The problem with drop caps is it doesn't work well if the font size is changed, the line height is changed, and/or the font is changed. So it's best to not use drop caps. A larger cap is best for the first paragraph of the chapter.
JSWolf is online now   Reply With Quote
Old 12-24-2015, 12:01 PM   #12
Thom*
The Fumbler
Thom* began at the beginning.
 
Posts: 66
Karma: 10
Join Date: Jun 2015
Device: android 4.2/fbreader
The size of the first letter in a paragraph is probably controled by a CSS file. In the CSS file you would find something like:

span.dropcaps
{
float: left;
font-size: 100px;
line-height: 100px;
padding-top: 1px;
margin-top: -.10em;
margin-right: .09em;
color: #5E5E5E;
}

Then the first character in each paragraph is coded something like this:

<span class="dropcaps">W</span>

"Dropcaps" is the class name and it could be something else. Whatever is in the <span> statement is what you are looking for.

You can change the size of the first letter by changing the class in the CSS file. For example, to reduce the size from 100 pixels to 50 pixels change the CSS file to look like this:

span.dropcaps
{
float: left;
font-size: 50px;
line-height: 50px;
padding-top: 1px;
margin-top: -.10em;
margin-right: .09em;
color: #5E5E5E;
}

That will effectively change the size of all letter surrounded by <span class="dropcaps">Whatever</span>.

An alternative is to eliminate the "dropcaps" altogether resulting in a font size that is normal for the paragraph. This can be accomplished with a Regex search and replace:

Search: <span class="dropcaps">(.*?)</span>
Replace: \1

Actually, I would change that search to <span class="dropcaps">(((?!<span).)*?)</span> just in case there exist nested spans in you book.

I hope that helps.

Merry Christmas
Thom* is offline   Reply With Quote
Old 12-24-2015, 12:50 PM   #13
shootist
Zealot
shootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned offshootist can read ebooks with the screen turned off
 
Posts: 115
Karma: 97138
Join Date: Jul 2010
Device: nook, prs-650, prs-350, galaxy tab 2
Thanks guys. I took the suggestion to eliminate drop caps altogether. That is much better.
shootist is offline   Reply With Quote
Old 12-24-2015, 04:59 PM   #14
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: 74,044
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Something like this works well...

Code:
.firstletter {
font-size: 2em;
line-height: 0
}
JSWolf is online now   Reply With Quote
Old 12-30-2015, 06:17 AM   #15
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
Quote:
Originally Posted by shootist View Post
Thanks guys. I took the suggestion to eliminate drop caps altogether. That is much better.
Very wise (IMHO).

I use boldface caps at 90% for the first several words. Looks great (IMHO).

span.smallcap {
font-size: 90%;
font-weight: bold;
}
Notjohn is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to block indent a paragraph? Center a seperator? Tarana Editor 10 08-23-2015 09:54 AM
How do I set paragraph indent? pargoo Sigil 17 11-09-2013 06:38 PM
Selective paragraph indent Leonatus Writer2ePub 8 10-31-2013 04:22 PM
HTML- Paragraph indent w/ no spaces? Help please? Joseph Picard Workshop 36 07-20-2012 12:35 PM
Preference: Paragraph indent or a little paragraph spacing? 1611mac General Discussions 48 11-11-2011 12:43 AM


All times are GMT -4. The time now is 07:53 AM.


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