Page 1 of 1

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

PostPosted: Mon Jun 08, 2015 12:16 pm
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!

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

PostPosted: Mon Jun 08, 2015 1:53 pm
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).

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

PostPosted: Mon Jun 08, 2015 2:57 pm
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 3675 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...

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

PostPosted: Mon Jun 08, 2015 4:34 pm
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)

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

PostPosted: Mon Jun 08, 2015 4:43 pm
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.

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

PostPosted: Mon Jun 08, 2015 5:59 pm
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

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

PostPosted: Mon Jun 08, 2015 7:16 pm
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.

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

PostPosted: Tue Jun 09, 2015 9:30 am
by keme
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 ;) ).

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

PostPosted: Tue Jun 09, 2015 2:24 pm
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.