bugtex4ht - Bugs: bug #404, Using label/ref seems to be broken...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #404: Using label/ref seems to be broken with opendocument export

Submitted by:  Florian Zumkeller-Quast <branleb>
Submitted on:  Fri Oct 26 12:55:17 2018  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

(Jump to the original submission Jump to the original submission)

Wed Nov 25 12:09:01 2020, comment #7:

Thanks, Michal, I was not aware of this. This works indeed.

Jürgen Spitzmüller <jspitzm>
Wed Nov 25 11:55:24 2020, comment #6:

Hi Jürgen,

oolatex is not recommended way to use Tex4ht for the ODT conversion. It is better to use

make4ht -f odt mwe.tex

make4ht fixes some issues in ODT files and internal links are among them. Your example seems to work with make4ht.

Michal Hoftich <michal_h21>
Project Member
Wed Nov 25 11:27:49 2020, comment #5:

This seems to be broken again on current TeXLive.

See the minimal example I attach, processed with
mk4ht oolatex mwe.tex

(file #369, file #370, file #371)

Jürgen Spitzmüller <jspitzm>
Mon Aug 19 01:21:03 2019, comment #4:

hopefully updated in tl by now, closing.

Karl Berry <karl>
Project Administrator
Tue Jan 15 19:47:13 2019, comment #3:

The recent make4ht update which should be already included in TeX distributions should fix this issue when the ODT output format is selected.

Michal Hoftich <michal_h21>
Project Member
Thu Nov 1 11:14:42 2018, comment #2:

I've added the hyperlink fixing filter to the make4ht ODT format. It is available on Github. It requires updated LuaXML library, where I fixed one critical issue.

Michal Hoftich <michal_h21>
Project Member
Sat Oct 27 20:22:28 2018, comment #1:

It seems that post-processing by Xtpipes haven't been executed on the content.xml file, because it should replace <t4htlink> tags with valid OpenDocument elements.

Anyway, on my machine Xtpipes replace only some links, they doesn't replace the destinations in section titles. I also think text:a element should be used for links to get the hyperlink functionality.

I've created Lua filter for make4ht that replaces the link handling in xtpipes. The links produced by it are clickable.

The modified xtpipes file, make4ht build file and sample ODT file are attached.

The command used for the compilation is

make4ht -uf odt test-labelref.tex "TocLink"

It is necessary to use the development version of make4ht[1], because I fixed some bugs while working on this example.

[1] https://github.com/michal-h21/make4ht

(file #302, file #303, file #304)

Michal Hoftich <michal_h21>
Project Member
Fri Oct 26 12:55:17 2018, original submission:

When using \label{} and \ref{} (or \pageref{} in TeX, the opendocument output seems to be broken. The referenced Label is just not rendered visibly.

I've attached a MWE and the generated .odt file.

I'm using:

htxelatex test-labelref.tex "xhtml,ooffice" "ooffice/! -cmozhtf" "-coo -cvalidate"

to generated that file.
When running xelatex to generate a pdf file, everything works fine.

The TeX-Code line
<pre>
Something about Section \ref{sec:1} and --\ref{sec:2}-- to show something else on p.~\pageref{sec:1}.
</pre>

results in
<pre>
<!--l. 22--><text:p text:style-name="Text-body">Something about Section <t4htlink
href="#x1-10001">1<!--tex4ht:ref: sec:1 --></t4htlink> and &#x2013;<t4htlink
href="#x1-20002">2<!--tex4ht:ref: sec:2 --></t4htlink>&#x2013; to show something else on p.<text:s/><t4htlink
href="#x1-10001">3</t4htlink>.
</text:p>
</pre>

So, in summary, the reference is rendered, but not in the correct way. (Btw, shouldn't it be text:reference-ref instead of t4htlink? See http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#element-text_reference-ref)

If you need any further information to reproduce the behaviour, please let me know.

Florian Zumkeller-Quast <branleb>

 

Attached Files
file #369:  mwe.tex added by jspitzm (153B - text/x-tex)
file #370:  mwe.odt added by jspitzm (7kB - application/vnd.oasis.opendocument.text)
file #371:  mwe.log added by jspitzm (11kB - text/x-log)
file #302:  test-labelref.odt added by michal_h21 (8kB - application/vnd.oasis.opendocument.text)
file #303:  test-labelref.mk4 added by michal_h21 (1kB - application/octet-stream)
file #304:  oo-text.4xt added by michal_h21 (14kB - application/octet-stream)
file #299:  test-labelref.tex added by branleb (403B - text/x-tex)
file #300:  test-labelref.pdf added by branleb (17kB - application/pdf)
file #301:  test-labelref.odt added by branleb (8kB - application/vnd.oasis.opendocument.text)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jspitzm (Updated the item)
  • -unavailable- added by karl (Posted a comment)
  • -unavailable- added by michal_h21 (Updated the item)
  • -unavailable- added by branleb (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    11 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Nov 25 11:27:49 2020jspitzmAttached File-=>Added mwe.tex, #369
      Attached File-=>Added mwe.odt, #370
      Attached File-=>Added mwe.log, #371
    Mon Aug 19 01:21:03 2019karlOpen/ClosedOpen=>Closed
    Tue Jan 15 19:47:13 2019michal_h21StatusNone=>Fixed
    Sat Oct 27 20:22:28 2018michal_h21Attached File-=>Added test-labelref.odt, #302
      Attached File-=>Added test-labelref.mk4, #303
      Attached File-=>Added oo-text.4xt, #304
    Fri Oct 26 12:55:17 2018branlebAttached File-=>Added test-labelref.tex, #299
      Attached File-=>Added test-labelref.pdf, #300
      Attached File-=>Added test-labelref.odt, #301
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray