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