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

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ก.ค. 2024
  • If you're a student, researcher, or writer who needs to add images and figures to your LaTeX document, this tutorial is for you. In this video, we'll show you how to add images and figures to your LaTeX document and how to place them in line with the text, side-by-side, or add subfigures.
    We'll cover everything you need to know, from including graphicx package to importing images, scaling them, and adding captions. You will also learn how to position images, float them, and create a list of figures.
    We will go into detail about how to place images side-by-side or add subfigures with the subfigure package. We will demonstrate how to customize subfigures with different captions and references.
    By the end of this tutorial, you'll have a solid understanding of how to add images and figures to your LaTeX document, and you'll be able to create beautiful and professional-looking documents with images and figures.
    So if you're ready to level up your LaTeX skills, be sure to check out our tutorial. Don't forget to subscribe to our channel for more tutorials on LaTeX and other tools and technologies.
    Keywords: LaTeX, images, figures, graphicx, subfigure, captions, references, positioning, floating, list of figures, scaling, subfigures, side-by-side
    Hashtags: #LaTeX #Images #Figures #Graphicx #Subfigure #Captions #References #Positioning #Floating #ListOfFigures #Scaling #Subfigures #SideBySide
    ✅ Subscribe for more videos like this one
    🔔 Click on the bell icon to be notified when I release a new video
    👍 Please like my video!
    ⚠️ Join my channel to get access to perks: / @federicotartarini
    🙏 Support my channel on Patreon at / federicotartarini
    ☕ Support my channel by buying me a coffee - www.buymeacoffee.com/FedericoT
    ✅ Let's connect:
    🌍 My website - federicotartarini.github.io/
    💻 GitHub - github.com/FedericoTartarini
    Twitter - / federicotartar1
    LinkedIn - / federico-tartarini
    👨‍💻 Source code:
    ```
    \documentclass{article}
    \usepackage{lipsum}
    \usepackage{graphicx}
    \usepackage{subcaption}
    \usepackage{hyperref}
    \title{Figures side by side and sub-figures}
    \begin{document}
    \maketitle
    \begin{figure}[t]
    \centering
    \begin{minipage}{0.49\textwidth}
    \centering
    \includegraphics[width=1\textwidth]{universe}
    \caption{Caption}
    \label{fig:1}
    \end{minipage}
    \hfill
    \begin{minipage}{0.49\textwidth}
    \centering
    \includegraphics[width=1\textwidth]{figure2}
    \caption{Caption}
    \label{fig:2}
    \end{minipage}
    \end{figure}
    The universe is shown in Figure~
    ef{fig:1} and a mountain is shown in Figure~
    ef{fig:2}.
    \begin{figure}[t]
    \centering
    \begin{subfigure}[t]{0.49\textwidth}
    \centering
    \includegraphics[width=1\textwidth]{universe}
    \caption{Caption}
    \label{fig:3-a}
    \end{subfigure}
    \hfill
    \begin{subfigure}[t]{0.49\textwidth}
    \centering
    \includegraphics[width=1\textwidth]{figure2}
    \caption{Caption}
    \label{fig:3-b}
    \end{subfigure}
    \caption{For the sub-figures}
    \label{fig:3}
    \end{figure}
    The universe is shown in sub-figure~
    ef{fig:3-a} and a mountain is shown in sub-figure~
    ef{fig:3-b} and finally the Figure~
    ef{fig:3} is showing the universe and mountain side by side.
    \lipsum
    \end{document}
    ```
    🎥 Content of this video:
    00:00 - What you will learn
    01:40 - Add an image to your document
    02:45 - Add figures side by side
    07:00 - Reference figures in text
    08:35 - Add subfigures

ความคิดเห็น • 58

  • @samiayasmin5782
    @samiayasmin5782 2 ปีที่แล้ว

    Thanks a ton. Really helpful!

  • @michakrawczyk3437
    @michakrawczyk3437 ปีที่แล้ว

    Thank you very much! It is very helpful.

  • @roselima5492
    @roselima5492 2 ปีที่แล้ว

    Thank you very much Federico!

    • @FedericoTartarini
      @FedericoTartarini  2 ปีที่แล้ว +1

      You are welcome, thank you so much for writing a comment.

  • @neliodiassantos
    @neliodiassantos ปีที่แล้ว

    Thanks for your video! Help me a lot!

  • @AliAkbar-sf9tl
    @AliAkbar-sf9tl ปีที่แล้ว

    Thanku so much! it helps a lot

  • @hongweitang-kn9ms
    @hongweitang-kn9ms 5 หลายเดือนก่อน

    Thanks sir, it's really helpful

  • @arunnagargoje1439
    @arunnagargoje1439 3 ปีที่แล้ว +1

    Very nice explanation sir

  • @ab-xo4yc
    @ab-xo4yc 2 ปีที่แล้ว

    grazie, mi hai salvato

    • @FedericoTartarini
      @FedericoTartarini  2 ปีที่แล้ว

      Mi fa molto piacere. Se riesci, condividi il video con amici e colleghi. Grazie mille.

  • @shivshambhuchoudhary1204
    @shivshambhuchoudhary1204 3 ปีที่แล้ว

    Beautiful

  • @timothyimogore1738
    @timothyimogore1738 ปีที่แล้ว

    Thank you so much

  • @saubhiksom
    @saubhiksom 8 หลายเดือนก่อน

    Hi! I am having issue regarding the captions of the two figures when I am putting them side by side. The captions are touching each other on the sides

  • @zeerak-uc7xd
    @zeerak-uc7xd ปีที่แล้ว

    thank you

  • @tomoxt
    @tomoxt ปีที่แล้ว

    Legend for having the code in the description

  • @maipyaar
    @maipyaar ปีที่แล้ว

    Thanks a bunch. I am having a problem with my thesis. The sub-figures captures are include Figure number. How do I solve this please?

    • @FedericoTartarini
      @FedericoTartarini  ปีที่แล้ว

      Hi, have you followed all the steps as shown in the video?

  • @cristiangomezcardenas2506
    @cristiangomezcardenas2506 2 ปีที่แล้ว

    Hi, how can i add a subfigure on top of the other.
    Thanks and regards

    • @FedericoTartarini
      @FedericoTartarini  2 ปีที่แล้ว +1

      Hi why are you trying to add a figure on top of the others? I don't think using the same technique as shown in the video would work. You may need an alternative solution.

  • @vanita8773
    @vanita8773 11 หลายเดือนก่อน

    pl tell about how to add complicated tables like first column in first row and second column in first row, with heading and is again sub divided in to two with sub heading

    • @FedericoTartarini
      @FedericoTartarini  11 หลายเดือนก่อน

      I have uploaded a video in which I explain how to do that.

  • @mustafeezulhassan8604
    @mustafeezulhassan8604 2 ปีที่แล้ว

    How can I add 5 figures in 2 columns? Where one figure spans 2 rows instead of one?

    • @FedericoTartarini
      @FedericoTartarini  2 ปีที่แล้ว +1

      Yes you can add a figure that spans two columns. However I'll need to have a look at exactly what you need to do in order to help you with the code.

  • @pabitrapangeni
    @pabitrapangeni ปีที่แล้ว

    How can we change the font of captions for all the figures at once?

    • @FedericoTartarini
      @FedericoTartarini  ปีที่แล้ว

      You can follow the instructions in this thread: tex.stackexchange.com/questions/822/change-the-font-of-figure-captions

  • @yoha1652
    @yoha1652 2 ปีที่แล้ว +1

    Thank you sir
    Is there any code for graphs arranged in side by side instead of pictures??

    • @FedericoTartarini
      @FedericoTartarini  2 ปีที่แล้ว

      Are the graphs images?

    • @yoha1652
      @yoha1652 2 ปีที่แล้ว

      No.. I draw the graphs using tikz

    • @FedericoTartarini
      @FedericoTartarini  2 ปีที่แล้ว +1

      You should then be able to arrange them side by side using the same approach as for figures

    • @yoha1652
      @yoha1652 2 ปีที่แล้ว

      Thank you..

  • @x2diaries506
    @x2diaries506 2 ปีที่แล้ว

    Hi, In case we have lengthy captions how do manage to overlap.

    • @FedericoTartarini
      @FedericoTartarini  2 ปีที่แล้ว +1

      Could you please share an example? Perhaps if you have very lengthy captions you may want to organise the figures differently or merge them into one where you put the figures side my side and then you have a single caption

    • @x2diaries506
      @x2diaries506 2 ปีที่แล้ว

      @@FedericoTartarini yeah because of it I have to reduce the length of my captions. Moreover could you please guide how to reduce space before and after inserting images or drawing table in the text.?

    • @FedericoTartarini
      @FedericoTartarini  2 ปีที่แล้ว

      I would suggest you to do a Google search to find the solution to the spacing problem. It is not easy to share the solution in the TH-cam chat

  • @shadabhasan2242
    @shadabhasan2242 2 ปีที่แล้ว

    when i am increasing the size from .49 to 1 it not coming side by side

  • @MShazarul
    @MShazarul 11 หลายเดือนก่อน

    The report will be completed by four people, including me. I inted to list their names below their picture. These pictures are position next to one another. How do I include their name positioned below their pictures, centered to the picture and without the caption?

    • @FedericoTartarini
      @FedericoTartarini  11 หลายเดือนก่อน +1

      Unfortunately it is a bit hard to explain how to do that in a TH-cam comment.

    • @MShazarul
      @MShazarul 11 หลายเดือนก่อน

      @@FedericoTartarini Not a proble, scouring through forum to look for assistance or maybe I could try table if I can't get any. Just like in Words

  • @lemao8304
    @lemao8304 ปีที่แล้ว

    I can't use minipage with my overleaf

  • @mdalamgirhussain7917
    @mdalamgirhussain7917 ปีที่แล้ว

    Can i can remove all the text that is in Spanish or some other language?

  • @ShakeelAhmad-tf6lz
    @ShakeelAhmad-tf6lz 2 ปีที่แล้ว

    Any proper guide is available about Latex ?

    • @FedericoTartarini
      @FedericoTartarini  2 ปีที่แล้ว

      Which guide are you looking for?

    • @ShakeelAhmad-tf6lz
      @ShakeelAhmad-tf6lz 2 ปีที่แล้ว

      @@FedericoTartarini I am looking guide about thesis and research paper writing about Latex. I download from google 2 books but I tried their gievn code, get fail.

    • @FedericoTartarini
      @FedericoTartarini  2 ปีที่แล้ว

      I have a playlist about LaTeX. It contains more than 30 videos with all you need to know about LaTeX. I would suggest you starting with my video on how to get started with LaTeX in 10 minutes

    • @ShakeelAhmad-tf6lz
      @ShakeelAhmad-tf6lz 2 ปีที่แล้ว

      @@FedericoTartarini sure.