![]() |
#1 |
Zealot
![]() Posts: 124
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
add rules into all paragraph
when i build my new ebook it's possible add rule <p class=body>text</p> on all paragraph of my page??? (with calibre)
Last edited by larysa; 05-16-2016 at 01:10 PM. |
![]() |
![]() |
![]() |
#2 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,914
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:
but Why? in the CSS just set p { your style stuff here} Then think 'Exception' to the standard 'p' for those special ![]() those get a p class= |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Zealot
![]() Posts: 124
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
I use ocr software to convert my scan page into text page, after import text into calibre.
But on each paragraph i have to add my p class at the beginning and /p at the end... For each paragraph!! I want add this with one rule.... |
![]() |
![]() |
![]() |
#4 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,224
Karma: 145488788
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
p { margin-top: 0; margin-bottom: 0; text-indent: 1.2em; } You just change p as you want and you won't need a class for most p. |
|
![]() |
![]() |
![]() |
#5 |
Zealot
![]() Posts: 124
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
You don't understand my problem...
I have css, but i copy and paste from ocr software into calibre...the text is flatten, without nothing, only simple text. I must add pclass at beginning and /p at the end for each paragraph....I want one rule for this! |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
What formats can the OCR export to? If it will export to HTML or Word, use that. Then add it to calibre and do a conversion. Other formats can be used successfully, but avoid PDF if you can.
|
![]() |
![]() |
![]() |
#7 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
You shouldn't be copying and pasting into the Calibre editor. If your OCR software exports as text, load the text file into Calibre, and then use Calibre to convert the text to HTML. That will add the tags for you. Then edit the HTML/CSS to tidy it up.
|
![]() |
![]() |
![]() |
#8 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,914
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
sorry, but You don't seem to understand HTML/CSS
You don't NEED "class= " for HTML tags. None of the responses are wrong, just different. But they all have 1 thing in common K.I.S.S. For years, Baen (you've heard of them?) shipped ebooks with 3 tiny CSS 1 of those was even blank (the conversion scripts required it to be included. so it was empty rather than break other stuff) Here is the BASE CSS I use all the time. 2 entriers ![]() I sometimes add a Chapter Number (CN) treatment, Opening Paragraph treatment (FP) |
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
When you import your text, does it NOT have any <p> and </p> tags around each block of text?
|
![]() |
![]() |
![]() |
#10 |
Zealot
![]() Posts: 124
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
@ phossler
Yes, when import text I don't have any tag (I copy from ocr on clipboard and paste into calibre...if save html from ocr when import I have various ( much more) different tag...then I copy only with right click and paste into calibre, clean of any tag) I want save my clipboard on txt file, then import to calibre and have for each paragraph only one tag (the same) for each paragraph. Then with find function i replace this tag whit my tag pclass=body.... |
![]() |
![]() |
![]() |
#11 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
As I said earlier, larysa, this is not a good approach. It would be much better to add your text file into Calibre, and then use Calibre to convert the text to HTML.
|
![]() |
![]() |
![]() |
#12 |
Zealot
![]() Posts: 124
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
Ok then i save my document as txt file (without any tag) and then add this txt into calibre (and him add tag). Ok this solved my question...but how to calibre import txt file ???
|
![]() |
![]() |
![]() |
#13 |
eBook Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 85,544
Karma: 93383099
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
|
The same way you'd import any other book into your Calibre library. Either use the "Add Book" menu item in Calibre, or just drag and drop the file onto the Calibre window.
|
![]() |
![]() |
![]() |
#14 |
Zealot
![]() Posts: 124
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
Ok tonight I try! Thanks for your support!
|
![]() |
![]() |
![]() |
#15 |
Zealot
![]() Posts: 124
Karma: 10
Join Date: Feb 2016
Device: iPad mini 4
|
Ok work. But when i save txt file and after import into calibre, more character are modify: è with ė, á with ä and this for each vocal with accent...also ' isn't recognized...the easy way would be copy and past into a blank page of calibre ebook and insert tag at the beginning and at the end to all paragraphs...!!
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add automatically paragraph tag | hifi25nl | Sigil | 20 | 05-12-2015 04:40 AM |
Problem: Merge two ebooks paragraph by paragraph... | akayacik80 | Workshop | 5 | 09-23-2014 09:05 AM |
3 suggestions: merge on add, cleanup on add, sorting | changeling | Calibre | 5 | 08-24-2013 06:35 AM |
Preference: Paragraph indent or a little paragraph spacing? | 1611mac | General Discussions | 48 | 11-11-2011 12:43 AM |