Skip to content

style(latex): replace $$ with recommended \[ \] for Centered Math snippet#615

Open
asaberui1 wants to merge 1 commit intorafamadriz:mainfrom
asaberui1:main
Open

style(latex): replace $$ with recommended \[ \] for Centered Math snippet#615
asaberui1 wants to merge 1 commit intorafamadriz:mainfrom
asaberui1:main

Conversation

@asaberui1
Copy link

Description

This PR updates the Centered Math snippet to use \[ ... \] instead of $$...$$.

Motivation

In modern LaTeX, using \[ ... \] is widely considered a best practice over the plain TeX syntax $$...$$ for unnumbered displayed equations. The benefits include:

  1. Better Spacing: \[ ... \] handles vertical spacing more consistently.
  2. Error Handling: It provides better error checking and prevents common alignment issues.
  3. Compatibility: It integrates more seamlessly with document classes and packages like amsmath.

Reference: StackExchange: Why is [ ... ] preferable to $$...$$?

Changes

Modified the Centered Math snippet body:

  • From: "body": ["\\$$ $0 \\$$"]
  • To:
    "body": [
        "\\[",
        "\t$0",
        "\\]"
    ]

@asaberui1 asaberui1 changed the title pref(latex): replace $$ with recommended \[ \] for Centered Math snippet style(latex): replace $$ with recommended \[ \] for Centered Math snippet Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant