表内の特殊記号(塗りつぶされた十字、白抜きの十字、塗りつぶされた四角、白抜きの四角)

表内の特殊記号(塗りつぶされた十字、白抜きの十字、塗りつぶされた四角、白抜きの四角)

私は LaTeX で図のデータを表す表を作成中です。図には特別な記号がいくつか含まれており、表にも同じものを入れたいのですが、異なるパッケージでこれらの記号を見つけるのが困難です。以下は表の生のコードです。

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

ここに画像の説明を入力してください

関連情報