Bug 134853 - Formulas not displayed in RTFs produced with latex2rtf
Summary: Formulas not displayed in RTFs produced with latex2rtf
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All Linux (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:rtf
Depends on:
Blocks: RTF-Fields
  Show dependency treegraph
 
Reported: 2020-07-16 08:42 UTC by Tristan Miller
Modified: 2022-09-05 15:55 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample LaTeX file to run through latex2rtf (72 bytes, text/x-tex)
2020-07-16 08:42 UTC, Tristan Miller
Details
RTF resulting from running test.tex through latex2rtf (4.49 KB, application/rtf)
2020-07-16 08:43 UTC, Tristan Miller
Details
Comparison MSO 2010 and LibreOffice 7.1 master (50.73 KB, image/png)
2020-07-16 08:50 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tristan Miller 2020-07-16 08:42:07 UTC
Description:
If I convert a LaTeX file to RTF using latex2rtf and then try to view the generated RTF in LibreOffice Writer, all the formulas are missing.  By contrast, if I open the RTF in Microsoft Word 2010, all the formulas are correctly displayed.

Attached is a minimal example: a simple LaTeX document containing one formula, and the RTF resulting from running latex2rtf on it.

Steps to Reproduce:
1. Open the attached RTF file

Actual Results:
2. LibreOffice Writer displays a blank page

Expected Results:
3. LibreOffice writer should have displayed a document containing the following formula: x² + y² = z²


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Possibly related to Bug 89146.
Comment 1 Tristan Miller 2020-07-16 08:42:48 UTC
Created attachment 163096 [details]
Sample LaTeX file to run through latex2rtf
Comment 2 Tristan Miller 2020-07-16 08:43:16 UTC
Created attachment 163097 [details]
RTF resulting from running test.tex through latex2rtf
Comment 3 Xisco Faulí 2020-07-16 08:50:07 UTC
Created attachment 163098 [details]
Comparison MSO 2010 and LibreOffice 7.1 master
Comment 4 Xisco Faulí 2020-07-16 08:51:48 UTC
Reproduced in

Version: 7.1.0.0.alpha0+
Build ID: d851a02df57ab378ed0cc6d9362516de09c3279c
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Version: 5.2.0.0.alpha1+
Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8)

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)

- LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 5 V Stuart Foote 2020-07-16 14:49:50 UTC
Looking at attachment 163097 [details] the latex2rtf converted formula is generated as MS RTF Field code 'EQ'

See little reason to tweak RTF import filters to parse as the latex2rtf project makes no effort beyond MS Word, or using the RTF 'EQ' field code extensions to hold the equations. And this is NOTOURBUG?

Ideally we'd want MathML, but I guess MathType MTEF could be parsed. The RTF Field extensions are an unsupported dead end which the latex2rtf project concedes is getting progressively worse in fidelity on their target Word platform.
Comment 6 Miklos Vajna 2020-07-16 15:49:07 UTC
RTF has at least 3 different ways to represent formulas:

- the rtf markup which is a 1:1 mapping of OOXML (newest)
- the OLE object way, which was the norm till 2003
- the EQ field

I think if somebody is interested in improving support for the last one in LO, it would be welcome, so no reason to close this bug.