Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 08-23-2024, 08:21 PM   #1
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 432
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
<span>Surrounding text</span>

A book I'm reading puts span tags around all text. Most are

Code:
<p><span>Paragraph of text</span></p>
but occasionally they surround a single letter.

Is there any good reason to do this? For that matter, is there any good reason to delete them all (other than a bit of space saving)?
foosion is offline   Reply With Quote
Old 08-23-2024, 08:29 PM   #2
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,220
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Some software programs are just weird…. But…. That particular issue is something that kobo does for their kepub books. They use that span for some of their device functionality.

The individual letters surrounded by a span are usually used to apply styling. Eg the first dropcap letter in the chapter.

Since you use a kobo I’d just leave them, they don’t really hurt anything.
Turtle91 is offline   Reply With Quote
Old 08-23-2024, 08:45 PM   #3
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 432
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
This is in an original epub, not from kobo. Sounds like there's no good reason for it, but no harm either.

EDIT: A problem with strikethrough that seems to be a kobo issue, unless there's a general epub solution: https://www.mobileread.com/forums/sh...4&postcount=44

Last edited by foosion; 08-23-2024 at 09:45 PM.
foosion is offline   Reply With Quote
Old 08-24-2024, 06:16 AM   #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: 76,354
Karma: 136006198
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 foosion View Post
A book I'm reading puts span tags around all text. Most are

Code:
<p><span>Paragraph of text</span></p>
but occasionally they surround a single letter.

Is there any good reason to do this? For that matter, is there any good reason to delete them all (other than a bit of space saving)?
I would delete all of the <span> as they have no need to be there.
JSWolf is offline   Reply With Quote
Old 08-24-2024, 06:26 AM   #5
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 432
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by JSWolf View Post
I would delete all of the <span> as they have no need to be there.
Is there a way to use Diaps editor plugin to edit all files? It only seems to edit the current file.

Otherwise regex find/replace would work. I wonder why they included all the <span>s, but that's probably a mystery.
foosion is offline   Reply With Quote
Old 08-24-2024, 06:42 AM   #6
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,353
Karma: 6794938
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Quote:
Originally Posted by foosion View Post
Is there a way to use Diaps editor plugin to edit all files? It only seems to edit the current file.
You need to add the icon to the tool bar, then click the arrow and deselect "Edit current file only"
Karellen is offline   Reply With Quote
Old 08-24-2024, 06:45 AM   #7
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: 76,354
Karma: 136006198
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 foosion View Post
Is there a way to use Diaps editor plugin to edit all files? It only seems to edit the current file.

Otherwise regex find/replace would work. I wonder why they included all the <span>s, but that's probably a mystery.
You can have Diaps edit all files in one go.

Find the icon (for diaps) in the toolbar and click the arrow on the right side. Then uncheck Edit current file only.
JSWolf is offline   Reply With Quote
Old 08-24-2024, 07:54 AM   #8
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 432
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by JSWolf View Post
You can have Diaps edit all files in one go.

Find the icon (for diaps) in the toolbar and click the arrow on the right side. Then uncheck Edit current file only.
There are arrows for convert CSS cm to em and for smarten punctuation, each leading to check for edit current file only. There is no such arrow for edit spans and divs, at least not on version 0.4.0 which is the version Calibre lists and is in the OP of the plugin's thread.
Attached Thumbnails
Click image for larger version

Name:	diap.jpg
Views:	42
Size:	1.45 MB
ID:	210376  

Last edited by foosion; 08-24-2024 at 08:04 AM.
foosion is offline   Reply With Quote
Old 08-24-2024, 08:14 AM   #9
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,353
Karma: 6794938
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
In the editor, go to Edit>Preferences>Toolbars
Select "Book wide tools from third party plugins"
Move the Edit Spans Divs icon from the left panel to the right panel
Press ok

You need to make the change from the icon, not the menu.
Karellen is offline   Reply With Quote
Old 08-24-2024, 08:35 AM   #10
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 432
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by Karellen View Post
In the editor, go to Edit>Preferences>Toolbars
Select "Book wide tools from third party plugins"
Move the Edit Spans Divs icon from the left panel to the right panel
Press ok

You need to make the change from the icon, not the menu.
Edit Spans Divs was already in the right panel, along with the other two. Nothing to change.
foosion is offline   Reply With Quote
Old 08-24-2024, 08:47 AM   #11
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,220
Karma: 19000635
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by foosion View Post
This is in an original epub, not from kobo. Sounds like there's no good reason for it, but no harm either.

EDIT: A problem with strikethrough that seems to be a kobo issue, unless there's a general epub solution: https://www.mobileread.com/forums/sh...4&postcount=44
Did you happen to use Calibre, or some other ebook management software, to send the ePub file to your kobo? That process may have "kobofied" it by adding the spans. If not, then it is most likely from whatever publishing/editing software that automatically added them. I agree that removing all most of them is fine, but you should probably protect your styling (single characters) before doing a complete sweep...

I'd change the individual letter spans to something else first, then get rid of the paragraph spans, then put the individual letter spans back to their original <span>.
Turtle91 is offline   Reply With Quote
Old 08-24-2024, 08:57 AM   #12
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 432
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
Quote:
Originally Posted by Turtle91 View Post
Did you happen to use Calibre, or some other ebook management software, to send the ePub file to your kobo? That process may have "kobofied" it by adding the spans. If not, then it is most likely from whatever publishing/editing software that automatically added them. I agree that removing all most of them is fine, but you should probably protect your styling (single characters) before doing a complete sweep...

I'd change the individual letter spans to something else first, then get rid of the paragraph spans, then put the individual letter spans back to their original <span>.
Yes, started with a commercial epub, then Calibre transformed it to a kepub when sending my kobo. I would have thought major publishers would use good software, but experience has taught me otherwise.

I'd just remove the naked <spans>. Easy enough with regex find/replace in the editor.
foosion is offline   Reply With Quote
Old 08-24-2024, 11:04 AM   #13
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: 76,354
Karma: 136006198
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 foosion View Post
There are arrows for convert CSS cm to em and for smarten punctuation, each leading to check for edit current file only. There is no such arrow for edit spans and divs, at least not on version 0.4.0 which is the version Calibre lists and is in the OP of the plugin's thread.
You need the icon for Diaps Edition Toolbag to be in the toolbar so you can access the arrow on the right of the icon that you need to click. If it's not in the toolbar, you cannot change the settings. You cannot change the settings from the plugins menu.

I know @Karellen already posted this, but you seem to have either missed it or ignored it so I'll post again.

In the editor...
  1. Go to Edit > Preferences >Toolbars
  2. Select "Book wide tools from third party plugins"
  3. Move the "Edit Spans Divs" icon from the left panel to the right panel
  4. Press OK
You need to make the change from the icon, not the menu.

Last edited by JSWolf; 08-24-2024 at 11:16 AM.
JSWolf is offline   Reply With Quote
Old 08-24-2024, 11:37 AM   #14
foosion
Evangelist
foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.foosion is an enigma wrapped up in a mystery.
 
Posts: 432
Karma: 41524
Join Date: Sep 2011
Device: Kobo Libra 2 & Clara BW
deleted

Regex works nicely.

Last edited by foosion; 08-24-2024 at 12:10 PM.
foosion is offline   Reply With Quote
Old 08-24-2024, 11:58 PM   #15
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,441
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 foosion View Post
Is there a way to use Diaps editor plugin to edit all files? It only seems to edit the current file.

Otherwise regex find/replace would work. I wonder why they included all the <span>s, but that's probably a mystery.
In Sigil, You select all the files you want it applied to in the file browser.
In Calibre-Editor, there is a "pulldown" on the Icon to do Current File Only

In Sigil The plugin has a setting "Having Attribute" Naked is what you choose for <span> or <div> when you just want them gone.
theducks is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Span Span Span Sigil cleaning up indesign blackest Sigil 31 12-06-2017 11:16 AM
Span Span Span Span MULTIVAC ePub 7 12-06-2014 09:58 AM
span in span: is this problematic? tbuyus ePub 8 03-31-2013 09:01 AM
Is there RegEx to <span> ALL CAPS text? phossler Sigil 4 03-10-2013 03:43 PM
Remove <br /> together with span, and only span Razzia Recipes 3 05-30-2011 07:55 PM


All times are GMT -4. The time now is 02:20 AM.


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