latex include code example

Example 1: how to insert png latex

\includegraphics[scale=0.65]{screenshot.png}

Example 2: how to add image overleaf

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}

\title{A project with images}
\author{Overleaf}
\date{}

\begin{document}

\maketitle

\section{Introduction}
\begin{figure}[htp]
    \centering
    \includegraphics[width=4cm]{InsertingImagesEx5}
    \caption{An image of a galaxy}
    \label{fig:galaxy}
\end{figure}

\end{document}

Tags:

Misc Example