
나는 \overrightarrow
tabularx 테이블에서 를 사용합니다 \hline
. 그러나 벡터 화살표가 선과 혼합되어 있습니다. 거기에좋은수동으로 간격을 두는 것 외에 이 오류를 해결하는 방법은 무엇입니까?
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\begin{document}
\begin{tabularx}{\linewidth}{|Y|Y|Y|}\hline
a&$\overrightarrow{\mathrm{AB}}$&c\\\hline
\end{tabularx}
\end{document}
답변1
패키지 의 대안 cellspace
:
\documentclass{article}
\usepackage{cellspace}
\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\setlength\cellspacetoplimit{6pt}
\setlength\cellspacebottomlimit{6pt}
\begin{document}
\begin{tabularx}{\linewidth}{|Y|SY|Y|}\hline
a & $\overrightarrow{\mathrm{AB}}$ & cdeffg \\\hline
\end{tabularx}
\end{document}
답변2
\makegapedcells
또 다른 가능성은 패키지 에서 사용하는 것입니다 makecell
.
\documentclass{article}
\usepackage{amsmath, amssymb}
\usepackage{makecell, tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\begin{document}
{
\setcellgapes{3pt}
\makegapedcells
\begin{tabularx}{\linewidth}{|Y|Y|Y|}\hline
a & $\overrightarrow{\mathrm{AB}}$ & cdeffg \\\hline
\end{tabularx}
}
\end{document}
답변3
\renewcommand{\arraystretch}{<more space between rows>}
(또는 @Zarko'definition을 사용할 수 있습니다.스트레칭 인자), 예를 들어 셀의 공간을 늘리기 위해.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{tabularx}
\newcolumntype{Y}{>{\centering\arraybackslash}X}
\begin{document}
{\renewcommand{\arraystretch}{2}
\begin{tabularx}{\linewidth}{|Y|Y|Y|}\hline
a&$\overrightarrow{\mathrm{AB}}$&c\\\hline
\end{tabularx}}
\end{document}