矩陣的 LaTeX 程式碼錯誤

矩陣的 LaTeX 程式碼錯誤

有人可以找出這段程式碼中有什麼錯誤嗎?

\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}

答案1

\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}

在此輸入影像描述

附錄: 對於某些人來說,喜歡使用:=不同的符號來定義。您可以在以下位置找到有關此符號的討論和不同符號如何正確排版 :=。例如\coloneqq從包裝上看mathtools還是\colonequals從包裝上看colonequals等等。為了進行比較,請觀察使用的情況\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}

在此輸入影像描述

進一步的可能性是unicode-mathxelatex˙orlualatex engine. This fonts define\coloneq` 一起使用,它給出:

在此輸入影像描述

@Sebastiano,謝謝您向我指出這個細節。就我個人而言,我很少使用(由於我的專業背景)符號根據定義相等:-)

答案2

使用f_1^{\prime}而不是f_1^'.

在此輸入影像描述

我建議使用\ddots\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}

相關內容