I'm trying to make a typeset form using some custom commands that I've built. Part of that effort is making "blanks": macros for blank space where someone can write something in after the document has been printed. Their definition is in the formfields package (information about how to get that is at the bottom of the post).
I ran into the following issue: I had some of the blanks inside of tables, and the blanks in the left column weren't coming up flush to the end of first column. Eventually, I traced that to the following change, demonstrated in these two tables from this MWE:
\documentclass[draft]{article}
\usepackage{tabu}
\usepackage{formfields}
\usepackage[left=1.0in, right=.5in, top=.7in, bottom=.7in]{geometry}
\begin{document}
% not flush, and blanks don't all come up to same place.
\begin{tabu} {X<{ \hspace{.5em} }>{ \hspace{.5em} }X}
\field{thing}& \hrulefill\\
\blank & \hrulefill\\
\field{thing}& \hrulefill\\
\end{tabu}
% all blanks flush with each other at right end of 1st column.
\begin{tabu} {X<{\hspace{.5em}}>{\hspace{.5em}}X}
\field{thing}& \hrulefill\\
\blank & \hrulefill\\
\field{thing}& \hrulefill\\
\end{tabu}
% same as second table.
\begin{tabu} {XX}
\field{thing}& \hrulefill\\
\blank & \hrulefill\\
\field{thing}& \hrulefill\\
\end{tabu}
\end{document}
Why do the blanks and fields all come up flush against the end of the first column in the second and third tables, but not the first? I could understand if I were doing something different to each row, but in both of these tables, I don't think I'm doing anything different that would make the rules not align with each other on the right side; I assume this means the spaces at the end of the first column in the different rows of the 1st table are of different lengths. I don't see why that should be the case. I ask this question because I couldn't figure out that the spaces in my table header were the culprit for several weeks. I'm hoping to get some insight as to how to diagnose and debug this sort of thing. If you can, please pay special attention to that.
Part of the problem seems to be the spaces within the <
and >
column specifiers in my table, because the second table from the MWE
has the spaces removed, and all the blanks come up flush with the end
of the first column. I'm not suprised the spaces stop the blanks from becoming flush with the right end of the 1st column, but I don't understand why the different blanks would act differently.
Additional Resources
A picture of the trouble (the red rectangles were added later, they show where the lines aren't flush with each other).
Zoomed in picture of the first (top) table:
\ProvidesExplPackage
for formfield.sty.<
and>
column things, then the trouble goes away, despite the different commands (\field
uses\blank
anyway, so they're not that different). But... why should it go away? Why was there trouble at all?