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 false
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
89 \begin_layout Standard
91 \begin_inset CommandInset toc
92 LatexCommand lstlistoflistings
103 \begin_layout Standard
105 \begin_inset listings
106 lstparams "style=bw,language=C++"
110 \begin_layout Plain Layout
117 \begin_inset Newline newline
126 \begin_inset CommandInset ref
128 reference "Example-Listing"
138 \begin_layout Standard
140 \begin_inset listings
141 lstparams "language=Python,float=h"
145 \begin_layout Plain Layout
146 # Example listing float
149 \begin_layout Plain Layout
153 \begin_layout Plain Layout
154 'this is a python function'
157 \begin_layout Plain Layout
161 \begin_layout Plain Layout
163 \begin_inset Caption Standard
165 \begin_layout Plain Layout
166 Example Listing float
167 \begin_inset CommandInset label
169 name "Example-Listing"
187 \begin_layout Standard
188 Here is an example listing with left line numbering, language
189 \begin_inset Quotes eld
193 \begin_inset Quotes erd
197 \begin_inset Quotes eld
211 \begin_inset Quotes erd
214 , range lines from 4 to end:
217 \begin_layout Standard
219 \begin_inset listings
220 lstparams "firstline=4,numbers=left,showspaces=true,language=Python"
224 \begin_layout Plain Layout
228 \begin_layout Plain Layout
229 'this is a python function'
232 \begin_layout Plain Layout
236 \begin_layout Plain Layout
240 \begin_layout Plain Layout
241 'This is a German word: Tschüß'
244 \begin_layout Plain Layout
253 \begin_layout Standard
254 A floating one-liner with [h] placement and without caption:
255 \begin_inset listings
256 lstparams "fontfamily=tt,fontsize={\large},bgcolor=lightgray,language=ABAP,float=h"
260 \begin_layout Plain Layout
270 \begin_layout Standard
271 Another inline listing:
272 \begin_inset listings
273 lstparams "language=TeX"
277 \begin_layout Plain Layout
280 begin{centering} hello
288 \begin_layout Standard
289 A non-floating listing with line frames and a top caption (Listing
295 \begin_inset CommandInset ref
297 reference "hello-world"
305 \begin_inset listings
306 lstparams "numbers=left,frame=lines,language=C"
310 \begin_layout Plain Layout
312 \begin_inset Caption Standard
314 \begin_layout Plain Layout
316 \begin_inset CommandInset label
331 \begin_layout Plain Layout
335 \begin_layout Plain Layout
339 \begin_layout Plain Layout
345 \begin_layout Plain Layout
349 \begin_layout Plain Layout
358 \begin_layout Standard
359 A non-floating listing with line frames and a bottom caption (Listing
365 \begin_inset CommandInset ref
375 \begin_inset listings
376 lstparams "numbers=left,frame=lines,language=Fortran"
380 \begin_layout Plain Layout
384 \begin_layout Plain Layout
388 \begin_layout Plain Layout
392 \begin_layout Plain Layout
396 \begin_layout Plain Layout
397 end subroutine function
400 \begin_layout Plain Layout
402 \begin_inset Caption Standard
404 \begin_layout Plain Layout
406 \begin_inset CommandInset label
423 A framed floating listing with a caption and a label (Listing
429 \begin_inset CommandInset ref
439 \begin_inset listings
440 lstparams "frame=single,language=Python,float=h"
444 \begin_layout Plain Layout
445 def boring(args = None):
448 \begin_layout Plain Layout
452 \begin_layout Plain Layout
454 \begin_inset Caption Standard
456 \begin_layout Plain Layout
458 \begin_inset CommandInset label
478 \begin_layout Standard
479 The same framed floating listing with a caption, a label and a stray math equation (Listing
485 \begin_inset CommandInset ref
494 ): \begin_inset listings
495 lstparams "frame=single,language=Python,float=h"
499 \begin_layout Plain Layout
500 def boring(args = None):
503 \begin_layout Plain Layout
507 \begin_layout Plain Layout
509 \begin_inset Caption Standard
511 \begin_layout Plain Layout
512 The previous Python function.
513 \begin_inset CommandInset label
521 \begin_inset Formula $y=f(x)$