LibreOffice hyperlinks

I’m trying to use LibreOffice to create a document with a table of
contents (TOC) including hyperlinks and then export it as HTML.

I have created a document, added a TOC, and formatted the tOC to contain
hyperlinks. They work within the application (ctrl-click) but the HTML
they generate doesn’t work. The anchors appear to be sensible but it
generates HTML for the links like:

<p class=“P29”><a href="./#__RefHeading__1332_444093600"
class=“Index_20_Link”>1.2.Definitions</a></p>

That tries to link to an anchor on the front page of our website,
instead of to an anchor on the page that is the document! Does anybody
know how to adjust the format of the links it generates?

I haven’t found anything in the help or with google. Our mail server has
just been reconfigured so I’m not sure whether the lack of response to
my subscription request is my problem or theirs. And I haven’t yet
figured out which oo/lo forum to use. So any help would be appreciated!

Cheers, Dave

Dave Howorth wrote:
>
> <p class=“P29”><a href="./#__RefHeading__1332_444093600"
> class=“Index_20_Link”>1.2.Definitions</a></p>
>

> Cheers, Dave
>
remove the ./ before # and everything should work


GNOME 3.10.1
openSUSE 13.1 (Bottle) (x86_64) 64-bit
Kernel Linux 3.11.6-4-desktop

vazhavandan wrote:
> Dave Howorth wrote:
>>
>> <p class=“P29”><a href="./#__RefHeading__1332_444093600"
>> class=“Index_20_Link”>1.2.Definitions</a></p>
>
>> Cheers, Dave
>>
> remove the ./ before # and everything should work

Yes. The question is whether it is possible to persuade LO to do that,
or whether I need to keep on hacking the files afterwards.

Dave Howorth wrote:
> vazhavandan wrote:
>> Dave Howorth wrote:
>>>
>>> <p class=“P29”><a href="./#__RefHeading__1332_444093600"
>>> class=“Index_20_Link”>1.2.Definitions</a></p>
>>
>>> Cheers, Dave
>>>
>> remove the ./ before # and everything should work
>
> Yes. The question is whether it is possible to persuade LO to do that,
> or whether I need to keep on hacking the files afterwards.
>
I am using LibreOffice Writer Version: 4.1.3.2 and it generates
hyperlinks without the ./ if i use the file ==> export function to
create html pages


GNOME 3.10.1
openSUSE 13.1 (Bottle) (x86_64) 64-bit
Kernel Linux 3.11.6-4-desktop

vazhavandan wrote:
> Dave Howorth wrote:
>> vazhavandan wrote:
>>> Dave Howorth wrote:
>>>>
>>>> <p class=“P29”><a href="./#__RefHeading__1332_444093600"
>>>> class=“Index_20_Link”>1.2.Definitions</a></p>
>>>
>>>> Cheers, Dave
>>>>
>>> remove the ./ before # and everything should work
>>
>> Yes. The question is whether it is possible to persuade LO to do that,
>> or whether I need to keep on hacking the files afterwards.
>>
> I am using LibreOffice Writer Version: 4.1.3.2 and it generates
> hyperlinks without the ./ if i use the file ==> export function to
> create html pages

Yes. Upgrading solved that part. Unfortunately it now generates XHTML
that is neither valid nor accepted by Firefox (for different reasons,
I’m not claiming Firefox would accept valid XHTML). Great programming!

So my question is still are there any options to change what it
generates? I managed to subscribe to the LO list but so far haven’t got
any answer there either.

Depending on the complexity of the document…

Try ‘Save As’ with ‘HTML Document (Writer)’ as the filter.

The import/export of HTML is in dire need of attention. :frowning:

Dave Howorth wrote:
> Yes. Upgrading solved that part. Unfortunately it now generates XHTML
> that is neither valid nor accepted by Firefox (for different reasons,
> I’m not claiming Firefox would accept valid XHTML). Great programming!
>
> So my question is still are there any options to change what it
> generates? I managed to subscribe to the LO list but so far haven’t got
> any answer there either.
>
xhtml == html
Choose xhtml as format and save file as xyz.html

GNOME 3.10.1
openSUSE 13.1 (Bottle) (x86_64) 64-bit
Kernel Linux 3.11.6-4-desktop