[Tex/LaTex] Using Symbols in tables

symbolstables

I have a table and I wanted to replace 2 variables with appropriate symbols:

Code:

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

I would like to replace the Normal and Outlier with proper symbols, that made the table more readable.

Best Answer

Please have a look to question minimal working example (MWE) to learn to build a MWE. Important is to reduce the MWE to only really needed packages to show the problem. Package natbib for example does not make a problem with your table ...

For your problem a compiling MWE could be (I used package pifont to create the two symbols (\ding{108} and \ding{109}) for the table, package textcomp with \textbullet and \textopenbullet and package amssymb with \blacksquare and \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}

The result should be:

compiled pdf

Related Question