Linked Questions

10 votes
3 answers
2k views

How to keep indentations in Python code copied from LaTeX PDF?

I tried to include Python 3.6 code in a LaTeX PDF document which should be easily be copied to save to a file or to try the Python code. Although, \begin{verbatim} for row in range(1,9): for col ...
theozh's user avatar
  • 125
4 votes
2 answers
6k views

Beautifully format text of an external document

I have some formatted long text files looking like this: f=50 k_max=420 Iteration Func-count min f(x) Procedure 0 1 7.07212e-09 1 2 ...
rowman's user avatar
  • 1,760
1 vote
2 answers
7k views

How to put a list of code in appendix?

I want to put a code in my thesis appendix. print('This sentence is output to the screen') # Output: This sentence is output to the screen a = 5 print('The value of a is', a) # Output: The value of ...
aan's user avatar
  • 2,603
12 votes
1 answer
22k views

Listings: syntax for literate

In the documentation for the listings package it says: literate = [*]<replacement item>. . .<replacement item> First note that there are no commas between the items. Each item ...
BadAtLaTeX's user avatar
  • 1,110

15 30 50 per page
1
2