表中的特殊符號(實心十字,空心十字,實心正方形,空心正方形)

表中的特殊符號(實心十字,空心十字,實心正方形,空心正方形)

我正在乳膠中處理表格,描述圖中的數據。它包含圖中包含的許多特殊符號,我想在表中包含相同的東西。但是,我在不同的包中查找這些符號時遇到困難。下面是該表的原始程式碼:

\documentclass{article}
\usepackage{graphicx} % Required for inserting images
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{amsmath,amssymb,amsfonts,mathrsfs}



\begin{document}

\renewcommand{\tabcolsep}{10pt}
\begin{table}[b!]
        \caption{Details of the data presented in figure 16 regarding modifications in a monodisperse suspension of large particles to replicate the settling velocity of large particles in bidisperse flows}
        \label{tab5}
%   \scriptsize
\centering
\small
\begin{tabular}{c c c c c c c c}\hline
\multicolumn{1}{c}{\multirow{2}{*}{$\text{Re}_{\text{t,l}}$}} & \multicolumn{1}{c}{\multirow{2}{*}{Mono}} & \multicolumn{1}{c}{\multirow{2}{*}{Bi}} & \multicolumn{2}{c}{Mono, $\rho_{f,m}$} &  & \multicolumn{2}{c}{Mono, $\rho_{f,m}$ {\&} $\mu_{f,m}$} \\
\cline{4-5} \cline{7-8}
\multicolumn{1}{l}{} & & & Value & Deviation && Value & Deviation \\ \midrule
1 & 0.6 & 0.455 & 0.576 & 26.6 && 0.445 & 2.2  \\ \midrule
50 & 0.75 & 0.72 & 0.7235 & 0.48 && 0.61 & 15.3 \\ \midrule
100 & 0.777 & 0.7354 & 0.742 & 0.89 && 0.6268 & 14.7 \\ 
\bottomrule
\end{tabular}
\end{table}

\end{document}

上面的程式碼給出了下表:

初始影像

但是,我需要一個包含符號的表格,如下所示:

所需的桌子

符號是填滿紅色方塊,空黑色方塊,填充紅十字,空的紅十字。它們的尺寸、顏色和順序應與所需影像顯示的相同。

答案1

根據需要選擇參數

\documentclass{article}

\usepackage{pict2e,xcolor}

\newcommand*{\filledredsquare}{\textcolor{red}{\mysymbols{\polygon*(0,0)(1,0)(1,1)(0,1)\polygon(0,0)(1,0)(1,1)(0,1)}}}
\newcommand*{\emptyblacksquare}{\mysymbols{\polygon(0,0)(1,0)(1,1)(0,1)}}
\newcommand*{\filledredcross}{\textcolor{red}{\mysymbols{\Line(0,0)(1,1)\Line(0,1)(1,0)}}}
\newcommand*{\emptyredcross}{\textcolor{red}{\mysymbols{\linethickness{.2pt}\polygon(.1,0)(1,.9)(.9,1)(0,.1)\polygon(.9,0)(1,.1)(.1,1)(0,.9)}}}

\newcommand*{\mysymbols}[1]{%
   \begingroup
   \setlength{\unitlength}{1.3ex}% or a value you like
   \begin{picture}(1,1)
   \thicklines
   #1%
   \end{picture}%
   \endgroup
}

\begin{document}
zzz \filledredsquare\ \emptyblacksquare\ \filledredcross\ \emptyredcross\  zzz
\end{document}

在此輸入影像描述

相關內容