Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pasting inline math from Wikipedia makes a mess #1350

Open
3 tasks done
garrettgsb opened this issue Jun 29, 2024 · 1 comment
Open
3 tasks done

Pasting inline math from Wikipedia makes a mess #1350

garrettgsb opened this issue Jun 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@garrettgsb
Copy link

Have you read a contributing guide?

  • I have read CONTRIBUTING.md
  • I have searched the existing issues and didn't find any that were similar
  • I have considered creating a pull request with fixes instead of a bug report and want to proceed

Current Behavior

Copying this text from Wikipedia:

wikipedia-cauchy-distribution

And pasting into AnyType begets this result:

anytype-cauchy-distribution

That is, the text from the mathematical formula is splayed out on multiple lines, and I think a broken SVG embed is included.

Expected Behavior

The text for the math is pasted in as one contiguous unit, similar to how it's rendered on the page.

I can see a few different outcomes that could make sense:

  • (Ideal) Embed and render the SVG in the same way that Wikipedia does, so it looks the same
  • At least avoid breaking each character out into its own block-- just paste the characters in as one continuous string, like a regular HTML text field would:

f ( x ; x 0 , γ )

That's how the expression looks when copy-pasted into this field, for example. It looks a little janky, but is tolerable.

Maybe converting to LaTeX is possible, but I wouldn't know how to approach that.

Steps To Reproduce

  1. Create a new page or note in Anytype
  2. Copy the following excerpt from the first paragraph of this Wikipedia page:

The Cauchy distribution f ( x ; x 0 , γ ) {\displaystyle f(x;x_{0},\gamma )} is the distribution of the x-intercept of a ray issuing from ( x 0 , γ ) {\displaystyle (x_{0},\gamma )} with a uniformly distributed angle. It is also the distribution of the ratio of two independent normally distributed random variables with mean zero.

  1. Paste into the Anytype document
  2. See that the text is messy

Environment

- OS: macOS 12
- Anytype Version: 0.40.9

Anything else?

No response

@garrettgsb garrettgsb added the bug Something isn't working label Jun 29, 2024
@ra3orblade ra3orblade transferred this issue from anyproto/anytype-ts Jun 30, 2024
@ra3orblade
Copy link
Contributor

We will need to fix this when inline-latex arrives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants