[Tex/LaTex] \textwidth within \resizebox

graphicsmulticolumnscalingtables

I want to the final row of a table to display the notes, spanning across all columns, using \multicolumn{#}{p{\textwidth}}{}. This does not work properly in connection with resize, because textwidth keeps the same value but the measurement is scaled downwards.

Here is my code:

\documentclass{article}%
\usepackage{graphicx}
\begin{document}
\resizebox{\textwidth}{!}{%
\begin{tabular}{rrrrrrrrr} \hline
aaaaaaaa & aaaaaaaa & aaaaaaaa & aaaaaaaa & aaaaaaaa & aaaaaaaa & aaaaaaaa & aaaaaaaa & aaaaaaaa\\ \hline
\multicolumn{9}{p{\textwidth}}{Notes: Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et.}
\end{tabular}%
}
\end{document} 

Output:
enter image description here

Best Answer

Better to use threeparttablex, though it is not perfect (a little too wide in the right)

\documentclass{article}%
\usepackage{graphicx}
\usepackage[referable]{threeparttablex}
\begin{document}

\noindent
\rule{\textwidth}{1mm}

\noindent
\resizebox{\textwidth}{!}{%
  \begin{threeparttable}
    \begin{tabular}{rrrrrrrrr} \hline aaaaaaaa & aaaaaaaa & aaaaaaaa &
      aaaaaaaa & aaaaaaaa & aaaaaaaa & aaaaaaaa & aaaaaaaa &
      aaaaaaaa\\ \hline 
    \end{tabular}%
    \begin{tablenotes}
      \note Lorem ipsum dolor sit amet, consetetur sadipscing elitr,
      sed diam nonumy eirmod tempor invidunt ut labore et.
    \end{tablenotes}
  \end{threeparttable}
}
\end{document}