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
28 \font_sf_scale 100 100
29 \font_tt_scale 100 100
31 \use_dash_ligatures true
33 \default_output_format default
35 \bibtex_command default
36 \index_command default
42 \use_package amsmath 1
43 \use_package amssymb 0
46 \use_package mathdots 0
47 \use_package mathtools 0
49 \use_package stackrel 0
50 \use_package stmaryrd 0
51 \use_package undertilde 0
53 \cite_engine_type default
57 \paperorientation portrait
68 \paragraph_separation indent
69 \paragraph_indentation default
71 \math_numbering_side default
76 \paperpagestyle default
77 \tracking_changes false
86 \begin_layout Standard
88 \begin_inset CommandInset toc
89 LatexCommand lstlistoflistings
100 \begin_layout Standard
102 \begin_inset listings
103 lstparams "style=bw,language=C++"
107 \begin_layout Plain Layout
114 \begin_inset Newline newline
123 \begin_inset CommandInset ref
125 reference "Example-Listing"
135 \begin_layout Standard
137 \begin_inset listings
138 lstparams "language=Python,float=h"
142 \begin_layout Plain Layout
143 # Example listing float
146 \begin_layout Plain Layout
150 \begin_layout Plain Layout
151 'this is a python function'
154 \begin_layout Plain Layout
158 \begin_layout Plain Layout
160 \begin_inset Caption Standard
162 \begin_layout Plain Layout
163 Example Listing float
164 \begin_inset CommandInset label
166 name "Example-Listing"
184 \begin_layout Standard
185 Here is an example listing with left line numbering, language
186 \begin_inset Quotes eld
190 \begin_inset Quotes erd
194 \begin_inset Quotes eld
208 \begin_inset Quotes erd
211 , range lines from 4 to end:
214 \begin_layout Standard
216 \begin_inset listings
217 lstparams "firstline=4,numbers=left,showspaces=true,language=Python"
221 \begin_layout Plain Layout
225 \begin_layout Plain Layout
226 'this is a python function'
229 \begin_layout Plain Layout
233 \begin_layout Plain Layout
237 \begin_layout Plain Layout
238 'This is a German word: Tschüß'
241 \begin_layout Plain Layout
250 \begin_layout Standard
251 A floating one-liner with [h] placement and without caption:
252 \begin_inset listings
253 lstparams "fontfamily=tt,fontsize={\large},bgcolor=lightgray,language=ABAP,float=h"
257 \begin_layout Plain Layout
267 \begin_layout Standard
268 Another inline listing:
269 \begin_inset listings
270 lstparams "language=TeX"
274 \begin_layout Plain Layout
277 begin{centering} hello
285 \begin_layout Standard
286 A non-floating listing with line frames and a top caption (Listing
292 \begin_inset CommandInset ref
294 reference "hello-world"
302 \begin_inset listings
303 lstparams "numbers=left,frame=lines,language=C"
307 \begin_layout Plain Layout
309 \begin_inset Caption Standard
311 \begin_layout Plain Layout
313 \begin_inset CommandInset label
328 \begin_layout Plain Layout
332 \begin_layout Plain Layout
336 \begin_layout Plain Layout
342 \begin_layout Plain Layout
346 \begin_layout Plain Layout
355 \begin_layout Standard
356 A non-floating listing with line frames and a bottom caption (Listing
362 \begin_inset CommandInset ref
372 \begin_inset listings
373 lstparams "numbers=left,frame=lines,language=Fortran"
377 \begin_layout Plain Layout
381 \begin_layout Plain Layout
385 \begin_layout Plain Layout
389 \begin_layout Plain Layout
393 \begin_layout Plain Layout
394 end subroutine function
397 \begin_layout Plain Layout
399 \begin_inset Caption Standard
401 \begin_layout Plain Layout
403 \begin_inset CommandInset label
423 \begin_layout Standard
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)$