Skip to content

Instantly share code, notes, and snippets.

@geryxyz
Last active November 24, 2023 07:43
Show Gist options
  • Save geryxyz/fbeac8c5bf6c5fdd49e9d5cc8d2c1028 to your computer and use it in GitHub Desktop.
Save geryxyz/fbeac8c5bf6c5fdd49e9d5cc8d2c1028 to your computer and use it in GitHub Desktop.
LaTeX rendering of a test-coverage matrix for scientific papers
\usepackage{nicematrix} % https://ctan.org/pkg/nicematrix?lang=en
\begin{NiceMatrixBlock}[auto-columns-width]
\[
\begin{array}{cccc}
& n\text{ source code items} & & m\text{ tests} \\
C = &
\begin{bNiceMatrix}
c_{1,1} & c_{1,2} & \cdots & c_{1,n} \\
c_{2,1} & c_{2,2} & \cdots & c_{2,n} \\
\vdots & \vdots & \ddots & \vdots \\
c_{m,1} & c_{m,2} & \cdots & c_{m,n} \\
\end{bNiceMatrix} &
e = &
\begin{bNiceMatrix}
e_{1} \\
e_{2} \\
\vdots \\
e_{m}
\end{bNiceMatrix}
\\
& n\text{ score values} \\
s = &
\begin{bNiceMatrix}
s_{1} & s_{2} & \cdots & s_{n}
\end{bNiceMatrix}
\end{array}
\]
\end{NiceMatrixBlock}
@geryxyz
Copy link
Author

geryxyz commented Nov 23, 2023

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment