9
votes
1answer
514 views

How to typeset LaTeX code inside a Table environment?

I wanted to typeset LaTeX code directly into my document, but without it doing something, i.e., I just want to show my code in the output. Now, I know there is the verbatim environment for code, as ...
2
votes
0answers
93 views

Deciding whether to end a line with a character or not in lstlisting [closed]

I need to write a document where there are written inputs and outputs of unix command line interface software (through bash). For example I need to show something like: $ git log --pretty=format:"%h ...
6
votes
3answers
884 views

How to properly display backticks in verbatim environment?

I am preparing a beamer presentation where I need to display some markdown code involving backticks. Specifically, I want to show backticks in the verbatim environment. However, LaTeX renders them as ...
5
votes
5answers
6k views

Verbatim environment with correct tab handling and special characters

I'm looking for an environment similar to Verbatim which will allow me to say something like the following code (which uses indentation instead of spaces): \documentclass{article} ...
5
votes
1answer
1k views

Environment code undefined

Why do I get ! LaTeX Error: Environment code undefined. when I use: \documentclass[10pt,a4wide]{article} \usepackage{a4wide} \usepackage[utf8]{inputenc} \usepackage[portuguese]{babel} ...
1
vote
1answer
356 views

Listings settings for command line arguments [closed]

I am typesetting a set of instructions which includes several (Unix) command line arguments. I have been using the listings package to include these arguments, but the colouring is less than ideal. ...
4
votes
1answer
671 views

How can I input part of a file in verbatim?

I'm writing the documentation to a large piece of Matlab code. I would like include tags in my Matlab code and then read the lines of code between the tags into Latex and output them as verbatim (or ...