1

I'm using the hyperref package to allow me to use forms in my latex document, but I can't seem to work out how to make it so that the value input into the form is aligned to the bottom of the textfield, rather than to the top as this makes the line look a bit stupid, especially for larger text.

Is there any way to align the text to stay with the bottom of the input box instead?

EDIT: Here's a stripped down version that shows the problem, just compile it and type something into the field and you'll see that the text "jumps" up

\documentclass[a4paper, 10pt]{article}
\usepackage{hyperref}
\usepackage{mathptmx} 
\usepackage[scaled=.92]{helvet} 
\usepackage{courier}
\usepackage[T1]{fontenc}

\begin{document}
\begin{center}
    {\huge{Route\begin{Form}
    \TextField[name=route_number, maxlen=4, width=1.8cm, charsize=20pt, align=1]{}
    \end{Form}New Schedule Survery}}\\
\end{center}
\end{document}
  • Welcome to TeX.SE! I would be far more easy to help you if you would provide a small, complete document document which show your problem. – Zarko Aug 21 '16 at 13:42
2

I am not sure if I understand your question correctly, but if you want to shift the box, you can play around with \raisebox{}{}:

\documentclass[a4paper, 10pt]{article}
\usepackage{hyperref}
\usepackage{mathptmx} 
\usepackage[scaled=.92]{helvet} 
\usepackage{courier}
\usepackage[T1]{fontenc}

\begin{document}
    \begin{center}
        {%
            \huge
            Route
            \raisebox{-.25\baselineskip}{
                \begin{Form}
                    \TextField[name=route_number, maxlen=4, width=1.8cm, charsize=20pt, align=1]{}
                \end{Form}
            }
            New Schedule Survery
        }
    \end{center}
\end{document}

enter image description here

Please also note, that \huge and similar commands do not take an argument.

  • Perfect thank you so much! It was my first time using forms so I didn't realise you can treat them as box objects. And that also explains why I always end up having problems with huge scopes! – Ryan Hill Aug 21 '16 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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