Figures, subfigures and figures side-by-side in LaTeX all you need to know.

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Everyone, my name is Federico Tartarini. And in this video I want to show you two things are you can put triggers side by side in latex and how you can add some triggers to your document. What are the difference between the two? As you can see here at the top, we have two fingers side by side. So when finger on the left and one finger on the right, this is nice. If you want to save space, we have created two fingers or two images and we want to save space. So we can put the two fingers side by side. And we have to caption one for each speakers as if the figure were full weight. On the other end. At the bottom here, you can see that I've actually some figures as you can see each sub feeders as his own caption with a letter, so a for a figure on the left and B for a trigger on the writer. And then we have overall caption for the whole figure. So let me show you how to put either side by side and how to add the sub triggers to your document. And then I will quickly show you how to position them into your document but the scope of this video is not about positioning so I will not go too much into detail about that. In this video, I'm going to use over refer but of course you can follow along with me. Also if you are compiling your data documents locally. Finally just want to say that I'm going to share all my source code with you so follow along with me but don't worry too much about copying and pasting the code while I digress, you can just look at the video description below. And then you will see all the source code that for you to use. The first thing that we need to do is to add an image to your document. So let me open my project directory here. You can see that the mean dot txt file, which is the file that I'm working on, and these image which is universe. Of course, in your document, you can replace this image with any other image. So let me actually go and use Unsplash which is a free repository for images I'm going to download this image here. I'm going to add it to my document, so I just have to open it in the loads. I'm going to rename it as figure two. And then I'm going to go back into Overleaf here and I'm going to upload it as trigger. Let's keep in mind that is important that your two fingers have the same expectation. Otherwise, they're going to be looking a bit different because they have different height. So let me go back to the main text document. And let's first figure side by side. So let me compile the document at the moment because they don't have any source code. I can do that with Ctrl, Enter. And I can recompile the document and you will see that there are no fingers at the moment. So that was just the document that I compiled before. So in order to work with some fingers and fingers side by side, we need these two packages. One is graphics and the other one is subscription. Again, no water. I'm going to put it down in the video description. So we are making the title so we are beginning to document we may we specify the title, and then we are making the title and we have some Latin text as a placeholder. So let me start with the first speaker, which are either side by side. So use the beginning command and we begin a feeder. I figured environment already. Overleaf is quite handy because it provides a boilerplate for us. So the first thing that we want to specify is that we wanted to disperse pygar is going to be here in the text. So it can also float. It doesn't have to be at the top. It doesn't have to be at the bottom, but can be MindWave in line with a text. So we're going to put our age. Then we're going to use centering because we want the two finger to be center even though we're going to use two fingers. We're not going to use the included graphic. And let me show you why. Because if I the universe and then I press Ctrl, enter, they're going to have just one finger. Of course this is not the right size that we want because we haven't specified the width of the image. So we can do that by using winter equal to one over text rate. So now if we compile the document again, the image should be full test with perfect so that's what we want. If we want to add just one image and we have already a caption. However, this is not what we want. Finally, we want to put two figures side by side. So we are going to have to put these include graphic and these caption inside our mini page. So let me do that. So let me create a bit of space here. Making mini page and then of course when we do begin we also need to do end mini page. And then inside the mini page. We also want to do again centering because we want to that the image is going to be centered inside the mini page. So now let's do include graphic and let's copy these LS copy the labor. So we are including these. The only thing that we haven't done is that we haven't specified how wide is the mini page or intermediate. So we want to see that zero point 49 So is less than all of the text. Let's compile the document again and we should see one finger of the size of the test winter but in the center. Why is in the center not on the left because we say centering you have before the mini bits. So now that we have understood our mini page let's just copy and paste this code here at the bottom. And we're going to add an under figure. So the other figure was called figure two. We don't have to specify the extension leader can solve that thing out for us. And we can do Ctrl Enter. So we compile the document and you can see that the two fingers are one under each other. But we want to fix this because we don't want to have the two fingers one under each other but we want to have the two fingers side by side. So how can we do that? We can just do we can add an H field in between the two many pages at mini compiler documentation again. And now you can see that the two figures are side by side. They look the same because I've called them to make sure that they have the same aspect ratio theme the two figures do not have the same aspect ratio, then eventually they will not have the same shape and one will be taller than the other holds on other things that I need to fix is because I want to save time before but I copy and paste this minivator There is only one problem. We just need to change the label because we want to have one unique label for each speaker. So we're going to say four feet one. So feet one is the first label and is the label for the second thing. So in the text, here, we can reference the speaker. So we can say the universe is shown in and then we can say bigger one and a mountain is shown in this bigger and then we can see in the which is a non breaking space reference. And then figure two. If you want to know more about how to add hyperlinks or references into your document I have another video and I will put a link in the description. So just check that video out and you will see your sakar that you're on the top of the screen if you're watching this video on your computer. So I forgot to say finger here. So let me just compile the document again. So we can see that the universe is showing people one and the mountain is shown in figure two. is not clickable at the moment, because we haven't imported the package hyperdrive. So we can say use package and then hyperdrive, and we can compile the document again. Now, these not only will update automatically if you enter new pictures, but also we can click on these, and we can navigate through the document, which is super handy. Great. Now I've shown you how to add the two figures side by side to save space, if you want to do that. The second thing that I'm going to show you is how to add sub figures and an overarching caption way to describe the sub figures. So let's do that is very similar to the previous code, but there are some small modification. So let me add another environment, which is begin bigger. So we begin to figure again, Overleaf compiles and gives us some boilerplate border, but of course, we have to change it again. So we're happy with the centering. That's perfect. But now instead of starting straight away with the group graphic we want to add a sub finger. So how can we do that instead of say begin minivator This time we have to do begin sub finger perfect. So again, make sure that you are ending this command with N sub finger. Then inside here, as we did before, we want to have blocked we want to have centering. So we indented and we say centering. And then inside here we want to include the graphic. So we include the graphic and we want to have a caption and a liquid. So let me copy this. And of course insert include graphic, we need to specify what the width of the text of the tweet and the image that we want to show. So let me copy and paste this one is called from report. So we are going to say your input graphic. We want to have a width of the text width. Again, I explained before not to be confused. When I see one text we're here. Inside included graphic because we want the full text we have the mini page. So the mini page was already zero point 49 of the full document text. So here we have one of the text with of the mini beat. The same happened here. So inside the sub figures, which we haven't yet specified, how big is going to be the sub finger. We want to have the full width of the sub figure. So the only thing that I'm actually missing here is to specify when the sub figure is going to be here so it's okay to be at the top inside the feature. And we want to specify the we so we want to specify it as before. So again, it has to be zero point 49 text and then finger here. We want to be at the bottom. So let me compile this document and check that everything is working. Okay, so we should see a figure here at the bottom of the document. Fantastic. We're only seeing one at the center once a figure because we haven't specified the other and we have selected centric. So let me call it a figure to the label. Let me copy and paste this code. Let me copy and paste it down here. Let me remove some spaces here so the code is a little bit more readable. We're going to call it three and we are going to call it the figures show. So we are going to compile the document again and now we can see that the two figures are at the bottom Why are at the bottom because they are appearing on top of each other stat. What we want to do is we want to fix these behavior as we did before. And we can do that using an age field in between the sub figures. Fantastic so now that the two figures are separated by nhp. We have a figure on the left a figure on the right. And these figures appear at the bottom of the page because we have specified here. If I will force these to be taught then these two figures are going to appear in page two. As you can see, we have some text, any other figures why? Because we cannot place these figures at the top of the page because they are to come after this figure here and there is already something else at the top of the page. So let me move back to the bottom of the page. Let me compile the document again. And then we're going to add some text here in which we can refer to figures. So we're going to add some text here, which we're going to fix in a second. So we're going to say the bigger tree and then we want to add that because these are some things we want to capture for the old figure. So in this case, we want to add a caption for the old figure. Well, it's pretty simple. We just for the sub bigger space specify or Solibri and this is a very good naming convention actually. So sorry, these labels should be three it should be three dashboards. And then here I'm going to copy this one's bigger showing subfigure four and finally the bigger and then we're going to reference the old finger so we're going to use Rafa and we're going to say big three, four. Showing the universe and Amanda side by side. So let me recompile this document we can see that we have figure three these subfigures. So this is the caption for the subfigures. Unfortunately, I didn't use writing a good naming convention. Yeah, the label should have been just picture three. And I use figure three for this one and figure four for this one. Of course, I could have used figure 3.8 And let's do that actually figure three dash v and this is all in Figure three. And then we need to change the answer. So three the shade reader speak. And then we're going to call it a figure three. And then we just have to find where this text is in the text. So we can see the university showing some figure three a how to mark the monitoring shown in figure three B and finally the Eagle Tree is showing the universe and a mountain side by side. I really hope you found this video interesting. If you did, please consider liking the video and subscribing to my channel. It really helps a lot because I'm new here on YouTube. So it really helps me a lot to know that you like my video and it helps with the YouTube algorithm. If you have any questions or comments please feel free to add it in the comment section below under the video. I have a lot of other videos on Latech so I will put a link at the end of the video to my latex playlist, a latex femur so if you want to learn more about later catalytic Beamer. And if you want to support this channel, please consider buying me a coffee you can do so by clicking the link down in the video description on buy me a coffee. Thank you very much for listening and see you next time.
Info
Channel: Federico Tartarini
Views: 3,784
Rating: undefined out of 5
Keywords: latex figures side by side, side by side figure, side by side figures beamer, side by side figure latex, latex reference figures, subfigures in latex, latex figures placement in a document, latex figures, latex course, latex subfigure, subfigure latex not working, subfigure latex, figures in latex, Latex figure captions, figures in latex overleaf, latex figures in two columns, latex figure placement, how to insert figures in latex, Insert figures in latex, Minipage latex
Id: ZihsQU7h9-E
Channel Id: undefined
Length: 16min 56sec (1016 seconds)
Published: Thu Jun 10 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.