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
General ⇒ How to display both input codes and output side by side?
-
- Posts: 66
- Joined: Tue Oct 07, 2008 9:39 am
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?
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¹
Best regards and welcome to the board
Thorsten¹
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Re: How to display both input codes and output side by side?
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.
-
- Posts: 66
- Joined: Tue Oct 07, 2008 9:39 am
-
- Posts: 66
- Joined: Tue Oct 07, 2008 9:39 am
How to display both input codes and output side by side?

