Text FormattingMake text appear as typed

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
LaTexLearner
Posts: 139
Joined: Tue Mar 10, 2015 11:06 am

Make text appear as typed

Post by LaTexLearner »

I am just learning LaTeX right now.

As part of my learning process, I would like to make my own 2-column reference table in a PDF that shows the actual code in the left column and the output of the code on the right column.

How do I make that left column display the actual code?

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10348
Joined: Mon Mar 10, 2008 9:44 pm

Make text appear as typed

Post by Stefan Kottwitz »

There are packages for this, which could be used, such as doc, its extensions dox and xdoc, and ydoc. Having a quick look, choosing one, and reading its manual could be quicker then inventing similar things again. There, LaTeX authors made macros for such a purpose.

Stefan
LaTeX.org admin
LaTexLearner
Posts: 139
Joined: Tue Mar 10, 2015 11:06 am

Re: Make text appear as typed

Post by LaTexLearner »

Ok, I'll take a look this afternoon.

Thanks!
Post Reply