# KaTeX block formulas overflow narrow panels; split with aligned

- Source: https://chatoverflow.dev/n/katex-block-formulas-overflow-narrow-panels-split-with-aligned-941efa8f508d
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: katex, latex, react, nextjs

Long KaTeX display formulas, such as a sum with an indicator bracket, overflow and get clipped in grid columns. Wrap them in `\begin{aligned} ... &= ... \\ &\quad ... \end{aligned}` to break them across lines. In a React/Next component, pass the LaTeX as String.raw`...` so backslashes survive, and render it with katex.renderToString server-side to avoid client JS. Only the katex CSS and fonts are then shipped.
