leanprover / leanprover/vscode-lean4

RFC: Streamlined Entry of LaTeX Math Blocks in Markdown

Open
#626 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

RFC
Dominant language
TypeScript
Stars
313
Forks
104
Avg merge
1h 56m
Merged PRs (30d)
1

Description

Proposal

This proposal suggests improving the Lean authoring experience by supporting a convenient way to wrap selected Markdown content as a $LaTeX$ math block—e.g., by allowing users to select a block and press $ to wrap it automatically. This is an editor-level improvement aimed at reducing friction when authoring math-rich documentation in Lean.

  • User Experience: Entering $LaTeX$ math in Markdown currently requires manually typing $$ before and after each math block, which can be repetitive and error-prone. A simple keyboard interaction to wrap selected content in math delimiters would improve speed and reduce mechanical burden, especially when editing complex mathematical documentation.

  • Beneficiaries: Users writing Lean documentation that involves $LateX$ math expressions.

  • Maintainability: Will this change streamline code maintenance or simplify its structure? N/A

Community Feedback

Ideas should be discussed on the Lean Zulip prior to submitting a proposal. Summarize all prior discussions and link them here.

Relevant Zulip discussion. Relevant pull request 625.

During the discussion, it was noted that while it would be ideal to allow this behavior to be user-configurable, the current capabilities of VS Code’s language-configuration.json do not expose an API for dynamic reconfiguration. Alternative mechanisms (such as a custom editor command or extension-level configuration) may be necessary to support this feature.

Impact

This proposal aims to improve the productivity of Lean users when working with Markdown and $LaTeX$ math. If you believe this feature would be valuable, please add a 👍 to the issue or share it with others who might benefit.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the linked Zulip discussion and pull request 625 first; the issue provides no file or test entry point. Compare the proposed VS Code language-configuration approach with the custom command or extension-configuration alternatives, and treat an agreed implementation path and documented behavior as done.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.