Theses, Books, Title pages ⇒ Master/doctoral thesis figures next to each other
-
- Posts: 9
- Joined: Thu Mar 02, 2017 8:31 pm
Master/doctoral thesis figures next to each other
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,
NEW: TikZ book now 40% off at Amazon.com for a short time.
And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Master/doctoral thesis figures next to each other
You can also use the float package. But why would you need it?
-
- Posts: 9
- Joined: Thu Mar 02, 2017 8:31 pm
Master/doctoral thesis figures next to each other
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
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: 10324
- Joined: Mon Mar 10, 2008 9:44 pm
Master/doctoral thesis figures next to each other
----
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.
----
-
- Posts: 9
- Joined: Thu Mar 02, 2017 8:31 pm
Master/doctoral thesis figures next to each other
- Johannes_B
- Site Moderator
- Posts: 4182
- Joined: Thu Nov 01, 2012 4:08 pm
Master/doctoral thesis figures next to each other
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).