11 questions linked to/from lstlisting line wrapping
79 views

### Equation overflowing overfull \hbox [duplicate]

I have a question about showing C++ code in LateX When I do the following, the C++ goes past the page. Is there a way to fix this? \documentclass{article} \newcommand{\dd}[1]{\mathrm{d}#1} \...
12k views

### Adding programing code on LaTeX

I need to put some code from Linux's configuration files and some JavaScript in a document. I have tried to use \texttt, it worked for some Linux's basic commands like sudo apt-get install XYZ, but ...
518 views

### Listings — make linebroken line comment a comment

So, I have listings wrapping lines in my code listing using the breaklines option. Fortunately, I can let the default breaks stand in most cases, as I am listing Python code which is fairly tolerant ...
673 views

### how to wrap a long terminal command without real line breaking?

this may look like a duplicate question to this one and many, but really I had a hardtime in finding the desired solution. The breaklines=true didn't work as it breaks the long command. Hence simple ...
209 views

### wrapping long python arrays in listings package

NOTE I have tried the following answer to a similar question , but it doesn't work: lstlisting line wrapping My problem is trying to put the following code in latex: import matplotlib.pyplot as plt ...
459 views

### Insert word, character, or symbol at beginning of all hanging indents in paragraph

In the same vein as this question (and somewhat similar to this question), I am trying to insert anything (e.g. a word, character, or symbol) at the beginning of each wrapped line in a paragraph. ...
208 views

### What, in the custom class I use, prevents line breaking in listings?

I have found how to wrap code inside lstlisting block. When my document has article class, everything works as expected. However, when I change the document's class to one I need in my work, lines do ...
448 views

### How to format an algorithm using lstlisting

I'm writing an algorithm using lstlisting : \lstset{language=C++} \begin{lstlisting}[frame=single,caption=Algorithme de la méthode "HOG+SVM"] HOGDescriptor hog;\\ hog.setSVMDetector(...
475 views

### Adjusting the text width of R listings in LaTex [closed]

Hi I have R codes that I am listing in my LaTex file with \begin{lstlisting}[language=R] R code \end{lstlisting} I have no specific listing setting in my preamble. My R code is very wide and ...