# Circle a number inside a table

Open to any and all suggestions / alternative layouts. Need to be able to cleanly circle a number inside of a table. Currently I have this (stolen from elsewhere) and it produces output as attached.

\usepackage{tikz}

\newcommand*\circled[1]{\tikz[baseline=(char.base)]{
\node[shape=circle,draw,inner sep=2pt] (char) {#1};}}

% A completed self assessment sheet (see end of this document).
\section{Self Assessment}

\begin{table}[h]
\begin{tabular}{llllllllllllll}
Level 1 & A & 18 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & \circled{10} \\
Level 2 & V & 12 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & \circled{10} \\
Level 3 & AA & 10 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & \circled{9} & 10 \\
Level 4 & S & 12 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & \circled{8} & 9 & 10 \\
Level 5 & I & 10 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & \circled{8} & 9 & 10 \\
Level 6 & S & 10 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & \circled{8} & 9 & 10 \\
Level 7 & C & 6  & 0 & 1 & 2 & 3 & 4 & 5 & 6 & \circled{7} & 8 & 9 & 10 \\
Level 8 & R & 16 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & \circled{8} & 9 &
\end{tabular}
\end{table}

• Use c for the columns Nov 28, 2014 at 16:58
• @egreg Where does the c go? Nov 28, 2014 at 17:00
• \begin{tabular}{l l r *{11}{c} } Nov 28, 2014 at 17:01
• @egreg hot damn get you a medal Nov 28, 2014 at 17:06

You want centered columns, but also to increase the interline space in the table.

\documentclass{article}
\usepackage{tikz}

\newcommand*\circled[1]{\tikz[baseline=(char.base)]{% <---- BEWARE
\node[shape=circle,draw,inner sep=2pt] (char) {#1};}}

\begin{document}

\begin{table}
\centering
\renewcommand{\arraystretch}{1.4}

\begin{tabular}{l l r *{11}{c}}
Level 1 & A & 18 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & \circled{10} \\
Level 2 & V & 12 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & \circled{10} \\
Level 3 & AA & 10 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & \circled{9} & 10 \\
Level 4 & S & 12 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & \circled{8} & 9 & 10 \\
Level 5 & I & 10 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & \circled{8} & 9 & 10 \\
Level 6 & S & 10 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & \circled{8} & 9 & 10 \\
Level 7 & C & 6  & 0 & 1 & 2 & 3 & 4 & 5 & 6 & \circled{7} & 8 & 9 & 10 \\
Level 8 & R & 16 & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & \circled{8} & 9 &
\end{tabular}

\end{table}
\end{document}


Since the redefinition of \arraystretch is issued in a table environment, it will be undone at the end of the environment, so it won't affect other tables.

Don't forget protecting end-of-lines.