View Single Post
Old 11-02-2017, 05:31 AM   #46
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,233
Karma: 35158061
Join Date: May 2011
Location: PA {back in the usa!}
Device: Sony PRS-T2, ADE on PC
@Rubén ---
I really hate to rain on the party. I tried your NoWrap span, and in my usage, it failed.

Click image for larger version

Name:	Emdash Split.png
Views:	307
Size:	19.9 KB
ID:	159766

.
I use "hanging indents" for poetry, and the spanned text slides to the left, superimposed over adjacent text. It seemed to do this both WITH and WITHOUT the text-indent:0 specified in the span.

Code:
Spoiler:

CSS:
Code:
.stanza{
margin-top: 1.0em;
margin-bottom: 1.25em;
margin-right: .5em;
margin-left: 2.5em;
}

.stanza p{
text-align: left;
text-indent: -2.75em; 
padding-left: 2.75em;
margin-top: 0;
margin-bottom: .15em;
hyphens: none;
-webkit-hyphens: none !important;
-moz-hyphens: none;
adobe-hyphenate: none;
}

.nowrap{
/*text-indent: 0 !important;*/
display: inline-block;
}
HTML:
Code:
<div class="stanza">
<p>“And now, when fifteen suns have each</p>
<p class="ins1">Fulfill’d in turn its circling year,</p>
<p>Thrown back again on England’s beach,</p>
<p class="ins1">Our bark paid off—HE drives me <i>Here!</i></p>
<p>I could not die in flood or <span class="nowrap">fight—</span></p>
<p>HE drives me <span class="midfont">HERE</span>!!”—</p>
<p class="aright">“And sarve you right!</p>
</div>


Click image for larger version

Name:	NoWrap Span.png
Views:	309
Size:	15.8 KB
ID:	159767

.
If I do manage to get the viewer window sized just right, so that the spanned word does drop to the next line, it does not indent as specified in the CSS.

Click image for larger version

Name:	Indent Fails.png
Views:	301
Size:	44.5 KB
ID:	159768

.
Also, when I tried it in a normal paragraph (no negative indent), but justified, it gave an extremely wide spacing to the spanned word.

Click image for larger version

Name:	NoWrap Span JUSTIFIED.png
Views:	294
Size:	22.0 KB
ID:	159769


.
I tested in Sigil and Calibre viewer (QT based) and in ADE 2.0.

So this kind of span seems not to work well in paras with negative / hanging indents. The good news is that the Unicode ⁠& # 8 2 8 8 ; appears to be working fine with hanging indent.

Please let me know if I am doing something wrong with the code.

Last edited by GrannyGrump; 11-02-2017 at 07:33 AM.
GrannyGrump is offline   Reply With Quote