![]() |
#1 |
Junior Member
![]() 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> |
![]() |
![]() |
![]() |
#2 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.) |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() 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? |
![]() |
![]() |
![]() |
#4 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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.
|
![]() |
![]() |
![]() |
#5 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,359
Karma: 203720150
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
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. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
#7 |
Banned
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
![]() |
![]() |
![]() |
#8 |
Junior Member
![]() 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. |
![]() |
![]() |
![]() |
#9 | |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
Quote:
This is in effect Mark Coker's Nuclear Option, in that it wipes out italics and heading styles etc? |
|
![]() |
![]() |
![]() |
#10 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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... |
![]() |
![]() |
![]() |
#11 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
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.
|
![]() |
![]() |
![]() |
#12 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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!
|
![]() |
![]() |
![]() |
#13 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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...
|
![]() |
![]() |
![]() |
#14 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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
|
|
![]() |
![]() |
![]() |
#15 |
null operator (he/him)
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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 |
![]() |
![]() |
![]() |
|
![]() |
||||
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 |