Text Formatting ⇒ Placing text under a line in a form
Placing text under a line in a form
I am working on creating a printable form using Latex. I want to place text underneath a line where a user will write something.
e.g. _____________________
First Name
or _____________________
Date(dd/mm/yy)
(The text would be centered in a small font under the line)
I might be missing something obvious here. Any help would be greatly appreciated
If anyone knows if there are any tutorials or templates for creating or setting up forms, please let me know.
Thanks,
Sunny
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
Placing text under a line in a form
http://tug.ctan.org/tex-archive/info/pd ... /forms.pdf
If you just want something that'll get printed beforehand with a blank with text under it, you could use something like...
Code: Select all
\documentclass{article}
\usepackage{amsmath}
\begin{document}
Your name is $\underset{\text{name}}{\underline{\hspace{4cm}}}$
\end{document}Re: Placing text under a line in a form
Re: Placing text under a line in a form
I ran into new problem along the same topic. I know need to find a way to post content above and below a line. I tried using the following:
$\overset{\LARGE\textbf{a}}{\underset{b}{\underline{\hspace{5.0in}}}}$
This works well for placement of the text but for some reason does not allow me to control the font size and style. And for some reason the denominator is always italicized.
I am not sure what to do next.
Sunny
Placing text under a line in a form
Denominator? You know, TeX was made to format mathematics. You don't need to use overset to do a fraction. There are special commands for fractions.sunnyhd wrote:Hi Everyone,
I ran into new problem along the same topic. I know need to find a way to post content above and below a line. I tried using the following:
$\overset{\LARGE\textbf{a}}{\underset{b}{\underline{\hspace{5.0in}}}}$
This works well for placement of the text but for some reason does not allow me to control the font size and style. And for some reason the denominator is always italicized.
I am not sure what to do next.
Sunny
$\frac{1}{2}$
gives you a vertical 1/2.
The $...$ signifies math mode. In math mode, letters are assumed to be variables, and hence are italicized. If you don't want them italicized, you can do:
$\frac{\mathrm{x}}{\mathrm{y}}$
should give you x/y vertically with "x" and "y" unitalicized. If you load the amsmath package, instead of \mathrm{...} you can also use \text{...} to use regular text inside math mode.
$\frac{\text{x}}{\text{y}}$
Try \dfrac instead of \frac as well, which will give you a display-style fraction.
Re: Placing text under a line in a form
$\overset{\text{\LARGE\textbf{a}}}{\underset{\text{b}{{\underline{\hspace{5.0in}}}}$