Hi,
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
Text Formatting ⇒ Placing text under a line in a form
Placing text under a line in a form
If you want an editable PDF form, here's a tutorial for that:
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...
or something like that. There may be better ways I don't know about, though.
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
Your suggestion above worked - Thanks!
Re: Placing text under a line in a form
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
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
Thanks for the idea, all I did was add the \text{} to the following and it worked:
$\overset{\text{\LARGE\textbf{a}}}{\underset{\text{b}{{\underline{\hspace{5.0in}}}}$
$\overset{\text{\LARGE\textbf{a}}}{\underset{\text{b}{{\underline{\hspace{5.0in}}}}$