Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!wuarchive!udel!brahms.udel.edu!anita From: anita@brahms.udel.edu (Anita Marie Hoover) Newsgroups: comp.text.tex Subject: Re: Side by side figures in LaTeX Message-ID: <21198@brahms.udel.edu> Date: 8 May 91 13:51:10 GMT References: <1991May6.033627.24887@cs.ubc.ca> Organization: University of Delaware Lines: 65 In article hanche@imf.unit.no (Harald Hanche-Olsen) writes: =>In article <1991May6.033627.24887@cs.ubc.ca> scharein@cs.ubc.ca (Robert Scharein) writes: => => Does anybody know of a way to place two figures (or tables) side by => side in a LaTeX document? => =>Yes, anybody knows :-) No, seriously, ... => => It seems that LaTeX puts the figures in => a \parbox of width \textwidth so it would not seem possible without => changing \textwidth in the middle of the document. => =>I believe that the figure and table environments are very badly named. =>THE figure ENVIRONMENT DOES NOT MAKE A FIGURE! What it makes is a =>float: A box that can be moved to wherever the output routine feels =>like putting it (subject to certain constraints). Similarly for the =>table environment: The only diffence between the two (I believe) is =>how the \caption command works. You see, the \caption command within =>the figure environment is what really defines the figure! Now, there =>is nothing to stop you from having two or more \caption's (or none!) =>inside your figure environment. If the environment had been named =>"figures" instead, I believe fewer people would be confused. => =>So, the answer to your question is simple enough: Put each of your =>two figures including their \caption inside a \parbox, and set the two =>boxes side by side inside the figure environment. (The \parbox is so =>the \caption command will know how wide it must be). Warning: I have =>not tested this, and no doubt you will discover pitfalls. But this is =>at least in principle how I would do it. => Here is an example: \documentstyle [12pt] {article} \begin{document} Here are two tables that are side by side. This is especially nice when wanting to compare costs, usage or other types of data. \begin{table}[htbp] \begin{center} \begin{minipage}[t]{2.25in} \caption{Usage Figures for Jan through Mar 1989} \vspace*{.5\baselineskip} \begin{center} \begin{tabular}{|ccc|}\hline Jan & Feb & Mar \\\hline 1 & 2 & 3\\\hline \end{tabular} \end{center} \end{minipage}\hspace*{.375in} \begin{minipage}[t]{2.25in} \caption{Usage Figures for Apr through Jun 1989} \vspace*{.5\baselineskip} \begin{center} \begin{tabular}{|ccc|}\hline Apr & May & Jun \\\hline 4 & 5 & 6\\\hline \end{tabular} \end{center} \end{minipage} \end{center} \end{table} Now isn't this great! \end{document}