]> git.lyx.org Git - lyx.git/blob - lib/examples/currency.lyx
xpm -> png
[lyx.git] / lib / examples / currency.lyx
1 #LyX 1.5.0svn created this file. For more info see http://www.lyx.org/
2 \lyxformat 276
3 \begin_document
4 \begin_header
5 \textclass article
6 \begin_preamble
7 \usepackage[eurosym]{eurofont}
8 \end_preamble
9 \language english
10 \inputencoding latin9
11 \font_roman default
12 \font_sans default
13 \font_typewriter default
14 \font_default_family default
15 \font_sc false
16 \font_osf false
17 \font_sf_scale 100
18 \font_tt_scale 100
19 \graphics default
20 \paperfontsize default
21 \spacing single
22 \papersize default
23 \use_geometry false
24 \use_amsmath 0
25 \use_esint 0
26 \cite_engine basic
27 \use_bibtopic false
28 \paperorientation portrait
29 \secnumdepth 3
30 \tocdepth 3
31 \paragraph_separation indent
32 \defskip medskip
33 \quotes_language english
34 \papercolumns 1
35 \papersides 1
36 \paperpagestyle default
37 \tracking_changes false
38 \output_changes false
39 \end_header
40
41 \begin_body
42
43 \begin_layout Title
44
45 Currency symbols and LyX
46 \end_layout
47
48 \begin_layout Author
49
50 by Adrien Rebollo
51 \end_layout
52
53 \begin_layout Standard
54
55 To obtain the main currency symbols with LaTeX, we need to use special packages.
56  Here we give a brief description of how to display and print the euro,
57  cent, yen and general currency symbols.
58  The dollar and the pound need no special trick, so we won't speak about
59  them.
60 \end_layout
61
62 \begin_layout Section
63
64 The euro symbol
65 \end_layout
66
67 \begin_layout Standard
68
69 To print the euro symbol, you need to get the eurofont package, available
70  at 
71 \begin_inset LatexCommand url
72 target "/macros/latex/contrib/supported/eurofont"
73 \end_inset
74
75  in the CTAN.
76  You'll need therefore to add to the LaTeX preamble of your LyX document
77  the command :
78 \family default
79  
80 \family typewriter
81
82 \backslash
83 usepackage{eurofont}
84 \family default
85 .
86  See the preamble of this document to figure out.
87  Then you can always obtain the euro symbol in your printed document by
88  typing
89 \family default
90  
91 \family typewriter
92
93 \backslash
94 euro{}
95 \family default
96  in TeX mode, like this : 
97 \begin_inset ERT
98 status inlined
99
100 \begin_layout Standard
101
102 \backslash
103 euro{}
104 \end_layout
105
106 \end_inset
107
108 .
109 \end_layout
110
111 \begin_layout Standard
112
113 The shape of the symbol in the printed version tends to be better when you
114  install the eurosym package too.
115  It is available at 
116 \begin_inset LatexCommand url
117 target "/fonts/eurosym"
118 \end_inset
119
120  in the CTAN.
121  Then you declare eurofont with the
122 \family default
123  
124 \family typewriter
125 eurosym
126 \family default
127  option, like this :
128 \family default
129  
130 \family typewriter
131
132 \backslash
133 usepackage[eurosym]{eurofont}
134 \family default
135 .
136 \end_layout
137
138 \begin_layout Standard
139
140 As a next step, we'll configure LyX to display a WYSIWYM euro symbol.
141  First you have to select latin9 screen fonts, as the euro is not in the
142  common latin1 encoding.
143  In the
144 \family default
145  
146 \family sans
147 Edit\SpecialChar \menuseparator
148 Preferences
149 \family default
150  popup, enter
151 \family default
152  
153 \family typewriter
154 iso8859-15
155 \begin_inset Foot
156 status collapsed
157
158 \begin_layout Standard
159
160 latin9 is the common name for the
161 \family default
162  
163 \family typewriter
164 iso8859-15
165 \family default
166  encoding, and latin1 for
167 \family default
168  
169 \family typewriter
170 iso8859-1
171 \family default
172 .
173 \end_layout
174
175 \end_inset
176
177
178 \family default
179  in the
180 \family default
181  
182 \family sans
183 Screen\InsetSpace ~
184 fonts\SpecialChar \menuseparator
185 Encoding
186 \family default
187  field, and of course you'll have to choose fonts that are available on
188  your system in this encoding.
189 \end_layout
190
191 \begin_layout Standard
192
193 You should properly configure your X server if you want the euro symbol
194  directly on your keyboard.
195  You can also try the keymap files in LyX :
196 \family default
197  
198 \family typewriter
199 european.kmap
200 \family default
201  and
202 \family default
203  
204 \family typewriter
205 francais.kmap
206 \family default
207  should normally support the euro symbol at its usual place.
208  Select your keymap in the
209 \family default
210  
211 \family sans
212 Language\SpecialChar \menuseparator
213 Keymap
214 \family default
215  fields.
216 \end_layout
217
218 \begin_layout Standard
219
220 The last step is to tell LyX that the encoding of your document is latin9.
221  You do this in the
222 \family default
223  
224 \family sans
225 Format\SpecialChar \menuseparator
226 Document
227 \family default
228  popup.
229  It requires your LaTeX distribution to have the appropriate
230 \family default
231  
232 \family typewriter
233 latin9.def
234 \family default
235  file for the
236 \family default
237  
238 \family typewriter
239 inputenc
240 \family default
241  package.
242  It is in the recent LaTeX distributions, and is available at 
243 \begin_inset LatexCommand url
244 target "/macros/latex/unpacked"
245 \end_inset
246
247  in the CTAN.
248 \end_layout
249
250 \begin_layout Standard
251
252 If you see an euro symbol here : €, and not some horrible glyph, that's
253  OK.
254  Now try to view the DVI file.
255  If LaTeX doesn't complain and the printed version seems fine, you're done.
256 \end_layout
257
258 \begin_layout Section
259
260 Other currency symbols
261 \end_layout
262
263 \begin_layout Standard
264
265 All the symbols we present here are not available with LaTeX natively.
266  But including the eurofont package gives access to all of them.
267 \end_layout
268
269 \begin_layout Description
270
271 The\InsetSpace ~
272 cent\InsetSpace ~
273 symbol If your keyboard allows the direct display of the cent symbol
274  ¢, great, if not you'll have to type
275 \family default
276  
277 \family typewriter
278
279 \backslash
280 textcent{}
281 \family default
282  in TeX mode, like this : 
283 \begin_inset ERT
284 status inlined
285
286 \begin_layout Standard
287
288 \backslash
289 textcent{}
290 \end_layout
291
292 \end_inset
293
294 .
295 \end_layout
296
297 \begin_layout Description
298
299 The\InsetSpace ~
300 yen\InsetSpace ~
301 symbol Same story as above, typing
302 \family default
303  
304 \family typewriter
305
306 \backslash
307 yen{}
308 \family default
309 , like this : 
310 \begin_inset ERT
311 status inlined
312
313 \begin_layout Standard
314
315 \backslash
316 textyen{}
317 \end_layout
318
319 \end_inset
320
321 , or directly ¥.
322 \end_layout
323
324 \begin_layout Description
325
326 The\InsetSpace ~
327 general\InsetSpace ~
328 currency\InsetSpace ~
329 symbol It is a horrible mix of cross and circle.
330  You cannot obtain it on screen together with the euro symbol, because it
331  is corresponding in latin1 to the euro in latin9.
332  You have just to type
333 \family default
334  
335 \family typewriter
336
337 \backslash
338 textcurrency{}
339 \family default
340  in TeX mode : 
341 \begin_inset ERT
342 status inlined
343
344 \begin_layout Standard
345
346 \backslash
347 textcurrency{}
348 \end_layout
349
350 \end_inset
351
352 .
353  If your screen fonts are latin1, you'll see it here : €.
354  If they are latin9, you'll have a euro symbol instead.
355 \end_layout
356
357 \begin_layout Description
358
359 The\InsetSpace ~
360 vertical\InsetSpace ~
361 broken\InsetSpace ~
362 bar Of course it is not a currency symbol, but it is one
363  that you can't obtain with plain LaTeX, but provided when you include eurofont.
364  You type
365 \family default
366  
367 \family typewriter
368
369 \backslash
370 textbrokenbar{}
371 \family default
372  in TeX mode : 
373 \begin_inset ERT
374 status inlined
375
376 \begin_layout Standard
377
378 \backslash
379 textbrokenbar{}
380 \end_layout
381
382 \end_inset
383
384 .
385  You'll have it on your keyboard if your X configuration is real good, and
386  it will only display with latin1 screen fonts : Š .
387  (With latin9 it is an s with a caron.)
388 \end_layout
389
390 \end_body
391 \end_document