Tag Info

New answers tagged

3

I don't know if the style can be changed mid document, but this works: \documentclass{article} \usepackage[pygopt={style=murphy}]{pythontex} \begin{document} \begin{pygments}{python} #!/usr/bin/env python import Tkinter as tk class Application(tk.Frame): def __init__(self, master=None): tk.Frame.__init__(self, master) self.grid() self.createWidgets() def ...


0

It's a disgusting way, but I got it to work: \texttt{\$}\mintinline{perl}{_[0]} I only need it in black and white, so it looks fine. If there's another answer that works better, I will accept that one instead


4

You have to escape the special characters: \documentclass{article} \usepackage{minted} \begin{document} \mint{perl}|$_[0]| \end{document} The character | stands for an arbitrary (nonspecial) character that doesn't appear in the text to be processed, like for \verb. You might consider using pythontex: \documentclass{article} \usepackage{pythontex} ...



Top 50 recent answers are included