表格单元格中的水平线是表单的一部分

表格单元格中的水平线是表单的一部分

我正在尝试用 LaTeX 设计一个表格,以便手工填写。我需要尽可能地复制一个已经在其他地方使用的表格。所述表格使用水平线在表格单元格内书写,如下所示:

在此处输入图片描述

我尝试使用下划线(_)来生成上述行。有没有更优雅的方法? 在此处输入图片描述

这是 MWE。

\documentclass[10pt,a4paper]{article}
\usepackage{multirow}


\newcommand{\longline}{\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_}
\newcommand{\shortline}{\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_}
\newcommand{\mediumline}{\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_}

\newcommand{\ratings}{\_\_\_1~~~\_\_\_2~~~\_\_\_3~~~\_\_\_4}

\usepackage[left=1.5cm,right=2cm,top=1cm,bottom=2cm]{geometry}

\begin{document}

    \begin{tabular}{p{0.55\textwidth}p{0.2\textwidth}|p{0.24\textwidth}}
    Subject Knowledge/ Conceptual Clarity   &\ratings & \multirow{4}{4.5cm}{{\textbf{Any specific comments on trainer}} \newline\newline \mediumline  \newline\newline \mediumline \newline\newline  \mediumline\newline\newline  \mediumline \newline\newline  }\\ [2\baselineskip]
    Trainer Created and maintained an environment for learning &\ratings & \\[2\baselineskip]
    Rate the trainer's training skills and competency &\ratings &\\ [2\baselineskip]
    Would you like to attend other sessions by this trainer &\ratings &
    \\[2\baselineskip]

\end{tabular}
\end{document}

答案1

也许使用\rules 更好:

\newcommand{\mediumline}{\rule{0.24\textwidth}{0.4pt}}
\newcommand{\ratingsline}{\rule{15pt}{0.4pt}}

\newcommand{\ratings}{\ratingsline 1~~~\ratingsline 2~~~\ratingsline 3~~~\ratingsline 4}

梅威瑟:

\documentclass[10pt,a4paper]{article}
\usepackage{multirow}


\newcommand{\mediumline}{\rule{0.24\textwidth}{0.4pt}}
\newcommand{\ratingsline}{\rule{15pt}{0.4pt}}

\newcommand{\ratings}{\ratingsline 1~~~\ratingsline 2~~~\ratingsline 3~~~\ratingsline 4}

\usepackage[left=1.5cm,right=2cm,top=1cm,bottom=2cm]{geometry}

\begin{document}

    \begin{tabular}{p{0.55\textwidth}p{0.2\textwidth}|p{0.24\textwidth}}
    Subject Knowledge/ Conceptual Clarity   &\ratings & \multirow{4}{4.5cm}{{\textbf{Any specific comments on trainer}} \newline\newline \mediumline  \newline\newline \mediumline \newline\newline  \mediumline\newline\newline  \mediumline \newline\newline  }\\ [2\baselineskip]
    Trainer Created and maintained an environment for learning &\ratings & \\[2\baselineskip]
    Rate the trainer's training skills and competency &\ratings &\\ [2\baselineskip]
    Would you like to attend other sessions by this trainer &\ratings &
    \\[2\baselineskip]

\end{tabular}
\end{document} 

输出:

在此处输入图片描述

相关内容