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-27-2022, 09:14 AM   #1
skil-phil
Connoisseur
skil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animals
 
skil-phil's Avatar
 
Posts: 84
Karma: 6698
Join Date: Sep 2022
Location: South Africa
Device: kindle pw10
Beautify question

Hi,
Now and again I will come across a file that defies the beautify rules.
Nothing separates between </p> and <p>.
All ends up as one big text glob.
It does not affect the output but makes editing time consuming.
Any reason why this would happen?
Thanks
Phil
skil-phil is offline   Reply With Quote
Old 11-27-2022, 09:15 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 45,308
Karma: 27111242
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Beautify will only beautify when it can be reasonably certain that the changes it makes will not affect the rendered appearance. Lots of things can cause it to refuse to beautify. If you want to force it copy paste the HTML into some external beuatify tool that is not so careful and paste the result back.
kovidgoyal is offline   Reply With Quote
Advert
Old 11-27-2022, 11:48 AM   #3
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 448
Karma: 3886916
Join Date: May 2013
Location: Ontario, Canada
Device: Kindle KB, Oasis, Pop_Os!, Jutoh, Kobo Forma
Quote:
Originally Posted by skil-phil View Post
Hi,
Now and again I will come across a file that defies the beautify rules.
Nothing separates between </p> and <p>.
All ends up as one big text glob.
It does not affect the output but makes editing time consuming.
Any reason why this would happen?
Thanks
Phil
I don't have an example at hand, but I've seen this happen if a bunch of <p>s are surrounded by other code, like some <div> or <pre> or something. Remove that surrounding thing, which is usually useless or in error, and Beautify will work again.
retiredbiker is offline   Reply With Quote
Old 11-27-2022, 10:42 PM   #4
skil-phil
Connoisseur
skil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animals
 
skil-phil's Avatar
 
Posts: 84
Karma: 6698
Join Date: Sep 2022
Location: South Africa
Device: kindle pw10
Thanks for the explanations.
Not going to trust an external beautifier.
Will look for extraneous tags.
Phil
skil-phil is offline   Reply With Quote
Old 11-27-2022, 11:13 PM   #5
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,611
Karma: 9500498
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
I sometimes also have problems with Beautify, where in certain xhtml pages, it does nothing.

The culprit is a set of empty <div class="something"></div> tags either just below the <body> tag or below the heading tags.

Once I delete these tags, beautify works as per normal. Next time I come across a book with that issue, I'll scramble it and upload it if anybody is interested in checking out why it does that.
Karellen is offline   Reply With Quote
Advert
Old 11-28-2022, 08:14 AM   #6
skil-phil
Connoisseur
skil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animalsskil-phil is kind to children and small, furry animals
 
skil-phil's Avatar
 
Posts: 84
Karma: 6698
Join Date: Sep 2022
Location: South Africa
Device: kindle pw10
Found it.
Duplicate body tags.
Removed one and all works.
Thanks for the replies and ideas on where to look.
skil-phil is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
beautify files icon rjwse@aol.com Editor 2 03-26-2021 04:00 PM
Beautify not working theducks Editor 4 10-09-2019 08:26 PM
"Beautify" question pmorris Editor 1 06-09-2014 11:17 AM
Beautify feature BobC Editor 1 03-15-2014 09:24 AM
Beautify Baen e-books IceHand Workshop 1 02-21-2008 09:57 AM


All times are GMT -4. The time now is 12:54 PM.


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