sample-eqrefs.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>MathJax Equation References</title>
  5. <!-- Copyright (c) 2012-2017 The MathJax Consortium -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  8. <meta name="viewport" content="width=device-width, initial-scale=1">
  9. <script type="text/x-mathjax-config">
  10. MathJax.Hub.Config({ TeX: { equationNumbers: {autoNumber: "all"} } });
  11. </script>
  12. <script type="text/javascript" src="../MathJax.js?config=TeX-AMS_HTML"></script>
  13. <style>
  14. h1 {
  15. background: #CCCCCC;
  16. padding: .2em 1em;
  17. border-top: 3px solid #666666;
  18. border-bottom: 3px solid #999999;
  19. }
  20. </style>
  21. </head>
  22. <body>
  23. <center>
  24. <h1>A test of Equation References</h1>
  25. </center>
  26. <div style="padding:0 2em">
  27. <hr>
  28. Here is a labeled equation:
  29. $$x+1\over\sqrt{1-x^2}\label{ref1}$$
  30. with a reference to ref1: \ref{ref1},
  31. and another numbered one with no label:
  32. $$x+1\over\sqrt{1-x^2}$$
  33. This one uses \nonumber:
  34. $$x+1\over\sqrt{1-x^2}\nonumber$$
  35. <p>
  36. <HR>
  37. <p>
  38. Here's one using the equation environment:
  39. \begin{equation}
  40. x+1\over\sqrt{1-x^2}
  41. \end{equation}
  42. and one with equation* environment:
  43. \begin{equation*}
  44. x+1\over\sqrt{1-x^2}
  45. \end{equation*}
  46. <p>
  47. <HR>
  48. <p>
  49. This is a forward reference [\ref{ref2}] and another \eqref{ref2} for the
  50. following equation:
  51. $$x+1\over\sqrt{1-x^2}\label{ref2}$$
  52. More math:
  53. $$x+1\over\sqrt{1-x^2}$$
  54. Here is a ref inside math: \(\ref{ref2}+1\) and text after it.
  55. \begin{align}
  56. x& = y_1-y_2+y_3-y_5+y_8-\dots
  57. && \text{by \eqref{ref1}}\\
  58. & = y'\circ y^* && \text{(by \eqref{ref3})}\\
  59. & = y(0) y' && \text {by Axiom 1.}
  60. \end{align}
  61. Here's a bad ref [\ref{ref4}] to a nonexistent label.
  62. <p>
  63. <HR>
  64. <p>
  65. An alignment:
  66. \begin{align}
  67. a&=b\label{ref3}\cr
  68. &=c+d
  69. \end{align}
  70. and a starred one:
  71. \begin{align*}
  72. a&=b\cr
  73. &=c+d
  74. \end{align*}
  75. </div>
  76. </body>
  77. </html>