Skip to content

[Doc]: dynamically resize the mathtext symbol tables #26143

Description

@story645

Documentation Link

https://matplotlib.org/devdocs/users/explain/text/mathtext.html#symbols

Problem

In the math text example, the number of columns for displaying each set of symbols is specified as part of defining each set of symbols:

symbols = [
["Lower-case Greek",
6,
r"""\alpha \beta \gamma \chi \delta \epsilon \eta \iota \kappa
\lambda \mu \nu \omega \phi \pi \psi \rho \sigma \tau \theta
\upsilon \xi \zeta \digamma \varepsilon \varkappa \varphi
\varpi \varrho \varsigma \vartheta""".split()],

This makes the tables somewhat brittle with respect to a reordering or a resizing.

Suggested improvement

modify the run function of the directive to generate a more dynamic table, maybe a sphinx-design grid

tagging this good first issue because the work is contained to the math_symbol_table.py file and the way to verify that the changes make sense is to build the docs and ensure that the resulting tables in the mathtext tutorials look similar to the old ones but the number of columns change to fit better when the browser window is resized. This issue requires working knowledge of sphinx.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions