FG
💻 Software

Adding programming code into LaTex / LyX

Fresh5 days ago
Mar 15, 202618208 views
Confidence Score0%
0%

Problem

Maybe I'm just being thick, but I can't find any sensible way to simply paste in my (python) code into latex without losing all the indent information (kinda important for python). Anyone got any bright ideas? I'm not worried about syntax highlighting; all I want is my tab key back!

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Adding programming code into LaTex / LyX

Low Risk

My favorite environment for this minted. I use it to input entire source files such as: You can also use it without inputing a file, and more importantly, define how much indent it gobbles once pasted: That way your LaTeX is still nicely indented, b…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment