OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

convert to html, all paragrah marks doubled [SOLVED]

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
Aardvark12
General User
General User


Joined: 03 May 2007
Posts: 12
Location: Southern California

PostPosted: Tue Apr 01, 2008 5:01 pm    Post subject: convert to html, all paragrah marks doubled [SOLVED] Reply with quote

In Open Office Writer, if one tries to save a document in html all paragraph marks are doubled. If one pressed <enter> twice at the end of a paragraph, to leave a blank line between paragraphs, it will now appear as if you pressed <enter> four times.

This was true last year, and was still true in OO Writer 2.3, in the brief test I did. So one can't use Writer to save in html.

I have two questions:

1) Has the problem been fixed yet in OO 2.4? If not, then there is no reason for me to download a new version. Maybe in OO 3.0??

2) I believe there was once a comment on the forum that for html in Writer all the paragraph marks in a document had to be converted to line breaks, that is convert <enter> to <ctrl><enter>. Will this work? I can find no way to use search and replace, and get it to accept <ctrl><enter>.

Thank you for any help.


Last edited by Aardvark12 on Wed Apr 02, 2008 1:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
ftack
Moderator
Moderator


Joined: 27 Jan 2003
Posts: 3102
Location: Belgium

PostPosted: Wed Apr 02, 2008 4:40 am    Post subject: Reply with quote

I cannot reproduce this in OOo 2.3. One paragraph is translated to one <p>...</p> pair of codes. A hard return is translated to <br>. This seems correct html to me.
_________________
--
GNU/Linux (Ubuntu)
Back to top
View user's profile Send private message
Aardvark12
General User
General User


Joined: 03 May 2007
Posts: 12
Location: Southern California

PostPosted: Wed Apr 02, 2008 7:54 am    Post subject: Reply with quote

Everyone I have checked with has the same problem. I have no idea why you do not see this. As stated, all of the paragraphs end with my having pressed the <enter> key twice, or have two hard returns. If save as HTML, *all* line spacing connected to hard returns is doubled. Here is an example when I view the source code of the HTML:

One paragragh ends with this line.</FONT></P>
<P CLASS="western" STYLE="margin-bottom: 0in"><BR>
</P>
<P CLASS="western" STYLE="margin-bottom: 0in"><FONT FACE="Times New Roman, serif">The next Paragraph starts here, and continues...


In Open Office 2.3.0==>

One paragraph ends with this line.

The next Paragraph starts here, and continues...


Then I save the file as an HTML, and see this in all browsers==>

One paragraph ends with this line.



The next Paragraph starts here, and continues...

NOTE: I took the html and loaded it back into Open Office and then all the line spacing looks correct (well, almost correct, a few errors). Maybe this is what you are referring to. Look at the html in a browser, since this is material that has to posted on the web. The fact that Open Office thinks the material is rendered correctly is just another bug.
Back to top
View user's profile Send private message
Drumlib
Newbie
Newbie


Joined: 02 Apr 2008
Posts: 1

PostPosted: Wed Apr 02, 2008 9:00 am    Post subject: Reply with quote

I had the same problem and I found a solution. I'm no expert and if there is a better way hopefully someone more knowlegeable will post. But here is how I did it:

File - New Text Document

Format - Paragraph - Indents and Spacings Tab
Set "Spacing below paragraph" to 0.16"

Format - Styles and Formatting
Click the icon on the far right of the Styles and Formatting window and select "Update Style."

-----------------
This changes the formatting of the "Default" (text) paragraphs. It adds space below your paragraphs so you don't have to hit "Enter" twice to get space between your paragraphs. Now, when you save the document as an HTML file, you won't have the HUGE gaps caused by multiple paragraph marks.
------------------

Choose File - Save As.
Save and name the empty (no text) formatted document as a template.

Choose File - Templates - Save.
In the New Template box, type a name for the new template.
In the Categories list, select "My Templates", and then click OK.

Choose File - Templates - Organize.
In the category list, double-click the "My Templates" folder.
Right-click the template that you created, and choose Set as Default Template.
Click Close.

Now all your new text documents will have the new paragraph formatting.
Back to top
View user's profile Send private message Visit poster's website
ftack
Moderator
Moderator


Joined: 27 Jan 2003
Posts: 3102
Location: Belgium

PostPosted: Wed Apr 02, 2008 9:51 am    Post subject: Reply with quote

I still do not see a problem that needs to be fixed. I guess Drumlib has the right suggestion for you.

The way html is displayed depends on the browser. The html just says "this is a new paragraph". Most browsers will display the new paragraph with whitespace in between. The correct way for you to see that white space between paragraphs in Writer is, as Drumlib explained, to adjust the paragraph style to display the paragraphs like your browser would.
_________________
--
GNU/Linux (Ubuntu)
Back to top
View user's profile Send private message
floris_v
Moderator
Moderator


Joined: 12 Jul 2007
Posts: 4600
Location: Netherlands

PostPosted: Wed Apr 02, 2008 10:58 am    Post subject: Reply with quote

What you're seeing is probably the default spacing that html viewers put between paragraphs in < p > tags. If you want to get rid of that, just change the paragraph style and adjust the space between paragraphs. You can verify it by opening the file in a text editor (Notepad in Windows).
_________________
LibreOffice 3.6.3; OOo 3.4.1 on Windows Vista
Join the Official community forum - in several languages, including Nederlandstalig forum
Back to top
View user's profile Send private message
Aardvark12
General User
General User


Joined: 03 May 2007
Posts: 12
Location: Southern California

PostPosted: Wed Apr 02, 2008 1:13 pm    Post subject: Reply with quote

Thank you for the replies. I will, indeed, experiment with changing the spacing after paragraphs when using Open Office Writer, as suggested by Drumlib.

I did solve the problem while using Puppy Linux. (I have Windows, Mint [Ubuntu flavor], Puppy, and PCLinuxOS on my computer. Open Office is installed in all of them.) I saved my Open Office Writer file as a .doc, since I was going to e-mail it to a web site administrator to be converted to html, as they had agreed to do this.

Then while in Puppy Linux I clicked on the .doc file and it automatically opened in Abiword. I hadn't previously used Abiword for .doc files, so this surprised me. Everything looked fine, and this is a 14,000 word document. So in Abiword I tried saving to .html and it worked perfectly. All the formatting was preserved, the paragraph spacing, and subsection spacing was correct. Puppy Linux uses Abiword and Seamonkey browser/composer.

I don't have to make .html files very often, but this is a simple alternative.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group