3

I'm looking to make a timestamp with pre < and post > as start/finish, but I can't get the characters to align. With the 1st solution, < > are an equal distance from the nearest digit, but the digits aren't aligned. And conversely with the second solution. Any suggestion?

\documentclass{article}
\usepackage{datetime2}

\begin{document}
\noindent
{\tiny\makebox{\raisebox{+.1ex}{<}}%
  \DTMdisplaytime{0}{0}{00}%
  \makebox{~}\\
  \makebox{\raisebox{+.1ex}{~}}%
  \DTMdisplaytime{0}{0}{01}%
  \makebox{>}}\par

\hrule width 4em 

\noindent
{\tiny
\begin{tabular}{@{}p{2ex}@{}l@{}p{2ex}@{}}
  \raisebox{+.1ex}{<}
  &\DTMdisplaytime{0}{0}{00}%
  &\raisebox{+.1ex}{~}
  \end{tabular}\\
\begin{tabular}{@{}p{2ex}@{}l@{}p{2ex}@{}}
  \raisebox{+.1ex}{~}
  &\DTMdisplaytime{0}{0}{01}%
  &\raisebox{+.1ex}{>}
\end{tabular}}

\end{document}

enter image description here

1
  • I think the start/finish symbols should be \langle and \rangle rather than < and >.
    – Bernard
    Aug 15, 2021 at 8:56

1 Answer 1

3

enter image description here

\documentclass{article}
\usepackage{datetime2}

\begin{document}

{\tiny
\begin{tabular}{@{}r@{}l@{}l@{}}
  \raisebox{+.1ex}{<}   &\DTMdisplaytime{0}{0}{00}                     \\
                        &\DTMdisplaytime{0}{0}{01} &\raisebox{+.1ex}{>}
\end{tabular}}

\bigskip

{\tiny
  \raisebox{+.1ex}{<}\DTMdisplaytime{0}{0}{00}
  
  \phantom{<}\DTMdisplaytime{0}{0}{01}\raisebox{+.1ex}{>}
}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .