Linked Questions

11 votes
1 answer
30k views

Warning when adding package minted?

I am for some reason getting an warning when i try to load the package minted in sharelatex. The warning is Command \@parboxrestore has changed. Package fvextra Warning: csquotes should be loaded ...
dfh's user avatar
  • 641
6 votes
1 answer
3k views

Listings: recognize numbers and `1e-3`

This is a follow up question. Have a look at this one: Listings: syntax for literate with the solution by karlkoeller %Minimal \documentclass[]{report} \usepackage[utf8]{inputenc} \usepackage[...
BadAtLaTeX's user avatar
  • 1,149
4 votes
1 answer
85 views

UTF-8 Mu won't render inside custom environment

I just tried using this https://tex.stackexchange.com/a/83883/143861 for syntax highlighting Python in overleaf \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} % Default fixed font ...
minseong's user avatar
  • 487
3 votes
1 answer
9k views

Problem with listings package for Python syntax coloring

I am implementing the method I learned here for putting Python code in Latex. Everything works great except that I have problems with comments. Here's the code from the link I mentioned: \usepackage[...
ahoosh's user avatar
  • 203
2 votes
1 answer
544 views

How to number the listings within sections?

I use this excellent approach for inserting external Python code in my document. How to highlight Python syntax in LaTeX Listings \lstinputlistings command \section{TEST} \pythonexternal[caption=test,...
GenXGer's user avatar
  • 23
1 vote
1 answer
1k views

a good python ambient for my latex code

I am looking for a latex preamble in order to have a good python script. Here I found this \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} % Default fixed font does not support bold ...
Stefano Fedele's user avatar
1 vote
1 answer
355 views

How to typeset programs as beautiful math

The programs I am talking about are Haskell(ish). In the programming world Haskell is the most math-ish of mainstream languages. However when it comes to taking actual Haskell code and typesetting it ...
Rushi's user avatar
  • 313
1 vote
1 answer
2k views

get spyder-like color highlighting in pythontex

In my work with Python 3.4, I use spyder (anaconda3 2.0.1) and I like the highlighting of the Spyder editor (version 2.3). Is it possible to have the same highlighting scheme in latex documents ...
guillaume's user avatar
0 votes
1 answer
548 views

How to caption a listing(?) environment, custom Python syntax highlighting environment

I am using this answer to add syntax-highlighted Python snippets to my document \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \usepackage{newtxtt} % Custom colors \usepackage{...
minseong's user avatar
  • 487
0 votes
1 answer
475 views

How to include minus and hyphen sign in colored python code lisiting?

The post: How to highlight Python syntax in LaTeX Listings \lstinputlistings command produced answer from redmode, that gives a colored python code listing. Although the text produces minus/hyphens in ...
Brendan Darrer's user avatar
0 votes
1 answer
556 views

Using listings to add colorful code

By default listings adds black and white code. How can I make them colorful. Language I work on are -> Python, Mathematica, IDL.
Kartik Chhajed's user avatar
0 votes
1 answer
3k views

Python code block outside of margin

I want to include some Python code to my Latex document. I have read this Tex Stackexchange question and added the following code to get syntax highlights: \usepackage{color} \DeclareFixedFont{\ttb}{...
JNevens's user avatar
  • 1,479
0 votes
0 answers
296 views

Modifying existing Latex code to put Python codes in the Cheatsheet

I want to make a cheatsheet for Pandas which has Python codes. I googled and tried to find a free online site that help to get built easily. I'm unable to find except overleaf which uses Latex codes ...
Mithlesh Upadhyay's user avatar
0 votes
0 answers
311 views

Using the minted package with Temaker produces 'pygmentize' error

Using Texmaker 5.04 on Windows 10 (with Python installed and up-to-date via Anaconda), I'm trying to compile the minimal example provided in the minted documentation. I expanded the command string ...
regnittearg's user avatar
0 votes
0 answers
1k views

How to include a caption to a Python code snippet

I am using a self-defined command to create an environment for my Python code that I want to show in my document. This command has been taken from redmode's answer to the following question: here. So, ...
Luk's user avatar
  • 509

15 30 50 per page