as visible on image, by default lstlisting frames only the code, not the caption, MakeIndex, Nomenclature, Glossaries and Acronyms, Assignments, Laboratory books and reports, To put both the whole code listing and the caption inside a thin frame box (, To put two such framed code boxes, side by side (possibly by using subfloat or minipage) - with their own subcaptions (and then possibly a main caption). You signed in with another tab or window. Stack Overflow for Teams is moving to its own domain! Reference lstlisting code by caption/title instead of number. I assume because they are different languages. To learn more, see our tips on writing great answers. How is a plea agreement NOT a threat or promise? How to write definition in latex - xam.kp-fahrzeuge.de Other May 13, 2022 9:05 PM legend of zelda wind waker wiki guid. It's never too long for a MWE, look at the example in my answer. By clicking Accept all cookies, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. Continue line numbers in listings package? How to handle listings, fancyvrb, newfloat and caption? lstlisting - behaviour like figure. Notepad++ supports a lot of the language C, C++, Shell, and there are many others. Place \label{