Text FormattingDisplay of sample Code and corresponding Output

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
veljko
Posts: 2
Joined: Sat Mar 23, 2013 10:26 am

Display of sample Code and corresponding Output

Post by veljko »

I need a little help.

I'm writing a document in which I want to show an example of LaTeX file. I not know this syntax, how to display it horiyontaly in my document as in picture.

Code: Select all

\begin{lstlisting}

\begin{document}
\documentclass[a4paper]{article}
Welcome to the first \LaTeX document!
\end{document}

\end{lstlisting}
The output is: "Welcome to the first LaTeX document!"

I want to display as in the attached picture. How to code it for horizontal display? Tabular?

Thank you!
Attachments
latex-example.png
latex-example.png (15.59 KiB) Viewed 6352 times
Last edited by localghost on Sat Mar 23, 2013 10:48 am, edited 1 time in total.

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

Display of sample Code and corresponding Output

Post by localghost »

Have a look at the showexpl package.


Best regards and welcome to the board
Thorsten
veljko
Posts: 2
Joined: Sat Mar 23, 2013 10:26 am

Re: Display of sample Code and corresponding Output

Post by veljko »

Thank you, very much!

Best regards,
Veljko
Post Reply