11 questions linked to/from Creating a zebra effect using listings
3k views

### How to mark whole line or part of line with background color in a listing (listings package)?

I want to highlight either a whole line of code in a listing, or a part of line (a subexpression) using background color (to not interfere with syntax highlighting). I use lstlistings environment ...
3k views

### Recent issues with lstlinebgrd package with listings after the latter's update[September 02,2018]

I could run the program without any problem while highlighting few lines of code using listings and lstlinebgrd packages. But the recent update of listings package v1.7 is giving me error even on the ...
1k views

### Using listings: "zebra effects" AND line numbers

I just made a code listing with a "zebra effect", just like here: Creating a zebra effect using listings But afterwards, the line numbers at the left side of the listing don't appear any more. This ...
2k views

### Highlighting line ranges in a lstlisting: partial solution, but expansion issues

In my quest for a better solution for How to change appearance of a particular line when using \lstincludelisting, I came across the linebackground= option Martin Scharrer added to the listings ...
549 views

### Test if a number is in a comma separated range/list of numbers

Martin Scharrer posted a very elegant answer for the question "Creating a zebra effect using listings". I want to extend that code to highlight only lines given in a comma separated list. The ...
3k views

### change background color for some lines inside a listings block

I need to change background color for some lines inside a listings block. This is an example: \documentclass{article} \usepackage{listings} % Include the listings-package \usepackage{...
924 views

### Listing, zebra effect and broken lines

In Creating a zebra effect using listings, I've found one solution to produce a zebra effect for listing. Unfortunately, this only works if the lines are not broken. Is there a way to fix this? Here ...
760 views

### Alternate text style for odd and even line

I want to make someting like the lstlinebgrd package to creating a zebra effect. \documentclass{article} \usepackage{lstlinebgrd} \usepackage[english]{babel}%If not an error occurs \begin{document} \...
977 views

I use the package called "lstaddons" (creator, initial question) to get colored line backgrounds on listings. I want to color the whole line to the frame. What I miss there is a dynamic calculation ...