1 #LyX 2.4 created this file. For more info see https://www.lyx.org/
5 \save_transient_properties true
6 \origin /systemlyxdir/examples/Graphics_and_Insets/
10 \definecolor{lgray}{rgb}{0.95, 0.95, 0.95}
12 \use_default_options true
13 \maintain_unincluded_children no
15 \language_package default
18 \font_roman "default" "default"
19 \font_sans "default" "default"
20 \font_typewriter "default" "default"
21 \font_math "auto" "auto"
22 \font_default_family default
23 \use_non_tex_fonts false
26 \font_typewriter_osf 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
37 \paperfontsize default
42 \use_package amsmath 1
43 \use_package amssymb 1
46 \use_package mathdots 1
47 \use_package mathtools 1
49 \use_package stackrel 1
50 \use_package stmaryrd 1
51 \use_package undertilde 1
53 \cite_engine_type default
57 \paperorientation portrait
69 \paragraph_separation indent
70 \paragraph_indentation default
72 \math_numbering_side default
77 \paperpagestyle default
78 \listings_params "breaklines=true"
79 \tracking_changes false
80 \postpone_fragile_content false
89 \begin_layout Standard
90 \begin_inset Note Note
93 \begin_layout Plain Layout
94 This example shows how to typeset code listings in a document using the
98 \begin_layout Plain Layout
99 Other than the minted package, you also need the pygments python module.
100 See the minted documentation for directions on how to install it and what
101 you have to do for using it with LaTeX.
102 If you use a linux system, you can possibly install a suitable package
103 through your package manager.
104 Look for python packages named
116 \begin_layout Standard
117 A common example of a C program is shown in Listing
122 \begin_inset CommandInset ref
131 using the default style, a light gray background, visible spaces, and numbered
133 The listing of some fortran code using the
137 style is instead shown in a non-floating listing below.
140 \begin_layout Standard
141 \begin_inset listings
142 lstparams "language=C,float=t,numbers=left,showspaces=true,bgcolor=lgray"
146 \begin_layout Plain Layout
151 \begin_layout Plain Layout
156 \begin_layout Plain Layout
159 \begin_inset Quotes eld
165 \begin_inset Quotes erd
171 \begin_layout Plain Layout
176 \begin_layout Plain Layout
181 \begin_layout Plain Layout
183 \begin_inset Caption Standard
185 \begin_layout Plain Layout
187 \begin_inset CommandInset label
206 \begin_layout Standard
207 \begin_inset listings
208 lstparams "language=Fortran,frame=lines,style=bw"
212 \begin_layout Plain Layout
214 * Compute machine precision
217 \begin_layout Plain Layout
221 \begin_layout Plain Layout
223 implicit double precision (a-h,o-z)
226 \begin_layout Plain Layout
231 \begin_layout Plain Layout
236 \begin_layout Plain Layout
241 \begin_layout Plain Layout
246 \begin_layout Plain Layout
252 \begin_layout Plain Layout
254 write(*,'(1pg24.17)') eps
257 \begin_layout Plain Layout
262 \begin_layout Plain Layout
272 \begin_layout Standard
273 Here is an inline listing of some TeX code:
274 \begin_inset listings
275 lstparams "language=TeX,fontfamily=tt"
279 \begin_layout Plain Layout