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

Discuss the formula editor

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

Postby Horus » Mon Jun 08, 2015 12:16 pm

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).
Horus
 
Posts: 86
Joined: Mon Apr 21, 2008 12:21 pm

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

Postby keme » Mon Jun 08, 2015 1:53 pm

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 3.4.1/4.1.2/4.1.3, on Ms Windows 7/10 and Mac OS-X 10.8.5 and 10.11.
LibreOffice 4.3.3.2 on Mepis Antix MX 14
User avatar
keme
Volunteer
 
Posts: 2983
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

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

Postby Horus » Mon Jun 08, 2015 2:57 pm

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 3092 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

Postby Horus » Mon Jun 08, 2015 4:34 pm

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)
Horus
 
Posts: 86
Joined: Mon Apr 21, 2008 12:21 pm

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

Postby acknak » Mon Jun 08, 2015 4:43 pm

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
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

Postby Horus » Mon Jun 08, 2015 5:59 pm

> 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
Horus
 
Posts: 86
Joined: Mon Apr 21, 2008 12:21 pm

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

Postby acknak » Mon Jun 08, 2015 7:16 pm

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
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

Postby keme » Tue Jun 09, 2015 9:30 am

A few workarounds...
Code: Select all   Expand viewCollapse view
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 3.4.1/4.1.2/4.1.3, on Ms Windows 7/10 and Mac OS-X 10.8.5 and 10.11.
LibreOffice 4.3.3.2 on Mepis Antix MX 14
User avatar
keme
Volunteer
 
Posts: 2983
Joined: Wed Nov 28, 2007 10:27 am
Location: Egersund, Norway

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

Postby acknak » Tue Jun 09, 2015 2:24 pm

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
User avatar
acknak
Moderator
 
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3


Return to Math

Who is online

Users browsing this forum: No registered users and 1 guest