[Solved] Table of Contents (TOC) saving as HTML??

Discuss the word processor
Post Reply
djlerman
Posts: 2
Joined: Wed May 07, 2008 6:41 pm

[Solved] Table of Contents (TOC) saving as HTML??

Post by djlerman »

Welcome beginner. Please answer all of the questions below which may provide information necessary to answer your question.
-----------------------------------------------------------------------------------------------------------
Which version of OpenOffice.org are you using? 2.3.1
What Operating System (version) are you using? Win XP service pack 2
What is your question or comment? How to correctly save a document as HTML making the TOC live links.

I have 2 files that I brought in from WORD.

1 file when I save as HTML (from OO) the TOC turns into links
the other file when I save as HTML (from OO) the TOC turns into static text.

Any suggestion on how to get the TOC to save as links all of the time..

The files are completely separate files. There is no connection between the files. I'm just using them as an example to show that the issue probably isn't with the Application settings it might be how the TOC is set up or a setting in the document itself.

They are being saved as HTML so that they can be uploaded to a wiki and the wiki requires either it's own markup language or HTML.

For the problem document. The TOC refreshes in both WORD and OO but the links only work when it is opened in OO.

This is what I'm trying to do.
- Open word sample.doc in OO
- save as HTML (with the TOC being live hyperlinks.)

For the problem document:
- the TOC refreshs ok in WORD and OO
- the TOC <ctrl>+<click> only works in WORD but not in OO
- the TOC exports to HTML with the TOC as hyperlinks in WORD but not OO

Problem document:
One straight from WORD: http://www.iqaat.com/tmp/word%20sample.doc
One saved in OO: http://www.iqaat.com/tmp/word%20sample.odt
One saved as HTML from OO: http://www.iqaat.com/tmp/word%20sample.html

Document with working toc:
Word: http://www.iqaat.com/tmp/word_sample_working_toc.doc
OO: http://www.iqaat.com/tmp/word_sample_working_toc.odt
HTML: http://www.iqaat.com/tmp/word_sample_working_toc.html

Thanks,
~Donavon
Last edited by djlerman on Thu May 08, 2008 6:13 pm, edited 1 time in total.
User avatar
floris v
Volunteer
Posts: 4431
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: WRITER: Table of Contents (TOC) saving as HTML??

Post by floris v »

Please don't double post.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
djlerman
Posts: 2
Joined: Wed May 07, 2008 6:41 pm

Re: WRITER: Table of Contents (TOC) saving as HTML??

Post by djlerman »

Huh? This is my 1st ever post on this board.

I googled as well as did a search on this, as well as a few other OO related boards but could not find a solution, so I am posting to try and get some assistance or direction.

Thanks,
~D
User avatar
floris v
Volunteer
Posts: 4431
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: WRITER: Table of Contents (TOC) saving as HTML??

Post by floris v »

In that case, apologies. :oops: I somehow thought I'd seen it before in another forum here. As a way to make amends, I'll explain some stuff about doing it in html.

Please be aware that the Word format is a closed format, it has been reverse engineered b the developers of OOo, but some things may slip through.

Re conversion to html or editing html in OOo (or Word, for that matter): it's not a good idea to try it. html is better edited and made in special (and mostly free) html editors. The reason is that word processors add lots of unneeded code, and OOo used an old version of html.
If you strictly want html files, use the following for linked tables of contents:
First convert the files to hhtml, makes sure that you remove the hyperlinks before you do that. Then open the html file in for instance Notepad. Insert special html bookmarks where you want to link to. Bookmarks or anchors in HTML are inserted as <a name="chap1"></a>, where "chap1" is the bookmark name. If you link to a bookmark inside the same document, use <a href="#chap1">Chapter 1 - title of chapter 1</a>

You can also do the hard work in OOo, but it's much harder there.
OpenOffice 4.1.11 on Ubuntu; LibreOffice 6.4 on Linux Mint, LibreOffice 7.6.2.1 on Ubuntu
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
Hagar Delest
Moderator
Posts: 32667
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: WRITER: Table of Contents (TOC) saving as HTML??

Post by Hagar Delest »

djlerman wrote:For the problem document:
- the TOC refreshs ok in WORD and OO
- the TOC <ctrl>+<click> only works in WORD but not in OO
- the TOC exports to HTML with the TOC as hyperlinks in WORD but not OO
Make sure the headings appear in the Navigator (F5), it insures that the TOC is correctly build and hyperlinked. (I know they don't in your file).
See here: Chapter headings missing in Navigator.

Thanks to add '[Solved]' at beginning of your first post title (edit button) if your issue has been fixed.

NB: moved the thread to the Writer forum.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
Post Reply