GeneralEnrollment form

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
fleet
Posts: 5
Joined: Sat Aug 15, 2009 1:53 pm

Enrollment form

Post by fleet »

Hello,

I have to create a enrollment-form, which will be filled in with pencils. It must have rectangles, which has to be filled in by one letter each. It should look like this:

Name: |_||_||_||_||_||_||_||_||_||_||_||_||_||_||_||_||_||_||_||_|
Date of birth: |_||_||_||_||_||_||_||_|
Institution: |_||_||_||_||_||_||_||_||_||_||_||_||_||_||_||_||_||_|

The rectangles should have a top line aswell, just couldn't write it. How do create these rectangles?

I use TeXLive.

Regards, Fleet
Last edited by fleet on Tue Mar 15, 2011 6:30 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Enrollment form

Post by coachbennett1981 »

Code: Select all


|\underline{\hspace{.10in}||


fleet
Posts: 5
Joined: Sat Aug 15, 2009 1:53 pm

Re: Enrollment form

Post by fleet »

Thanks for your answer but, I need to create true rectangles for people to write letters in. It shouldn't just be underscores and |'s.

Regards, Fleet
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Enrollment form

Post by localghost »

Try something with the pgf/tikZ package.

Code: Select all

\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{tikz}

\newcommand*{\fillout}[1]{%
  \begin{tikzpicture}[x=1em,y=3ex,baseline]
    \foreach \x in {0,1,...,#1}
      \draw (0,0) +(\x,0) rectangle (1,1);
  \end{tikzpicture}
}

\begin{document}
  \begin{tabular}{@{}ll@{}}
    Name: & \fillout{20} \\
    Date of Birth: & \fillout{8} \\
    Institution: & \fillout{23}
  \end{tabular}
\end{document}

Thorsten
fleet
Posts: 5
Joined: Sat Aug 15, 2009 1:53 pm

Re: Enrollment form

Post by fleet »

Thanks, Thorsten. Your example helped my write what I needed. I have one question more, though:

How do I remove the inner margin/padding in a tikz node, so the text will start at the left edge?

Regards, Fleet
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Enrollment form

Post by localghost »

fleet wrote:[…] How do I remove the inner margin/padding in a tikz node, so the text will start at the left edge? […]
The package manual suggests to use the »inner sep« option.
Post Reply