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
86 \docbook_table_output 0
91 \begin_layout Standard
93 \begin_inset CommandInset toc
94 LatexCommand lstlistoflistings
101 \begin_layout Section
105 \begin_layout Standard
107 \begin_inset listings
108 lstparams "style=bw,language=C++"
112 \begin_layout Plain Layout
119 \begin_inset Newline newline
128 \begin_inset CommandInset ref
130 reference "Example-Listing"
140 \begin_layout Standard
142 \begin_inset listings
143 lstparams "language=Python,float=h"
147 \begin_layout Plain Layout
148 # Example listing float
151 \begin_layout Plain Layout
155 \begin_layout Plain Layout
156 'this is a python function'
159 \begin_layout Plain Layout
163 \begin_layout Plain Layout
165 \begin_inset Caption Standard
167 \begin_layout Plain Layout
168 Example Listing float
169 \begin_inset CommandInset label
171 name "Example-Listing"
189 \begin_layout Standard
190 Here is an example listing with left line numbering, language
191 \begin_inset Quotes eld
195 \begin_inset Quotes erd
199 \begin_inset Quotes eld
213 \begin_inset Quotes erd
216 , range lines from 4 to end:
219 \begin_layout Standard
221 \begin_inset listings
222 lstparams "firstline=4,numbers=left,showspaces=true,language=Python"
226 \begin_layout Plain Layout
230 \begin_layout Plain Layout
231 'this is a python function'
234 \begin_layout Plain Layout
238 \begin_layout Plain Layout
242 \begin_layout Plain Layout
243 'This is a German word: Tschüß'
246 \begin_layout Plain Layout
255 \begin_layout Standard
256 A floating one-liner with [h] placement and without caption:
257 \begin_inset listings
258 lstparams "fontfamily=tt,fontsize={\large},bgcolor=lightgray,language=ABAP,float=h"
262 \begin_layout Plain Layout
272 \begin_layout Standard
273 Another inline listing:
274 \begin_inset listings
275 lstparams "language=TeX"
279 \begin_layout Plain Layout
282 begin{centering} hello
290 \begin_layout Standard
291 A non-floating listing with line frames and a top caption (Listing
297 \begin_inset CommandInset ref
299 reference "hello-world"
307 \begin_inset listings
308 lstparams "numbers=left,frame=lines,language=C"
312 \begin_layout Plain Layout
314 \begin_inset Caption Standard
316 \begin_layout Plain Layout
318 \begin_inset CommandInset label
333 \begin_layout Plain Layout
337 \begin_layout Plain Layout
341 \begin_layout Plain Layout
347 \begin_layout Plain Layout
351 \begin_layout Plain Layout
360 \begin_layout Standard
361 A non-floating listing with line frames and a bottom caption (Listing
367 \begin_inset CommandInset ref
377 \begin_inset listings
378 lstparams "numbers=left,frame=lines,language=Fortran"
382 \begin_layout Plain Layout
386 \begin_layout Plain Layout
390 \begin_layout Plain Layout
394 \begin_layout Plain Layout
398 \begin_layout Plain Layout
399 end subroutine function
402 \begin_layout Plain Layout
404 \begin_inset Caption Standard
406 \begin_layout Plain Layout
408 \begin_inset CommandInset label
425 A framed floating listing with a caption and a label (Listing
431 \begin_inset CommandInset ref
441 \begin_inset listings
442 lstparams "frame=single,language=Python,float=h"
446 \begin_layout Plain Layout
447 def boring(args = None):
450 \begin_layout Plain Layout
454 \begin_layout Plain Layout
456 \begin_inset Caption Standard
458 \begin_layout Plain Layout
460 \begin_inset CommandInset label
480 \begin_layout Standard
481 The same framed floating listing with a caption, a label and a stray math equation (Listing
487 \begin_inset CommandInset ref
496 ): \begin_inset listings
497 lstparams "frame=single,language=Python,float=h"
501 \begin_layout Plain Layout
502 def boring(args = None):
505 \begin_layout Plain Layout
509 \begin_layout Plain Layout
511 \begin_inset Caption Standard
513 \begin_layout Plain Layout
514 The previous Python function.
515 \begin_inset CommandInset label
523 \begin_inset Formula $y=f(x)$