Display source code in LaTeX - source code listing

preview_player
Показать описание
In this video, I will show you how to display source code in your LaTeX document using the powerful packages "listing" and "verbatim". I will demonstrate how to import code from a file, add captions and reference code in the text, and customize code style and color. Additionally, I will show you how to highlight specific lines of code and change the caption name to fit your needs. Whether you need to showcase your programming skills or add snippets of code to your document, this tutorial will help you achieve it with ease.

Keywords: LaTeX, code, source code, programming, listings, verbatim, highlighting, customization, caption, reference.

Hashtags: #LaTeX #code #sourcecode #programming #listings #verbatim #highlighting #customization #caption #reference.

✅ Subscribe for more videos like this one
🔔 Click on the bell icon to be notified when I release a new video
👍 Please like my video!

✅ Let's connect:

📝 Useful notes:

👨‍💻 Source code:

🎥 Content of this video:
00:00 - What you will learn
00:15 - Verbatim environment
01:22 - The listing package
02:00 - Specifying options
03:30 - Change code style and color
05:50 - Import code from an external file
07:35 - List of listings

🔣 Keywords:
#LaTeX #LaTeXCourse #CodeListing #Listing #SourceCode
Рекомендации по теме
Комментарии
Автор

I have probably said this before already but I am constantly amazed by your videos. It is always straightforward and to the point. AND so immensely useful. Thank you so much once again.

winstonyap
Автор

Grazie fede per questo video. Molto utile per un neofita come me!

ragnarresh
Автор

How do you make the line numbers non selectable? I want the reader to be able to copy the code from the document but when doing so the line numbers are taken as well.

fb
Автор

I cant figure it out how to add the "Source Code" on the begining of each caption, so there arent just numbers, I want full name to be displayed. Do you know perhaps?

smukec
Автор

great video!!!and I have a question: how to connect the Cyrillic alphabet? my text just disappears

АидаБисенгалиева-ел
Автор

thankyou for your explanation, that's a great video but i have one question, how to change the caption originally "Source Code 1" to "Source Code 1.1" or "Source Code 3.1" etc, according to chapter number? Please reply my question.

nadhifaafrinia
Автор

how to make line numbers non selectable when selecting to copy and paste?

Not_The_Pizza_Guy
Автор

how do you reference that label you created within the square brackets, /ref{} dosnt seem to be able to find it

TM-bjzh
Автор

great video <3 do you know if there is any way to use the programming language Maple? since it is pretty similar to matlab, i can also import the code and say ist matlab code, but it would be better if there was a, ,Maple'' option as language. or is there maybe an option how you can add your own keywords for example so i can custom add some keywords maple uses, that matlab doesnt for example

HebaBeats
Автор

Grazie for the video Federico! Where is the link for using blank to reformat the code when lines are too long? Thanks!

drover
Автор

Hello sir, I just have a question: how can we preserve indentation and new lines when copying lines of code from overleaf?

ridazouga
Автор

grazie broo, gli italiani sono i migliori

TP
Автор

Is there any way to highlight integer and float/double literals in a certain color?

kimschmidt
Автор

well, if i want to do this documentation on overleaf, what is the library to activate?

garcializardemarcos
Автор

Can Latex receive the json object from API ?🤔

tantuannguyen
Автор

Please provide the zip file for your project 🙌

king_of_the_pirates
Автор

How to add (_), (%) on python source code in overleaf

deepthyjoseph