[Solved] Can't write a literal character (%) in a Math object

Discuss the formula editor
Post Reply
clone799
Posts: 6
Joined: Thu Apr 27, 2023 4:13 pm

[Solved] Can't write a literal character (%) in a Math object

Post by clone799 »

I can't believe I am having this problem,and if it's just me being a dummy, let me know.

I have a document in which I need to insert a math formula. I inserted a math/formula object, and here's what I wrote (with sensitive information removed, of course):

{x}over{y}={20}over{94}=21%

I want it to look like this:
CutPerc.PNG
CutPerc.PNG (2.01 KiB) Viewed 17742 times
Instead, it looks like this:
CutNoPerc.PNG
CutNoPerc.PNG (854 Bytes) Viewed 17742 times
I know that % is used in functions (an atrocious design choice for a MATH markup language, but that's not the point). But there has to be a way to write a single percent sign, right? They allow a perthousand sign (%perthousand), but not a %? And I've tried using a \ and a / to mark a literal character, nothing.

I can't believe this is such a problem, and I can't believe there's nothing in the documentation to resolve this. How has this never come up? This has to be me, I'm sure of it, I'm the one unable to find the easy solution. Because nobody would make a whole text editing software in which you can add math formulas, but you can't use a percent sign in any of them.

I am begging the wizards of this board to help me, I am out of ideas.
Last edited by clone799 on Thu Apr 27, 2023 5:50 pm, edited 1 time in total.
Apache OpenOffice 4.1.1 - Windows 10
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Can't write a literal character (%) in a math object.

Post by RoryOF »

Put your % sign in double quotes: "%"
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
clone799
Posts: 6
Joined: Thu Apr 27, 2023 4:13 pm

Re: Can't write a literal character (%) in a math object.

Post by clone799 »

RoryOF wrote: Thu Apr 27, 2023 5:05 pm Put your % sign in double quotes: "%"
Honestly, that's such an obvious solution I can't believe I didn't think of it. Thank you.

While I'm here, is there a document/help page where is says that? I couldn't find it for the life of me.
Apache OpenOffice 4.1.1 - Windows 10
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: SOLVED: Can't write a literal character (%) in a math object.

Post by RoryOF »

I just searched on the Forum. using the Forum search at top right.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Zizi64
Volunteer
Posts: 11358
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: SOLVED: Can't write a literal character (%) in a math object.

Post by Zizi64 »

Three versions work in my LibreOffice 7.4.6:
LO746_Equ.png
LO746_Equ.png (15.69 KiB) Viewed 17674 times

https://en.wikipedia.org/wiki/Percent_sign
"Form and spacing
English style guides prescribe writing the percent sign following the number without any space between (e.g. 50%)."

Therefore it will be better result with the formula:

Code: Select all

{x}over{y}={20}over{94}="21%"
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
RoryOF
Moderator
Posts: 34611
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved]: Can't write a literal character (%) in a math object.

Post by RoryOF »

@Zizi64: Only your first example works with OpenOffice.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
cwolan
Posts: 129
Joined: Sun Feb 07, 2021 3:44 pm

Re: Can't write a literal character (%) in a math object.

Post by cwolan »

clone799 wrote: Thu Apr 27, 2023 5:49 pm
RoryOF wrote: Thu Apr 27, 2023 5:05 pm Put your % sign in double quotes: "%"
Honestly, that's such an obvious solution I can't believe I didn't think of it. Thank you.

While I'm here, is there a document/help page where is says that? I couldn't find it for the life of me.
See OpenOffice Help for Math, topic "Entering Text".
The other option is to define your own % symbol (mentioned in the Bugzilla request for enhancement 20739 ).


EnteringText.jpg
EnteringText.jpg (89.76 KiB) Viewed 17549 times
OpenOffice 1.1.5 – 4.1.15
LibreOffice 3.3.0.4 – 7.6.6
Windows 7,10,11 64-bit
User avatar
thejoyofwriting
Banned
Posts: 2
Joined: Mon Jun 19, 2023 3:15 am

Re: Can't write a literal character (%) in a math object.

Post by thejoyofwriting »

cwolan wrote: Thu Apr 27, 2023 9:37 pm
clone799 wrote: Thu Apr 27, 2023 5:49 pm
RoryOF wrote: Thu Apr 27, 2023 5:05 pm Put your % sign in double quotes: "%"
Honestly, that's such an obvious solution I can't believe I didn't think of it. Thank you.

While I'm here, is there a document/help page where is says that? I couldn't find it for the life of me.
See OpenOffice Help for Math, topic "Entering Text".
The other option is to define your own % symbol (mentioned in the Bugzilla request for enhancement 20739 ).



EnteringText.jpg
I am having some troubles,when I am typing the 15 "%" in my report the numbers 15 are in italic and the % is in normal font,how can i format the mto the same fonts ? it's really weird
 Edit: Spam link in quoted text removed 
Last edited by thejoyofwriting on Sun Jun 25, 2023 7:44 pm, edited 1 time in total.
Apache OpenOffice 4.1.5 released.
Windows 10
User avatar
Zizi64
Volunteer
Posts: 11358
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: [Solved] Can't write a literal character (%) in a Math object

Post by Zizi64 »

I am having some troubles,when I am typing the 15 "%" in my report the nu
Please upload your ODF type sample file here.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
DiGro
Posts: 173
Joined: Mon Oct 08, 2007 1:31 am
Location: Hoorn NH, The Netherlands

Re: [Solved] Can't write a literal character (%) in a Math object

Post by DiGro »

Use ~ or ` for a great or small gap respectively between

Code: Select all

{x}over{y}~=~{20}over{94}~=`21"%"
that will get you the spaces you desire:
With gaps
With gaps
CutPerc_with_gaps.PNG (2.01 KiB) Viewed 16572 times
____________
DiGro

AOO 4.1.15 (Dutch) on Windows 11. Scanned with Ziggo Safe Online (F-Secure)
Post Reply