Bug 162972 - add a %prime symbol (Unicode U+2032) to the sm Formula Symbols chart
Summary: add a %prime symbol (Unicode U+2032) to the sm Formula Symbols chart
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/how-to-...
Whiteboard:
Keywords:
Depends on:
Blocks: Formula-Editor
  Show dependency treegraph
 
Reported: 2024-09-15 02:51 UTC by john
Modified: 2024-09-15 13:52 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description john 2024-09-15 02:51:09 UTC
Description:
As discussed and documented and the following link, the rendering in LO of the 'prime' symbol is very unsatisfactory especially compared to latex.
https://ask.libreoffice.org/t/how-to-type-x-prime-and-subscript/100384/6

This leads to the messy hack of 

x^{ font fixed size*1.2{,}}_1

when it should be enough to write

x'_1
or
x^prime_1

I made a workaround by adding %prime to the symbol catalog, and it's a bit smoother/easier, but then requires a customisation of each LO install on which the document is being edited.

I think a good solution for the prime symbol is needed as part of the base installation of LO.






Steps to Reproduce:
1. add a formula x'_1 x^'_2
2. render 

Actual Results:
note that x'_1 renders with the subscript 1 too far to the right, while x^'_2 renders with the the prime too far up and too small.


Expected Results:
some standard syntax is needed in LO that gives a properly positioned prime symbol


Reproducible: Always


User Profile Reset: No

Additional Info:
As noted above, adding the symbol Ux2032 from MathJax Main (specifically this font -- it has an oversized prime that behaves correctly when used as a superscript)  solves this problem but is nasty because it requires customisation in order to achieve a commonly needed/standard feature.
Comment 1 V Stuart Foote 2024-09-15 12:09:06 UTC
Addition of a %prime to the 'Special' symbol set is reasonable. Would avoid users needing to repeatedly perform Unicode conversion of U+2032, or needing to make their own addition to the symbol set.

Not sure, but could we use a font other than 'OpenSymbol'? The U+2032 glyph in Liberation Serif looks better against default font for 'Variable' nodes.

Seems easy hackable.
Comment 2 john 2024-09-15 12:53:37 UTC
Just a couple that double prime and triple prime are also commonly used in certain contexts. It seems there could be pitfalls there to consider:

https://stackoverflow.com/questions/42723131/second-derivative-in-asciimath
Comment 3 V Stuart Foote 2024-09-15 13:52:01 UTC
(In reply to john from comment #2)
> Just a couple that double prime and triple prime are also commonly used in
> certain contexts. It seems there could be pitfalls there to consider:
>...

s/couple/comment/

Sure, suppose we could also provide %doubleprime against U+2033 and even %tripleprime against U+2034, but diminishing returns for common use.