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