Results 1 to 7 of 7

Thread: LibreOffice hyperlinks

  1. #1

    Default 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

  2. #2
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

    Default Re: LibreOffice hyperlinks

    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

  3. #3

    Default Re: LibreOffice hyperlinks

    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.

  4. #4
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

    Default Re: LibreOffice hyperlinks

    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

  5. #5

    Default Re: LibreOffice hyperlinks

    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.

  6. #6
    Join Date
    Sep 2013
    Location
    Norfolk, UK
    Posts
    1,165

    Default Re: LibreOffice hyperlinks

    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.
    Regards, Paul

    Tumbleweed (Snapshot: 20190814) KDE Plasma 5 ~~~
    Non-Tumbling Tumblweed (20150508) KDE 4 - Resurrected
    Leap 15.0 KDE Plasma 5 ~~~ Leap 15.1 KDE Plasma 5 (Work in progress...)

  7. #7
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

    Default Re: LibreOffice hyperlinks

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •