答案1
像这样?
\documentclass{article}
\usepackage{amsmath}
\usepackage{xcolor}
\newcommand{\greenup}{\textcolor{green}{$\uparrow$}}
\newcommand{\reddown}{\textcolor{red}{$\downarrow$}}
\begin{document}
\begin{center}
\begin{tabular}{ |c|c|c| }
\hline
50 & 30.5 & \greenup 19.50 \\
10 & 20 & \reddown 10.00 \\
33 & 11 & \greenup 20.00 \\
\hline
\end{tabular}
\end{center}
\end{document}
或使用fontawesome
图标:
\documentclass{article}
\usepackage{fontawesome}
\usepackage{xcolor}
\newcommand{\greenup}{\textcolor{green}{\faArrowUp}}
\newcommand{\reddown}{\textcolor{red}{\faArrowDown}}
\begin{document}
\begin{center}
\begin{tabular}{ |c|c|c| }
\hline
50 & 30.5 & \greenup 19.50 \\
10 & 20 & \reddown 10.00 \\
33 & 11 & \greenup 20.00 \\
\hline
\end{tabular}
\end{center}
\end{document}