표 형식의 상단 규칙과 수직선 사이의 간격

표 형식의 상단 규칙과 수직선 사이의 간격

이번 MWE에서는

\documentclass[]{article}
\usepackage{amsmath}
\usepackage{booktabs}%added 8/16/2019
\setlength\heavyrulewidth{0.5ex}

\begin{document}            
\small
\begin{tabular}[c]{|p{1.5in}|p{4in}|}
\toprule
Problem&1\\\hline 
ODE            &${\frac {\rm d}{{\rm d}x}}y \left( x \right) =1+2\,x$\\\hline 
ODE degree     &1\\\hline 
Number of solutions &1\\\hline 
CAS classification &quadrature\\\hline 
Program classification&{\footnotesize [separable]}\\\hline 
Solved? &yes\\\hline
Verified? &yes\\ 
\bottomrule
\end{tabular}
\normalsize

\end{document}

출력에 표시된 간격을 줄여야 합니다.

Mathematica 그래픽

이러한 격차를 줄이기 위해 위의 MWE를 수정하는 방법은 무엇입니까?

TL 2019 사용

답변1

\Xhline패키지 를 사용하는 다른 접근 방식은 다음과 같습니다 makecell.

여기에 이미지 설명을 입력하세요

\documentclass[]{article}
\usepackage{amsmath}

\usepackage{makecell}


\begin{document}

\small
\begin{tabular}[c]{|p{1.5in}|p{4in}|}
\Xhline{0.5ex}
Problem&1\\\hline 
ODE            &${\frac {\rm d}{{\rm d}x}}y \left( x \right) =1+2\,x$\\\hline 
ODE degree     &1\\\hline 
Number of solutions &1\\\hline 
CAS classification &quadrature\\\hline 
Program classification&{\footnotesize [separable]}\\\hline 
Solved? &yes\\\hline
Verified? &yes\\ 
\Xhline{0.5ex}
\end{tabular}
\normalsize

\end{document}

패키지를 사용하고 매뉴얼 booktabs의 지침을 따르는 예booktabs

항상 두 가지 간단한 지침을 기억한다면 크게 잘못되지 않을 것입니다. 1. 절대로 수직 규칙을 사용하지 마십시오.

다음과 같이 보일 수 있습니다:

여기에 이미지 설명을 입력하세요

\documentclass[]{article}
\usepackage{amsmath}
\usepackage{booktabs}

\begin{document}

\begin{tabular}[c]{ll}
\midrule
Problem & 1 \\ \addlinespace
ODE            &${\frac {\rm d}{{\rm d}x}}y \left( x \right) =1+2\,x$\\ \addlinespace
ODE degree     &1\\  \addlinespace
Number of solutions &1\\ \addlinespace
CAS classification &quadrature\\ \addlinespace
Program classification&{\footnotesize [separable]}\\  \addlinespace
Solved? &yes\\ \addlinespace
Verified? &yes\\ 
\bottomrule
\end{tabular}

\end{document}

관련 정보