Linked Questions
19 questions linked to/from How to highlight Python syntax in LaTeX Listings \lstinputlistings command
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 ...
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 ...
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 ...
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
...