Hello everyone,
I am not very good at latex but I am quite interested to know if it is possible to put the figures next to each other? Secondly, can I use float package in this template?
I would really appreciate your kind cooperation.
Respectfully,
Theses, Books, Title pages ⇒ Master/doctoral thesis figures next to each other
-
- Posts: 9
- Joined: Thu Mar 02, 2017 8:31 pm
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Master/doctoral thesis figures next to each other
Yes, of course you can put two images next to each other, why shouln't there any difference?
You can also use the float package. But why would you need it?
You can also use the float package. But why would you need it?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
-
- Posts: 9
- Joined: Thu Mar 02, 2017 8:31 pm
Master/doctoral thesis figures next to each other
Thanks a lot for your kind reply. May I know the input code for placing two figures side by side?
I need float package because I also face problem with the positioning of figures. I want them below a specific text but it doesn't work that way after compiling. I would appreciate if you let me know any solution for that.
Kindest Regards,
I need float package because I also face problem with the positioning of figures. I want them below a specific text but it doesn't work that way after compiling. I would appreciate if you let me know any solution for that.
Kindest Regards,
Master/doctoral thesis figures next to each other
Take a look at the top answer here:
https://tex.stackexchange.com/questions ... each-other
There are different methods of achieving two pictures which are side by side. You can choose the easiest one for you.
https://tex.stackexchange.com/questions ... each-other
There are different methods of achieving two pictures which are side by side. You can choose the easiest one for you.
- Stefan Kottwitz
- Site Admin
- Posts: 10290
- Joined: Mon Mar 10, 2008 9:44 pm
Master/doctoral thesis figures next to each other
To cite the solutions of Masroor, linked by erir above:
----
Without Using Any Package
Using Packages
You can use either subfig or subcaption.
Using subfig:
Using subcaption:
Pros and Cons of the Approaches:
In order to get a better understanding of the placement and width controlling issues, I strongly suggest the you go through the documentation of the above two packages (subfig and subcaption). These documentations contain some excellent hints and examples.
Also, for comprehending the solutions of related issues, these questions (A, B, C, D, E, F) are worth taking a look at.
----
----
Without Using Any Package
Code: Select all
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[!tbp]
\centering
\begin{minipage}[b]{0.4\textwidth}
\includegraphics[width=\textwidth]{flower1.jpg}
\caption{Flower one.}
\end{minipage}
\hfill
\begin{minipage}[b]{0.4\textwidth}
\includegraphics[width=\textwidth]{flower2.jpg}
\caption{Flower two.}
\end{minipage}
\end{figure}
\end{document}
You can use either subfig or subcaption.
Using subfig:
Code: Select all
\documentclass{article}
\usepackage{graphicx}
\usepackage{subfig}
\begin{document}
\begin{figure}[!tbp]
\centering
\subfloat[Flower one.]{\includegraphics[width=0.4\textwidth]{flower1.jpg}\label{fig:f1}}
\hfill
\subfloat[Flower two.]{\includegraphics[width=0.4\textwidth]{flower2.jpg}\label{fig:f2}}
\caption{My flowers.}
\end{figure}
\end{document}
Code: Select all
\documentclass{article}
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\begin{document}
\begin{figure}[!tbp]
\begin{subfigure}[b]{0.4\textwidth}
\includegraphics[width=\textwidth]{flower1.jpg}
\caption{Flower one.}
\label{fig:f1}
\end{subfigure}
\hfill
\begin{subfigure}[b]{0.4\textwidth}
\includegraphics[width=\textwidth]{flower2.jpg}
\caption{Flower two.}
\label{fig:f2}
\end{subfigure}
\caption{My flowers.}
\end{figure}
\end{document}
- It is actually difficult to call one method superior over the other. Which one you want to use will depend on the result you are expecting. So, see the results presented above and choose yourself.
- The first one which uses the minipage environment is actually very simple. But as you can see the figures are number individually. If want to present a group of related figures, it may not be the one you are looking for.
- The results from subfig and subcaption are very similar. Though each has its own way of usage. However, there are reports on subfig not working properly with hyperref. This question provides an excellent discussion on the comparative analysis on subcaption vs. subfig.
In order to get a better understanding of the placement and width controlling issues, I strongly suggest the you go through the documentation of the above two packages (subfig and subcaption). These documentations contain some excellent hints and examples.
Also, for comprehending the solutions of related issues, these questions (A, B, C, D, E, F) are worth taking a look at.
----
LaTeX.org admin
-
- Posts: 9
- Joined: Thu Mar 02, 2017 8:31 pm
Master/doctoral thesis figures next to each other
Thank you all for your kind replies. the first method that doesn't use any package really works for me. Many thanks again
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Master/doctoral thesis figures next to each other
Package subfig won't really work with the template, package subcaption will work just fine. The class already uses the caption package internally.
If you don't need a caption, and don't want the image to flow to another place, avoid the
You could also use
If you don't need a caption, and don't want the image to flow to another place, avoid the
figure
environment. You could also use
\captionof{figure}{This is the caption}
to use a caption without a floating environment (like figure).The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.