LaTeX forum ⇒ Text Formattingauto fit »user input field« SIZE

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

auto fit »user input field« SIZE

Postby comandos » Mon Jan 20, 2020 11:53 am

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] [Expand/Collapse] [Download] ({untitled.tex})
  1. \documentclass{article}
  2. \usepackage[slovene]{babel}
  3. \usepackage[utf8]{inputenc}
  4. \usepackage[left=1in, right=0.5in, bottom=1.0in, top=0.5in]{geometry}
  5. \usepackage[pdftex]{eforms}
  6. \usepackage{tabularx}
  7. \usepackage{multirow}
  8. \setlength\parindent{0pt}
  9. \pagenumbering{gobble}
  10.  
  11.  
  12. \newcounter{infoLineNum}
  13. \setcounter{infoLineNum}{0}
  14. \newcommand{\infoInput}[2][4in]{%
  15. \stepcounter{infoLineNum}%
  16. \makebox[0pt][l]{%
  17. \kern 4 pt
  18. \raisebox{.75ex}
  19. {\textField[\W0\BC{}\BG{}\TU{#2}]{name\theinfoLineNum}{#1}{12bp}}%
  20. }
  21. \dotfill
  22. }
  23.  
  24. \renewcommand{\arraystretch}{1.7}
  25.  
  26.  
  27.  
  28. \begin{document}
  29.  
  30. \begin{table}[ht!]
  31. \begin{tabularx}{\textwidth}{|p{1in}|X|p{1in}|}
  32. \hline
  33. \multicolumn{1}{|c|}{\multirow{2}{*}{Lokacija}} & \multicolumn{1}{l|}{\multirow{2}{*}{\infoInput{Lokacija}}} & \multicolumn{1}{c|}{NE ID} \\ \cline{3-3}
  34. \multicolumn{1}{|c|}{} & \multicolumn{1}{c|}{} & \multicolumn{1}{l|}{} \\ \hline
  35. \multicolumn{1}{|c|}{Naslov} & \multicolumn{2}{l|}{} \\ \hline
  36. \multicolumn{1}{|c|}{Križišče} & \multicolumn{2}{l|}{} \\ \hline
  37. \multicolumn{1}{|c|}{Tip opreme} & \multicolumn{1}{l|}{} & \multicolumn{1}{l|}{} \\ \hline
  38. & & \\
  39. & & \\
  40. & & \\
  41. & & \\
  42. & & \\
  43. & & \\
  44. & & \\
  45. & & \\
  46. & & \\
  47. & &
  48. \end{tabularx}
  49. \end{table}
  50.  
  51.  
  52. \end{document}


Best regards
Attachments
1.jpg
1.jpg (36.63 KiB) Viewed 415 times

Return to “Text Formatting”

Who is online

Users browsing this forum: No registered users and 2 guests