[Issue] Punctuations & non-letter symbols wrongly in italics

Discuss the formula editor
Post Reply
Horus
Posts: 86
Joined: Mon Apr 21, 2008 12:21 pm

[Issue] Punctuations & non-letter symbols wrongly in italics

Post by Horus »

I've noticed that punctuations, eg comma, semi-colon, exclamation marks, are wrongly in italics. After a search in OOO bugzilla, I was astonished to see that the bug had been reported in 2003 and thus is a known bug!

https://bz.apache.org/ooo/show_bug.cgi?id=11138

I've added my comment there (comment 7). I sent a post here in the hope that the bug would be "revived" and get more attention.

So, the moment, for something as simple as
(x, 3!)

I have to write
(x"," 3"!")

That's really really ugly!
Last edited by Hagar Delest on Thu Jun 11, 2015 9:45 pm, edited 1 time in total.
Reason: tagged [Issue] (link to a bug report).
User avatar
keme
Volunteer
Posts: 3738
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Punctuations and non-letter symbols are wrongly in itali

Post by keme »

I see your point. The punctuation symbols are normally operators ("," for list separator and "!" for factorial), so they should not be in italic.

For the comma I have no solution other than quoting. The "solution" to force operator handling for the exclamation point is to use the factorial prefix.
"fact a" comes out as "a!" (italic letter and straight punctuation). Hardly less ugly, but perhaps more readable (depending on "fact" being suitable for your context).
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
Horus
Posts: 86
Joined: Mon Apr 21, 2008 12:21 pm

Re: Punctuations and non-letter symbols are wrongly in itali

Post by Horus »

Thanks for the "fact" keyword! I didn't know it exists because it's not shown in the "Elements" dialog > Function section as shown in the image below:
oomath-element-dialog.png
oomath-element-dialog.png (7.52 KiB) Viewed 5012 times
According to "Help", "fact" is the only function not shown in that handy dialog. Well, let's hope that's the case.

I've just noticed another problem that didn't catch my eyes before. When there's a number before a variable, the variable is NOT italics. Try these examples:

ab^2 newline
3ab^2 newline
3 ab^2

The "only" workaround is artificially putting a space after the number (3rd line), but in correct math typesetting, this is not necessary or recommended.

Wow, OO Math is so broken...
Horus
Posts: 86
Joined: Mon Apr 21, 2008 12:21 pm

Re: Punctuations and non-letter symbols are wrongly in itali

Post by Horus »

I've just filed a bug report for the last point:
Issue 126357 - Letters not in italics if preceded by number (https://bz.apache.org/ooo/show_bug.cgi?id=126357)
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Punctuations and non-letter symbols are wrongly in itali

Post by acknak »

Horus wrote:... The "only" workaround is artificially putting a space after the number ...
No easier, but I typically use something like
3{a}b^2

It's a general limitation in the parser, so I'm used to breaking things up this way.
AOO4/LO5 • Linux • Fedora 23
Horus
Posts: 86
Joined: Mon Apr 21, 2008 12:21 pm

Re: Punctuations and non-letter symbols are wrongly in itali

Post by Horus »

> 3{a}b^2
OK, thanks, but look carefully, your expression gives a different rendering. There are spaces around the variable a. Try the following and you'll see:
3{a}bcd^2
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Punctuations and non-letter symbols are wrongly in itali

Post by acknak »

Horus wrote:... look carefully, your expression gives a different rendering. There are spaces around the variable a.
Right. With a string of letters, OO Math does not (and cannot) know whether each letter is a separate variable, or one multi-letter variable. It takes the whole string of letters as the variable name. If you have adjacent single letter variables, you have to separate them somehow. I like to use the brackets.
AOO4/LO5 • Linux • Fedora 23
User avatar
keme
Volunteer
Posts: 3738
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

Re: Punctuations and non-letter symbols are wrongly in itali

Post by keme »

A few workarounds...

Code: Select all

nospace {3 a b c d^2} newline
3{abcd}^2 newline
3{a}{b}{c}{d}^2 
Can you use one of these?

There is some clutter in each, but it is like that with most tools. A bit of fiddling is needed to get exactly the appearance we want. Bug/flaw may be fixed in time, but until then we just have to live with it.
According to "Help", "fact" is the only function not shown in that handy dialog.
True, but the help is wrong. The "area hyperbolic" (inverse hyperbolic) functions are mentioned as "clickable" elements, but as far as I can see they are missing from the function category of "elements".
There may be others (like that "nospace" modifier ;) ).
Apache OO 4.1.12 and LibreOffice 7.5, mostly on Ms Windows 10
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Punctuations and non-letter symbols are wrongly in itali

Post by acknak »

LibreOffice has made some improvements in the Math interface, including the floating palette; I don't know if they've added the missing functions or not, but if you're a regular Math user, it might be worth a look.
AOO4/LO5 • Linux • Fedora 23
Post Reply