![]() |
#1 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29
Karma: 6366
Join Date: Oct 2011
Device: Sigil
|
Changing <div> tags to <p> tags
I find every time I start working on a new chapter, I have to change the initial <div> tag to a <p> tag, or else each subsequent paragraph will have <div> tags instead of the correct <p> tags.
I put this in as an issue and John. Anyone else find themselves doing this all this all the time? |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,552
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
I've never had the problem of Sigil using div instead of p, but then as I mentioned, I don't make changes in Book View. I'm not entirely sure what you mean by "start new chapter" in terms of Sigil functionality, but any time I insert a brand new html file, it usually starts life as <p>& nbsp;</p>… never any divs.
You'd probably need to detail your exact steps that that result in divs. But I doubt that it's a Sigil "issue." It's probably a case of Sigil not working the way you think it should for your particular workflow. You may need to adapt. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29
Karma: 6366
Join Date: Oct 2011
Device: Sigil
|
Yes, I work in Book View, using the WYSIWYG editor. To start a new chapter, I always use the Split at Cursor button, which creates a new XHTML file. I like working in Book View, but periodically have to go into code view to change <div> tags to <p> tags and to remove nbsb characters. If not for these two instances, I would not need to use Code View. If one could ignore code view, then I think a many more users would be able to use Sigil.
None the less, just the way it is, I think Sigil is fantastic! Here are the instructions for duplicating this problem. 1. Start a new ebpub document. 2. In Section0001, type in a few words 3. Press h2 to make that line Heading 2 4. View Code. Notice is added into header. This is not necessary. 5. Go back to Edit mode. 6. Move cursor to end of line and enter a carriage return. 7. Type a few words. Look at code again. 8. Notice new paragraph has </div><div> tags. 9. These should be <p></p> tags. This is Issue 2162. |
![]() |
![]() |
![]() |
#4 | |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,552
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Quote:
2. In Book View hit the enter (return) key once followed by the delete key. 3. With the mouse (or arrow keys) place cursor on the first line. 4. Type in a few words, Press h2 to make that line Heading 2. 5. Move cursor (w/mouse or arrow keys) to second line, type a few words. 6. Look at code. 7. Go back to Edit mode. 8. Move cursor to end of line and enter a carriage return. 9. Enter more paragraphs at your leisure by using the carriage return. Repeat whenever you start a new chapter. Last edited by DiapDealer; 04-05-2013 at 01:19 PM. |
|
![]() |
![]() |
![]() |
#5 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29
Karma: 6366
Join Date: Oct 2011
Device: Sigil
|
Quote:
|
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,552
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
If step 5 won't allow you move to the second line, it can only mean that you didn't enter the carriage return (enter) in step 2. Also note that step 2 is the Return key followed by the delete key. Not the backspace key. The delete key is not the same thing as the backspace key. Hitting Return/Backspace would definitely foul the process up as you've described.
The steps do work. It just creates two paragraphs right from the get-go, so you don't have to hit the return key after you're done changing the first paragraph to a heading (h2). You then manually move the cursor into the second paragraph, and from there on out... everything is normal. Hitting the delete key just removes the & nbsp; since you don't care for it being there. You could skip that step (hitting the delete key) if you want. Last edited by DiapDealer; 04-05-2013 at 03:10 PM. |
![]() |
![]() |
![]() |
#7 | |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 29
Karma: 6366
Join Date: Oct 2011
Device: Sigil
|
Quote:
This little acrobatic routine will save me the time having to edit the <div> tags every time I create a new XHTML file. As for correcting this in Sigil, so new users don't have to figure this out, the status of this issue is: "Cannot Fix". No matter. John, you're doing a fantastic job! Even at .7.1 Sigil is nearly bullet proof, and a joy to use. PS: I'll update this thread if the status changes. |
|
![]() |
![]() |
![]() |
#8 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,552
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Glad it worked for you.
![]() |
![]() |
![]() |
![]() |
#9 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
One workaround would be to do this once and save it. Then use this as a template (starting point) whenever you start a new book instead of new.
Dale |
![]() |
![]() |
![]() |
#10 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,346
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:
I go in and have ALL my default pages (cover/title/copyright/acknowledgement s/maps/CSS/opf/first page) set up exactly how I want them, then save as "default.epub" Then I change the properties of the Sigil shortcut so instead of opening a "new" ePub it opens the "default". (Do that by adding '{space}"{path}/default.epub" ' after the "sigil.exe" in the properties. I.e. "...sigil.exe" "c:/ebooks/default.epub" Just remember to Save As to a different file name before you make any changes. If any of the devs are reading, it would be nice to have this as a built in function... |
|
![]() |
![]() |
![]() |
#11 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 28,552
Karma: 204127028
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
|
Why the shortcut properties rigamarole? If Sigil is the default epub app on your system, just double-click default.epub (or whatever your template epub is named).
|
![]() |
![]() |
![]() |
#12 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 878
Karma: 2457540
Join Date: Nov 2011
Device: none
|
And if it isn't (I prefer to have a reader rather than an editor as the default application for books) just drop the file's icom into Sigil's icon.
What have you got against <div> anyway? You can assign it classes and styles just like <p>. |
![]() |
![]() |
![]() |
#13 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,031
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Or do as I do when I want other than the set sefault:
Right click on the file: Open with: Sigil |
![]() |
![]() |
![]() |
#14 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,346
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 like a lot of shortcuts on my desktop...I have the one sigil shortcut in my task bar at the bottom...it won't let me have duplicates. When I click it, it opens the default ePub. No dragging, no finding the file(that I have in a folder several levels deep). It's very easy to add the file to the properties. One click and I'm working!
|
![]() |
![]() |
![]() |
#15 | |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,031
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:
I just open Sigil (default) from the Quick Launch bar (at the bottom), select the current file from the TOP of th File open history list. This adds a few seconds only. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple Div Tags in Fixed Layout Epub | verydeepwater | ePub | 4 | 01-24-2013 07:11 AM |
ePub validation error - not liking div tags | Kratos | ePub | 19 | 07-23-2012 11:14 AM |
Removing all <div> tags? | ElMiko | Sigil | 6 | 01-24-2012 05:51 PM |
Regular expression for matching div tags? | kiwidude | Sigil | 11 | 12-12-2010 06:11 AM |
Remove spacing between paragraphs - what about div tags ? | NASCARaddicted | Calibre | 5 | 11-07-2009 05:47 AM |