![]() |
#1 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 242
Karma: 51054
Join Date: Jun 2011
Location: Belleville, IL
Device: Kindle-3
|
A Way To Keep "Certain" Lines From Indenting?
Whenever Calibre sees a blockquote, it automatically indents the first line of it just like any other paragraph. But often a blockquote will contain something like a poem or a song where you wouldn't want the first line indented. Is there a way to stop individual lines from being indented without having to resort to a 'pre' tag? (which just brings about a new set of problems). This is NOT what I want:
![]() |
![]() |
![]() |
![]() |
#2 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Put this in extra css under the Look and Feel settings:
Code:
blockquote > p:first-child {text-indent:0;} |
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Quote:
Edit: that may not work, see this post for further discussion/links: https://www.mobileread.com/forums/sho...d.php?t=112344 Based on the image you may be able to get away with this: Code:
blockquote > p {text-indent:0;} Last edited by ldolse; 07-28-2011 at 11:17 PM. |
|
![]() |
![]() |
![]() |
#4 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 242
Karma: 51054
Join Date: Jun 2011
Location: Belleville, IL
Device: Kindle-3
|
Thanks, but neither of those seem to work. I even tried the following setting all values to zero, and that didn't work either, so I guess CSS isn't going to help.
<STYLE type="text/css"> <!-- BLOCKQUOTE.passage P {text-indent: 0em; margin-top: 0; margin-bottom: 0;} BLOCKQUOTE.passage BLOCKQUOTE P {text-indent: 0;} --> </STYLE> Edit: I should point out that using a 'pre' tag rather than a block quote would seem ideal. The caveat is that you can't use any kind of html generated 'em dash' inside of a pre tag, or at least I don't know of a way to do it. So the only way to use a dash inside a pre is to use something else to represent it like a pair of hyphens: -- or maybe tildas: ~~, but darn it, I want my text to look just like the book! Last edited by Ransom; 07-29-2011 at 01:10 PM. |
![]() |
![]() |
![]() |
#5 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
Quote:
btw, if you want an em-dash just use an actual em-dash -there's no need to use html encoding. Last edited by ldolse; 07-29-2011 at 03:31 PM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | ||
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 242
Karma: 51054
Join Date: Jun 2011
Location: Belleville, IL
Device: Kindle-3
|
Quote:
Quote:
![]() And if you try to paste some text from a typical Word doc with a dash in it into the 'pre' tags of an html file, it will get turned into, oh I don't remember what you call it, but it's a very small dash rather than a nice big Em dash. It's hardly any longer than a hyphen and most people would confuse it with one I'm sure. Lastly, Calibre will ignore anything but a proper html Em dash code like the one I gave above. In the following sample the first stanza was copy/pasted into html without using html code for the Em dash. The second stanza used ![]() ![]() This is what the same html file looks like after Calibre gets hold of it. Notice that only the stanza with the proper ![]() ![]() Last edited by Ransom; 07-29-2011 at 07:29 PM. |
||
![]() |
![]() |
![]() |
#7 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
I suspect there is some other problem relating to copy/paste from Word vs. the em-dash itself. I frequently use em-dash using just the character and have never had a problem. An alternative approach to get an em-dash during conversion though is to use double hyphens -- and enable 'smarten punctuation' during conversion.
I'm not sure if you solved your issue around blockquotes - this is something else I use all the time so not sure why you're having a problem here. Posting your conversion settings and perhaps a snippet of the source code could help. If your formatting requirements are relatively simple (by the screenshots they look like they are) you can try using text with Markdown or Textile instead of whatever combination of Word/HTML you're using. Those are my preferred formats if I'm starting something from scratch or really poorly formatted text. Here's an example using only markdown, smarten punctuation, and extra css - '>' creates blockquotes: Code:
PART I ------- ### THE MESSAGE >My heart trembles like a poor leaf. > >The planets whirl in my dreams. > >The stars press against my window. > >I rotate in my sleep. > >My bed is a warm planet. > >>--M<span class="smcps">ARVIN</span> M<span class="smcps">ERCER</span> >> >>P.S. 153, Fifth Grade, Harlem >> >>New York City, N.Y. (1981) Code:
body{font-family: serif} p {margin-top: 0em; margin-bottom: 0.3em; text-align:justify} blockquote {margin-bottom: 0.5em; margin-top: 0.3em} p + blockquote {margin-top: 1em; margin-bottom: 1em; margin-left:15%} span.smcps { white-space: pre; font-size: 80%} h2 {text-align: right; margin-bottom: 0em} h2 + h3 {text-align: right; font-size: 2.5em; margin-top: 0em} blockquote > blockquote {padding-left: 20%} Last edited by ldolse; 07-30-2011 at 01:24 AM. |
![]() |
![]() |
![]() |
#8 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 242
Karma: 51054
Join Date: Jun 2011
Location: Belleville, IL
Device: Kindle-3
|
I tried 'smarten punctuation', however placing two, or even three, hyphens in a row anywhere within 'pre' tags doesn't do anything. Apparently 'smarten punctuation' doesn't effect anything within a 'pre' tag. So I'm back to using block quotes, which works fine except for that first line being indented. I'll live with it.
Thanks for your help. |
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
The first line definitely isn't indented by default, as I was trying to illustrate with my example - if you post more detail beyond the screenshots we may be able to figure out where you're going wrong.
My only thought is that you have 'remove spacing between paragraphs' enabled - that could potentially be the root cause of you problems, depending on how the line breaks in the poems are defined. Last edited by ldolse; 08-02-2011 at 03:12 AM. |
![]() |
![]() |
![]() |
#10 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 242
Karma: 51054
Join Date: Jun 2011
Location: Belleville, IL
Device: Kindle-3
|
"My only thought is that you have 'remove spacing between paragraphs' enabled"
I do. Didn't I mention that? That's why I was asking if there was a specific way to keep certain lines from indenting. Yes, I could turn off that feature and do everything the hard way, but that's a great feature and I'd like to keep using it. |
![]() |
![]() |
![]() |
#11 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
No, actually you didn't mention it - just re-read the thread to double-check. And by your screenshots it's not obvious that it's enabled since your code must be using <br/> tags under the hood, otherwise every line in your blockquotes would be indented.
Don't use that feature if you actually want the level of control that you're asking for - everything can be done with a much finer grain of control using extra css. If you enable that feature it over-rides everything else, including extra css. Here's how to get what you want (with that feature disabled). Put this in extra css before conversion: Code:
p {margin-top: 0em; margin-bottom: 0.0em; text-indent:1.5em} blockquote > p {text-indent:0;} |
![]() |
![]() |
![]() |
#12 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,680
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Try the following CSS and see what happens....
Code:
blockquote { text-indent: 0 } |
![]() |
![]() |
![]() |
#13 | ||
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 242
Karma: 51054
Join Date: Jun 2011
Location: Belleville, IL
Device: Kindle-3
|
Quote:
Quote:
I tried your way too JSWOLF. No go. Any other ideas? Last edited by Ransom; 08-03-2011 at 11:28 AM. |
||
![]() |
![]() |
![]() |
#14 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,337
Karma: 123455
Join Date: Apr 2009
Location: Malaysia
Device: PRS-650, iPhone
|
You seem to be mixing up left margins with indents. Your first picture has a blockquote - blockquotes automatically get margins that just happen to co-incide with most people's default indents. The first line of that blockquote is indented - the subsequent lines are not indented.
As far as how to fix it, disabling remove spacing between paragraphs combined with the extra css should have fixed it - but only with the original document. Converting a bad ePub to ePub probably won't fix it. You'll need to actually post the job log (lower right hand corner) along with snippets of the original source code instead of screenshots. |
![]() |
![]() |
![]() |
#15 | ||
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 242
Karma: 51054
Join Date: Jun 2011
Location: Belleville, IL
Device: Kindle-3
|
I'm not mixing up anything. You're simply doing a lot of strange assuming.
Quote:
Quote:
|
||
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Touch Horizontal white streaky lines - on "Connected and Charging" screen | beautifulsoup | Kobo Reader | 0 | 07-27-2011 06:47 PM |
Feature Request: configurable space setting for "Insert blank line" in "Look & Feel" | therealjoeblow | Calibre | 15 | 07-25-2011 03:14 PM |
Ten Favorite Noir Lines...Plus "The Grifters" Coming to Kindle | Paul Levine | Reading Recommendations | 5 | 04-16-2011 12:53 AM |
Woher bekomme ich "Infinite Jest" oder "Unendlicher Spaß" von David Foster Wallace? | bitschnau | Erste Hilfe | 3 | 11-01-2010 01:22 PM |