Aug 1, 2019

1. Example of inserting images in LaTex.

Below is an example on how to import a picture.

A. One image in one column

\begin{figure}[t]
    \centering
    \includegraphics[width=8.5cm]{A.PNG}
    \caption{This is an example of a figure placement. This is}
    \label{fig:A_PNG}
\end{figure}

B. Two images in one column
\begin{figure}
     \centering
     \begin{subfigure}[b]{0.24\textwidth}
         \centering
         \includegraphics[width=\textwidth]{A.PNG}
         \caption{abcd}
         \label{fig:A_PNG}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.24\textwidth}
         \centering
         \includegraphics[width=\textwidth]{B.PNG}
         \caption{efgh}
         \label{fig:B_PNG}
     \end{subfigure}
     \caption{This is an example of a figure placement. This is} 
     \label{fig:AB_PNG}
\end{figure}

C. Three images in one column
\begin{figure}
     \centering
     \begin{subfigure}[b]{0.15\textwidth}
         \centering
         \includegraphics[width=\textwidth]{A.PNG}
         \caption{abcd}
         \label{fig:A_PNG}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.15\textwidth}
         \centering
         \includegraphics[width=\textwidth]{B.PNG}
         \caption{efgh}
         \label{fig:B_PNG}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.15\textwidth}
         \centering
         \includegraphics[width=\textwidth]{C.PNG}
         \caption{ijkl}
         \label{fig:C_PNG}
     \end{subfigure}
     \caption{This is an example of a figure placement. This is} 
     \label{fig:ABC_PNG}
\end{figure}



D. Two images in top and one image in bottom in one column
\begin{figure}
     \centering
     \begin{subfigure}[b]{0.24\textwidth}
         \centering
         \includegraphics[width=\textwidth]{A.PNG}
         \caption{abcd}
         \label{fig:A_PNG}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.24\textwidth}
         \centering
         \includegraphics[width=\textwidth]{B.PNG}
         \caption{efgh}
         \label{fig:B_PNG}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.485\textwidth}
         \centering
         \includegraphics[width=\textwidth]{C.PNG}
         \caption{ijkl}
         \label{fig:C_PNG}
     \end{subfigure}
     \caption{This is an example of a figure placement. This is} 
     \label{fig:ABC_PNG}
\end{figure}

E. Two images in top and two images in bottom in one column
\begin{figure}
     \centering
     \begin{subfigure}[b]{0.24\textwidth}
         \centering
         \includegraphics[width=\textwidth]{A.PNG}
         \caption{abc}
         \label{fig:A_PNG}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.24\textwidth}
         \centering
         \includegraphics[width=\textwidth]{B.PNG}
         \caption{def}
         \label{fig:B_PNG}
     \end{subfigure}
     \hfill
    \begin{subfigure}[b]{0.24\textwidth}
         \centering
         \includegraphics[width=\textwidth]{C.PNG}
         \caption{ghi}
         \label{fig:C_PNG}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.24\textwidth}
         \centering
         \includegraphics[width=\textwidth]{D.PNG}
         \caption{jkl}
         \label{fig:D_PNG}
     \end{subfigure}
     \caption{This is an example of a figure placement. This is} 
     \label{fig:ABCD_PNG}
\end{figure}

F. One image in two columns
\begin{figure*}[t]
    \centering
    \includegraphics[width=8.5cm]{A.PNG}
    \caption{This is an example of a figure placement. This is}
    \label{fig:A_PNG}
\end{figure*}

G. Two images in two columns
\begin{figure*}
     \centering
     \begin{subfigure}[b]{0.45\textwidth}
         \centering
         \includegraphics[width=\textwidth]{A.PNG}
         \caption{abc}
         \label{fig:A_PNG}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.45\textwidth}
         \centering
         \includegraphics[width=\textwidth]{B.PNG}
         \caption{def}
         \label{fig:B_PNG}
     \end{subfigure}
     \caption{This is an example of a figure placement. This is} 
     \label{fig:AB_PNG}
\end{figure*}

H. Three images in two columns
\begin{figure*}
     \centering
     \begin{subfigure}[b]{0.32\textwidth}
         \centering
         \includegraphics[width=\textwidth]{A.PNG}
         \caption{abc}
         \label{fig:A_PNG}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.32\textwidth}
         \centering
         \includegraphics[width=\textwidth]{B.PNG}
         \caption{def}
         \label{fig:B_PNG}
     \end{subfigure}
     \hfill
    \begin{subfigure}[b]{0.32\textwidth}
         \centering
         \includegraphics[width=\textwidth]{C.PNG}
         \caption{ghi}
         \label{fig:C_PNG}
     \end{subfigure}
     \caption{This is an example of a figure placement. This is} 
     \label{fig:ABC_PNG}
\end{figure*}

I. Four images in two columns
\begin{figure*}
     \centering
     \begin{subfigure}[b]{0.24\textwidth}
         \centering
         \includegraphics[width=\textwidth]{A.PNG}
         \caption{abc}
         \label{fig:A_PNG}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.24\textwidth}
         \centering
         \includegraphics[width=\textwidth]{B.PNG}
         \caption{def}
         \label{fig:B_PNG}
     \end{subfigure}
     \hfill
    \begin{subfigure}[b]{0.24\textwidth}
         \centering
         \includegraphics[width=\textwidth]{C.PNG}
         \caption{ghi}
         \label{fig:C_PNG}
     \end{subfigure}
     \hfill
     \begin{subfigure}[b]{0.24\textwidth}
         \centering
         \includegraphics[width=\textwidth]{D.PNG}
         \caption{jkl}
         \label{fig:D_PNG}
     \end{subfigure}
     \caption{This is an example of a figure placement. This is} 
     \label{fig:ABCD_PNG}
\end{figure*}

No comments:

Post a Comment