TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to design a form in LaTeX, to be filled by hand. I need to replicate a form that is already being used elsewhere, as closely as possible. The said form uses horizontal lines to write on, inside a table cell, as shown below:

enter image description here

I tried using underscores(_) to generate the said line. Is there a more elegant method? enter image description here

Here's the 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}
share|improve this question
up vote 4 down vote accepted

Probably using \rules is better:

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

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

MWE:

\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} 

Output:

enter image description here

share|improve this answer
    
Ah, thats much more elegant. +1. – Vaibhav Garg Feb 22 '14 at 10:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.