```julia# # up to 3 in order to highlight the previous 2 linesusing Gnuplotx = -2π:0.001:2π@gp x sin.(x) "w l t 'sin' lw 2 lc '#56B4E9'" "set grid"@gp :- xrange = (-2π - 0.3, 2π + 0.3) yrange = (-1.1,1.1)@gp :- x cos.(x) "w l t 'cos' lw 2 lc rgb '#E69F00'" # [!code highlight]```
Output
julia
using Gnuplotx = -2π:0.001:2π@gp x sin.(x) "w l t 'sin' lw 2 lc '#56B4E9'" "set grid"@gp :- xrange = (-2π - 0.3, 2π + 0.3) yrange = (-1.1,1.1)@gp :- x cos.(x) "w l t 'cos' lw 2 lc rgb '#E69F00'"
::: infoThis is an info box.:::::: tipThis is a tip.:::::: warningThis is a warning.:::::: dangerThis is a dangerous warning.:::::: detailsThis is a details block.:::
When ``a \ne 0``, there are two solutions to ``ax^2 + bx + c = 0`` and they are$$x = {-b \pm \sqrt{b^2-4ac} \over 2a}$$Don't type anything after the last double dollar sign, and make sure there are no spaces after the opening double dollar sign in the display math!You can also use fenced code blocks with the `math` tag for equations!!!! note Inline `$$` delimiters like `$$x=1+2$$` will render as inline math when written within a paragraph. For display/block math, place the `$$` delimiters on their own lines. $$f(x, y) = 2y$$Alternatively, use fenced code blocks:```math\nabla^2 \Phi = \rho```
Output
When , there are two solutions to and they are
Don't type anything after the last double dollar sign, and make sure there are no spaces after the opening double dollar sign in the display math!
You can also use fenced code blocks with the math tag for equations!
Note
Inline $$ delimiters like $$x=1+2$$ will render as inline math when written within a paragraph. For display/block math, place the $$ delimiters on their own lines.
You can label equations inside math environments and reference them later using \eqref{...} (or \ref{...} if you only want the equation number). This works for single equations as well as multi-line environments such as align.
```math\begin{align}\nabla\cdot\mathbf{E} &= 4 \pi \rho \label{eq:c} \\\nabla\cdot\mathbf{B} &= 2 \\\nabla\times\mathbf{E} &= - \frac{1}{c} \frac{\partial\mathbf{B}}{\partial t} \label{eq:d} \\\nabla\times\mathbf{B} &= - \frac{1}{c}\left(4 \pi \mathbf{J} + \frac{\partial\mathbf{E}}{\partial t}\right)\end{align}```See $\eqref{eq:c}$? And what about $\ref{eq:d}$? Or simply typed as \eqref{eq:c} and \ref{eq:d}!Also works using $$\ref{eq:c}$$ or without spaces: equation\eqref{eq:d}goes here!
Output
See ? And what about ? Or simply typed as and !
Also works using or without spaces: equationgoes here!
TIP
Use \eqref{...} to automatically include parentheses around the equation number.
Use \ref{...} if you only need the raw number.
Labels must be unique within a document.
In multi-line environments, place \label{} on the specific line you want to reference.
The NewCM fonts provide excellent support for mathematical typography. Here are some examples demonstrating various features.
Warning
This section demonstrates the typographical capabilities of the NewCM fonts for complex mathematical notation. While care has been taken to ensure accuracy, users should verify equations against authoritative sources before using them in academic or professional contexts. The equations are illustrative and may not reflect all conventions or edge cases.
The stress-energy tensor $T_{\mu\nu}$ must satisfy the conservation law with covariant derivative:```math\begin{equation}\nabla_\mu T^{\mu\nu} = 0 \implies \partial_\mu (\sqrt{-g}T^{\mu\nu}) + \Gamma^\nu_{\mu\lambda}\sqrt{-g}T^{\mu\lambda} = 0 \label{eq:conservation}\end{equation}```
Output
The stress-energy tensor must satisfy the conservation law with covariant derivative:
A typical Feynman amplitude for electron-photon vertex involves the coupling to the electromagnetic field:```math\begin{equation}\mathscr{A}_{\text{vertex}} = -ie\bar{u}(p')\gamma^\mu u(p) A_\mu(q) \label{eq:feynman-amplitude}\end{equation}```
Output
A typical Feynman amplitude for electron-photon vertex involves the coupling to the electromagnetic field:
For any differential form $\boldsymbol{\omega}$ on a surface $\Sigma$ in the tangent space $\mathscr{T}(\mathcal{M})$:```math\begin{equation}\oint_{\partial \Sigma} \boldsymbol{\omega} = \iint_{\Sigma} d\boldsymbol{\omega} \quad \forall \, \Sigma \in \mathscr{T}(\mathcal{M}) \label{eq:stokes}\end{equation}```
Output
For any differential form on a surface in the tangent space :
The cardinality of the power set of natural numbers equals the continuum:```math\begin{equation}\wp(\aleph_0) \cong 2^{\aleph_0} = \mathfrak{c} \label{eq:cardinality}\end{equation}```
Output
The cardinality of the power set of natural numbers equals the continuum: