[LaTeX] subfigures with captions

This post provides Latex code examples for how to generate sub-figures with and without captions.

  • Sub-figures with captions
\documentclass{article}
\usepackage{graphicx, caption, subcaption}
\begin{document}
  This article is about ....

\begin{figure}
 \begin{subfigure}{0.96\textwidth} 
     \includegraphics[width=\textwidth]{subfig1} 
     \caption{subfig 1 caption text here}
 \end{subfigure} 
 \centering  %note: this centering command applies to subfig1
 \hfill
 \begin{subfigure}{0.47\textwidth}
     \includegraphics[width=\textwidth]{subfig2}
     \caption{subfig 2 caption text here}
 \end{subfigure}
 \hfill
 \begin{subfigure}{0.47\textwidth}
     \includegraphics[width=\textwidth]{subfig3}
     \caption{subfig 3 caption text here}
 \end{subfigure}
 \caption{the overall fig caption text here}
 \label{fig:subfig_example} % Give a unique label
\end{figure}

\end{document}
  • Sub-figures without caption
\documentclass{article}
\usepackage{graphicx}
\begin{document}
  This article is about ....

%*For figures without sub-captions
\begin{figure}
    \includegraphics[width=0.96\textwidth]{subfig1}
    \centering 
    \hfill
    \includegraphics[width=.48\textwidth]{subfig2} 
    \hfill
    \includegraphics[width=.48\textwidth]{subfig3}
    % figure caption is below the figure
    \caption{figure caption text here}
 \label{fig:subfig_example2} % Give a unique label
 \end{figure}
 
\end{document}

Install DB Browser for SQLite on Ubuntu 16.04

This post introduces how to install DB Browser for SQLite on Ubuntu 16.04.

For Ubuntu and derivaties, @deepsidhu1313 provides a PPA with the latest release at here:

https://launchpad.net/~linuxgndu/+archive/ubuntu/sqlitebrowser

Step 1: Add the PPA shown above by issuing the following command in your terminal:

$ sudo add-apt-repository -y ppa:linuxgndu/sqlitebrowser

Step 2: Update the cache using:

$ sudo apt-get update

Step 3: Install the DB Browser for SQLite package by issuing the following command:

$ sudo apt-get install sqlitebrowser

 

Reference:

http://sqlitebrowser.org/