我有一张表格,我想用适当的符号替换两个变量:
代码:
\documentclass[11pt, a4paper, oneside]{Thesis}
\usepackage[square, numbers,rotating, comma, fancyhdr,here, sort&compress,caption,epsfig,subfig ,enumitem,array,subcaption, cleveref,subfigure ,booktabs,tabularx, textcomp, placeins,graphicx, url, blindtext,verbose{placeins} ]
\usepackage{natbib}
\begin{document}
\begin{table}
\caption{Temporal Outliers that are detected with respect to the MetoSwiss Forecasts in $2007-09-29$}
\label{tod29f}
\centering
\footnotesize\setlength{\tabcolsep}{2.5pt}
\begin{tabular}{r@{:}l*{5}c}
\toprule
\multicolumn{1}{c}{}& & \multicolumn{5}{c}{Node ID}\\ \cmidrule{3-7}
\multicolumn{2}{c}{Date | Time} & 25 & 28 & 29 & 31 & 32 \\ \toprule
9/29/2007 00&00 & Normal & Normal & Normal & Normal & Normal \\
9/29/2007 01&00 & Outlier & Outlier & Outlier & Outlier & Outlier \\
9/29/2007 02&00 & Normal & Normal & Normal & Normal & Normal \\
9/29/2007 03&00 & Normal & Normal & Normal & Normal & Normal \\
9/29/2007 22&00 & Normal & Normal & Normal & Normal & Normal \\
9/29/2007 23&00 & Normal & Normal & Normal & Normal & Normal \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
我想用适当的符号替换正常值和异常值,以使表格更具可读性。
答案1
请看一下问题最小工作示例(MWE)学习构建 MWE。重要的是将 MWE 减少到仅显示问题真正需要的包。natbib
例如,包不会对您的表造成问题...
对于您的问题,编译 MWE 可以是(我使用包为表pifont
创建两个符号(\ding{108}
和)、带有和的包以及带有和的包):\ding{109}
textcomp
\textbullet
\textopenbullet
amssymb
\blacksquare
\square
%http://tex.stackexchange.com/questions/94861/using-symbols-in-tables
\documentclass[11pt, a5paper, oneside]{scrartcl} % Thesis
\usepackage{booktabs} % for pretty tables
\usepackage{pifont} % symbols: \ding{108}, \ding{109}
\usepackage{textcomp} % symbols: \textbullet, \textopenbullet
\usepackage{amsmath,amssymb} % Symbols: \blacksquare, \square
%\usepackage[square,numbers,sort&compress]{natbib} % natbib with several options
\begin{document}
\begin{table}
\caption{Temporal Outliers that are detected with respect to the MetoSwiss Forecasts in 2007/09/29}
\label{tod29f}
\centering
\footnotesize\setlength{\tabcolsep}{2.5pt}
\begin{tabular}{r@{:}l*{5}c}
\toprule
\multicolumn{1}{c}{} & & \multicolumn{5}{c}{Node ID} \\
\cmidrule{3-7}
\multicolumn{2}{c}{Date | Time} & 25 & 28 & 29 & 31 & 32 \\
\midrule
9/29/2007 00&00 & \ding{108} & \ding{108} & \ding{108} & \ding{108} & \ding{108} \\
9/29/2007 01&00 & \ding{109} & \ding{109} & \ding{109} & \ding{109} & \ding{109} \\
9/29/2007 23&00 & \ding{108} & \ding{108} & \ding{109} & \ding{108} & \ding{109} \\
\midrule
9/29/2007 23&00 & \textbullet & \textbullet & \textbullet & \textopenbullet & \textopenbullet \\
\midrule
9/29/2007 23&00 & $\blacksquare$ & $\blacksquare$ & $\blacksquare$ & $\square$ & $\square$ \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
结果应该是: