sample-eqrefs.html 1.7 KB

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