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 04-15-2024, 09:53 AM   #1
lethalox
Junior Member
lethalox began at the beginning.
 
lethalox's Avatar
 
Posts: 5
Karma: 10
Join Date: Jun 2007
Location: New Paltz, New York, 12561
Device: Sony eReader PRS-500
Using the Editor for a newbie

I have short story that I converted from an .lrf file. Unfortunately the conversion is a messed up. With breaks in the text artificially sprinkled throughout the document. Since I also have the short story in a pbook, it was easy enough to address. Where I am struggling is that I can seem to get an a text indent for every line break.

Here is the stylesheet.
.body {
display: block;
font-size: 1.125em;
line-height: 1.2;
padding-left: 0;
padding-right: 0;
margin: 0 5pt
}
.bs {
color: rgb(0, 0, 0);
display: block;
font-size: 0.88889em;
font-weight: normal;
text-align: left;
text-indent: 10pt;
border: rgb(0, 0, 0) solid 0;
margin: 0
}
.calibre {
display: block
text-indent: 30pt;
}
.calibre1 {
display: block;
margin: 1em 0
text-indent: 30pt;
}


The line breaks are marked as <br class="calibre"/>. But at each line, there is no indent. A paragraph break will get an indent with <p class="calibre1">.


And help would be much appreciated.
Much thanks!
lethalox is offline   Reply With Quote
Old 04-15-2024, 10:01 AM   #2
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 11,521
Karma: 230505502
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Replace all instances of <br class="calibre"/> with </p><p class="calibre1">.
Sirtel is online now   Reply With Quote
Old 04-15-2024, 11:16 AM   #3
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: 30,451
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
You have one of those books with 1 CODED paragraph and BR to make a newline

You need to replace all the <br class="calibre"/>
with
</p> <p class="calibre1">

That ends the current actual paragraph and the starts a new one (using the remainder of the text)
theducks is offline   Reply With Quote
Old 04-15-2024, 11:43 AM   #4
lethalox
Junior Member
lethalox began at the beginning.
 
lethalox's Avatar
 
Posts: 5
Karma: 10
Join Date: Jun 2007
Location: New Paltz, New York, 12561
Device: Sony eReader PRS-500
Using so does the br tag and class not support an indent?
I understand using the <p> gets the indent but <p> also creates a lot of visual separation between paragraphs that would not like to have.

Much thx...
lethalox is offline   Reply With Quote
Old 04-15-2024, 02:23 PM   #5
Sirtel
Grand Sorcerer
Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.Sirtel ought to be getting tired of karma fortunes by now.
 
Sirtel's Avatar
 
Posts: 11,521
Karma: 230505502
Join Date: Jan 2014
Location: Estonia
Device: Kobo Sage & Libra 2
Quote:
Originally Posted by lethalox View Post
Using so does the br tag and class not support an indent?
I understand using the <p> gets the indent but <p> also creates a lot of visual separation between paragraphs that would not like to have.

Much thx...
That's because you have a 1em margin in your paragraph code. Change that to 0 if you don't want any spaces between paragraphs.
Sirtel is online now   Reply With Quote
Old 04-15-2024, 04:43 PM   #6
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: 30,451
Karma: 58055868
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 lethalox View Post
Using so does the br tag and class not support an indent?
I understand using the <p> gets the indent but <p> also creates a lot of visual separation between paragraphs that would not like to have.

Much thx...
Indent belongs to a Block Level tag.
BR is inside a the text, so all you can do is Line height.

W3schools is where you can learn about CSS. Not everything you see there is aimed at Web pages. EPUB is a subset
theducks is offline   Reply With Quote
Old 04-15-2024, 06:12 PM   #7
gbm
Wizard
gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.gbm ought to be getting tired of karma fortunes by now.
 
Posts: 2,128
Karma: 8796706
Join Date: Jun 2010
Device: Kobo Clara HD,Hisence Sero 7 Pro RIP, Nook STR, jetbook lite
Look at the css for the calibre1 style, it has 1em space for the top and bottom margins.

Code:
If the margin property has two values:

    margin: 10px 5px;
        top and bottom margins are 10px
        right and left margins are 5px
Change it to:
Code:
.calibre1 {
display: block;
margin: 0;
text-indent: 30pt;
}
Code:
.calibre1 {
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: 0;
   text-indent: 30pt;

}
]
See https://www.w3schools.com/cssref/pr_margin.php for explanation of css margins.

bernie

Quote:
Originally Posted by lethalox View Post
I have short story that I converted from an .lrf file. Unfortunately the conversion is a messed up. With breaks in the text artificially sprinkled throughout the document. Since I also have the short story in a pbook, it was easy enough to address. Where I am struggling is that I can seem to get an a text indent for every line break.

Here is the stylesheet.
Spoiler:
.body {
display: block;
font-size: 1.125em;
line-height: 1.2;
padding-left: 0;
padding-right: 0;
margin: 0 5pt
}
.bs {
color: rgb(0, 0, 0);
display: block;
font-size: 0.88889em;
font-weight: normal;
text-align: left;
text-indent: 10pt;
border: rgb(0, 0, 0) solid 0;
margin: 0
}
.calibre {
display: block
text-indent: 30pt;
}
.calibre1 {
display: block;
margin: 1em 0
text-indent: 30pt;
}


The line breaks are marked as <br class="calibre"/>. But at each line, there is no indent. A paragraph break will get an indent with <p class="calibre1">.


And help would be much appreciated.
Much thanks!


Quote:
Originally Posted by lethalox View Post
Using so does the br tag and class not support an indent?
I understand using the <p> gets the indent but <p> also creates a lot of visual separation between paragraphs that would not like to have.

Much thx...
gbm is offline   Reply With Quote
Old 04-19-2024, 04:30 PM   #8
lethalox
Junior Member
lethalox began at the beginning.
 
lethalox's Avatar
 
Posts: 5
Karma: 10
Join Date: Jun 2007
Location: New Paltz, New York, 12561
Device: Sony eReader PRS-500
Thx

Thank you for all you support. I have learned much....
lethalox is offline   Reply With Quote
Reply

Tags
css


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Editor Plugin] Editor Chains capink Plugins 94 07-03-2024 08:26 PM
Editor doesn't start if an editor plugins fails Terisa de morgan Editor 4 12-29-2020 02:47 AM
[Editor Plugin] - Enabling 'Customize plugin' dialog directly from the Editor thiago.eec Development 7 01-09-2019 09:05 PM
Editor: ToC Editor: Start entry macnab69 Editor 2 06-25-2014 12:15 PM
Book Editor TOC Editor Isue? weberr Editor 2 04-17-2014 12:13 PM


All times are GMT -4. The time now is 09:45 AM.


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