MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   can I split a file at headings? (https://www.mobileread.com/forums/showthread.php?t=335996)

gennaro 12-28-2020 07:41 AM

can I split a file at headings?
 
Can I automatically split a long file at chapters (say before h1 or h2 elements) without putting the marks by hand?
Thank you

Doitsu 12-28-2020 07:51 AM

Quote:

Originally Posted by gennaro (Post 4074566)
Can I automatically split a long file at chapters (say before h1 or h2 elements) without putting the marks by hand?

Simply search for heading start tags and replace them sigil split marker <hr> tags. For example:

Find:<h1
Replace:<hr class="sigil_split_marker" /><h1

Then select Split at markers.

gennaro 12-28-2020 01:24 PM

Quote:

Originally Posted by Doitsu (Post 4074567)
Simply search for heading start tags and replace them sigil split marker <hr> tags. ….

Thanks a lot

exaltedwombat 12-28-2020 05:42 PM

Quote:

Originally Posted by Doitsu (Post 4074567)
Simply search for heading start tags and replace them sigil split marker <hr> tags.

So, just in case you follow instructions meticulously, don't replace <h1> tags with split markers, rather use Search & Replace to preface them with split markers. (The example given is then correct.)

Pedantic, I know. But computer code takes no prisoners :-)


All times are GMT -4. The time now is 10:19 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.