7

First let me just point out that I am new to LaTeX and I searched for an answer to the question but I could not find anything I could use. So if you already know where I can find my answer just point me in the direction and I will remove this thread.

Now, I have a problem getting two examples of text next to each other. It is an example of a template and I would like to show two variants side by side. This is the text:

openstack {  
    tenant <some name>  
    image <image name>  
    flavor <flavor type>  
    keypair <keypair>  
}  
 network eth0 {  
        net <net>  
    }  
}  
host <hostname> {  
    superclass common  
    network eth0 {  
           floating-ip auto ext_net  
    }  
}

Does anyone know how I could do this is in a neat fashion?

2
  • 1
    Welcome to TeX.sx! You may want to check my question from last month. Possible duplicate?!
    – masu
    Commented Oct 7, 2013 at 14:45
  • Use two minipages. If they have widths that total less than the current line width, and there is no blank line between them, they will be side-by side.
    – Dan
    Commented Dec 7, 2013 at 3:16

1 Answer 1

7

You can find very useful stuff about multi-column pages at the LaTeX Wiki:

http://en.wikibooks.org/wiki/LaTeX/Page_Layout#Multi-column_pages

In short, you can use the code below for a two-column text:

\begin{multicols}{2}
lots of text
\end{multicols}

Just don't forget to add

\usepackage{multicol}

at the preamble of your code.

Good Luck :)

1
  • You're welcome @Jonas. You may accept this answer as accepted, if it helped you.
    – Omid1989
    Commented Apr 10, 2016 at 12:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .