4

I am trying to get the table caption left aligned (as the first table labeled "parameter estimates" using tabularx), but in tabular* environment (also happens to my tabularx in the original document) I am not able to left-align it. It just want to stay centered. This also happens to my figures (and I would like consistency, so both to figure and table).

Also, if someone could tell me how I can add colon after "TABLE X" then that would be appreciated, but please mark what part of the code that does this, as I may want to remove it.

 \documentclass{article}
    \usepackage{float}% http://ctan.org/pkg/float
    \makeatletter
    \newcommand\fs@topruled{\def\@fs@cfont{\bfseries}\let\@fs@capt\floatc@ruled
      \def\@fs@pre{\hrule height.8pt depth0pt \kern2pt}%
      \def\@fs@post{}%
      \def\@fs@mid{}%
      \let\@fs@iftopcapt\iftrue}
    \makeatletter
    \floatstyle{topruled}
    \restylefloat{table}

    \usepackage{tabularx,booktabs,caption}% http://ctan.org/pkg/{tabularx,booktabs,caption}
    \captionsetup[table]{
      labelsep = newline,
      textfont = sc, 
      name = TABLE, 
      justification=justified,%this does not seem to work
      skip = \medskipamount}
    \begin{document}

    \begin{table}[!htp]
      \caption{Parameter estimates of the No-Arbitrage Yield only model}
      \label{tab:parameter_estimates}
      \begin{tabularx}{\linewidth}{@{} X r r @{}}
        \toprule[0.5pt]
        \toprule[0.5pt]
        \small Parameters & \multicolumn{2}{c}{\small Full Sample} \\
        \midrule[0.5pt]
        $\delta_0$ & \multicolumn{2}{c}{6.2030} \\
        & \multicolumn{2}{c}{Factor autoregressive parameters} \\
        $\rho_{LL}$ & $1.000$ & $(0.342)$ \\
        $\rho_{SS}$ & $0.999$ & $(0.233)$ \\
        & \multicolumn{2}{c}{Risk pricing factors} \\
        $\lambda_S^0$ & \multicolumn{2}{c}{$0$} \\
        $\lambda_L^0$ & $-0.0174$ & $(0.041)$ \\
        $\lambda_S^1$ & $ 0.0912$ & $(0.089)$ \\
        $\lambda_S^1$ & $-0.1612$ & $(0.034)$ \\
        & \multicolumn{2}{c}{Factor shock volatility parameters} \\
        $\sigma_L$ & $0.0340$ & $(0.019)$ \\
        $\sigma_L$ & $0.0795$ & $(0.010)$ \\
        \bottomrule
      \end{tabularx}

      \medskip

      \parbox{\linewidth}{\scriptsize%
      \textsc{Note}:
      The table shows the results from the market model estimations. Each column presents the mean and standard deviation for 
      all the companies' CAR in the designated event window period. The first column, (0, 2), reports~$\mu$ and~$\sigma$ for 
      the event window period spanning from day~0 to~2 days after the dividend announcement (3~day window). Where day~[0] is 
      the dividend announcement day. Columns~(2),~(3) and~(4) widens the event window to~5,~11 and~21 days. The $t$-values are 
      reported below in parentheses and calculated as $\mu / (\sigma / \sqrt{n})$. ***, ** and * denote significance at 
      the~1,~5 and~10\% levels, respectively.}
    \end{table}

    \begin{table}[!htp]
    \small
      \caption{Correlation matrix}
      \label{tab:Correlation matrix}
      \begin{tabular*}{\linewidth}{@{\extracolsep{\fill}} l*5{c}@{}}
        \toprule[0.5pt]
        \toprule[0.5pt]
       \small Maturity (months) &  1 &  3 & 12 &  36 &  60  \\
          \midrule[0.5pt]
          %
       1 & 1 &  &   & \\
    %
    % 
        3 &  0.997 & 1 &   &  \\
      %
      %  
        12 & 0.978 & 0.983 &  1 &   \\
        36 &  0.937 & 0.940 &  0.976 & 1 \\
        60 & 0.915 & 0.914 &  0.949 & 0.993  & 1\\
           \bottomrule
      \end{tabular*}

      \medskip

      \parbox{\linewidth}{\scriptsize%
      \textsc{Note}:
      We present the correlation matrix for five (5) different maturities. The sample period is from 2000:01 to 2014:02.}
    \end{table}


    \end{document}
5

use

 \captionsetup[table]{
  labelsep = newline,
  textfont = sc, 
  name = TABLE, 
  justification=justified,
  singlelinecheck=false,%%%%%%% a single line is centered by default
  labelsep=colon,%%%%%%
  skip = \medskipamount}

enter image description here

  • thanks! How about the colon after Table 1.. Since I have a lineshift, it is automatically removed.. any idea? – MAT-TEX May 12 '14 at 19:35
  • Ah I forgot it: labelsep=colon. See my edited answer – user2478 May 12 '14 at 19:43
  • Yes, but I was sort of hoping to get Table: (then new line) and labeltext (but it is probably better looking with out). Thank you for your help – MAT-TEX May 12 '14 at 20:00
  • 1
    that is also possible, see documentation of caption. However, I prefer what you have now. – user2478 May 12 '14 at 20:04

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.