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

LaTeX formatting issues #9

Open
JohnFNovak opened this issue Oct 13, 2022 · 0 comments
Open

LaTeX formatting issues #9

JohnFNovak opened this issue Oct 13, 2022 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@JohnFNovak
Copy link

JohnFNovak commented Oct 13, 2022

I think that this issue is closely related to issue #4, but pages that have latex in them are returned with the formulas almost unreadable. Specifically, formulas are returned twice, once in a string representation with a lot of (seemingly) random spaces, and then in proper latex format but wrapped in {displaystyle <formula> }, instead of $<formula>$.

ex (note that github removes all the gnarly extra spaces):

In functional analysis and operator theory, a bounded linear operator is a linear transformation L : X → Y {\displaystyle L:X\to Y} between topological vector spaces (TVSs) X {\displaystyle X} and Y {\displaystyle Y} that maps bounded subsets of X {\displaystyle X} to bounded subsets of Y . {\displaystyle Y.} If X {\displaystyle X} and Y {\displaystyle Y} are normed vector spaces (a special type of TVS), then L {\displaystyle L} is bounded if and only if there exists some M > 0 {\displaystyle M>0} such that for all x ∈ X , {\displaystyle x\in X,} The smallest such M {\displaystyle M} is called the operator norm of L {\displaystyle L} and denoted by ‖ L ‖ . {\displaystyle |L|.} A bounded operator between normed spaces is continuous and vice versa.The concept of a bounded linear operator has been extended from normed spaces to certain to all topological vector spaces.Outside of functional analysis, when a function f : X → Y {\displaystyle f:X\to Y} is called "bounded" then this usually means that its image f ( X ) {\displaystyle f(X)} is a bounded subset of its codomain. A linear map has this property if and only if it is identically 0. {\displaystyle 0.} Consequently, in functional analysis, when a linear operator is called "bounded" then it is never meant in this abstract sense (of having a bounded image).

instead of

In functional analysis and operator theory, a bounded linear operator is a linear transformation $L:X\to Y$ between topological vector spaces (TVSs) $X$ and $Y$ that maps bounded subsets of $X$ to bounded subsets of $Y.$ If $X$ and $Y$ are normed vector spaces (a special type of TVS), then $L$ is bounded if and only if there exists some $M&gt;0$ such that for all $x\in X,$ The smallest such $M$ is called the operator norm of $L$ and denoted by $|L|.$ A bounded operator between normed spaces is continuous and vice versa.

The concept of a bounded linear operator has been extended from normed spaces to certain to all topological vector spaces.

Outside of functional analysis, when a function $f:X\to Y$ is called "bounded" then this usually means that its image $f(X)$ is a bounded subset of its codomain. A linear map has this property if and only if it is identically $0.$ Consequently, in functional analysis, when a linear operator is called "bounded" then it is never meant in this abstract sense (of having a bounded image).

I have made a sincere effort to get to the bottom of this, and #4, and I've made some headway. This problem seems to arise from the explaintext flag in the PHP api request url. Interested parties can experiment for themselves, the explaintext flag is in the prop=extracts section: https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&format=json&prop=extracts&titles=Bounded_operator&redirects=1&converttitles=1&formatversion=latest&explaintext=1

One option would be to not use the explaintext flag and parse the HTML, but that would create a lot of additional parsing work for the plugin.

@jmilldotdev jmilldotdev added enhancement New feature or request help wanted Extra attention is needed labels Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants