Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 05-09-2015, 03:27 AM   #1
hifi25nl
Junior Member
hifi25nl began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2011
Location: GB
Add automatically paragraph tag

I have a long book written with openoffice.
How to add automatically paragraph tag or specific tag at each carriage return?

Example:

<p class="standard-text">This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test </p>
<p class="standard-text"> This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test</p>
<p class="standard-text">This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test This is a test </p>
hifi25nl is offline   Reply With Quote
Old 05-09-2015, 06:20 AM   #2
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Export or "save as" your OOW file as html. Open it in Sigil and add your style sheet. Depending on your style sheet, you may have to place all instances of <p class="standard-text"> with a plain vanilla <p> or some other usage.

(I've never used the OOW-to-html option, but I'm told it can produce cleaner html than Word does.)
Notjohn is offline   Reply With Quote
Advert
Old 05-09-2015, 11:59 AM   #3
hifi25nl
Junior Member
hifi25nl began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2011
Location: GB
Thanks, but this really is not an option. Open office will save html with a lot of useless tags that I don't need.
I have tried other solutions , for example copy as text in linux kwrite editor and save as html, but in this case there are not paragraph tags.

My question is: people (or editors) using sigil need to add manually the p tag...or whatever paragraph tags?
hifi25nl is offline   Reply With Quote
Old 05-09-2015, 12:22 PM   #4
rubeus
Banned
rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.
 
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
Either your paragraphs are included in <p> or even worth in <div>, or you didnt export it as html. Nevertheless i cant see any Sigil related problem here, its Openoffice and html/epub write now.
rubeus is offline   Reply With Quote
Old 05-09-2015, 12:25 PM   #5
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 28,359
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by hifi25nl View Post
My question is: people (or editors) using sigil need to add manually the p tag...or whatever paragraph tags?
How are you getting your OO document's text into Sigil in the first place? Are you copying from OO and pasting into Sigil's Book View?

When I paste from Word into Sigil's Book View (as plain text), p tags ARE created where ever carriage returns occurred in the original. I would assume OO would be similar.
DiapDealer is offline   Reply With Quote
Advert
Old 05-09-2015, 12:34 PM   #6
hifi25nl
Junior Member
hifi25nl began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2011
Location: GB
This is good, I was using only code window...However with paste as plain text I have div tag, not p.

After I can substitute div with my css tag easily with search and replace
hifi25nl is offline   Reply With Quote
Old 05-09-2015, 12:43 PM   #7
rubeus
Banned
rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.rubeus ought to be getting tired of karma fortunes by now.
 
Posts: 272
Karma: 1224588
Join Date: Sep 2014
Device: Sony PRS 650
So you have an export problem, not an import problem. Better look at https://www.mobileread.com/forums/forumdisplay.php?f=230
rubeus is offline   Reply With Quote
Old 05-09-2015, 01:08 PM   #8
hifi25nl
Junior Member
hifi25nl began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jan 2011
Location: GB
The problem is solved.

I discovered that in the new KDE Plasma there are some problems in cut text format (!). Using LXQt Desktop on the same installation Sigil is adding correctly the p tags.

Thank you for suggestions.
hifi25nl is offline   Reply With Quote
Old 05-10-2015, 05:43 AM   #9
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Quote:
Originally Posted by DiapDealer View Post
How are you getting your OO document's text into Sigil in the first place? Are you copying from OO and pasting into Sigil's Book View?

When I paste from Word into Sigil's Book View (as plain text), p tags ARE created where ever carriage returns occurred in the original. I would assume OO would be similar.
I never thought of trying that! (Perhaps because I used to make the occasional editorial change in Book View and it turned out badly, with a non-breaking space whenever I hit the space bar.)

This is in effect Mark Coker's Nuclear Option, in that it wipes out italics and heading styles etc?
Notjohn is offline   Reply With Quote
Old 05-10-2015, 07:48 AM   #10
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
Have you tried dropping your OpenOffice document into Calibre for conversion to EPUB? Then tidy up in Sigil, or even give Calibre's editor a try - it seems remarkably similar to Sigil in all but appearance.
If your OpenOffice document was constructed "by the rules" you'll get pretty clean code. Or you might have some work to do - but anything's better than pasting paragraphs across one by one, surely?
And there's no need to obsess over achieving minimal EPUB code. That's not what the reader sees. If it works...
exaltedwombat is offline   Reply With Quote
Old 05-10-2015, 08:09 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,313
Karma: 20171571
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 exaltedwombat View Post
but anything's better than pasting paragraphs across one by one, surely?
I don't think he meant paragraph by paragraph. You can paste the entire text. IIRC it does strip formatting (italics, bold, etc.) but you can always do a search/replace and put tags around the formatted text before copy/paste to Sigil.
Turtle91 is offline   Reply With Quote
Old 05-10-2015, 12:31 PM   #12
exaltedwombat
Guru
exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.exaltedwombat ought to be getting tired of karma fortunes by now.
 
Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
Well OK. But why not simply drop it into Sigil, which will give you a well-formatted EPUB output automatically, as long as you made logical use of styles etc. in the original? There's a tool for this job - use it!
exaltedwombat is offline   Reply With Quote
Old 05-10-2015, 01:55 PM   #13
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
...Why not simply use the EPUB export plugin...
eschwartz is offline   Reply With Quote
Old 05-10-2015, 03:42 PM   #14
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,912
Karma: 60358908
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 eschwartz View Post
...Why not simply use the EPUB export plugin...
+1 Writer2EPUB is fairly clean.
theducks is offline   Reply With Quote
Old 05-10-2015, 05:45 PM   #15
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 21,633
Karma: 29710510
Join Date: Mar 2012
Location: Sydney Australia
Device: none
I would get Writer to save as DOCX and import it directly into calibre-editor, then save as EPUB. If any significant editing was required (very unlikely in my case) I'd do it in Sigil.

Calibre recently added support for strict OpenXML which is what I suspect Writer might create. The differences between strict and the original MS spec are at the edges. ECMA had to make some changes, even if only on the principal of bloody-mindedness.

BR
BetterRed is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically Add - How often does it check? Stresspuppy Library Management 2 05-19-2014 10:05 PM
Automatically tag based on column info? Iocane Library Management 3 09-10-2012 12:40 PM
How to automatically populate a tag with the decade from the pubdate via python smoothrolla Library Management 5 11-19-2011 06:41 AM
Automatically add tag if word/phrase found in ebook? eosrose Calibre 3 11-16-2011 06:48 AM
LRF to EPUB: Each line is a paragraph tag wudaben Calibre 5 07-14-2010 07:04 PM


All times are GMT -4. The time now is 08:14 AM.


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