我正在用 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}