To set the icon heading style you need to import \caption and \subcaption package, you can change the caption and label font, encoding style, alignment, format, etc. Insert a child graph
The code is as follows
\begin{figure}
\centering
\begin{subfigure}[t]{1in}
\centering
\includegraphics[width=1in]{ PLACEHOLDER}
\caption{caption 1}\label{fig:1a}
\end{subfigure}
\quad
\begin{subfigure}[t]{1in}
\centering
\includegraphics[width=1in]{placeholder}
\caption{caption 2}\label{fig:1b}
\end{ Subfigure}
\caption{main figure caption}\label{fig:1}
\end{figure}
Insert child table
Code Similar
\begin{table}
\centering
\begin{subtable}[t]{2in}
\centering
\begin{tabular}{|l|l|l|}
\hline
& & 300\\
\hline
& & 600\\
\hline
\end{tabular}
\ Caption{caption 1}\label{table:1a}
\end{subtable}
\quad
\begin{subtable}[t]{2in}
\centering
\begin{tabular}{|l|l|l|}
\hline
& & 300\\
\hline
& & 600\\
\hline
\end{tabular}
\ Caption{caption 2}\label{table:1b}
\end{subtable}
\caption{main table caption}\label{table:1}
\end {table}
You can use \columnwidth instead of \width to set the caption numbering style
% change the style of the caption numbering.
\renewcommand{\thetable}{\alph{table}}
\renewcommand{\thefigure}{\alph{table}}
\renewcommand{\ Thesubtable}{\roman{subtable}}
\renewcommand{\thesubfigure}{\arabic{subfigure}}
Counter Style |
Code |
Example |
Arabic numerals |
\arabic{counter} |
1, 2 |
Lower Case Letters |
\alph{counter} |
A, b |
Upper Case Letters |
\alph{counter} |
A, B |
Lower Case Roman |
Numerals \roman{counter} |
I, II |
Upper Case Roman |
Numerals \roman{counter} |
I, II |
Replace the counter with a table or subtable and get the number style you want.
Example:
\renewcommand{\thefigure}{\roman{figure}}
\renewcommand{\thesubfigure}{\arabic{subfigure}}
\begin{ Figure}
\centering
\begin{subfigure}[t]{1in}
\centering
\includegraphics[width=1in]{ PLACEHOLDER}
\caption{arabic numerals}\label{fig:1a}
\end{subfigure}
\quad
\begin{subfigure}[t] {1in}
\centering
\includegraphics[width=1in]{placeholder}
\caption{arabic numerals}\label{fig:1b}
\end {Subfigure}
\caption{capital Roman numerals}\label{fig:1}
\end{figure}
The icon number is associated with the chapter.
Similar to the following code
% This applies if your have chapters
\renewcommand{\thefigure}{\thechapter.\alph{figure}}% set caption label style to 1.A
\renewcommand{\thesubfigure}{\arabic{subfigure}}
\begin{figure}
\centering
\begin{ subfigure}[t]{1in}
\centering
\includegraphics[width=1in]{placeholder}
\caption{arabic numerals}\ LABEL{FIG:1A}
\end{subfigure}
\quad
\begin{subfigure}[t]{1in}
\centering
\ Includegraphics[width=1in]{placeholder}
\caption{arabic numerals}\label{fig:1b}
\end{subfigure}
\caption{chapter number dot Figure letter}\label{fig:1}
\end{figure}
Heading style settings
When you import a macro package, you can set the global style directly, that is, all caption styles change, as shown in the following example:
% options apply to all captions
\usepackage[options]{caption}
% applies to all subfigure and subtable captions
\usepackage[options]{subcaption}
% would apply to all captions
\usepackage[labelfont=it,textfont={bf,it}]{caption}
% would apply to all subcaptions
\usepackage[labelfont=bf,textfont=normalfont,singlelinecheck=off,justification=raggedright]{subcaption}
You can also use \captionsetup to set the heading style so that all subsequent heading styles are reset according to \captionsetup, and the sample code is as follows:
\captionsetup[float_type]{options}
Float_type can be table, subtable, figure, Subfigure, and so on, the following code shows the settings for label font, text font, and the alignment of subheadings:
% for figures:caption label are italic, the caption text is Bold/italic \captionsetup[figure]{l
Abelfont=it,textfont={bf,it}}% for Subfigures:caption label is bold, the caption text normal. % justification is raggedright (i.e. left aligned)% Singlelinecheck=off means this justification setting is used even
When the "caption is" a single line long.
% if singlelinecheck=on, then caption is always centered the caption was only one. \captionsetup[subfigure]{labelfont=bf,textfont=normalfont,singlelinecheck=off,justification=raggedright} \begin {figure} \centering \begin{subfigure}[t]{1in} \centering \includegraphics[width=1in]{placeholder} \caption{Captio N}\LABEL{FIG:1A} \end{subfigure} \quad \begin{subfigure}[t]{1in} \centering \includegraphics[width=1in]{placeholder } \caption{caption}\label{fig:1b} \end{subfigure} \caption{main figure caption.} \label{fig:1} \end{figure}
Operation effect is as follows
Where Singlelinecheck=off is to set the justification setting for even a row of headings, otherwise the default is centered.
The header size is set as follows
\captionsetup{font={scriptsize}}
Other dimensions See http://blog.csdn.net/wkd22775/article/details/51784770