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
87 \docbook_mathml_prefix 1
92 \begin_layout Standard
94 \begin_inset CommandInset toc
95 LatexCommand lstlistoflistings
102 \begin_layout Section
106 \begin_layout Standard
108 \begin_inset listings
109 lstparams "style=bw,language=C++"
113 \begin_layout Plain Layout
120 \begin_inset Newline newline
129 \begin_inset CommandInset ref
131 reference "Example-Listing"
141 \begin_layout Standard
143 \begin_inset listings
144 lstparams "language=Python,float=h"
148 \begin_layout Plain Layout
149 # Example listing float
152 \begin_layout Plain Layout
156 \begin_layout Plain Layout
157 'this is a python function'
160 \begin_layout Plain Layout
164 \begin_layout Plain Layout
166 \begin_inset Caption Standard
168 \begin_layout Plain Layout
169 Example Listing float
170 \begin_inset CommandInset label
172 name "Example-Listing"
190 \begin_layout Standard
191 Here is an example listing with left line numbering, language
192 \begin_inset Quotes eld
196 \begin_inset Quotes erd
200 \begin_inset Quotes eld
214 \begin_inset Quotes erd
217 , range lines from 4 to end:
220 \begin_layout Standard
222 \begin_inset listings
223 lstparams "firstline=4,numbers=left,showspaces=true,language=Python"
227 \begin_layout Plain Layout
231 \begin_layout Plain Layout
232 'this is a python function'
235 \begin_layout Plain Layout
239 \begin_layout Plain Layout
243 \begin_layout Plain Layout
244 'This is a German word: Tschüß'
247 \begin_layout Plain Layout
256 \begin_layout Standard
257 A floating one-liner with [h] placement and without caption:
258 \begin_inset listings
259 lstparams "fontfamily=tt,fontsize={\large},bgcolor=lightgray,language=ABAP,float=h"
263 \begin_layout Plain Layout
273 \begin_layout Standard
274 Another inline listing:
275 \begin_inset listings
276 lstparams "language=TeX"
280 \begin_layout Plain Layout
283 begin{centering} hello
291 \begin_layout Standard
292 A non-floating listing with line frames and a top caption (Listing
298 \begin_inset CommandInset ref
300 reference "hello-world"
308 \begin_inset listings
309 lstparams "numbers=left,frame=lines,language=C"
313 \begin_layout Plain Layout
315 \begin_inset Caption Standard
317 \begin_layout Plain Layout
319 \begin_inset CommandInset label
334 \begin_layout Plain Layout
338 \begin_layout Plain Layout
342 \begin_layout Plain Layout
348 \begin_layout Plain Layout
352 \begin_layout Plain Layout
361 \begin_layout Standard
362 A non-floating listing with line frames and a bottom caption (Listing
368 \begin_inset CommandInset ref
378 \begin_inset listings
379 lstparams "numbers=left,frame=lines,language=Fortran"
383 \begin_layout Plain Layout
387 \begin_layout Plain Layout
391 \begin_layout Plain Layout
395 \begin_layout Plain Layout
399 \begin_layout Plain Layout
400 end subroutine function
403 \begin_layout Plain Layout
405 \begin_inset Caption Standard
407 \begin_layout Plain Layout
409 \begin_inset CommandInset label
426 A framed floating listing with a caption and a label (Listing
432 \begin_inset CommandInset ref
442 \begin_inset listings
443 lstparams "frame=single,language=Python,float=h"
447 \begin_layout Plain Layout
448 def boring(args = None):
451 \begin_layout Plain Layout
455 \begin_layout Plain Layout
457 \begin_inset Caption Standard
459 \begin_layout Plain Layout
461 \begin_inset CommandInset label
481 \begin_layout Standard
482 The same framed floating listing with a caption, a label and a stray math equation (Listing
488 \begin_inset CommandInset ref
497 ): \begin_inset listings
498 lstparams "frame=single,language=Python,float=h"
502 \begin_layout Plain Layout
503 def boring(args = None):
506 \begin_layout Plain Layout
510 \begin_layout Plain Layout
512 \begin_inset Caption Standard
514 \begin_layout Plain Layout
515 The previous Python function.
516 \begin_inset CommandInset label
524 \begin_inset Formula $y=f(x)$