General ⇒ Enrollment form
Enrollment form
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
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
-
- Posts: 274
- Joined: Fri Feb 05, 2010 10:15 pm
Enrollment form
Code: Select all
|\underline{\hspace{.10in}||
Re: Enrollment form
Regards, Fleet
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Enrollment form
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
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: Enrollment form
How do I remove the inner margin/padding in a tikz node, so the text will start at the left edge?
Regards, Fleet
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Enrollment form
The package manual suggests to use the »inner sep« option.fleet wrote:[…] How do I remove the inner margin/padding in a tikz node, so the text will start at the left edge? […]
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10