Page 1 of 1
[Solved] ChatGPT math equations don't paste as expected
Posted: Thu Jan 09, 2025 6:08 am
by rayroshi
Using Windows 10 and OpenOffice Writer, I am trying to copy and paste mathematical statements, but when pasting them, the terms are often doubled; e.g., if I were to try pasting "ϕ(n)=(p−1)×(q−1)ϕ," it appears as "ϕ(n)=(p−1)×(q−1)ϕ(n)=(p−1)×(q−1)." So, if dealing with large mathematical paragraphs, this becomes a time-consuming nightmare if I then have to go through the whole thing, manually deleting things.
Is there any way avoid this repetition? Any help would be much appreciated.
Re: Can't paste mathematical notation
Posted: Thu Jan 09, 2025 7:02 am
by FJCC
Do I understand you correctly that your mathematical statements are plain text and not formula objects? If so, Writer would not treat them differently than any other text. Do you not see double pasting when you copy and paste text with only roman letters?
What happens if you paste using a different method than your standard one? If you usually paste with Ctrl + V, try using the menu Edit -> Paste. Does the problem persist?
Re: Can't paste mathematical notation
Posted: Thu Jan 09, 2025 9:06 am
by Hagar Delest
From where do you paste the strings?
It may come from an object that has metadata (in this case that would be identical to the displayed string) and then when pasted you get both strings.
Have you tried other paste special options?
Re: Can't paste mathematical notation
Posted: Thu Jan 09, 2025 5:11 pm
by MrProgrammer
Hagar Delest wrote: ↑Thu Jan 09, 2025 9:06 am
From where do you paste the strings?
According to these topics, they are probably pasting from an unspecified web page which has metadata.
[Solved] Darken Text In a Text Box
[Dropped] Preserve math format when pasting into Writer
rayroshi wrote: ↑Thu Jan 09, 2025 6:08 am
… when pasting them, the terms are often doubled …
Web pages may have lots of content present which the web browser has been told not to display. Copy/paste to Writer can therefore produce unexpected results, because Writer is not a web browser and cannot display the copied data the same way a web browser can. Review the advice given in your earlier topics. For some web pages Edit → Paste Unformatted may create text which you can then place in a
Formula Object (Insert → Object → Formula).
In general you will need a Formula Object to properly display mathematical equations in Writer. You will need to create that yourself; the object won't be available on a web page for you to copy.
The path of least effort may be to place an
image of the formula from the web page in your Writer document.
[Tutorial] Some useful hints on using images
If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.
Re: Can't paste mathematical notation
Posted: Thu Jan 09, 2025 8:20 pm
by rayroshi
Thanks to all of you for your responses; I really appreciate it.
I am pasting the responses that I get from ChatGTP, so I don't really know what kind of format in which they are written; don't know if that information helps you to help me or not, though.
Re: Can't paste mathematical notation
Posted: Thu Jan 09, 2025 9:07 pm
by Bill
Please provide a sample document or tell us how to reproduce the problem.
Re: Can't paste mathematical notation
Posted: Thu Jan 09, 2025 11:12 pm
by Hagar Delest
If you paste in a text editor (like Notepad) what do you get? Then copy that and paste it in Writer.
Re: Can't paste mathematical notation
Posted: Fri Jan 10, 2025 7:32 pm
by rayroshi
Hi Bill, thanks for responding. Okay, here's an example of a simple problem that I am using just as an example. It was posted to ChatGTP and then the answer was copied and pasted into a blank Writer document. I hope this helps:
To find the derivative of the function f(x)=4x3f(x) = 4x^3f(x)=4x3, we will use the power rule for derivatives.
Power Rule:
The power rule states that if you have a term of the form axnax^naxn, where aaa is a constant and nnn is a positive integer, the derivative is:
ddx(axn)=a⋅n⋅xn−1\frac{d}{dx}(ax^n) = a \cdot n \cdot x^{n-1}dxd(axn)=a⋅n⋅xn−1
Now, applying this rule to the function f(x)=4x3f(x) = 4x^3f(x)=4x3:
1. Identify the constant a=4a = 4a=4 and the exponent n=3n = 3n=3.
2. Apply the power rule: Multiply the constant 444 by the exponent 333, then subtract 1 from the exponent.
f′(x)=4⋅3⋅x3−1=12x2f'(x) = 4 \cdot 3 \cdot x^{3-1} = 12x^2f′(x)=4⋅3⋅x3−1=12x2
Final result:
The derivative of f(x)=4x3f(x) = 4x^3f(x)=4x3 is:
f′(x)=12x2f'(x) = 12x^2f′(x)=12x2
Re: Can't paste mathematical notation
Posted: Fri Jan 10, 2025 8:19 pm
by rayroshi
Hi Hagar. Thanks for your help. I think you may be onto something.
Okay, following your suggestion, I tried pasting ChatGTP's answer to this simple calculus problem: "What is the first derivative of 4x^3?"
I then copied ChatGTP's answer into Wordpad, as you recommended, and here's what I got:
The first derivative of 4x34x3 can be found using the power rule of differentiation, which states:
ddx(xn)=n⋅xn−1
dxd(xn)=n⋅xn−1
For 4x34x3, apply the power rule:
ddx(4x3)=4⋅3x3−1=12x2
dxd(4x3)=4⋅3x3−1=12x2
So, the first derivative of 4x34x3 is:
12x2
12x2
So, as you can see, it doesn't appear to be an Openoffice problem, because it was already showing up in a 'doubled' form, even in Wordpad, which means that just the act of copying it somehow makes it appear double. How to I get around that?
Re: Can't paste mathematical notation
Posted: Fri Jan 10, 2025 11:09 pm
by Hagar Delest
It seems that this how the HTML is formatted in the chatGPT interface. Thus not much to do I fear.
Just use a text editor to remove the added lines before copying and pasting that in Writer.
Please add
[Solved] at the beginning of the title in your
first post (top of the topic) with the
🖉 button if your issue has been fixed (I agree it's only a workaround here).
Re: Can't paste mathematical notation
Posted: Fri Jan 10, 2025 11:33 pm
by rayroshi
Hi Hagar.
Okay, well it looks like I'm just stuck doing it manually. Thanks for your help anyway! I really appreciate it.
--Ray Cole
Re: Can't paste mathematical notation
Posted: Fri Jan 10, 2025 11:46 pm
by Hagar Delest
I have asked to perplexity.ai and it seems that there are workarounds:
To prevent double quotes when pasting from ChatGPT, you can follow these steps:
1. Ask ChatGPT to format its response in Markdown4. This will help preserve formatting and avoid issues with quotes.
2. When copying the text, select and drag the entire response instead of using the copy button4. This method helps maintain the original formatting.
3. If you're pasting into a document editor like Google Docs, drag and drop the selected text directly from ChatGPT into the document4. This technique often preserves formatting better than traditional copy-paste.