Text Formattingauto fit »user input field« SIZE

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
comandos
Posts: 15
Joined: Sat Dec 15, 2018 3:46 pm

auto fit »user input field« SIZE

Post by comandos »

Greetings,
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}
Best regards
Attachments
1.jpg
1.jpg (36.63 KiB) Viewed 1731 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX books
Post Reply