Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[ENH]: Parse "\limits" in mathtext #28051

Open
@ChenZiHong-Gavin

Description

@ChenZiHong-Gavin

Bug summary

I encountered an issue while using the mathtext module in matplotlib. The problem arises when trying to parse LaTeX expressions containing the "\limits" command. The "\limits" command is used in LaTeX to specify that certain mathematical operators should have their subscripts and superscripts displayed above and below, especially when used with "\int".

For example,
\int \limits _ { v } ^ { \mu e } e d A
get
image
and\int_ { v } ^ { \mu e } e d A
get
image

Code for reproduction

frommatplotlibimportmathtextlatex_text=r"$\int\limits_{ v } ^ { \mu e } e d A$"mathtext.math_to_image(latex_text,'test.png')

Actual outcome

ValueError:
\int\limits_{ v } ^ { \mu e } e d A
^
ParseFatalException: Unknown symbol: \limits, found '' (at char 4), (line:1, col:5)

Expected outcome

image

Additional information

No response

Operating system

Windows

Matplotlib Version

3.8.4

Matplotlib Backend

module://matplotlib_inline.backend_inline

Python version

3.9.13

Jupyter version

1.0.0

Installation

pip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp