I was wondering what would be the best option to auto fit »user input field« to cell size.
My current code looks like this:
Code: Select all
\documentclass{article}
\usepackage[slovene]{babel}
\usepackage[utf8]{inputenc}
\usepackage[left=1in, right=0.5in, bottom=1.0in, top=0.5in]{geometry}
\usepackage[pdftex]{eforms}
\usepackage{tabularx}
\usepackage{multirow}
\setlength\parindent{0pt}
\pagenumbering{gobble}
\newcounter{infoLineNum}
\setcounter{infoLineNum}{0}
\newcommand{\infoInput}[2][4in]{%
\stepcounter{infoLineNum}%
\makebox[0pt][l]{%
\kern 4 pt
\raisebox{.75ex}
{\textField[\W0\BC{}\BG{}\TU{#2}]{name\theinfoLineNum}{#1}{12bp}}%
}
\dotfill
}
\renewcommand{\arraystretch}{1.7}
\begin{document}
\begin{table}[ht!]
\begin{tabularx}{\textwidth}{|p{1in}|X|p{1in}|}
\hline
\multicolumn{1}{|c|}{\multirow{2}{*}{Lokacija}} & \multicolumn{1}{l|}{\multirow{2}{*}{\infoInput{Lokacija}}} & \multicolumn{1}{c|}{NE ID} \\ \cline{3-3}
\multicolumn{1}{|c|}{} & \multicolumn{1}{c|}{} & \multicolumn{1}{l|}{} \\ \hline
\multicolumn{1}{|c|}{Naslov} & \multicolumn{2}{l|}{} \\ \hline
\multicolumn{1}{|c|}{Križišče} & \multicolumn{2}{l|}{} \\ \hline
\multicolumn{1}{|c|}{Tip opreme} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{} \\ \hline
& & \\
& & \\
& & \\
& & \\
& & \\
& & \\
& & \\
& & \\
& & \\
& &
\end{tabularx}
\end{table}
\end{document}