Bug 129124 - Truncated trigonometric function names
Summary: Truncated trigonometric function names
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
6.3.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-01 10:25 UTC by Valdas
Modified: 2019-12-01 11:38 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
latex file (192 bytes, text/x-tex)
2019-12-01 10:25 UTC, Valdas
Details
odt file (9.47 KB, application/vnd.oasis.opendocument.text)
2019-12-01 10:26 UTC, Valdas
Details
scrennshot of odt document (2.18 KB, image/png)
2019-12-01 10:31 UTC, Valdas
Details
scrennshot of pdf document (4.02 KB, image/png)
2019-12-01 10:31 UTC, Valdas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valdas 2019-12-01 10:25:13 UTC
Created attachment 156213 [details]
latex file
Comment 1 Valdas 2019-12-01 10:26:11 UTC
Created attachment 156214 [details]
odt file
Comment 2 Valdas 2019-12-01 10:30:41 UTC
 When converting from LaTeX (a.tex) to LibreOffice Writer (a.odt): resulting .odt displays only first letter of trigonometric functions (odt.png).
 But pdflatex produces correct result (pdf.png).
Comment 3 Valdas 2019-12-01 10:31:26 UTC
Created attachment 156216 [details]
scrennshot of odt document
Comment 4 Valdas 2019-12-01 10:31:54 UTC
Created attachment 156217 [details]
scrennshot of pdf document
Comment 5 Mike Kaganski 2019-12-01 10:40:03 UTC
(In reply to Valdas from comment #2)
>  When converting from LaTeX (a.tex) to LibreOffice Writer (a.odt)

you omitted every possible detail on *how* do you convert?
Comment 6 Valdas 2019-12-01 10:43:44 UTC
Sorry, I used PanDoc for that:

pandoc -f latex -t odt -o a.odt a.tex 

pandoc -v:
pandoc 2.8.0.1
Compiled with pandoc-types 1.20, texmath 0.12, skylighting 0.8.3
Comment 7 Mike Kaganski 2019-12-01 11:02:32 UTC
(In reply to Valdas from comment #6)

Something unrelated to LibreOffice (LibreOffice does not have an import filter for tex). Please file a bug against PanDoc.
Comment 8 Valdas 2019-12-01 11:10:46 UTC
PanDoc used for conversion from tex to odt. Resulting odt has converted equation in its native format where trigonometric function has full name (from internal "content.xml" file):

<math display="block" xmlns="http://www.w3.org/1998/Math/MathML"><mrow><msub><mi>x</mi><mn>1</mn></msub><mo>=</mo><msub><mi>l</mi><mn>1</mn></msub><mo>sin</mo><mrow><mo stretchy="true" form="prefix">(</mo><msub><mi>θ</mi><mn>1</mn></msub><mrow><mo stretchy="true" form="prefix">(</mo><mi>t</mi><mo stretchy="true" form="postfix">)</mo></mrow><mo stretchy="true" form="postfix">)</mo></mrow></mrow></math>

But in Libreoffice name appears truncated.
Comment 9 Mike Kaganski 2019-12-01 11:38:39 UTC
(In reply to Valdas from comment #8)

Exactly. The MathML generated by PanDoc is wrong:

> <?xml version='1.0' ?>
> <math display="block" xmlns="http://www.w3.org/1998/Math/MathML">
>     <mrow>
>         <msub>
>             <mi>x</mi>
>             <mn>1</mn>
>         </msub>
>         <mo>=</mo>
>         <msub>
>             <mi>l</mi>
>             <mn>1</mn>
>         </msub>
>         <mo>sin</mo>
>         <mrow>
>             <mo stretchy="true" form="prefix">(</mo>
>             <msub>
>                 <mi>θ</mi>
>                 <mn>1</mn>
>             </msub>
>             <mrow>
>                 <mo stretchy="true" form="prefix">(</mo>
>                 <mi>t</mi>
>                 <mo stretchy="true" form="postfix">)</mo>
>             </mrow>
>             <mo stretchy="true" form="postfix">)</mo>
>         </mrow>
>     </mrow>
> </math>

Note that "mo" in "<mo>sin</mo>", which is defining "mathematical operator" like "+". But sin is function name, and needs to be in <mi>...</mi>.