]> git.lyx.org Git - lyx.git/blob - lib/examples/currency.lyx
add romanian splash; add svglobal layout (+fixes to svjour) [bug 1430]; update CREDITS
[lyx.git] / lib / examples / currency.lyx
1 #LyX 1.3 created this file. For more info see http://www.lyx.org/
2 \lyxformat 221
3 \textclass article
4 \begin_preamble
5 \usepackage[eurosym]{eurofont}
6 \end_preamble
7 \language english
8 \inputencoding latin9
9 \fontscheme default
10 \graphics default
11 \paperfontsize default
12 \spacing single
13 \papersize Default
14 \paperpackage a4
15 \use_geometry 0
16 \use_amsmath 0
17 \use_natbib 0
18 \use_numerical_citations 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 can always obtain the euro symbol in your printed document by
65  typing 
66 \family typewriter 
67
68 \backslash 
69 euro{}
70 \family default 
71  in TeX mode, like this : 
72 \begin_inset ERT
73 status Inlined
74
75 \layout Standard
76
77 \backslash 
78 euro{}
79 \end_inset 
80
81 .
82 \layout Standard
83
84 The shape of the symbol in the printed version tends to be better when you
85  install the eurosym package too.
86  It is available at 
87 \begin_inset LatexCommand \url{/fonts/eurosym}
88
89 \end_inset 
90
91  in the CTAN.
92  Then you declare eurofont with the 
93 \family typewriter 
94 eurosym
95 \family default 
96  option, like this : 
97 \family typewriter 
98
99 \backslash 
100 usepackage[eurosym]{eurofont}
101 \family default 
102 .
103 \layout Standard
104
105 As a next step, we'll configure LyX to display a WYSIWYM euro symbol.
106  First you have to select latin9 screen fonts, as the euro is not in the
107  common latin1 encoding.
108  In the 
109 \family sans 
110 Edit\SpecialChar \menuseparator
111 Preferences
112 \family default 
113  popup, enter 
114 \family typewriter 
115 iso8859-15
116 \begin_inset Foot
117 collapsed true
118
119 \layout Standard
120
121 latin9 is the common name for the 
122 \family typewriter 
123 iso8859-15
124 \family default 
125  encoding, and latin1 for 
126 \family typewriter 
127 iso8859-1
128 \family default 
129 .
130 \end_inset 
131
132
133 \family default 
134  in the 
135 \family sans 
136 Screen\SpecialChar ~
137 fonts\SpecialChar \menuseparator
138 Encoding
139 \family default 
140  field, and of course you'll have to choose fonts that are available on
141  your system in this encoding.
142 \layout Standard
143
144 You should properly configure your X server if you want the euro symbol
145  directly on your keyboard.
146  You can also try the keymap files in LyX : 
147 \family typewriter 
148 european.kmap
149 \family default 
150  and 
151 \family typewriter 
152 francais.kmap
153 \family default 
154  should normally support the euro symbol at its usual place.
155  Select your keymap in the 
156 \family sans 
157 Language\SpecialChar \menuseparator
158 Keymap
159 \family default 
160  fields.
161 \layout Standard
162
163 The last step is to tell LyX that the encoding of your document is latin9.
164  You do this in the 
165 \family sans 
166 Format\SpecialChar \menuseparator
167 Document
168 \family default 
169  popup.
170  It requires your LaTeX distribution to have the appropriate 
171 \family typewriter 
172 latin9.def
173 \family default 
174  file for the 
175 \family typewriter 
176 inputenc
177 \family default 
178  package.
179  It is in the recent LaTeX distributions, and is available at 
180 \begin_inset LatexCommand \url{/macros/latex/unpacked}
181
182 \end_inset 
183
184  in the CTAN.
185 \layout Standard
186
187 If you see an euro symbol here : ¤, and not some horrible glyph, that's
188  OK.
189  Now try to view the DVI file.
190  If LaTeX doesn't complain and the printed version seems fine, you're done.
191 \layout Section
192
193 Other currency symbols
194 \layout Standard
195
196 All the symbols we present here are not available with LaTeX natively.
197  But including the eurofont package gives access to all of them.
198 \layout Description
199
200 The\SpecialChar ~
201 cent\SpecialChar ~
202 symbol If your keyboard allows the direct display of the cent symbol
203  ¢, great, if not you'll have to type 
204 \family typewriter 
205
206 \backslash 
207 textcent{}
208 \family default 
209  in TeX mode, like this : 
210 \begin_inset ERT
211 status Inlined
212
213 \layout Standard
214
215 \backslash 
216 textcent{}
217 \end_inset 
218
219 .
220 \layout Description
221
222 The\SpecialChar ~
223 yen\SpecialChar ~
224 symbol Same story as above, typing 
225 \family typewriter 
226
227 \backslash 
228 yen{}
229 \family default 
230 , like this : 
231 \begin_inset ERT
232 status Inlined
233
234 \layout Standard
235
236 \backslash 
237 textyen{}
238 \end_inset 
239
240 , or directly ¥.
241 \layout Description
242
243 The\SpecialChar ~
244 general\SpecialChar ~
245 currency\SpecialChar ~
246 symbol It is a horrible mix of cross and circle.
247  You cannot obtain it on screen together with the euro symbol, because it
248  is corresponding in latin1 to the euro in latin9.
249  You have just to type 
250 \family typewriter 
251
252 \backslash 
253 textcurrency{}
254 \family default 
255  in TeX mode : 
256 \begin_inset ERT
257 status Inlined
258
259 \layout Standard
260
261 \backslash 
262 textcurrency{}
263 \end_inset 
264
265 .
266  If your screen fonts are latin1, you'll see it here : ¤.
267  If they are latin9, you'll have a euro symbol instead.
268 \layout Description
269
270 The\SpecialChar ~
271 vertical\SpecialChar ~
272 broken\SpecialChar ~
273 bar Of course it is not a currency symbol, but it is one
274  that you can't obtain with plain LaTeX, but provided when you include eurofont.
275  You type 
276 \family typewriter 
277
278 \backslash 
279 textbrokenbar{}
280 \family default 
281  in TeX mode : 
282 \begin_inset ERT
283 status Inlined
284
285 \layout Standard
286
287 \backslash 
288 textbrokenbar{}
289 \end_inset 
290
291 .
292  You'll have it on your keyboard if your X configuration is real good, and
293  it will only display with latin1 screen fonts : ¦ .
294  (With latin9 it is an s with a caron.)
295 \the_end