1

How do shift one entry (the letter T) to the extreme right of the cell? Here is my code.

\begin{tabular}{ l c r }
  T & 2 & 3 \\
  4 & 5 & 6 \\
  7 & 8 & 9 \\
\end{tabular}

Tried to google for a function \shift_to_right{T} but it doesnt exist.

  • 1
    edited to make it simple – Kong Jan 21 at 4:47
  • 1
    Replace T by \multicolumn{1}{r}{T}? Of course, in this simple example this does not really have a big impact, but if you replace the entry 4 below the T by 444444 you will see that it works. – Schrödinger's cat Jan 21 at 4:56
6

This must be a duplicate of something, but you can always change the alignment of a single cell with \multicolumn{1}{<alignment>}{<content>}, e.g.

\documentclass{article}
\begin{document}
\begin{tabular}{ l c r }
  \multicolumn{1}{r}{T} & 2 & 3 \\
  4444444 & 5 & 6 \\
  7 & 8 & 9 \\
\end{tabular}
\end{document}

enter image description here

As you can see, T is at the very right of its cell.

2
\documentclass{article}
\begin{document}
\begin{tabular}{ l c r }
  \hfill T & 2 & 3 \\
  444444   & 5 & 6 \\
         7 & 8 & 9 \\
\end{tabular}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.