Latex Multiple Figures In One Row

This five-part series of short articles supplies a combination of video and textual descriptions to teach the basics of creating a thesis utilizing LaTeX. These tutorials were initially published on the original ShareLateX blog site throughout August 2013; in turn, today"s editor interconfront ( has adjusted substantially because of the development of ShareLaTeX and also the subsequent merger of ShareLaTeX and However, much of the content is still appropriate and teaches you some standard LaTeX—skills and expertise that will certainly apply across all platforms.

You watching: Latex multiple figures in one row

In the previous article we looked at configuring the page layout of our thesis making use of the geometry and fancyhdr packperiods. In this short article we"re going to look at making use of imperiods and also tables.

If you"ve never before included imperiods or tables into a LaTeX document, I recommfinish you initially check out the appropriate write-ups in our beginners tutorial series.You deserve to see our video tutorial on making use of imperiods in LaTeX and also video tutorial on tables.



For this job, every picture we usage we will certainly save in the imeras folder to store whatever tidy. In the initially post we all set the record for images by loading up the graphicx package and also by increating LaTeX wright here the images are stored making use of the graphicscourse command. Whenever before we include a picture right into our thesis, we will usage the number atmosphere. Here"s an example:

eginfigurecenteringincludegraphicsgraph_acaptionAn instance graphlabelfig:x cubed graphendfigure
Notice that I"ve halved the dimension of the picture and also supplied the position specifier h to put it in the record wbelow the code is in the message. It"s really vital to add captions to figures when composing a thesis. This is what it looks prefer compiled:


Notice that LaTeX has actually immediately numbered it according to what chapter it"s part of. It is also really crucial to label each figure so you deserve to accurately refer back to it in the text making use of the ef command also. If you included this in the text:

effig:x cubed graph
LaTeX would give you the number number "2.1" in place of this command in the pdf.


When creating a thesis you might want to incorporate some slightly even more facility figures via multiple imeras. You deserve to carry out this using subfigure atmospheres inside a figure environment. Before we can carry out this though, we must fill up the inscription and also subcaption packages:

We"ll execute an example via three images alengthy side each various other with sepaprice captions and also labels. Here"s some example code:

eginfigure centering eginsubfigure0.3 extwidth centering includegraphicsgraph1 caption$y=x$ labelfig:y equates to x endsubfigure hfill eginsubfigure0.3 extwidth centering includegraphicsgraph2 caption$y=3sinx$ labelfig:three sin x endsubfigure hfill eginsubfigure0.3 extwidth centering includegraphicsgraph3 caption$y=5/x$ labelfig:5 over x endsubfigure captionThree basic graphs labelfig:3 graphsendfigure
To start with, we create a brand-new figure, centre it and then develop a new subfigure. In the subnumber command also we need to add a placement specifier and then give it a width. Because we want three imeras alongside each various other we collection a width of 0.3 times the value of extwidth. You need to make certain that the amount of the widths you specify for the subnumbers is less than the text width if you want them all on the same line.

When we include the photo in we should specify the width using width= adhered to by the extwidth command. The reason this functions is because the message width within the subnumber is the width we specified in the eginsubfigure command, i.e. 0.3 times the normal message width (which is the value of extwidth).

See more: Best Books For The Hesi Rn Review Book, Registered Nurse Rn

Next we give the subnumber a sepaprice subtitle and also label. We have the right to then finish the subnumber and include the next 2 in. To add some spacing in between the numbers we"ll usage the hfill command also. If you didn"t want them all on the same line you could simply leave empty lines instead of the hfill commands. Please note that the indents I have actually used execute not affect the how the code is processed, they simply make it even more readable. The beauty of these subnumbers is that we have the right to describe each of them individually in the text because of their individual labels—however we have the right to additionally provide the totality figure a caption and also label.

This is what our figure will certainly look like in the document:


Now if we add a listofnumbers command simply after the table of contents, LaTeX will generate a list of all the figure offered in the thesis and increate us where each can be found:



Now lets talk about tables. When writing a thesis you should enclose all your tables in the table setting. Here"s a basic example:

egintablecenteringegintabular lA & B & C \hline1 & 2 & 3 \4 & 5 & 6endtabularcaptionvery fundamental tablelabeltab:abcendtable
Again make sure you include both a caption and a label.



Similar to via imeras, you might want to team tables together right into a single table setting. This can be done by making use of subtable environments inside a table atmosphere. Here"s an example:

egintable eginsubtable0.45 extwidth centering egintabular l Day & Max Temp & Min Temp \ hline hline Mon & 20 & 13\ Tue & 22 & 14\ Wed & 23 & 12\ Thurs & 25 & 13\ Fri & 18 & 7\ Sat & 15 & 13\ Sun & 20 & 13 endtabular captionFirst Week labeltab:week1 endsubtable hfill eginsubtable0.45 extwidth centering egintabular l Day & Max Temp & Min Temp \ hline hline Mon & 17 & 11\ Tue & 16 & 10\ Wed & 14 & 8\ Thurs & 12 & 5\ Fri & 15 & 7\ Sat & 16 & 12\ Sun & 15 & 9 endtabular captionSecond Week labeltab:week2 endsubtable captionMax and min temps taped in the first 2 weeks of July labeltab:tempsendtable
Notice that in each eginsubtable command also we"ve contained a position specifier and also a width. Again, we deserve to give each subtable a label and also subtitle as well as providing the whole table number a label and subtitle.


Now in the exact same method we added a list of numbers after the table of contents we deserve to include a list of tables utilizing the listoftables command also.


This concludes our conversation on imperiods and also tables. In the next post we"ll look at including a bibliography to our thesis.