Including images in a report is very common in Latex. Structuring your work nicely is probably the most obvious reason why you want to put two figures/tables side-by-side. Another reason might be to save space, wherever a smaller size of an image is sufficient. The following code can be used to place two figures side-by-side by creating a minipage…
\begin{figure}[ht]
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=\textwidth]{filename1}
\caption{default}
\label{fig:figure1}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\includegraphics[width=\textwidth]{filename2}
\caption{default}
\label{fig:figure2}
\end{minipage}
\end{figure}
Note, for certain figure manipulations such as width, loading the graphicx package is required:
\usepackage{graphicx}
The same “local column” – effect can be achieved for tables. The following code shows you how:
\begin{table}[ht]
\begin{minipage}[b]{0.45\linewidth}\centering
\begin{tabular}{|c|c|c|}
\hline
1&1&1\\
\hline
2&2&2\\
\hline
\end{tabular}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\begin{tabular}{|c|c|c|}
\hline
1&1&1\\
\hline
2&2&2\\
\hline
\end{tabular}
\end{minipage}
\end{table}
You can also have more than two column simply by adding another \minipage in between the table-command and reduce the width of each \minipage (0.33\linewidth in addition to the \hspace). LaTex will automaticaly place objects onto the next line, if space is not sufficient.
Remark: Using the subfigure-package is another way to place figures or tables side-by-side. You might want to have a look at this post on subfigures.
August 4th, 2007 at 1:22 pm
I was wondering if you had any tips on the creation of tables in LaTeX? This seems to be the most frustrating (to me) task. Ideally, I’d like a GUI table generator that converts the table into LaTeX.
In any event, great blog!
June 16th, 2011 at 5:44 pm
You might want to have a look at LyX. I use it to create all my tables and then paste the generated code into my Latex document.
.
August 27th, 2011 at 11:45 am
I use a macro called calc2latex (converts tables form OpenOffice into latex output), works great! There’s one for Excel called xls2latex. Google them, follow the instructions and let the macros make the tables for you!
August 11th, 2007 at 4:09 am
[...] have posted another article on that, just have a look there. minipage can also be used for text, not only for figures and [...]
August 28th, 2007 at 2:33 pm
[...] within the usual figure-floating-environment. You can find a post on the minipage-environment here, behaving differently compared a subfigure, but is also used within a floating [...]
September 11th, 2007 at 3:56 am
PLLEEEEASE help me:
I would like to create a table in Latex and add it a note at the end of the table and the source where I got that table from. How can I add those lines of text at the end of the table?
Thanks,
Miguel
September 11th, 2007 at 4:11 am
Hi Miguel,
If I understand correctly, you can simply use the \caption{table description} command. Just make sure you place it before the \label{}. This post shows you how:
http://texblog.wordpress.com/2007/08/07/introduction-to-tables-in-latex/
Cheers,
Tom
September 11th, 2007 at 2:49 pm
Hi Thomas,
This is how I would like my table to look in Latex (for example):
Table 1. This is my table title
_____________________________
1970 2000
_____________________________
GDP 3.5 5.4
Inflation 2.0 4.1
_____________________________
Note: this values are not true.
Source: World Bank (2003).
I don’t have problems with citing inside the table. That works fine. But my problem is how to add the note and the source at the end of the table. I’ve tried different options, nothing works (i.e., minipage) and it looks horrible. I wonder if there is an automatic option to do that. Double caption wouldn’t work because there would be two “Table #”, I gather.
What do you think?
Miguel
September 11th, 2007 at 3:28 pm
You might want to try using the table itself to hold the note and source. Try this:
\begin{table}[ht] \begin{minipage}[b]{0.48\linewidth} \caption{Table 1. This is my table title} \centering \begin{tabular}{lcc} \hline &1970&2000\\ \hline GDP&3.5&5.4\\ Inflation&2.0&4.1\\ \hline \multicolumn{3}{l}{Note: this values are not true.}\\ \multicolumn{3}{l}{Source: World Bank (2003).}\\ \end{tabular} \end{minipage} \hspace{0.5cm} \begin{minipage}[b]{0.48\linewidth} \caption{Table 1. This is my table title} \centering \begin{tabular}{lcc} \hline &1970&2000\\ \hline GDP&3.5&5.4\\ Inflation&2.0&4.1\\ \hline \multicolumn{3}{l}{Note: this values are not true.}\\ \multicolumn{3}{l}{Source: World Bank (2003).}\\ \end{tabular} \end{minipage} \end{table}If you need vertical lines to separate cells, instead of the horizontal bar in the column-number defining tabular-environment option, you can use
\vlineExample:
It’s a lot more to type, but this way you can omit the vertical lines around the note and source.
September 14th, 2007 at 9:53 am
I’m looking for a way to place a picture next to a table. Do you have any idea on this?
September 14th, 2007 at 11:07 am
Ok, after some tries I could solve it myself. Here is the solution:
\begin{table}[h] \begin{minipage}{0.45\textwidth} \centering \includegraphics[width=\textwidth]{fig1} \caption{caption fig1} \label{fig:fig1} \end{minipage} ~\hfill~ \begin{minipage}{0.45\textwidth} \centering \begin{tabular}{|c|c|c|} moin & moin & moin\\ \end{tabular} \caption{caption tab1} \label{tab:tab1} \end{minipage} \end{table}Thanks,
Amir
September 27th, 2007 at 5:46 pm
To all those with difficulties making tables:
If you’re comfortable with a program like OpenOffice.org Calc or Excel or whatever, you can use that program to make your tables.
If you Google for “Excel table macro Latex” or something like that, you can find a macro to convert the table to a LaTeX table.
AFAIK Excel2Latex is also usable for this kind of conversions.
October 15th, 2007 at 5:34 pm
i want side caption for figures in two column job and also bottom allignment
October 30th, 2007 at 3:03 pm
Hey thanks … found your minipage stuff pretty useful
November 1st, 2007 at 10:49 pm
@ashokg
This is not that easy actually. You can try the minipage-command, by using this Latex-source stab it worked perfectly well for me:
\begin{figure} \centering \begin{minipage}[t]{0.58\linewidth} \includegraphics[width=1\linewidth]{figure-file} \end{minipage}\hfill \begin{minipage}[b]{0.38\linewidth} \caption{Whatever caption-text you want.\label{fig:caption}} \end{minipage} \end{figure}The most important thing here is the bottom-alignment of the right-hand side “minipage” ([b]). The linewidth of the figure is 1 in order to use the complete width provided by the “minipage”.
Cheers,
Tom.
November 3rd, 2007 at 6:10 pm
Hey
For some reason, I can’t get the minipage environment to place my tables side-by-side. Here’s the source:
\begin{table}[h] \begin{minipage}[b]{2.25in} \centering \caption{} \begin{tabular}{@{}|l|c|c|} \hline & \hearts & $\lnot$\hearts\\ & (0.2) & (0.8)\\ \hline $A$ & &\\ fold hand & $-\$78$ & $-\$78$\\ \hline $B$ & &\\ call raise & $+\$x$ & $-\$228$\\ \hline \end{tabular} \label{table3} \end{minipage}\begin{minipage}[b]{2.25in} \centering \caption{} \begin{tabular}{@{}|l|c|c|} \hline & \hearts & $\lnot$\hearts\\ & (0.2) & (0.8)\\ \hline $A$ & &\\ fold hand & $-\$y$ & $-\$y$\\ \hline $B$ & &\\ call raise & $+\$231$ & $-\$228$\\ \hline \end{tabular} \label{table4} \end{minipage} \end{table}Any ideas why this won’t work? Thanks.
November 3rd, 2007 at 6:11 pm
@David
Just remove the space between the two minipage-environments and the tables are placed side-by-side, as long as there is enough space vertically. If you want some space between, you can comment the empty line out
... \end{minipage} % \begin{minipage} ...Tom.
November 3rd, 2007 at 6:15 pm
Miguel (or anyone else wondering about this)
I’ve placed additional text at the bottom of my tables using a custom command I call ‘\capbot’ (caption bottom)
\newcommand{\capbot}[1]{% \vspace{8pt}\footnotesize\raggedright #1}%I then use this command in the table float as follows:
\end{tabular} \end{center} \capbot{Data from the IMF's website: \url{http://www.imf.org/external/np/sec/memdir/members.htm.} Accessed 11 April 2007.} \label{nondemocfig} \end{table}This works quite nicely.
January 3rd, 2008 at 7:45 am
Thanks, this article helped me a lot!
January 30th, 2008 at 9:28 pm
How to create a big table across a two-column latex document? I tried vertically put the big table in one column for the two-column latex document. But it looks ugly so I tried \minipage. However, it still does not help. Any suggestions?
February 4th, 2008 at 6:02 pm
Hi Kai,
What I suggest you to do is use the command \onecolumn, which will start a new page having only one column in your “two column environment” (see my previous post).
Then you insert your table, depending on the height/width ratio you can even change the page layout to landscape.
And finally, you switch back to a \twocolumn environment.
Cheers,
Tom
February 6th, 2008 at 11:39 am
Hi,
Is it possible to have the two figures/tables aligned at the top stead at the bottom? I’ve tried \minipage[t] but it ended up with the top of the left figure/table aligned to the bottom of the right one. It looked as if the two figures/tables occupied the top right and bottom left of a 2×2 invisible grid.
Thanks
March 5th, 2008 at 5:54 am
Hi Si,
I had the same problem once I wanted to place a table next to a figure. Try to use subfigure instead of minipage, I’m not sure it will work, but it is worth a try.
Note:
Replace \begin{center}…\end{center} by \centering, which does not add any additional white space on top and below the figure/table.
April 14th, 2008 at 7:08 pm
[...] width of a page. Even though you can have several figures/tables next to each other (see posts on minipage and subfigure), with none of these techniques it is possible to have floating text around a figure [...]
May 8th, 2008 at 6:21 pm
Hi.
I’m trying to put a table and a picture side-by-side but my efforts are in vane.. who I can do that?
I made this but its not working well…
\begin{figure}[!h] \subfloat{ \includegraphics[scale=0.5]{picture1} } \hspace{1.2cm} \subfloat{ \begin{minipage}[t]{5cm}{5cm} \begin{tabular}{|c|c|c|} \hline \multicolumn{1}{|c|}{Sectores} & $[345;355[$ & $[355;5[$ \\ \multicolumn{1}{|c|}{Factores de calibração} & 1.02 & 1.02\\ \hline \end{tabular} \end{minipage} } \end{figure}May 8th, 2008 at 7:39 pm
Hi Hugo,
There is indeed a problem in your code. Y only have one minipage for your tabular environment, but actually you need a minipage for the picture as well. So try this and let me know if you are still facing problems:
\begin{figure}[!h] \begin{minipage}[b]{0.5\linewidth} \centering \includegraphics{picture1} \end{minipage} \hspace{1.2cm} \begin{minipage}[b]{0.5\linewidth} \centering \begin{tabular}{|c|c|c|} \hline \multicolumn{1}{|c|}{Sectores} & $[345;355[$ & $[355;5[$ \\ \multicolumn{1}{|c|}{Factores de calibração} & 1.02 & 1.02\\ \hline \end{tabular} \end{minipage} \end{figure}Cheers,
Tom
July 29th, 2008 at 2:48 am
google xl2latex
August 6th, 2008 at 5:30 am
[...] from http://texblog.wordpress.com/2007/08/01/placing-figurestables-side-by-side-minipage/ [...]
November 12th, 2008 at 7:17 am
Hi
I am also trying to put a figure and a table side by side. They end up getting both Figure captions or table captions.
I am not able to give simultaneously different captions i.e. figure to figure and table to table.
Somebody please help.
Cheers
Amar
November 14th, 2008 at 7:06 am
Hi
I found the solution by modifying the help given in http://www.win.tue.nl/latex/documentation/plaatjes/pictures.pdf
\parbox [h]{0.4\textwidth}{ \includegraphics [width=\linewidth]{drawing.eps} \captionof {figure}{caption1} \label{fig:draw} } %\hfill \hspace{0.5cm} \parbox [h]{0.4\textwidth }{ \captionof {table}{caption2} \begin{tabular}{|c|l|} \hline a & b \hline \end{tabular} \label{tab:table1} }December 17th, 2011 at 9:37 pm
Hi,
the code didn’t work for me for placing a figure and a table near each other
is there any package (expect caption & graphicx) which should be added?
thanks in advance
December 23rd, 2011 at 11:17 am
Hello!
Please provide a minimal example. You may want to try the subfig package.
Best, Tom.
December 9th, 2008 at 5:55 pm
Laying out two tables of uneven length aligns both tables vertically in the middle. How would I align them both to the top?
I think that this is exactly the problem that Si was asking about?
December 10th, 2008 at 10:12 pm
Hi Albert,
I cannot reproduce what you are referring to. Can you please provide a minimal example? Might it be that your tables together are wider than the document’s “textwidth” and hence one is pushed to the next “line”?
Cheers,
Tom.
November 10th, 2009 at 9:03 am
Just for the record, aligning tables to top is possible by giving [t] to both minipage and the tabular:
\begin{minipage}[t]{0.3\textwidth} \begin{tabular}[t]{ll} ...December 11th, 2008 at 10:10 pm
thanks!! That helped!!
December 26th, 2008 at 2:59 pm
[...] Using minipage environment. Here is an example. [...]
January 5th, 2009 at 7:16 pm
Thanks mate, fantastic blog! I’m adding you to my blog roll, if that’s ok…
May 18th, 2009 at 10:40 am
When i use the caption package, I got tons of errors after the place where I used the \captionof command… When I do not include the caption package, I only got 2 errors, there where I used the \captionof command…
anyone?
May 18th, 2009 at 11:41 am
My bad, found the problem. I had this error: “to many unprocessed floats”. By using the caption package, the size of some captions may be changed, and suddenly LaTeX placed all my figures at the end of the document. This happened with so many figures that LaTeX couldn’t put them down nicely on a page any more. By using the float package, I forced some figures in position, and problem solved.
An other solution when you got the error is putting in a \clearpage or \cleardoublepage command to allow a page full of figures to be generated.
September 10th, 2009 at 1:26 am
When I try this, I get only one caption underneath both figures. I’ve tried all kinds of variations, but no luck.
October 15th, 2009 at 6:25 pm
Very helpful. Thanks
January 15th, 2010 at 8:30 am
Very nice help!! Fast and efficient!!
February 26th, 2010 at 10:45 pm
Hey Amir,
It was really helpful for me!! After a long search on google for ‘image beside a table’, I finally ended up using your code.
Thanks again.
May 8th, 2010 at 11:59 pm
Helped a lot! thanx guys!
May 13th, 2010 at 8:56 pm
Hey thanks a lot. The idea helped
June 13th, 2010 at 2:30 pm
Worked perfectly for me with side by side pictures. Thanks for the tip!
July 28th, 2010 at 4:55 pm
Muchas Gracias
Thank you so much
August 11th, 2010 at 10:46 pm
Thanks a lot..!!
February 15th, 2011 at 5:44 pm
Hi!! I wanted to put two figures side by side, and the minipage stuff works fine. However, it doesn’t look good at all. The figures are not placed at the exact same height and I can’t place the captions exactly under each figure (probably cause of the page size, which i do not want to change) Also, I can’t put the figures at the center of the page, they either go too left or too right no matter what i do…
February 15th, 2011 at 6:32 pm
I can post the code if it helps undrestand what i mean..thanx!!
February 16th, 2011 at 2:44 am
It would definitely be useful to have a minimal example to look at. Thanks, Tom.
February 16th, 2011 at 9:18 am
Great! This is the code:
\begin{figure}[H] \begin{minipage}[b]{0.4\textwidth} \begin{flushleft} \large \hspace{-100pt} \includegraphics[angle=270 , scale=0.3]{misdip3.jpeg} \caption[Evolution of the beta functions and the dispersion through FODO 3] {\textit{Evolution of the beta functions and the dispersion through FODO 3.}} \end{flushleft} \end{minipage} \hspace{60pt} \begin{minipage}[b]{0.4\textwidth} \begin{flushright} \large \includegraphics[angle=270 , scale=0.3]{misdip4.jpeg} \hspace{100pt}\caption[Evolution of the phase advance through FODO 3]% {\textit{Evolution of the phase advance through FODO 3.}} \end{flushright} \end{minipage} \end{figure}February 18th, 2011 at 7:48 am
Hi,
What I propose is using the “subfigure” package instead of “minipage”, which gives you more flexibility. You can find a general introduction here.
If you want more space between the figure and the caption, use:
\usepackage[loose]{subfigure}Also, if you prefer numbers instead of the default numbering:
\renewcommand{\thesubfigure}{\thefigure.\arabic{subfigure}}Here is a link to the documentation: subfigure
Another thing that might be useful is the caption package (i.e. page 9). Among other things, it lets you define the font style of the caption and hence you don’t need to type the caption twice:
\usepackage[textfont=it]{caption}Hope this works! Let me know if you have any other question.
Cheers, Tom.
ps.: This should do:
\begin{figure}[h] \subfigure[Evolution of the beta functions and the dispersion through FODO 3]{ \includegraphics[angle=270 , scale=0.3]{misdip3.jpeg} } \qquad % double quadspace \subfigure[Evolution of the phase advance through FODO 3.]{ \includegraphics[angle=270 , scale=0.3]{misdip4.jpeg} } \end{figure}August 13th, 2011 at 10:51 pm
Lifesaver! Thanks mate!
August 28th, 2011 at 12:41 pm
Hi,
I’m trying to put a table and a figure side by side using the minipage environment but I have this problem:
the caption of the figure is considered as a table
how to solve this ???
regards
August 28th, 2011 at 1:29 pm
Hi there!
Use
\figcaption{...}instead of\caption{...}, provided by the nonfloat package. You’ll have to load it in your preamble.Cheers, Tom.
August 29th, 2011 at 10:50 am
Hi again,
thanks, another way to solve it is to add the figure in the \begin{figure} environment
Cheers.
October 12th, 2011 at 1:15 am
hi Tom!
i have to try make 2 lanscape table in 1 page. But the table can’t center,
The top and bottom margin not same. How to solve this problem?could u?
Cheers=)
October 13th, 2011 at 9:13 am
Hi Christina,
Do you want to rotate a single page and have two tables on that page in landscape format? If so, here is how you can achieve that:
\usepackage{pdflscape} ... \begin{landscape} % Table 1 %Table2 \end{landscape}If this is not what you wanted, please provide code of a mini-example. Cheers, Tom.
October 17th, 2011 at 7:57 pm
Amir, your code worked wonderfully for me. I had been struggling with the format till I tried your solution.
It turns out the issue was the [b] option after each \minipage command that made it look bad, ie, the table and the figure were placed side by side, but the figure was below the table. I removed that option and voilà, it worked.
Thank you all!
November 10th, 2011 at 2:12 pm
Easiest solution (columns):
\begin{columns} \begin{column}{0.5\textwidth} %text,figure.. \end{column \begin{column}{0.5\textwidth} %... \end{column \end{columns}the rest all didn’t work for me (minipages, wrapfigure, parbox..), it kept aligning the elements top-down, if at all.
January 24th, 2012 at 4:36 pm
thank you thank you very much
February 3rd, 2012 at 8:06 am
[...] more appropriate solution would be using the minipage environment. Here is an [...]
March 28th, 2012 at 5:39 am
Dear Bob , I have 40 subfigure which i want to display with caption F1,F2, …F40 under single banner. I do not want to display figure numbering like (a) F1 (b) F2 (c) F3… etc instead of it i want to display F1 F2 F3 F4…etc
please help me.
Thanks
regards
sarvesh
March 28th, 2012 at 7:40 am
Hi Sarvesh,
Below is a minimal working example where subfloats have no label. For more information see my post, the subfig and caption package documentations. Best, Tom.
\documentclass[11pt]{article} \usepackage{subfig, caption} \captionsetup[subfigure]{labelformat=empty} \begin{document} \begin{figure}[h] \centering \subfloat[][F1]{\rule{2.5cm}{2cm}}\quad \subfloat[][F2]{\rule{2.5cm}{2cm}}\quad \subfloat[][F3]{\rule{2.5cm}{2cm}}\quad \subfloat[][F4]{\rule{2.5cm}{2cm}}\\ \subfloat[][F5]{\rule{2.5cm}{2cm}}\quad \subfloat[][F6]{\rule{2.5cm}{2cm}}\quad \subfloat[][F7]{\rule{2.5cm}{2cm}}\quad \subfloat[][F8]{\rule{2.5cm}{2cm}}\\ \subfloat[][F9]{\rule{2.5cm}{2cm}}\quad \subfloat[][F10]{\rule{2.5cm}{2cm}}\quad \subfloat[][F11]{\rule{2.5cm}{2cm}}\quad \subfloat[][F12]{\rule{2.5cm}{2cm}}\\ \subfloat[][F13]{\rule{2.5cm}{2cm}}\quad \subfloat[][F14]{\rule{2.5cm}{2cm}}\quad \subfloat[][F15]{\rule{2.5cm}{2cm}}\quad \subfloat[][F16]{\rule{2.5cm}{2cm}} \end{figure} \end{document}March 28th, 2012 at 6:49 pm
Thanks a lot Sir for helping me to get the desired output.
March 29th, 2012 at 3:21 am
You are welcome. Cheers, Tom.
April 18th, 2012 at 6:44 pm
My minipages are always stacked vertically. Any thoughts on why this is happening?
April 19th, 2012 at 6:48 am
Hi Steven,
In general, they are stacked vertically if there is not enough space to arrange them horizontally. For figures, try using the
widthoption, e.g.:\usepackage{graphicx} ... \includegraphics[width=0.4\textwidth]{figure.file}If you provide a minimal working example, I may be able to help you better.
Best, Tom.
July 6th, 2012 at 3:13 pm
Hi Tom,
I’m having a similar problem to Steven above. I’m using the code you provided to place mini pages horizontally, but they only stack vertically. Because of the cautionary note about the size of figures, I’ve attempted to remedy this by decreasing the image size and the buffer space between the images. Even though the figures are now only an inch across they still stack vertically. The code is as follows:
\begin{figure}[ht] \begin{minipage}[b]{0.5\linewidth} \centering \includegraphics[width=1.0in]{Figure1} \caption{default} \label{fig:figure1} \end{minipage} \hspace{0.1cm} \begin{minipage}[b]{0.5\linewidth} \centering \includegraphics[width=1.0in]{Figure2} \caption{default} \label{fig:figure2} \end{minipage} \end{figure}Any suggestions?
Thanks!
July 16th, 2012 at 3:41 pm
Hi Kevin,
The problem is not so much with the size of the figures inside the
minipageenvironment, but the size of the minipage “box” itselves. Including the small horizontal space in-between, they are taking up more than the completelinewidth. Try reducing their sizes slightly and it should work just fine.Example:
\begin{figure}[ht] \begin{minipage}[b]{0.48\linewidth} % page linewidth \rule{\linewidth}{\linewidth} % minipage linewidth \end{minipage} \qquad \begin{minipage}[b]{0.48\linewidth} \rule{\textwidth}{\textwidth}\end{minipage} \end{figure}Cheers, Tom.
October 22nd, 2012 at 6:36 am
\begin{figure}[ht] \begin{minipage}[b]{0.45\linewidth} \centering \begin{tikzpicture} \draw [] (-3,0) -- (3,0) node [above left] {$v_{\theta}$}; \draw [] (0,-3) -- (0,3) node [below right] {$v_r$}; \draw[ decoration={markings, mark=at position 0.525 with {\arrow[scale=2]{<}}}, decoration={markings, mark=at position 0.925 with {\arrow[scale=2]{<}}}, postaction={decorate} ] (0,0) circle (1.5); \fill[very thick] (-1.5,0) circle (1pt) node [above left] {A}; \fill[very thick] (0,1.5) circle (1pt) node [above right] {B}; \fill[very thick] (1.5,0) circle (1pt) node [above right] {C}; \fill[very thick] (0,-1.5) circle (1pt) node [below right] {D}; \end{tikzpicture} \captionof{figure}{Engagement trajectory 1 in $(v_{r},v_{\theta})$ space} \label{fig:aba} %\end{center} \end{minipage} \hspace{0.5cm} \begin{minipage}[b]{0.45\linewidth} \centering \begin{tikzpicture} \draw [] (-3,0) -- (3,0) node [above left] {$v_{\theta}$}; \draw [] (0,-3) -- (0,3) node [below right] {$v_r$}; \draw[ decoration={markings, mark=at position 0.925 with {\arrow[scale=2]{>}}}, decoration={markings, mark=at position 0.125 with {\arrow[scale=2]{<}}}, postaction={decorate} ] (0,-1) arc (-45:45:2); \fill[very thick] (0,1.77) circle (1pt) node [above right] {B}; \fill[very thick] (1,0) circle (1pt) node [above right] {A}; \fill[very thick] (0,-1) circle (1pt) node [below right] {C}; \end{tikzpicture} \captionof{figure}{Engagement trajectory 2 in $(v_{r},v_{\theta})$ space} \label{fig:bab} %\end{center} \end{minipage} \end{figure}### Why am I not getting the images side-by-side?
October 22nd, 2012 at 6:54 am
Hi Tess,
Nice figures
! The space (line 23) ends the paragraph in LaTeX which is why the second figure is on the “next line” or below the first. Simply delete it and it should work. Also,
\hspaceis fine, however, LaTeX has standard space commands:\quadand\qquad. I recommend to use these. Finally, please provide a minimal working example including preamble next time, so I don’t have to figure out which packages and TikZ libraries you use.Thanks, Tom.
\documentclass{article} \usepackage{tikz, caption} \usetikzlibrary{decorations.markings} \begin{document} ... \end{minipage} \qquad \begin{minipage}[b]{0.45\linewidth} ... \end{document}October 23rd, 2012 at 7:29 pm
Thanks Tom ! It worked
October 23rd, 2012 at 7:53 pm
Hi I want to align two conditional statements like we do using the \begin{split} command. In the following code, I want to align z3 and z4.
\documentclass[a4paper,12pt]{report} \usepackage{tikz} \usetikzlibrary{decorations.markings,arrows} \usepackage {graphicx} \usepackage{textcomp} \usepackage{float} \usepackage{amsmath} \usepackage{amsmath,amscd,amssymb,amsgen,amsfonts,amsbsy} \usepackage{mathrsfs} %\usepackage[utf8x]{inputenc} \usepackage{color} \usepackage{textcomp} \usepackage{float} \usepackage{latexsym,graphicx} \usepackage[british]{babel} \usepackage{caption} \usepackage{pgf} \usepackage{indentfirst} \usepackage[left=20mm,top=20mm,right=20mm,bottom=22mm,foot=13mm]{geometry} \begin{document} \begin{equation} z_3 = \begin{cases} z_{2} & \text{if $-K_{br} < K < 0$}\\ -\left( \frac{K}{2} + \sqrt{\frac{K^2}{4} + \frac{v^3}{k^3}} \right)^\frac{1}{3} & \text{if $~0 < K < \infty$}\\ \end{cases} \\ z_4 = \begin{cases} z_{1},& \text{if } -K_{br} < K < 0\\ -\left( \frac{K}{2} - \sqrt{\frac{K^2}{4} + \frac{v^3}{k^3}} \right)^\frac{1}{3}, & \text{if}~ 0 < K < \infty \end{cases}\\ \end{equation} \end{document}October 24th, 2012 at 2:55 am
Hi Tess,
I assume by align, you mean vertically align
and
. Btw. you are loading several packages multiple times, including textcomp, float and amsmath. Not that it was wrong, but remember that sometimes the order makes a difference.
Cheers, Tom.
\documentclass{article} \usepackage{amsmath} \begin{document} \begin{align*} z_3 &= \begin{cases} z_{2} & \text{if $-K_{br} < K < 0$}\\ -\left( \frac{K}{2} + \sqrt{\frac{K^2}{4} + \frac{v^3}{k^3}} \right)^\frac{1}{3} & \text{if $~0 < K < \infty$}\\ \end{cases} \\z_4 &= \begin{cases} z_{1},& \text{if } -K_{br} < K < 0\\ -\left( \frac{K}{2} - \sqrt{\frac{K^2}{4} + \frac{v^3}{k^3}} \right)^\frac{1}{3}, & \text{if}~ 0 < K < \infty \end{cases} \end{align*} \end{document}October 24th, 2012 at 6:25 am
Thanks again Tom ! They are definitely getting aligned ! But I wanted them left aligned..that way they look better ! So, I used \begin{flalign*},
but that doesnot work ! Is there any other way to left align the conditional
equations?
October 24th, 2012 at 8:49 am
In case you mean left in the document, you can pass the
fleqnoption to eitherdocumentclassor theamsmathpackage.\documentclass[fleqn]{report}or
\usepackage[fleqn]{amsmath}To align the equations, this should work:
\documentclass{article} \usepackage{amsmath} \begin{document} \begin{flalign*} z_1 &= -\left( \frac{K}{2} + \sqrt{\frac{K^2}{4} - \frac{v^3}{k^3}} \right)^\frac{1}{3}\\ z_2 &= -\left( \frac{K}{2} - \sqrt{\frac{K^2}{4} - \frac{v^3}{k^3}} \right)^\frac{1}{3}\\ z_3 &= \begin{cases} z_{2} & \text{if $-K_{br} < K < 0$}\\ -\left( \frac{K}{2} + \sqrt{\frac{K^2}{4} + \frac{v^3}{k^3}} \right)^\frac{1}{3} & \text{if $~0 < K < \infty$}\\ \end{cases}\\ z_4 &= \begin{cases} z_{1} & \text{if } -K_{br} < K < 0\\ -\left( \frac{K}{2} - \sqrt{\frac{K^2}{4} + \frac{v^3}{k^3}} \right)^\frac{1}{3} & \text{if}~ 0 < K < \infty \end{cases}\\ a &= \begin{cases} \frac{1+i\sqrt{3}}{2},& \text{if } -K_{br} < K < 0\\ 1, & \text{if} ~0 < K < \infty \end{cases}\\ b &= \begin{cases} \frac{1-i\sqrt{3}}{2},& \text{if } -K_{br} < K < 0\\ 1, & \text{if} ~0 < K < \infty \end{cases}\\ \end{flalign*} \end{document}October 28th, 2012 at 7:41 pm
Hi all !
\documentclass[10pt]{beamer} \mode { \usecolortheme[named=yellow]{structure} %\usetheme{Warsaw} \usetheme{Ilmenau} %\usetheme{Copenhagen} % \usetheme{CambridgeUS} %\usethemes{Amsterdam} \setbeamercovered{invisible} }\usepackage[english]{babel} \usepackage[latin1]{inputenc} \usepackage{times} %\usepackage{iwona} \usepackage[T1]{fontenc} \usepackage{amsmath,amssymb} \usepackage{colortbl} \usepackage{array} \usepackage{longtable} \usepackage{rotating} \usepackage{fancyvrb} \usepackage{psfrag} \usepackage{graphicx} \usepackage{color} %\usetikzlibrary{decorations.markings,arrows} \definecolor{red}{rgb}{1,0.2,0.2} \definecolor{blue}{rgb}{0,0,1} \definecolor{green}{rgb}{0,0.7,0} \definecolor{black}{rgb}{0.2,0.2,0.2} \definecolor{orange}{rgb}{1,0.7,0} \definecolor{brown}{rgb}{0.8,0.2,0.2} \usepackage{tikz} %\PreviewEnvironment{tikzpicture} \usetikzlibrary{matrix} \newcommand{\red}[1]{\textcolor{red}{#1}} \newcommand{\blue}[1]{\textcolor{blue}{#1}} \newcommand{\green}[1]{\textcolor{green}{#1}} \newcommand{\black}[1]{\textcolor{black}{#1}} \newcommand{\orange}[1]{\textcolor{orange}{#1}} \newcommand{\brown}[1]{\textcolor{brown}{#1}} \newcommand{\bi}{\begin{itemize}} \newcommand{\ei}{\end{itemize}} \newtheorem{thm}{Theorem}[section] \newtheorem{lm}[thm]{\bf Lemma} \newtheorem{prob}[thm]{\bf Problem Statement} \newtheorem{df}[thm]{\bf Definition} \newtheorem{pr}[thm]{\bf Proposition} \newtheorem{rem}[thm]{\bf Remark} \newtheorem{algo}[thm]{\bf Algorithm} \newtheorem{corr}[thm]{\bf Corollary} \newtheorem{eg}[thm]{\bf Example} \DeclareMathAlphabet{\mathpzc}{OT1}{pzc}{m}{it} %\pagestyle{plain} \title[Coverage Control Algorithm]{Coverage Control Algorithm} \author[IIT Bombay]{Twinkle Tripathy} \institute[Systems and Control Engineering] {Systems and Control Engineering \\ IIT Bombay } \date{Oct 30, 2012} \begin{document} \begin{frame} \titlepage \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame} \frametitle{Introduction} \begin{block}{Motivation} \begin{itemize} \item Missile Guidance Strategies \item Coverage of a pre-defined area %\item \end{itemize} \end{block} \begin{block}{Application} \begin{itemize} \item Surveillance of landmarks \item Spraying fertilisers, irrigation of fields \end{itemize} \end{block} \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame} \frametitle{} \begin{block}{Problem Statement} \begin{itemize} \item Propose a strategy for autonomous robot to cover the area surrounding the steady target using range(distance) information only. \item The area to be covered is pre-defined by maximum and minimum radii, $R_{max}$ and $R_{min}$. \end{itemize} \end{block} \begin{block}{Kinematics of robot} \begin{eqnarray} {\dot x} = vcos(\alpha)\\ {\dot y} = vsin(\alpha)\\ {\dot {\alpha}} = u \end{eqnarray} \end{block} \end{frame} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{frame}{Mathematical Analysis} \begin{center} \begin{tikzpicture}[scale=2] \draw [->] (0,0) -- (2.5,2.5) ; \draw [dashed, ->] (0,0) -- (4.5,0) node [below] {Reference}; \draw [->](0,0) -- (0.3,1.5); \node [right] at (0.3,1.5) {$v$}; \node [below] at (0,0) {A}; \draw [->](1,0) arc (0:45:1); \node [right] at (1,0.5) {$\theta$}; \draw [->](0.5,0) arc (0:60:0.8); \node [right] at (0.55,0.25) {$\alpha$}; \fill[very thick] (2.5,2.5) circle (1pt) node [above right] {T}; \fill[very thick] (1.5,1.5) circle (1pt) node [right] {VT}; \node [right] at (1,1) {$ (1-\rho)r $}; \node [right] at (2,2) {$\rho r$}; %\node [left] at (2.25,2.25) {$d$}; %\fill[very thick] (1,1) circle (1pt) node [right] {$\rho$}; %\fill[very thick] (2.25,2.25) circle (1pt) node [right] {$(1-\rho)$}; \end{tikzpicture} \captionof{figure}{Engagement geometry between the agent and the target point} \label{fig:aaa} \end{center} \end{frame} \end{document}Why are my tikz figures not getting generated?
October 29th, 2012 at 2:25 am
Hi!
Please only sent the code that is absolutely necessary to reproduce the issue. Including the LaTeX error would also be useful.
Could it be that your editor replaces double dash by a long dash? I had to replace the dashes on the lines highlighted below. Other than that, your tikz figure seems to be ok.
Cheers, Tom.
\documentclass{beamer} \usepackage[english]{babel} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage{tikz, caption} \begin{document} \begin{frame}{Mathematical Analysis} \begin{center} \begin{tikzpicture}[scale=2] \draw [->] (0,0) -- (2.5,2.5) ; \draw [dashed, ->] (0,0) -- (4.5,0) node [below] {Reference}; \draw [->](0,0) -- (0.3,1.5); \node [right] at (0.3,1.5) {$v$}; \node [below] at (0,0) {A}; \draw [->](1,0) arc (0:45:1); \node [right] at (1,0.5) {$\theta$}; \draw [->](0.5,0) arc (0:60:0.8); \node [right] at (0.55,0.25) {$\alpha$}; \fill[very thick] (2.5,2.5) circle (1pt) node [above right] {T}; \fill[very thick] (1.5,1.5) circle (1pt) node [right] {VT}; \node [right] at (1,1) {$ (1-\rho)r $}; \node [right] at (2,2) {$\rho r$}; \end{tikzpicture} \captionof{figure}{Engagement geometry between the agent and the target point} \label{fig:aaa} \end{center} \end{frame} \end{document}November 12th, 2012 at 10:58 pm
Thanks! This was helpful.
December 12th, 2012 at 9:35 am
I only get one caption and it is only on the second picture?
December 12th, 2012 at 2:27 pm
Hi Michael,
Thanks for your comment. I’m not sure what you are doing exactly. But if you need captions for your figures, you might be better off using either subfigure or the more recent subfig package.
Nevertheless, here is a minimal example with two figures, each with a caption.
\documentclass[11pt]{article} \begin{document} \begin{figure}[ht] \begin{minipage}[b]{0.45\linewidth} \centering \rule{\textwidth}{0.75\textwidth} \caption{default}\label{fig:figure1} \end{minipage} \hspace{0.5cm} \begin{minipage}[b]{0.45\linewidth} \centering \rule{\textwidth}{0.75\textwidth} \caption{default}\label{fig:figure2} \end{minipage} \end{figure} \end{document}Best, Tom.
January 14th, 2013 at 2:43 pm
Hi, I am struggling with a captioning issue in minipage. The error I get states “Package floatrow Error: Caption(s) lost.” I have tried reading around this but cant find a solution to the issue. The code is one i have used previously and successfully so have no idea why it is now not working. Can anyone offer advice please?
General code used is as follows:
\begin{figure}[htbp] \begin{minipage}[b]{0.5\linewidth} \centering \includegraphics[width=0.95\textwidth]{photo1.jpg} \caption[photo1]{photo1} \label{fig:photo1} \end{minipage} \hspace{0.5cm} \begin{minipage}[b]{0.5\linewidth} \centering \includegraphics[width=0.95\textwidth]{photo2.jpg} \caption[photo2}]{photo2} \label{fig:photo2} \end{minipage} \end{figure}Many thanks in advance for any assistance given, greatly appreciated.
January 14th, 2013 at 4:38 pm
Hi Barry,
Your code works perfectly, the only problem was a “}” in the short caption of the second figure. The conflict is due to the floatrow package (as the error suggests). Remove it in case you don’t need it. Otherwise, I would need to see a minimal example which produces the error to be able to help.
Here is a complete minimal working example just using minipage including captions:
\documentclass[11pt]{article} \begin{document} \listoffigures \begin{figure}[ht] \begin{minipage}[b]{0.5\linewidth} \centering \rule{\textwidth}{0.75\textwidth} \caption[photo1]{photo1} \label{fig:photo1} \end{minipage} \hspace{0.5cm} \begin{minipage}[b]{0.5\linewidth} \centering \rule{\textwidth}{0.75\textwidth} \caption[photo2]{photo2} \label{fig:photo2} \end{minipage} \end{figure} \end{document}January 14th, 2013 at 5:03 pm
HI Tom,
Thank you very much for the prompt reply. I tried the altered code and still get the same error
.
I have included the code proper below, I am just at a loss as to why it used to work fine and now doesnt. Beginning to wonder if I have a package conflict.
\documentclass[11pt]{article} \begin{document} \listoffigures \begin{figure}[ht] \begin{minipage}[b]{0.5\linewidth} \centering \includegraphics[width=0.90\textwidth]{apatite.jpg} \rule{\textwidth}{0.75\textwidth} \caption[Photograph of apatite mineral]{Photograph of apatite mineral. Credit: Photograph from The Delaware Mineral Society.} \label{fig:apatite} \end{minipage} \hspace{0.5cm} \begin{minipage}[b]{0.5\linewidth} \centering \includegraphics[width=0.90\textwidth]{Whitlockite.jpg} \rule{\textwidth}{0.75\textwidth} \caption[Photograph of whitlockite mineral]{Photograph of whitlockite mineral. Credit: Photograph from Royal Ontario Museum.} \label{fig:whitlockite} \end{minipage} \end{figure} \end{document}Thanks for the assistance once again
January 15th, 2013 at 4:14 am
Again, the code works perfectly (apart from the missing graphicx package). You would need to give me an example that includes the packages you load, so I can reproduce the error. I.e., are you loading floatrow? Another possibility would be to use either subfigure or subfig. You might want to give those packages a try to see if it solves your problem.
Best, Tom.
January 21st, 2013 at 10:43 am
Hi Tom,
Iam using this code to display images side by side. However I want to reduce the space between the displayed images even further(ideally < 2mm seperating every image) , so that I can increase the size of every image and still display in one row. At present the seperation is around ~1cm between two images with the below code. can you suggest how to do this using minipage ?
\begin{figure}[h] \centering \begin{minipage}{.11\textwidth} \includegraphics[width=\textwidth]{Fig/I1} \end{minipage} \begin{minipage}{.11\textwidth} \includegraphics[width=\textwidth]{Fig/I2} \end{minipage} \begin{minipage}{.11\textwidth} \includegraphics[width=\textwidth]{Fig/I3} \end{minipage} \begin{minipage}{.11\textwidth} \includegraphics[width=\textwidth]{Fig/I4} \end{minipage} \begin{minipage}[b]{0.38\linewidth} \caption{\small Original frames.\label{fig:caption}} \end{minipage}January 21st, 2013 at 4:42 pm
I suggest using
\hfill, which basically fills whatever space is available. Here is your example with\hfill:\documentclass[11pt]{article} \begin{document} \begin{figure}[h] \centering \begin{minipage}{.11\textwidth} \rule{\textwidth}{0.75\textwidth}\end{minipage}\hfill \begin{minipage}{.11\textwidth} \rule{\textwidth}{0.75\textwidth}\end{minipage}\hfill \begin{minipage}{.11\textwidth} \rule{\textwidth}{0.75\textwidth}\end{minipage}\hfill \begin{minipage}{.11\textwidth} \rule{\textwidth}{0.75\textwidth}\end{minipage}\hfill \begin{minipage}[b]{0.38\linewidth} \rule{\textwidth}{0.75\textwidth}\end{minipage} \end{figure} \end{document}Best, Tom.
March 11th, 2013 at 10:58 am
Hi Tom, first of all you have a great and very helpful blog. All of this information helped me place 2 figures side by side and a table and a firgure side by side (using the minipage command). I have 2 questions: One- Is it possible to place two figures side by side and immediately below them another two figures, all of these as one “unit”?
Two- It’s a bit hard to explain (I’d send you a pic but don’t know how), but as I’m making a table I’d like to know how to control the lines, e.g. I have three columns and above them one cell which is not divided by the lines of thecolumns below… Do you have any suggestions?
Thanks,
Roman
March 11th, 2013 at 11:40 am
Hi Roman,
Thanks for your question. I’ll try to answer both below.
Question 1
Consider using the subfig package which I wrote about in this post. It’s more suitable for complex figures and supports captioning and referencing. Here is an example:
\documentclass[11pt]{article} \usepackage[lofdepth]{subfig} \begin{document} \listoffigures \begin{figure}[h] \centering \subfloat[first lof][first caption]{ \rule{0.45\linewidth}{0.35\linewidth} } \quad \subfloat[second lof][second caption]{ \rule{0.45\linewidth}{0.35\linewidth} } \subfloat[third lof][third caption]{ \rule{0.45\linewidth}{0.35\linewidth} } \quad \subfloat[forth lof][forth caption]{ \rule{0.45\linewidth}{0.35\linewidth} } \caption{General figure caption} \end{figure} \end{document}Question 2
The
tabularenvironment knows multicolumn cells. This article explains how to do it with a basic example.Hope it helps!
Tom
March 11th, 2013 at 12:41 pm
Hey Tom, I’ve tried out your solution but then LaTeX informs me that this \usepackage[lofdepth]{subfig} package can’t work with \usepackage{subcaption}. I’m sorry I didn’t post what I’m using before:
\documentclass[12pt,a4paper]{report} \usepackage{amsmath} \usepackage[utf8]{inputenc} \usepackage{amssymb} \usepackage[croatian]{babel} \usepackage[pdftex]{graphicx} \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption} \usepackage{units} %\usepackage[margin=2.5cm]{geometry} %\usepackage[top=3.5cm, bottom=3.8cm, left=3.5cm, right=3.3cm]{geometry} \usepackage[top=2.7cm, bottom=3.0cm, left=2.7cm, right=2.5cm]{geometry} \usepackage{indentfirst} \usepackage{color} \usepackage[usenames,dvipsnames,svgnames,table]{xcolor} \linespread{1.5} \usepackage[margin=10pt,font=small,labelfont=bf]{caption} \usepackage{booktabs} \title{} \date{} \newenvironment{packed_enum}{ \begin{enumerate} \setlength{\itemsep}{1pt} \setlength{\parskip}{0pt} \setlength{\parsep}{0pt} }{\end{enumerate}} \usepackage[pdftex]{hyperref} \hypersetup{ colorlinks,% citecolor=black,% filecolor=black,% linkcolor=black,% urlcolor=black }March 11th, 2013 at 1:00 pm
Hi Roman,
The more recent
subcaptionpackage provides similar functionality tosubfig. See the package documentation for more details. Here is the same example usingsubcaption:\documentclass[11pt]{article} \usepackage{caption} \usepackage[list=true]{subcaption} \begin{document} \listoffigures \section{Test section} \begin{figure}[ht] \begin{subfigure}[b]{.49\linewidth} \centering \rule{\linewidth}{0.65\linewidth} \caption{Subfigure 1}\label{fig:1a} \end{subfigure}% \quad \begin{subfigure}[b]{.49\linewidth} \centering \rule{\linewidth}{0.65\linewidth} \caption{Subfigure 2}\label{fig:1b} \end{subfigure}% \begin{subfigure}[b]{.49\linewidth} \centering \rule{\linewidth}{0.65\linewidth} \caption{Subfigure 3}\label{fig:1c} \end{subfigure}% \quad \begin{subfigure}[b]{.49\linewidth} \centering \rule{\linewidth}{0.65\linewidth} \caption{Subfigure 4}\label{fig:1d} \end{subfigure}% \caption{A figure}\label{fig:1} \end{figure} \end{document}March 11th, 2013 at 8:24 pm
Ok thanks and where do I put my pictures in the code? like I had to do before e.g. \includegraphics[width=\textwidth]{3sim1x1d1_30.jpg}
March 12th, 2013 at 2:25 am
Hi Roman,
In my example, the
\rulecommand is just a placeholder for the figure. So, all you have to do is replace them with your figures (\includegraphics).Tom
March 12th, 2013 at 4:21 pm
Hey Tom thanks a lot it really helped, I’m relatively new at this so you helped me speed up my work
March 13th, 2013 at 2:57 am
Happy to help
! Tom.
May 10th, 2013 at 12:43 pm
Dear All,
I have a problem that I cannot handle based on the forums I have read: using minipage, the [H] command does not work, the image disappears when I compile the source. Here is my code:
\begin{figure*} \begin{minipage}{0.43\textwidth} \includegraphics[width=\columnwidth]{./figures/blk3.eps} \end{minipage} \begin{minipage}{0.43\textwidth} \includegraphics[width=\columnwidth]{./figures/resch.eps} \end{minipage} \caption{Scenario 1 -- the ratio and the average number of occupied channels\label{fig:scenario1a}} \end{figure*}What should I do?
Thanks in advance.
Adam
May 10th, 2013 at 1:56 pm
Hi Adam,
Thanks for the code. Do you use
[H]onminipage? Try[H]or[h!t]on the figure.Please provide a complete minimal working example next time, including preamble.
Best, Tom.
May 10th, 2013 at 3:56 pm
Hi Tom,
thanks for the quick answer. I tried [H] and now [h!t] on the figure! Using [H], the figure disappears, using [h!t], the figure appears, but not on the defined area.
Adam
May 10th, 2013 at 4:49 pm
Hi Adam,
Glad it works! Hard to say why [H] doesn’t though. As I said, I’d need to see the code…
Cheers,
Tom
May 10th, 2013 at 7:15 pm
Hi Tom,
I try to do my best
However, I don’t know exactly what you need to help me.
\documentclass[10pt]{IEEEtran} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{epsfig} \usepackage{amssymb} \usepackage{psfrag} \usepackage{graphicx} \usepackage{float} \newcommand{\hide}[1]{} \newcommand{\TBD}[1]{\footnote{{TBD: #1}}} \newtheorem{theorem}{\bf Theorem}[section] \newtheorem{clause}{\bf Clause}[section] \newtheorem{lemma}{\bf Lemma}[section] \newtheorem{corollary}{\bf Corollary}[section] \newtheorem{definition}{\bf Definition}[section] \newtheorem{remark}{\bf Remark}[section] \newtheorem{algorithm}{\bf Algorithm}[section] %... \begin{document} \maketitle \begin{abstract} \input{abstract} \end{abstract} \begin{keywords} opportunistic spectrum access, mobile cellular networks, spectrum sharing policy; \end{keywords} \thispagestyle{empty} \section{Introduction}\label{intro} \input{intro} \section{The Proposed Spectrum Sharing Policy}\label{background} \input{background} \section{System Model}\label{sysmodel} \input{sysmodel} \section{Simulation Results}\label{simresults} \input{simresults} \section{Conclusions\label{conc}} \input{conclusions} \bibliographystyle{ieeetr} \bibliography{paper} \end{document} %Comment to Tom: %Now I paste the section that contains the figures %... \subsection{Scenario 1} %bla-bla-bla \begin{figure*}[H] \begin{minipage}{0.43\textwidth} \includegraphics[width=\columnwidth]{./figures/blk3.eps} \end{minipage} \begin{minipage}{0.43\textwidth} \includegraphics[width=\columnwidth]{./figures/resch.eps} \end{minipage} \caption{Scenario 1 -- the ratio and the average number of occupied channels\label{fig:scenario1a}} \end{figure*}I hope it is enough. Thank you for helping me.
Adam
May 14th, 2013 at 4:46 pm
Hi Adam,
Ideally, the code would illustrate your problem with as few lines as possible.
The problem is not related to eps-figures. You have two options:
\documentclass[a4paper, onecolumn]{article} \usepackage{multicol} \usepackage{blindtext} \usepackage{float} \begin{document} \begin{multicols}{2} \blindtext \end{multicols} \begin{figure}[H] \centering \rule{\textwidth}{0.3\textwidth} \caption{Single column figure} \end{figure} \begin{multicols}{2} \blindtext \end{multicols} \end{document}Best, Tom
May 15th, 2013 at 7:02 am
Hello Tom,
thank you for the fine explanation and the code.
Best wishes,
Adam