1 #LyX file created by tex2lyx 2.4
5 \save_transient_properties true
9 %% Do not edit unless you really know what you are doing.
14 \use_default_options false
15 \maintain_unincluded_children no
17 \language_package none
18 \inputencoding iso8859-15
20 \font_roman "default" "default"
21 \font_sans "default" "default"
22 \font_typewriter "default" "default"
23 \font_math "auto" "auto"
24 \font_default_family default
25 \use_non_tex_fonts false
29 \font_typewriter_osf false
30 \font_sf_scale 100 100
31 \font_tt_scale 100 100
33 \use_dash_ligatures true
35 \default_output_format default
37 \bibtex_command default
38 \index_command default
44 \use_package amsmath 1
45 \use_package amssymb 0
48 \use_package mathdots 0
49 \use_package mathtools 0
51 \use_package stackrel 0
52 \use_package stmaryrd 0
53 \use_package undertilde 0
55 \cite_engine_type default
59 \paperorientation portrait
71 \paragraph_separation indent
72 \paragraph_indentation default
74 \math_numbering_side default
79 \paperpagestyle default
80 \tracking_changes false
90 \begin_layout Standard
92 \begin_inset CommandInset toc
93 LatexCommand lstlistoflistings
100 \begin_layout Section
104 \begin_layout Standard
106 \begin_inset listings
107 lstparams "style=bw,language=C++"
111 \begin_layout Plain Layout
118 \begin_inset Newline newline
127 \begin_inset CommandInset ref
129 reference "Example-Listing"
139 \begin_layout Standard
141 \begin_inset listings
142 lstparams "language=Python,float=h"
146 \begin_layout Plain Layout
147 # Example listing float
150 \begin_layout Plain Layout
154 \begin_layout Plain Layout
155 'this is a python function'
158 \begin_layout Plain Layout
162 \begin_layout Plain Layout
164 \begin_inset Caption Standard
166 \begin_layout Plain Layout
167 Example Listing float
168 \begin_inset CommandInset label
170 name "Example-Listing"
188 \begin_layout Standard
189 Here is an example listing with left line numbering, language
190 \begin_inset Quotes eld
194 \begin_inset Quotes erd
198 \begin_inset Quotes eld
212 \begin_inset Quotes erd
215 , range lines from 4 to end:
218 \begin_layout Standard
220 \begin_inset listings
221 lstparams "firstline=4,numbers=left,showspaces=true,language=Python"
225 \begin_layout Plain Layout
229 \begin_layout Plain Layout
230 'this is a python function'
233 \begin_layout Plain Layout
237 \begin_layout Plain Layout
241 \begin_layout Plain Layout
242 'This is a German word: Tschüß'
245 \begin_layout Plain Layout
254 \begin_layout Standard
255 A floating one-liner with [h] placement and without caption:
256 \begin_inset listings
257 lstparams "fontfamily=tt,fontsize={\large},bgcolor=lightgray,language=ABAP,float=h"
261 \begin_layout Plain Layout
271 \begin_layout Standard
272 Another inline listing:
273 \begin_inset listings
274 lstparams "language=TeX"
278 \begin_layout Plain Layout
281 begin{centering} hello
289 \begin_layout Standard
290 A non-floating listing with line frames and a top caption (Listing
296 \begin_inset CommandInset ref
298 reference "hello-world"
306 \begin_inset listings
307 lstparams "numbers=left,frame=lines,language=C"
311 \begin_layout Plain Layout
313 \begin_inset Caption Standard
315 \begin_layout Plain Layout
317 \begin_inset CommandInset label
332 \begin_layout Plain Layout
336 \begin_layout Plain Layout
340 \begin_layout Plain Layout
346 \begin_layout Plain Layout
350 \begin_layout Plain Layout
359 \begin_layout Standard
360 A non-floating listing with line frames and a bottom caption (Listing
366 \begin_inset CommandInset ref
376 \begin_inset listings
377 lstparams "numbers=left,frame=lines,language=Fortran"
381 \begin_layout Plain Layout
385 \begin_layout Plain Layout
389 \begin_layout Plain Layout
393 \begin_layout Plain Layout
397 \begin_layout Plain Layout
398 end subroutine function
401 \begin_layout Plain Layout
403 \begin_inset Caption Standard
405 \begin_layout Plain Layout
407 \begin_inset CommandInset label
424 A framed floating listing with a caption and a label (Listing
430 \begin_inset CommandInset ref
440 \begin_inset listings
441 lstparams "frame=single,language=Python,float=h"
445 \begin_layout Plain Layout
446 def boring(args = None):
449 \begin_layout Plain Layout
453 \begin_layout Plain Layout
455 \begin_inset Caption Standard
457 \begin_layout Plain Layout
459 \begin_inset CommandInset label
479 \begin_layout Standard
480 The same framed floating listing with a caption, a label and a stray math equation (Listing
486 \begin_inset CommandInset ref
495 ): \begin_inset listings
496 lstparams "frame=single,language=Python,float=h"
500 \begin_layout Plain Layout
501 def boring(args = None):
504 \begin_layout Plain Layout
508 \begin_layout Plain Layout
510 \begin_inset Caption Standard
512 \begin_layout Plain Layout
513 The previous Python function.
514 \begin_inset CommandInset label
522 \begin_inset Formula $y=f(x)$