Note at the bottom of table - Left aligned?

ynchoir's picture

 Hi,

I am having problems getting left-aligned notes at the bottom of the centered table.  

My tex code is as below.  If I do it this way, everything is centered so the notes look ugly.  How can I left-align the sentences in notes while keeping the table at the center?  When I use \parbox{notes}, then the stuff inside the \parbox is nicely left-aligned but then the table itself is not centered.

I read the suggestion http://forum.mackichan.com/node/225 here but they did not work out well, either.

Thanks!

yn

 

\begin{table}[htbp]

  \centering

  \caption{Title of Table XXX}

    \begin{tabular}{rrrr}

          & $r_t^e$ & $s$   & $l$ \\

    \hline

    $E[\cdot]$ & 0.79  & 1.13  & 0.25 \\

    $\sigma [\cdot]$ & 6.08  & 0.91  & 0.23 \\

    \hline

    \end{tabular}%

  \label{tab:addlabel}%

\\

Here I type a bunch of notes.  Explaining details.

\end{table}%

 

 

 

 

The \centering macro is in

The \centering macro is in effect for the entire contents of the table environment, so the note is also centered.  See the attached for alternate methods.  The first table is just your sample text.  The second typesets the same, but was created using the Table - (4x3, floating) macro.  The third example removes the \centering macro and instead centers the tabular using the center environmnet (via the SW interface).  The last example uses the \centering macro inside a group, so only the tabular is centered.  The main difference in the last two methods is that different vertical spacing is used.

ynchoir's picture

 Thank you so much!  I liked

 Thank you so much!  I liked the last solution and am happy to use it.  The table looks beautiful now!

Sorry, but can I ask you the follow-up question?  I cannot seem to add label if I do it your way.  In my original text, I included \label{tab:addlabel} in the tex object and SW recognize it (i.e. I can call the label from 'cross-reference').  As there was no label in your example, I added a text field which is \label{tab:addlabel} right after the table.

But SW does not seem to recognize this new label and I cannot call or refer it in the text using cross-reference function.  What should I do here?  I tried a couple of other locations for \label{tab:addlabel} but nothing seemed to work.

Thank you for your help!  I appreciate it.

 

YN

A marker will refer to the

A marker will refer to the first most immediate object found before the marker.  Groupings will be respected, so if you had placed the marker outside the group used the contain the \centering macro, then the marker doesn't refer to anything in the sample document.  Place the marker immediately after the caption and you will get the results you want.  The attached is a modification of the previous example with the marker added and a cross reference to the marker.

ynchoir's picture

 Yes, that is exactly what I

 Yes, that is exactly what I wanted.  Thank you so much!  It helped a lot!

 

YN