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

Unexpected replacement of \right) with exlamation point in MathTextParser output #5210

Open
Assignees
QuLogic
Milestone
@rsnape

Description

@rsnape

This bug report originates from my attempts toanswer this question on Stack Overflow. Minimal example thanks to theother answer there by Baptiste.


With certain LaTeX strings, the right paranthesis indicates by\right) is replaced with an exclamation point when passed to MathTextParser and rendered as a bitmap or png. This behaviour appears to occur when the parantheses are around an expression comprising multiple layered fractions. It does not occur if\right] or\right\} are used

The minimal code to reproduce this is as follows:

import matplotlib.mathtext as mts = r'$\left(\frac{\frac{\frac{M}{I}}{N}}' \     r'{\frac{\frac{B}{U}}{G}}\right)$'parser = mt.MathTextParser("Bitmap")for size in range(1, 30):    filename = "figure{0}.png".format(size)    parser.to_png(filename, s, fontsize=size)

This gives output like

Image with exclamation in

Investigations indicate that this occurs only for certain combinations of expression and font size, but the example given above seems to give the most consistent failure conditions. Itmay be related todpi in the rendering, however this has not yet been conclusively proven or disproven.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp