%%%------------------------rrrrrrrrrrrrrrip!-------------------------- % Macro: \xsplit % By: Eric Skinner % Function: Takes two pieces of text, and boxes them side by side. % Column widths and inter-column gap are set by user. % Parameters: % #1: Width of first column, including unit specification % #2: Width of space between columns, including units % #3: Width of second column, including units % ** Warning: Don't exceed page dimensions! % #4: First column text. % #5: Second column text. % Registers: \box1,\box2 \def\xsplit#1#2#3#4#5{{ \setbox1=\vbox{\hsize= #1 #4} % First column \setbox2=\vbox{\hsize= #3 #5} % Second column % If the boxes are output side by side at this point, they % will be aligned at the bottom instead of the top. \ifdim\ht2>\ht1 % Column two is longer than column one % Fill bottom of column one with glue \setbox1=\vbox to \ht2{\hsize= #1 #4 \vfill} \else \ifdim\ht1>\ht2 % Column one is longer than column two % Fill bottom of column two with glue \setbox2=\vbox to \ht1{\hsize= #3 #5 \vfill} \fi \fi \hbox{\box1\hskip#2\box2}}} %%%------Cut some more------------------------------------------------ % Macro: \split % By: Eric Skinner % Function: Takes two pieces of text, and boxes them side by side. % Column widths are set by user. Inter-column gap is % automatically adjusted to make the first column flush % with the left margin, and the second flush with the right. % Parameters: % #1: Width of first column, including unit specification % #2: Width of second column, including units % ** Sum of #1 and #2 should not exceed current \hsize! % #3: First column text. Don't do anything REALLY weird. % #4: Second column text. % Registers: \dimen1 \def\split#1#2#3#4{ \dimen1=\hsize \advance\dimen1 by -#1 \advance\dimen1 by -#2 \xsplit{#1}{\dimen1}{#2}{#3}{#4}} %%%------------Tear----------------------------------------------------