# How to change the format of caption as that in a kind of journal and align the notes to the left?

I have met a simple problem. I want to align the notes of table to the left and put the notes after the caption of figure using the same format as that in this kind of journal: See here:

My original code is as below.

\documentclass[12pt,a4paper]{article}
\usepackage{microtype}
\usepackage{sectsty}
\allsectionsfont{\centering}
\usepackage{indentfirst,amsmath,multicol,amssymb,booktabs,threeparttable}
\usepackage[font=small,format=plain,labelfont=bf,up,textfont=normal,up,justification=justified,singlelinecheck=false]{caption}
\usepackage{setspace}
\usepackage{bm}
\usepackage{geometry}

\usepackage[sort]{natbib}
\setlength{\bibsep}{2pt}
\geometry{top=1.4in,bottom=1.in,left=1in,right=1in}
\usepackage{grffile}
\usepackage{graphicx,subfig}
\graphicspath{{F:/}}
\usepackage{epstopdf}
\usepackage[svgnames]{xcolor}
\onehalfspacing

\begin{document}
\section{Tables}
\begin{table}[htp]
\small{\caption{Cal}}
\centering
\resizebox{0.8\columnwidth}{!}{
\begin{tabular}{llll}
\toprule
Par & Des & Val & Tar \\
\midrule
$\beta$  &  Dis            & 0.9 & Sta  \\

\bottomrule
\end{tabular}
}
\begin{tablenotes}
\small \item \textit{Notes}:Parameters
\end{tablenotes}

\end{table}

\section{Figures}
\begin{figure}[htb]
\centering
\includegraphics[width=4in,scale=0.5]{jd}
\small{\caption{Jo.} \textit{Notes}: The.}
\end{figure}
\end{document}


Can I change the format of caption as that attachment in a kind of journal? i.e. Caption is below the 'Table 1'; The notes are aligned to the left ; Caption of figure is denoted by 'Fig.1.'.

• Do you want the caption and the notes to be aligned on the left side of the figure, or at the left margin? – Bernard Jul 4 '17 at 8:02
• Another question: is it for a two-columns document? – Bernard Jul 4 '17 at 10:18
• Just one-column. – Carl Jul 5 '17 at 8:38
• I wondered, because you use the \columnwidth length as an argument to \resizebox (which you shouldn't use anyway – see my answer). – Bernard Jul 5 '17 at 8:41
• But I also want to make the figure notes follow behind the caption. And the notes will not show in the \tableofcontents. – Carl Jul 5 '17 at 8:47

\documentclass[12pt,a4paper]{article}
\usepackage{microtype}
\usepackage{booktabs,tabularx}
\usepackage[font=small,format=plain,labelfont=bf,up,
textfont=normal,up,justification=justified,singlelinecheck=false]{caption}
\renewcommand{\figurename}{Fig. }
\renewcommand{\tablename}{Table }

\DeclareCaptionFormat{mytable}{#1#2\\#3}
\captionsetup[table]{format=mytable,labelsep=none}

\usepackage{geometry}

\geometry{top=1.4in,bottom=1.in,left=1in,right=1in}
\usepackage{graphicx}
\usepackage{caption}

\begin{document}

\begin{table}[t]
\caption{Cal}
{\centering\Huge
\begin{tabularx}{\linewidth}{>{\hfil}X>{\hfil}X>{\hfil}X>{\hfil}X}
\toprule
Par & Des & Val & Tar \\\midrule
$\beta$  &  Dis  & 0.9 & Sta  \\\bottomrule
\end{tabularx}\par}\medskip
\textit{Notes}: Parameters
\end{table}

\begin{figure}[b]
{\centering
\includegraphics[width=4in,scale=0.5]{example-image}\par}
\caption{Jo.} \textit{Notes}: The.
\end{figure}
\end{document}

• Thanks for your help! I also want to write the notes following the caption. – Carl Jul 4 '17 at 7:38
• Yes, thanks again! Also, can I use real point rather than colon, i.e. 'Fig.1.' – Carl Jul 4 '17 at 7:56
• Also, since my table is a bit large, I try to use this code as below. \section{Tables} \begin{table}[htp] \small{\caption{Cali}\label{Calibrate}} {\centering \begin{tabularx}{0.8\columnwidth}{llll} \toprule Para & Des & Va & Tar \\ \midrule $\beta$ & Dis & 0.99 & St\\ \bottomrule \end{tabularx}\par}\medskip \textit{Notes}:Parameters \end{table} But the rowline of the table is too long. The code as {>{\hfil}X>{\hfil}X>{\hfil}X>{\hfil}X} may be not suitable for mine. – Carl Jul 4 '17 at 8:00
• \caption[Short caption for toc ]{Long caption. \small Note: .... } In this way, the short caption is not shown up. – Carl Jul 4 '17 at 8:48
• @ChYh If the table is too wide, reduce 0.8\linewidth but not change X columns with l columns, or use tabular instead of tabularx. On the other hand, note that \small{\caption{yyy}} xxx do not make to "yyy" smaller, but to "xxx" . The short captions is showed only in the \tableofcontents. – Fran Jul 4 '17 at 16:21

sorry, during wrote of answer i was interrupted (by my wife) and I was not able to finish it ... so it is better temporary to delete it.

Edit: I'm back :)

• caption style should be determined in caption set up. If I understand you correctly you like to have

\usepackage[format=plain, font={small,up} labelfont=bf,
justification=justified, singlelinecheck=false]{caption}


later locally manual settings can lead to inconsistency

• tables' caption has different format than for figures. Its added option you can determine width

\DeclareCaptionLabelSeparator{mytable}{:\par}%put in what you like
\captionsetup[table]{labelsep=mytable}

• don't use

\resizebox{0.8\columnwidth}{!}{ \begin{tabular}{llll} ... \end{tabular}}

better is then use tabularx table environment and its column types:

\begin{tabularx}{0.8\linewidth}{*{4}{>{\raggedright\arraybackslash}X}}
...
\end{tabularx}

• if you have decimal numbers in one column, than is good to consider S column type fromsiunitx package, which enable align numbers at decimal point and reserve space for numbers signs (if they are present)

• since you also load threeparttable than use it when you like to add notes to table. I select, that notes be set as paragraph and start at left edge of table

• notes of figures can be part of figure caption (long part), for example as:

\caption[figure name.]{Figure name.\newline
\emph{Notes}: some longer text in notes
}


Complete MWE:

\documentclass[12pt,a4paper]{article}
\usepackage[top=1.4in, bottom=1in, left=1in, right=1in]{geometry}
\usepackage{bm}
\usepackage{microtype}
\usepackage{sectsty}
\allsectionsfont{\centering}
\usepackage{indentfirst,amsmath,multicol,amssymb,booktabs,threeparttable}
\usepackage[format=plain, font=small, labelfont=bf,
justification=justified, singlelinecheck=false]{caption}
\DeclareCaptionLabelSeparator{mytable}{:\par}%put in what you like
\captionsetup[table]{labelsep=mytable}
\captionsetup[figure]{name=Fig.}

\usepackage[demo]{graphicx}
\graphicspath{{F:/}}
\usepackage{subfig}
\usepackage{tabularx}

\usepackage{setspace}

\usepackage[sort]{natbib}
\setlength{\bibsep}{2pt}
\usepackage{grffile}
\usepackage{epstopdf}
\usepackage[svgnames]{xcolor}
\onehalfspacing

\usepackage{lipsum}% for text filler
\begin{document}
\section{Tables}
\begin{table}[htp]
\centering
\begin{threeparttable}
\caption{Cal}
\begin{tabularx}{0.6\linewidth}{*{4}{>{\raggedright\arraybackslash}X}}
\toprule
Par         & Des   & Val & Tar     \\
\midrule
$\beta$     & Dis   & 0.9 & Sta     \\
\bottomrule
\end{tabularx}
\begin{tablenotes}[para,flushleft]\footnotesize
\item \textit{Notes}: Parameters
\end{tablenotes}
\end{threeparttable}
\end{table}

\section{Figures}
\begin{figure}[htb]
\centering
\includegraphics[width=4in]{jd}
\caption[figure name.]{Figure name.\newline
\emph{Notes}: \lipsum*[11]
}
\end{figure}
\end{document}


• @ChYh, meanwhile I succeed to finish my answer. See, if edited version can help you. – Zarko Jul 4 '17 at 11:17
• Sorry to reply a bit late! I will have a try! Thanks for your help! – Carl Jul 5 '17 at 8:37

Like this?

\documentclass[12pt, a4paper, demo]{article}
\usepackage{microtype}
\usepackage{sectsty}
\allsectionsfont{\centering}
\usepackage{indentfirst,amsmath,multicol,amssymb,booktabs,threeparttable}
\usepackage[font=small,format=plain,labelfont=bf,up,textfont=normal,up,justification=justified,singlelinecheck=false]{caption}
\captionsetup[table]{labelsep=newline}
\captionsetup[figure]{name=Fig., labelsep=period}
\usepackage{setspace}
\usepackage{bm}
\usepackage{geometry}
\usepackage{tabularx}

\usepackage[sort]{natbib}
\setlength{\bibsep}{2pt}
\geometry{top=1.4in,bottom=1.in,left=1in,right=1in}
\usepackage{grffile}
\usepackage{graphicx,subfig}
\graphicspath{{F:/}}
\usepackage{epstopdf}
\usepackage[svgnames]{xcolor}
\onehalfspacing

\begin{document}

\section{Tables}

\begin{table}[!htp]
\small
\caption[Cal]{Cal\\ \textit{Notes}:Parameters}
\begin{tabularx}{\linewidth}{*{4}{X}}
\toprule
Par & Des & Val & Tar \\
\midrule
$\beta$ & Dis & 0.9 & Sta \\

\bottomrule
\end{tabularx}
\end{table}

\section{Figures}

\begin{figure}[htb]
{\centering
\includegraphics[width=\linewidth]{jd}
\caption{Jo}}%
\textit{Notes}: The.
\end{figure}

\end{document}


• But I also want to make the figure notes follow behind the caption. And the notes will not show in the \tableofcontents. And the table and its notes are aligned to the left margin. – Carl Jul 5 '17 at 9:02
• It seems I misunderstood some of your requirements. So you don't want the table centred? That's easy to change. The figure should also be at the left margin? – Bernard Jul 5 '17 at 9:07
• I want the table and figure to fill the margins of both sides. Sorry! – Carl Jul 5 '17 at 9:45
• In this case I had to changeyour width=... parameters. Please see the updated answer. – Bernard Jul 5 '17 at 10:10