Skip to content

docs: add KaTeX formula rendering and fix trading/margin/PnL content - #101

Merged
ChesterSim merged 1 commit into
masterfrom
csim26/docs-katex-and-content-fixes
Aug 25, 2026
Merged

docs: add KaTeX formula rendering and fix trading/margin/PnL content#101
ChesterSim merged 1 commit into
masterfrom
csim26/docs-katex-and-content-fixes

Conversation

@ChesterSim

Copy link
Copy Markdown
Contributor

Summary

  • Adds KaTeX ($$...$$) block-math rendering support: katex dependency, katex.min.css import in app/layout.tsx, and matching tonal-card styling in styles/theme.css (bounded surface, horizontal scroll for wide equations), plus consistent 24px spacing for images across MDX/JSX image syntaxes.
  • Fixes several accuracy issues across trading/margin/PnL docs:
    • Clarifies auction vs. order terminology in auction-parameters.mdx, including how a crossing limit order's own auction start/end prices are derived and clamped.
    • Removes stale "no High Leverage Mode" callout and outdated "Code Implementation" file/function references in the margin docs; converts the effective-margin-ratio formula to KaTeX.
    • Corrects the advanced-orders FAQ: trigger orders check against Velocity's trigger reference price (a clamped median), not the raw oracle price, and clarifies that triggering and filling are separate steps.
    • Restructures profit-loss/index.mdx to reflect that settling P&L doesn't require closing the position, and removes a stale screenshot reference.

Test plan

  • pnpm install picks up the new katex dependency cleanly
  • Local docs build renders a $$...$$ block formula with the new .katex-display styling in both light and dark themes
  • Spot-check the edited trading/margin/PnL pages render correctly

Adds katex + theme.css support for $$...$$ block math so formulas render
consistently with the tables/code tonal-card style. Also fixes several
accuracy issues in trading docs: clarifies auction vs. order terminology,
corrects trigger-order reference price (not raw oracle), and restructures
the P&L page to reflect that settling doesn't require closing a position.
@vercel

vercel Bot commented Aug 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
drift-protocol-v2-docs Ready Ready Preview Aug 25, 2026 10:08am

Request Review

@ChesterSim
ChesterSim merged commit c47bb93 into master Aug 25, 2026
8 checks passed
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