How do I make an offset table?

Hartmut Henkel hartmut_henkel at gmx.de
Sun Jan 30 10:17:59 CET 2022


On Sat, 29 Jan 2022, William F Hammond via texhax wrote:
> Perhaps this.  (For something serious the first argument of \raisebox
> should be defined in terms of lengths.)

perhaps one could typeset it twice:

\documentclass{article}
\begin{document}
\newcommand{\timetask}[2]{#1\\ \kern\offset #2\\}
\newcommand{\foo}{%
  \begin{tabular}{ll}
    \timetask{08:00}{breakfast}
    \timetask{13:00}{lunch}
    \timetask{17:00}{dinner}
  \end{tabular}%
}
\newdimen\offset\offset=0pt
\newbox\tbox
\setbox\tbox=\hbox{\foo}
\offset=0.5\wd\tbox
\begin{center}
\foo
\end{center}
\end{document}

Best Regards, Hartmut


More information about the texhax mailing list.