Answers for "figures in latex"

4

latex figure

\usepackage{graphicx}
% inside document:

\begin{figure}
	\centering
	\includegraphics[scale=1]{name_of_file_inside_directory}
	\caption{Your caption}
	\label{given_label_that_used_to_reference_figure_in_the_future}
\end{figure}

% use float option [H] after {figure} to place figure exactly as positioned in LeTeX code
% preferably place file of image inside directory of tex file
Posted by: Guest on May-27-2021
6

include picture in latex

\usepackage{graphicx}
\graphicspath{ {./images/} }
\includegraphics{image}
Posted by: Guest on November-11-2020
0

add figure numbers in latex

\begin{figure}[h!]
  \caption{A picture of the universe!}
  \includegraphics[width=0.5\textwidth]{universe}
\end{figure}
Posted by: Guest on May-09-2020
0

figures next to eatch other latex

% By using subfigure this is ashived 

\begin{figure}
\centering
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=.4\linewidth]{image1}
  \caption{A subfigure}
  \label{fig:sub1}
\end{subfigure}%
\begin{subfigure}{.5\textwidth}
  \centering
  \includegraphics[width=.4\linewidth]{image1}
  \caption{A subfigure}
  \label{fig:sub2}
\end{subfigure}
\caption{A figure with two subfigures}
\label{fig:test}
\end{figure}
Posted by: Guest on October-12-2021
-2

insert figure latex

%Path relative to the main .tex file 
\graphicspath{ {./images/} }
Posted by: Guest on November-21-2020

Browse Popular Code Answers by Language