GeneralHow to display both input codes and output side by side?

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
fractal.generator
Posts: 66
Joined: Tue Oct 07, 2008 9:39 am

How to display both input codes and output side by side?

Post by fractal.generator »

Dear all,

I want to display BOTH input codes (at the left side) and its corresponding output (at the right side) at the same time using only one environment.
How to create such environment using listing package?


Thank you in advance

Hayashi

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

How to display both input codes and output side by side?

Post by localghost »

There is no need to create an environment by yourself. The showexpl package will do this for you. As far as I know it uses the listings package internally.


Best regards and welcome to the board
Thorsten¹
User avatar
Juanjo
Posts: 657
Joined: Sat Jan 27, 2007 12:46 am

Re: How to display both input codes and output side by side?

Post by Juanjo »

As an alternative, you could use the fvrb-ex package, bundled with fancyvrb.
The CTAN lion is an artwork by Duane Bibby. Courtesy of www.ctan.org.
fractal.generator
Posts: 66
Joined: Tue Oct 07, 2008 9:39 am

How to display both input codes and output side by side?

Post by fractal.generator »

localghost wrote:There is no need to create an environment by yourself. The showexpl package will do this for you. As far as I know it uses the listings package internally.


Best regards and welcome to the board
Thorsten¹
Thanks localghost!!!

It is the package I need.
fractal.generator
Posts: 66
Joined: Tue Oct 07, 2008 9:39 am

How to display both input codes and output side by side?

Post by fractal.generator »

:idea: Mission Accomplished :idea:
Post Reply