Bug 47914 - Enhancement Request: Please add Laplace symbol
Summary: Enhancement Request: Please add Laplace symbol
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Formula Editor (show other bugs)
Version:
(earliest affected)
3.4.5 release
Hardware: Other All
: low enhancement
Assignee: dante19031999
URL:
Whiteboard: target:7.1.0 target:7.0.0.1
Keywords:
Depends on:
Blocks: Formula-Editor
  Show dependency treegraph
 
Reported: 2012-03-26 09:31 UTC by Jeremy Newton
Modified: 2020-06-26 09:20 UTC (History)
3 users (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 Jeremy Newton 2012-03-26 09:31:14 UTC
Just a quick request: I do a lot of math on Libre Office using Laplace Transforms using the symbol ℒ (U +2112) and would like to request for it's inclusion in the Formula Editor.

Though I can just use a character map program to grab it and then paste it into Libre Office, which I currently do, I figured it would be easier if it was already in the Catalogue or elements menu. Also considering that it's a common symbol in many maths and sciences, it would make sense for its inclusion.

Also note that it seems to look nicer with a sans-like font (eg. in DejaVu Sans it looks prefect) if that matters at all.
Comment 1 leighman 2012-09-27 11:36:09 UTC
Certainly seems reasonable, if a little niche.
Would it be better to just provide easy access to the character map in the formula editor?
Comment 2 Kenney Phillis Jr 2012-12-06 23:51:57 UTC
I agree that adding the laplace symbol would be useful. This is more relavant to people who are working with differential equations... I think if there is a dedicated symbol, that "%LAPLACE" would suffice and give no guesswork as to what this is supposed to be. This is similar to how the Pi symbol and others are done.
Comment 3 José Luis 2014-05-31 19:20:07 UTC
I think there is a way to achieve this using the Catalogue button in the Formula Editor. Then add the Ux2112 symbol (Laplacian like) and use Laplace as Symbol value. Then when you write %Laplace in the formula editor...

Works for me, the only trouble is that no appears like Deja Vu sans, but it's something.
Comment 4 José Luis 2014-05-31 19:27:31 UTC
Wait a moment, when you define the symbol name you also can define the symbol font, so... that's it ;)
Comment 5 Stephen 2016-01-27 23:07:23 UTC
Please also add the Fourier Transform symbol also.
Comment 6 Commit Notification 2020-06-24 10:02:01 UTC
dante committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e7fee907fa8240c742bd8f6268768d1acad2774f

tdf#40436 tdf#47914 RGB personalized color for math and laplace symbol 2

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2020-06-24 16:59:49 UTC
dante committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/bcec35810326c09dccac168e0411c5bb42475732

tdf#40436 tdf#47914 RGB personalized color for math and laplace symbol 2

It will be available in 7.0.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Phil 2020-06-26 07:39:26 UTC
Looking at the commit, it seems the code needs a switch/case instead of a list of if/else

See:
@@ -917,6 +917,8 @@ void SmElementsControl::addElements(const SmElementDescr aElementsArray[], sal_u
                addElement(aParser, "color silver { \"" + SmResId(STR_SILVER) + "\" }", aElement, SmResId(pElementHelp));
            else if (aElement == RID_COLORX_TEAL)
                addElement(aParser, "color teal { \"" + SmResId(STR_TEAL) + "\" }", aElement, SmResId(pElementHelp));
            else if (aElement == RID_COLORX_RGB)
                addElement(aParser, "color rgb 0 0 0 { \"" + SmResId(STR_RGB) + "\" }", aElement, SmResId(pElementHelp));
            else if (aElement == RID_ALIGNLX)
                addElement(aParser, "\"" + SmResId(STR_ALIGN_LEFT) + "\"", aElement, SmResId(pElementHelp));
            else if (aElement == RID_ALIGNCX)
Comment 9 Phil 2020-06-26 07:41:50 UTC
Additionnaly, in comment 5:

"Please also add the Fourier Transform symbol also."
Comment 10 dante19031999 2020-06-26 08:23:44 UTC
(In reply to Phil from comment #9)
> Additionnaly, in comment 5:
> 
> "Please also add the Fourier Transform symbol also."

I see. Sorry, forgotten. In any case I'm rewritting the mathml, wich is said to not work well. I'll add support for it (it's 10 lines of code).