![如何在不改变字体的情况下消除下表中罗马数字的 \underline 和 overline 之间的间隙?](https://linux22.com/image/474516/%E5%A6%82%E4%BD%95%E5%9C%A8%E4%B8%8D%E6%94%B9%E5%8F%98%E5%AD%97%E4%BD%93%E7%9A%84%E6%83%85%E5%86%B5%E4%B8%8B%E6%B6%88%E9%99%A4%E4%B8%8B%E8%A1%A8%E4%B8%AD%E7%BD%97%E9%A9%AC%E6%95%B0%E5%AD%97%E7%9A%84%20%5Cunderline%20%E5%92%8C%20overline%20%E4%B9%8B%E9%97%B4%E7%9A%84%E9%97%B4%E9%9A%99%EF%BC%9F.png)
\documentclass[12pt]{article}
\usepackage{amsmath,amssymb}
\usepackage[table]{xcolor}
\usepackage{tabularx}
\usepackage{makecell}
\usepackage{graphicx}
\usepackage{accents}
\begin{document}
\begin{table}[h]
\centering
\scalebox{2}{
\begin{tabular}{|c|c|c|c|}
\hline
Standard & University & Board & Class\\
\hline
$\overline{\underline{XII}}^{th}$ & ABC & IIP & $\overline{\underline{II}}^{nd}$\\
\hline
\end{tabular}}
\end{table}
\end{document}
答案1
您无需重新发明轮子,而是可以使用该romanbar
包来书写带有上下横线的罗马数字:
\documentclass[12pt]{article}
\usepackage{romanbar}
\begin{document}
\begin{table}[h]
\centering
\begin{tabular}{|c|c|c|c|}
\hline
Standard & University & Board & Class\\
\hline
\Romanbar{12}\textsuperscript{th} & ABC & IIP & \Romanbar{2}\textsuperscript{nd}\\
\hline
\end{tabular}
\end{table}
\end{document}