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

[Bug]: \genfrac has bad spacing with (high) custom ruler #22172

Open
@oscargus

Description

@oscargus

Bug summary

Using a high horizontal ruler overwrites denominator

Code for reproduction

importmatplotlib.pyplotaspltplt.text(0.5,0.5,r'$\genfrac{}{}{10}{}{foo}{bar}$')plt.draw()

Actual outcome

image

Expected outcome

This is from LaTeX rendering, but actually not that good either. It seems like the distance is also scaled with the height of the bar.

image

Additional information

Using

        vlist = Vlist([cnum,                      # numerator                       Vbox(0, thickness * 2.0),  # space                       Hrule(state, rule),        # rule                       Vbox(0, thickness * 2.0 + 2 * rule),  # space                       cden                       # denominator                       ])

in_genfrac (that is, adding 2 * rule to the second spacer) gives

image

Which I guess it at least somewhat consistent and no overwrite. The question is if one can/want to do better?

I can include this is#22171 if it seems like a reasonable solution.

Operating system

Windows 10

Matplotlib Version

3.6.0.dev1270+g46d2a1e.d20220109

Matplotlib Backend

module://matplotlib_inline.backend_inline

Python version

3.9.9

Jupyter version

No response

Installation

git checkout

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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