5
votes
1answer
189 views

Code highlighting for imported source files

I have several source code files that I would like to include in my document. I know that I can use verbatiminput to get the lines from the file, and use lstlisting to highlight the code, but I ...
2
votes
0answers
103 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
2answers
394 views

Highlight \verb in inline text

I'm new in LaTeX and I'm searching for solution to highlight verbatim text inside paragraph (for example, it is like on this page, where code is highlighted). Can anyone help me with this? Let say, ...
1
vote
1answer
242 views

minted Environment Inside minipage Environment

I am having to use the minted environment inside a minipage environment quite often in my document. I wanted to write a new environment for doing this, but since minted isn't designed to be included ...
6
votes
2answers
166 views

Highlighting code like one would in a SE post

When posting on SE, users can "highlight" code by using the ` symbol. Is there any way to get that in LaTeX? My intention is to highlight segments of code or particular functions. To be clear, I'm ...
12
votes
2answers
784 views

Highlighting a .diff file

Is there a way to highlight the syntax of a diff file (i.e. by using the listings package)?