Skip to content

Math Block: Use monospaced font for LaTeX input#72555

Closed
ItsRoy69 wants to merge 1 commit intoWordPress:trunkfrom
ItsRoy69:fix-72542
Closed

Math Block: Use monospaced font for LaTeX input#72555
ItsRoy69 wants to merge 1 commit intoWordPress:trunkfrom
ItsRoy69:fix-72542

Conversation

@ItsRoy69
Copy link
Copy Markdown
Contributor

@ItsRoy69 ItsRoy69 commented Oct 22, 2025

What?

Adds a monospaced font to the LaTeX input field in the Math block.

Closes #72542

Why?

LaTeX syntax uses special characters, brackets, and precise spacing that are easier to read and edit in a monospaced font (similar to code editors). This improves the user experience when writing mathematical expressions.

How?

Added style={ { fontFamily: 'monospace' } } prop to the TextareaControl component in the Math block's edit component.

Testing Instructions

  1. Create or edit a Math block
  2. Click on the block to open the LaTeX input popover
  3. Verify that the input field now displays text in a monospaced font
  4. Type some LaTeX syntax (e.g., \frac{a}{b}, x^2 + y^2 = r^2) and confirm it's more readable

Checklist

  • My code is tested
  • My code follows the WordPress code style
  • My code has proper inline documentation
  • I've included developer documentation if appropriate

Signed-off-by: ItsRoy69 <jyotirmoyroy649@gmail.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 22, 2025

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core, Gutenberg Plugin, New Block.
  • Labels found: First-time Contributor, [Block] Math.

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions
Copy link
Copy Markdown

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core, Gutenberg Plugin, New Block.
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ItsRoy69 <itsroy69@git.wordpress.org>
Co-authored-by: ellatrix <ellatrix@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Oct 22, 2025
@github-actions
Copy link
Copy Markdown

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @ItsRoy69! In case you missed it, we'd love to have you join us in our Slack community.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@ItsRoy69 ItsRoy69 changed the title Math Block: Use monospaced font for LaTeX input Enhancement: Use monospaced font for LaTeX input Oct 22, 2025
@ItsRoy69 ItsRoy69 changed the title Enhancement: Use monospaced font for LaTeX input Math Block: Use monospaced font for LaTeX input Oct 22, 2025
@ItsRoy69 ItsRoy69 closed this Oct 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Math First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Math block: use a monospaced font for LaTeX input

2 participants