XeLatex 中的複選標記

XeLatex 中的複選標記

我正在使用 Tex Studio 並使用 XeLatex 編譯器。當在表中使用 \checkmark 時,會顯示一個空心框而不是符號。根據互聯網搜索,我使用了 \pifont 和 \amssymb 等軟體包,但沒有成功。如果我將編譯器變更為 pdfLatex,則複選標記可見。

提前感謝您的幫助。

\documentclass{article}
\begin{document}
$\begin{table}[h!]
\begin{center}
    \begin{tabular}{|p{4cm} p{1cm} p{1cm} p{1cm} p{1cm} p{1cm} p{1cm}|}  \hline 
        Location    & $u_x$     & $u_y$     & $u_z$ & $\phi_x$ & $\phi_y$ & $\phi_z$ \\ \hline\hline
        Main Wall Bottom    &   \checkmark  & \checkmark    & \checkmark    & \checkmark & NDoF & \checkmark\\ \hline
        Pier Bottom     &   \checkmark  & \checkmark    & \checkmark    & NDoF &\checkmark  & \checkmark\\ \hline
        Main Wall Top   &   \checkmark  & \checkmark    & - & \checkmark & NDoF & \checkmark\\ \hline
        Pier Top    &   \checkmark  & \checkmark    & - & NDoF &\checkmark &  \checkmark\\ \hline
        Pier Vertical   &   \checkmark  & \checkmark    & - &  NDoF & \checkmark &\checkmark\\ \hline
    \end{tabular}
    \caption{Boundary conditions "-"= Not restricted; "NDof"= Element do not have respective degree of freedom } 
    \label{tab:element-bc}
\end{center}
\end{table}$
\end{document}

在此輸入影像描述

答案1

如果我刪除錯誤並新增 \usepackage{amssymb} ,複選標記就在那裡。編譯為

This is XeTeX, Version 3.14159265-2.6-0.999991 (TeX Live `2019/W32TeX) 

更正的代碼:

\documentclass{article}
\usepackage{amssymb}%
\begin{document}
\begin{table}[h!]
\begin{center}
    \begin{tabular}{|p{4cm} p{1cm} p{1cm} p{1cm} p{1cm} p{1cm} p{1cm}|}  \hline
        Location    & $u_x$     & $u_y$     & $u_z$ & $\phi_x$ & $\phi_y$ & $\phi_z$ \\ \hline\hline
        Main Wall Bottom    &   \checkmark  & \checkmark    & \checkmark    & \checkmark & NDoF & \checkmark\\ \hline
        Pier Bottom     &   \checkmark  & \checkmark    & \checkmark    & NDoF &\checkmark  & \checkmark\\ \hline
        Main Wall Top   &   \checkmark  & \checkmark    & - & \checkmark & NDoF & \checkmark\\ \hline
        Pier Top    &   \checkmark  & \checkmark    & - & NDoF &\checkmark &  \checkmark\\ \hline
        Pier Vertical   &   \checkmark  & \checkmark    & - &  NDoF & \checkmark &\checkmark\\ \hline
    \end{tabular}
    \caption{Boundary conditions "-"= Not restricted; "NDof"= Element do not have respective degree of freedom }
    \label{tab:element-bc}
\end{center}
\end{table}
\end{document}

在此輸入影像描述

相關內容