表の列の垂直スペース

表の列の垂直スペース

私は次のフォームを作成しています。表はペンまたは鉛筆を使用して手動で記入することを目的としています。しかし、各行で利用できるスペースは限られています(垂直方向)。列間の垂直方向のスペースを増やすにはどうすればよいですか?

\documentclass[a4paper]{exam}
    \usepackage{multicol, setspace}
    \usepackage{textcomp, booktabs,colortbl}
    \usepackage[table]{xcolor}
    \setlength\columnsep{10pt}
    \onehalfspacing
    \begin{document}

    \begin{center}
    \fbox{\fbox{\parbox{5.5in}{\centering
    OPD ENCOUNTER FORM}}}
    \end{center}
    \vspace{0.1in}

    \makebox[\textwidth]{Name :\enspace\hrulefill}
    \begin{multicols}{2}
    \vspace{0.2in}
    \makebox[0.45\textwidth]{Age:\enspace\hrulefill}
    \makebox[0.5\textwidth]{Sex:\enspace\hrulefill}
    \end{multicols}
    \makebox[\textwidth]{Address:\enspace\hrulefill}

    \begin{multicols}{2}
    \makebox[0.45\textwidth]{Dated: \enspace\hrulefill}
    \makebox[0.45\textwidth]{Ref: \enspace\hrulefill} 
    \end{multicols} 
    %-----------------------------------------------------------
    \section*{Present Problem}
    \fillwithlines{0.5in}
    %----------------------------------------------------------

    \section*{\large \textrecipe}
    \begin{table}[htp]
    \rowcolors{2}{gray!25}{white}
    \begin{tabular}{c p{3cm}p{3cm}clc} 
    \toprule 
     Sr No & Drug & Dose  & Frequency & Duration & Remark \\ \midrule
    1 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\

     2 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\

    3 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\ 

     4 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\ 

    5 &  &  & -~~ -~~ -  & x & before/with/after meals, at night  \\

    6 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\

    7 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\ \bottomrule 
    \end{tabular}
    \end{table}
    \end{document}

答え1

を使用できます\renewcommand{\arraystretch}{2}2必要に応じて変更してください3。たとえば、 。

\documentclass[a4paper]{exam}
    \usepackage{multicol, setspace}
    \usepackage{textcomp, booktabs,colortbl}
    \usepackage[table]{xcolor}
    \setlength\columnsep{10pt}
    \onehalfspacing
    \begin{document}

    \begin{center}
    \fbox{\fbox{\parbox{5.5in}{\centering
    OPD ENCOUNTER FORM}}}
    \end{center}
    \vspace{0.1in}

    \makebox[\textwidth]{Name :\enspace\hrulefill}
    \begin{multicols}{2}
    \vspace{0.2in}
    \makebox[0.45\textwidth]{Age:\enspace\hrulefill}
    \makebox[0.5\textwidth]{Sex:\enspace\hrulefill}
    \end{multicols}
    \makebox[\textwidth]{Address:\enspace\hrulefill}

    \begin{multicols}{2}
    \makebox[0.45\textwidth]{Dated: \enspace\hrulefill}
    \makebox[0.45\textwidth]{Ref: \enspace\hrulefill}
    \end{multicols}
    %-----------------------------------------------------------
    \section*{Present Problem}
    \fillwithlines{0.5in}
    %----------------------------------------------------------

    \section*{\large \textrecipe}
    \begin{table}[htp]
    \rowcolors{2}{gray!25}{white}
    \renewcommand{\arraystretch}{3}
    \begin{tabular}{c p{3cm}p{3cm}clc}
    \toprule
     Sr No & Drug & Dose  & Frequency & Duration & Remark \\ \midrule
    1 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\

     2 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\

    3 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\

     4 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\

    5 &  &  & -~~ -~~ -  & x & before/with/after meals, at night  \\

    6 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\

    7 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\ \bottomrule
    \end{tabular}
    \end{table}
    \end{document}

ここに画像の説明を入力してください

答え2

\\別の方法としては、各行の後に を代入して、必要なスキップを手動で指定する方法があります\\[skip]

この方法では、行ごとにスキップを区別することもできます。

たとえば、次の MWE では、5ex各白行の後と7ex各灰色行の後に次の情報を与えています。

\documentclass[a4paper]{exam}
\usepackage{multicol, setspace}
\usepackage{textcomp, booktabs,colortbl}
\usepackage[table]{xcolor}
\setlength\columnsep{10pt}
\onehalfspacing
\begin{document}

\begin{center}
\fbox{\fbox{\parbox{5.5in}{\centering
OPD ENCOUNTER FORM}}}
\end{center}
\vspace{0.1in}

\makebox[\textwidth]{Name :\enspace\hrulefill}
\begin{multicols}{2}
\vspace{0.2in}
\makebox[0.45\textwidth]{Age:\enspace\hrulefill}
\makebox[0.5\textwidth]{Sex:\enspace\hrulefill}
\end{multicols}
\makebox[\textwidth]{Address:\enspace\hrulefill}

\begin{multicols}{2}
\makebox[0.45\textwidth]{Dated: \enspace\hrulefill}
\makebox[0.45\textwidth]{Ref: \enspace\hrulefill}
\end{multicols}
%-----------------------------------------------------------
\section*{Present Problem}
\fillwithlines{0.5in}
%----------------------------------------------------------

\section*{\large \textrecipe}
\begin{table}[htp]
\rowcolors{2}{gray!25}{white}
\begin{tabular}{c p{3cm}p{3cm}clc}
\toprule
 Sr No & Drug & Dose  & Frequency & Duration & Remark \\ \midrule
1 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\[5ex]

 2 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\[7ex]

3 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\[5ex]

 4 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\[7ex]

5 &  &  & -~~ -~~ -  & x & before/with/after meals, at night  \\[5ex]

6 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\[7ex]

7 &  &  & -~~ -~~ -  & x & before/with/after meals, at night \\[5ex] \bottomrule
\end{tabular}
\end{table}
\end{document} 

出力:

ここに画像の説明を入力してください

関連情報