<!DOCTYPE html>
<html>
<head>
    <title>Math Test</title>
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <link rel="stylesheet" href="/css/katex/katex.min.css">
    <style>
        body { font-family: Arial, sans-serif; padding: 20px; }
        .math-container { margin: 20px 0; padding: 15px; border: 1px solid #ddd; }
    </style>
</head>
<body>
    <h1>数学公式测试</h1>

    <div class="math-container">
        <h3>测试 1: 基本公式</h3>
        <p>$x^2 - 9$</p>
    </div>

    <div class="math-container">
        <h3>测试 2: 分式公式</h3>
        <p>$\frac{x^2 - 9}{x + 3}$</p>
    </div>

    <div class="math-container">
        <h3>测试 3: 求根公式</h3>
        <p>$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}$</p>
    </div>

    <script src="/js/katex.min.js"></script>
    <script src="/js/auto-render.min.js"></script>
    <script>
        renderMathInElement(document.body, {
            delimiters: [
                {left: '$$', right: '$$', display: true},
                {left: '$', right: '$', display: false},
                {left: '\\(', right: '\\)', display: false},
                {left: '\\[', right: '\\]', display: true}
            ],
            throwOnError: false
        });
        console.log('Math rendered');
    </script>
</body>
</html>
