]> git.lyx.org Git - lyx.git/blob - lib/examples/currency.lyx
cxx compile fixes ; several patches from John
[lyx.git] / lib / examples / currency.lyx
1 #LyX 1.1 created this file. For more info see http://www.lyx.org/
2 \lyxformat 218
3 \textclass article
4 \begin_preamble
5 \usepackage{eurofont}
6 \usepackage{wasysym}
7 \usepackage{amssymb}
8 \end_preamble
9 \language english
10 \inputencoding latin9
11 \fontscheme default
12 \graphics default
13 \paperfontsize default
14 \spacing single 
15 \papersize Default
16 \paperpackage a4
17 \use_geometry 0
18 \use_amsmath 0
19 \paperorientation portrait
20 \secnumdepth 3
21 \tocdepth 3
22 \paragraph_separation indent
23 \defskip medskip
24 \quotes_language english
25 \quotes_times 2
26 \papercolumns 1
27 \papersides 1
28 \paperpagestyle default
29
30 \layout Title
31
32 Currency symbols and LyX
33 \layout Author
34
35 by Adrien Rebollo
36 \layout Standard
37
38 To obtain the main currency symbols with LaTeX, we need to use special packages.
39  Here we give a brief description of how to display and print the euro,
40  cent, yen and general currency symbols.
41  The dollar and the pound need no special trick, so we won't speak about
42  them.
43 \layout Section
44
45 The euro symbol
46 \layout Standard
47
48 To print the euro symbol, you need to get the eurofont package, available
49  at 
50 \begin_inset LatexCommand \url{/macros/latex/contrib/supported/eurofont}
51
52 \end_inset 
53
54  in the CTAN.
55  You'll need therefore to add to the LaTeX preamble of your LyX document
56  the command : 
57 \family typewriter 
58
59 \backslash 
60 usepackage{eurofont}
61 \family default 
62 .
63  See the preamble of this document to figure out.
64  Then you obtain the euro symbol by typing 
65 \family typewriter 
66
67 \backslash 
68 euro{}
69 \family default 
70  in TeX mode, like this : 
71 \latex latex 
72
73 \backslash 
74 euro{}
75 \latex default 
76 .
77 \layout Standard
78
79 There is another problem with the euro symbol : it is not included in the
80  latin1 character encoding.
81  So to have the glyph displayed on screen you should select iso8859-15 screen
82  fonts.
83  In the 
84 \family sans 
85 Edit\SpecialChar \menuseparator
86 Preferences
87 \family default 
88  popup, you enter 
89 \family typewriter 
90 iso8859-15
91 \family default 
92  in the 
93 \family sans 
94 Screen\SpecialChar ~
95 fonts\SpecialChar \menuseparator
96 Encoding
97 \family default 
98  field, and of course you'll have to choose fonts that are available on
99  your system in this encoding.
100  You also need to choose an appropriate keymap file : 
101 \family typewriter 
102 european.kmap
103 \family default 
104  and 
105 \family typewriter 
106 francais.kmap
107 \family default 
108  should normally support the euro symbol at its usual place.
109  Select your keymap in the 
110 \family sans 
111 Language\SpecialChar \menuseparator
112 Keymap
113 \family default 
114  fields.
115 \layout Standard
116
117 The last step is to tell LyX that the encoding of your document is latin9.
118  You do this in the 
119 \family sans 
120 Format\SpecialChar \menuseparator
121 Document
122 \family default 
123  popup.
124  It requires your LaTeX distribution to have the appropriate 
125 \family typewriter 
126 latin9.def
127 \family default 
128  file for the 
129 \family typewriter 
130 inputenc
131 \family default 
132  package.
133  It is in my tetex-1.0 distribution, and I have understood that it is provided
134  by the 
135 \family typewriter 
136 latex2html
137 \family default 
138  program, which you can grab here : 
139 \begin_inset LatexCommand \url{http://saftsack.fs.uni-bayreuth.de/~latex2ht/}
140
141 \end_inset 
142
143 .
144 \layout Standard
145
146 If you see an euro symbol here : ยค, and not some horrible glyph, that's
147  OK.
148  Now try to view the DVI file.
149  If LaTeX doesn't complain and the printed version seems fine, you're done.
150 \layout Section
151
152 The cent symbol
153 \layout Standard
154
155 The cent symbol is currently not available with LaTeX natively.
156  You need to have the package wasysym, which should be included in your
157  distribution.
158  You can get it at 
159 \begin_inset LatexCommand \url{/macro/latex/contrib/supported/wasysym}
160
161 \end_inset 
162
163  in the CTAN.
164  Then you insert the command : 
165 \family typewriter 
166
167 \backslash 
168 usepackage{wasysym}
169 \family default 
170  in your LaTeX preamble.
171  If your keymap allows the direct display of the cent symbol, great, if
172  not you'll have to type 
173 \family typewriter 
174
175 \backslash 
176 cent{}
177 \family default 
178  in TeX mode, like this : 
179 \latex latex 
180
181 \backslash 
182 cent{}
183 \latex default 
184 .
185 \layout Section
186
187 The yen symbol
188 \layout Standard
189
190 For the yen, it is the same story as above, but with the package amssymb,
191  or amsfonts, available at 
192 \begin_inset LatexCommand \url{/fonts/amsfonts}
193
194 \end_inset 
195
196  in the CTAN, and typing 
197 \family typewriter 
198
199 \backslash 
200 yen{}
201 \family default 
202 , like this : 
203 \latex latex 
204
205 \backslash 
206 yen{}
207 \latex default 
208 .
209 \layout Section
210
211 The general currency symbol
212 \layout Standard
213
214 You know, it is the horrible little mix of cross and circle.
215  You cannot obtain it on screen together with the euro symbol, because it
216  is the latin1 character replaced by the euro in latin9.
217  But you can always obtain it by including the 
218 \family typewriter 
219 wasysym
220 \family default 
221  package in the preamble, and by typing 
222 \family typewriter 
223
224 \backslash 
225 currency{}
226 \family default 
227  in TeX mode : 
228 \latex latex 
229
230 \backslash 
231 currency{}
232 \latex default 
233 .
234  
235 \layout Section
236
237 The vertical broken bar
238 \layout Standard
239
240 Of course it is not a currency symbol, but it is one that you can't obtain
241  with plain LaTeX, so let's tell something about it.
242  You must include the 
243 \family typewriter 
244 wasysym
245 \family default 
246  package, and type 
247 \family typewriter 
248
249 \backslash 
250 brokenvert{}
251 \family default 
252  in TeX mode : 
253 \latex latex 
254
255 \backslash 
256 brokenvert{}
257 \latex default 
258 .
259 \layout Section
260
261 Conclusion
262 \layout Standard
263
264 Here we are, view the DVI, and complain to 
265 \begin_inset LatexCommand \url{adrien.rebollo@gmx.fr}
266
267 \end_inset 
268
269  if you run into problems.
270 \the_end