![Error en el código LaTeX para una Matrix](https://rvso.com/image/405355/Error%20en%20el%20c%C3%B3digo%20LaTeX%20para%20una%20Matrix.png)
¿Alguien puede averiguar cuál es el error en este código?
\begin{equation}
W(f_1,\dots,f_g):= \text{det} \begin{pmatrix}
f_1 & f_2 & \dots & f_g\\
f_1^' & f_2^' & \dots & f_g^'\\
. & . & &.\\
. & . & &.\\
. & . & &.\\
f_1^{(g-1)} & f_2^{(g-1)}& \dots & f_g^{(g-1)}
\end{pmatrix}
\end{equation}
Respuesta1
\documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
W(f_1,\dotsc,f_g) := \text{det}
\begin{pmatrix}
f_1 & f_2 & \dots & f_g \\
f_1' & f_2' & \dots & f_g' \\ % <---
. & . & & . \\
. & . & & . \\
. & . & & . \\
f_1^{(g-1)} & f_2^{(g-1)} & \dots & f_g^{(g-1)}
\end{pmatrix}
\end{equation}
or better
\begin{equation}
W(f_1,\dotsc,f_g) := \det
\begin{pmatrix}
f_1 & f_2 & \dots & f_g \\
f_1' & f_2' & \dots & f_g' \\
\vdots & \vdots & \ddots & \vdots \\
f_1^{(g-1)} & f_2^{(g-1)} & \dots & f_g^{(g-1)}
\end{pmatrix}
\end{equation}
\end{document}
Apéndice:
Algunas personas prefieren utilizar :=
diferentes símbolos para la definición. Discusión y diferentes símbolos sobre estos símbolos que puedes encontrar enCómo escribir := correctamente. Por ejemplo, \coloneqq
del paquete mathtools
o \colonequals
del paquete colonequals
, etc. Las diferencias entre ellos son sutiles, sin embargo, para las personas con un agudo sentido de la estética son importantes. A modo de comparación, observe el caso de uso de \colonequals
:
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{equation}
W(f_1,\dotsc,f_g) \coloneqq \det\begin{pmatrix}
f_1 & f_2 & \dots & f_g \\
f_1' & f_2' & \dots & f_g' \\
\vdots & \vdots & \ddots & \vdots \\
f_1^{(g-1)} & f_2^{(g-1)} & \dots & f_g^{(g-1)}
\end{pmatrix}
\end{equation}
\end{document}
Otra posibilidad es utilizar unicode-math
con xelatex˙or
lualatex engine. This fonts define
\coloneq` que da:
@Sebastiano, gracias por señalarme este detalle. Personalmente, uso muy rara vez (debido a mi experiencia profesional) símbolos paraigual por definición:-)
Respuesta2
Usar f_1^{\prime}
en lugar de f_1^'
.
Sugiero usar \ddots
y \vdots
.
\documentclass{standalone}
\usepackage{amsmath}
\begin{document}
\begin{equation}
W(f_1,\dots,f_g):= \det
\begin{pmatrix}
f_1 & f_2 & \dots & f_g \\
f_1^{\prime}& f_2^{\prime} & \dots & f_g^{\prime} \\
\vdots & \vdots & \ddots& \vdots \\
f_1^{(g-1)} & f_2^{(g-1)} & \dots & f_g^{(g-1)}
\end{pmatrix}
\end{equation}
\end{document}