Forgot password?
 Register account
View 258|Reply 4

LaTeX行内公式用$開\)閉

[Copy link]

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

Show all posts

hbghlyj Posted 2024-2-24 06:52 |Read mode
在LaTeX中,行内公式可以用$\)
  1. \documentclass{article}
  2. \begin{document}
  3. $3^2+4^2=5^2\)
  4. \end{document}
Copy the Code
正常編譯:texlive.net/run?\documentclass{article}
\begi … 5^2\)
\end{document}

但在MathJax中不能。但MathJax可以额外設置?

682

Threads

110K

Posts

910K

Credits

Credits
90973
QQ

Show all posts

kuing Posted 2024-2-24 14:26
  1. <script>
  2. window.MathJax = {
  3.   tex: {
  4.     inlineMath: [ ['$','$'], ['`','`'], ["\\(","\\)"] ],
  5. ...
  6. ...
Copy the Code
或许可以在这里设吧,但我没试过。

这种问题,我只能说真逗😅

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

Show all posts

 Author| hbghlyj Posted 2024-2-25 00:47
kuing 发表于 2024-2-24 06:26
或许可以在这里设吧,但我没试过。
這樣不行吧,如果重複2個相同的開始符,後者會覆蓋前者。
測試:
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.   <script>
  5.   MathJax = {
  6.     tex: {inlineMath: [ ['$','$'],['$','\\)'] ]}
  7.   };
  8.   </script>
  9.   <script async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
  10. </head>
  11. <body>
  12.   $1\)
  13.   $1$
  14. </body>
  15. </html>
Copy the Code
結果是$1\)被識别,而$1$不會。

Comment

噢,好吧😕  Posted 2024-2-25 13:45

3153

Threads

7906

Posts

610K

Credits

Credits
64096
QQ

Show all posts

 Author| hbghlyj Posted 2024-2-25 00:50
“開始符不能重複”好像是因為FindTeX的key是開始符(當然,用同一個key重複設置就會覆蓋)。

Mobile version|Discuz Math Forum

2025-6-5 01:34 GMT+8

Powered by Discuz!

× Quick Reply To Top Edit