bugtex4ht - Bugs: bug #505, Provide way to produce odt file...

 
 
Show feedback again

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

bug #505: Provide way to produce odt file without dynamic contents

Submitted by:  Jürgen Spitzmüller <jspitzm>
Submitted on:  Thu Apr 8 07:58:07 2021  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon Feb 3 17:34:44 2025, comment #13:

I think so :)

Michal Hoftich <michal_h21>
Project Member
Mon Feb 3 15:37:48 2025, comment #12:

Perfect, thanks. So I suppose this ticket can be closed.

Jürgen Spitzmüller <jspitzm>
Mon Feb 3 12:08:15 2025, comment #11:

Yes, I can add it as an extension. It is `nodynamicodt` in the development version of make4ht. I see that there will be TeX Live freeze soon, so I will release a new make4ht version this or next week.

You are right that there was extra space before \ref. It was caused by a spurious space in redefinition \ref in TeX4ht. This space was inserted by the code that handles sub- and superscripts. I've added the fix to TeX4ht sources and should be in TeX Live soon.

Michal Hoftich <michal_h21>
Project Member
Mon Feb 3 07:18:16 2025, comment #10:

This is awesome and safes me so much work, thank you so much! Maybe consider adding this as an extension to the make4ht package.

One quirk I noted (independent of the build script): There is an extra space before the cross reference (cf. "section 1" in the example you posted).

Jürgen Spitzmüller <jspitzm>
Sun Feb 2 16:54:02 2025, comment #9:

That's good to hear! And since I was on that, I also made a new version, which removes links from TOC and bibliography.

(file #546, file #547)

Michal Hoftich <michal_h21>
Project Member
Sun Feb 2 14:54:05 2025, comment #8:

Yes, it works! Excellent, thanks for the swift help.

Jürgen Spitzmüller <jspitzm>
Sun Feb 2 14:26:52 2025, comment #7:

Hi Jürgen, I hope that simple change from t4htlink to "text|a" dom:query_selector should work. See the updated build file.

(file #545)

Michal Hoftich <michal_h21>
Project Member
Sun Feb 2 13:28:58 2025, comment #6:

Sorry to come back to this, but the proposed extension does not seem to work any longer with current make4ht. The links are simply not removed. Any idea how to fix this?

Jürgen Spitzmüller <jspitzm>
Thu Oct 21 15:22:29 2021, comment #5:

Yes, thanks for the reminder. There is also one issue you posted last week that needs to be resolved. I hope that I will have some time and energy tomorrow for that.

Michal Hoftich <michal_h21>
Project Member
Thu Oct 21 14:36:36 2021, comment #4:

Michal, as I currently have your attention, maybe you can also look at the remainder of this issue (a script to turn bibliography and toc to static text).

Jürgen Spitzmüller <jspitzm>
Fri Apr 23 05:10:18 2021, comment #3:

Thanks, this does remove the links, though it does not turn the bibliography and the toc from fields to static text.

Jürgen Spitzmüller <jspitzm>
Thu Apr 22 21:54:14 2021, comment #2:

I don't know if it is enough, but the attached make4ht build file removes links. TeX sample is attached as well. I don't know if the removing of links is enough.

Compile as

make4ht -e build.lua -f odt sample.tex

(file #404, file #405)

Michal Hoftich <michal_h21>
Project Member
Thu Apr 22 20:36:56 2021, comment #1:

Hi Jürgen,

sorry for the late reply. I didn't notice this message earlier. There were some issues with mail notifications from the bug tracker.

I think that this should be possible using Lua post-processing. It would be much harder on the TeX level. I will try to come with something, probably in the form of make4ht extension.

Best regards,
Michal

Michal Hoftich <michal_h21>
Project Member
Thu Apr 8 07:58:07 2021, original submission:

Often publishers request to submit Word documents that do not have any dynamic elements (no fields, no hyperlinks, toc and bibliography as simple static text). It is possible to remove such elements in Word (Shift+Ctrl+F9) and by jumping through some more hoops [1] it is also possible in LibreOffice.

Since producing Word files from LaTeX for publishers strikes me a common use case of tex4ht (at least in my field, the Humanities, where LaTeX submissions are very rarely accepted), it would be good if tex4ht (or make4ht) provided a simple option to produce such static output.

[1] https://bugs.documentfoundation.org/show_bug.cgi?id=80786

Jürgen Spitzmüller <jspitzm>

 

Attached Files
file #546:  sample.tex added by michal_h21 (809B - text/x-tex)
file #547:  build.lua added by michal_h21 (1kB - text/x-lua)
file #545:  build.lua added by michal_h21 (346B - text/x-lua)
file #404:  build.lua added by michal_h21 (348B - text/x-lua)
file #405:  sample.tex added by michal_h21 (809B - text/x-tex)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by michal_h21 (Posted a comment)
  • -unavailable- added by jspitzm (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):

     

     

    6 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Feb 3 17:34:44 2025michal_h21Open/ClosedOpen=>Closed
    Sun Feb 2 16:54:02 2025michal_h21Attached File-=>Added sample.tex, #546
      Attached File-=>Added build.lua, #547
    Sun Feb 2 14:26:52 2025michal_h21Attached File-=>Added build.lua, #545
    Thu Apr 22 21:54:14 2021michal_h21Attached File-=>Added build.lua, #404
      Attached File-=>Added sample.tex, #405
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray