]> git.lyx.org Git - lyx.git/blobdiff - lib/examples/currency.lyx
Changing ; to # (and testing to commit)
[lyx.git] / lib / examples / currency.lyx
index 020eab2e105a01a42435f47e32c67d5ced0b820e..9a18e805b65ce50f9ce21d380bfcc329329ac2e4 100644 (file)
-#LyX 1.1 created this file. For more info see http://www.lyx.org/
-\lyxformat 218
+#LyX 1.5.0svn created this file. For more info see http://www.lyx.org/
+\lyxformat 245
+\begin_document
+\begin_header
 \textclass article
 \begin_preamble
-\usepackage{eurofont}
-\usepackage{wasysym}
-\usepackage{amssymb}
+\usepackage[eurosym]{eurofont}
 \end_preamble
 \language english
 \inputencoding latin9
 \fontscheme default
 \graphics default
 \paperfontsize default
-\spacing single 
-\papersize Default
-\paperpackage a4
-\use_geometry 0
+\spacing single
+\papersize default
+\use_geometry false
 \use_amsmath 0
+\cite_engine basic
+\use_bibtopic false
 \paperorientation portrait
 \secnumdepth 3
 \tocdepth 3
 \paragraph_separation indent
 \defskip medskip
 \quotes_language english
-\quotes_times 2
 \papercolumns 1
 \papersides 1
 \paperpagestyle default
+\tracking_changes false
+\output_changes true
+\end_header
 
-\layout Title
+\begin_body
+
+\begin_layout Title
 
 Currency symbols and LyX
-\layout Author
+\end_layout
+
+\begin_layout Author
 
 by Adrien Rebollo
-\layout Standard
+\end_layout
+
+\begin_layout Standard
 
 To obtain the main currency symbols with LaTeX, we need to use special packages.
  Here we give a brief description of how to display and print the euro,
  cent, yen and general currency symbols.
  The dollar and the pound need no special trick, so we won't speak about
  them.
-\layout Section
+\end_layout
+
+\begin_layout Section
 
 The euro symbol
-\layout Standard
+\end_layout
+
+\begin_layout Standard
 
 To print the euro symbol, you need to get the eurofont package, available
  at 
 \begin_inset LatexCommand \url{/macros/latex/contrib/supported/eurofont}
 
-\end_inset 
+\end_inset
 
  in the CTAN.
  You'll need therefore to add to the LaTeX preamble of your LyX document
  the command : 
-\family typewriter 
+\family typewriter
 
-\backslash 
+\backslash
 usepackage{eurofont}
-\family default 
+\family default
 .
  See the preamble of this document to figure out.
- Then you obtain the euro symbol by typing 
-\family typewriter 
+ Then you can always obtain the euro symbol in your printed document by
+ typing 
+\family typewriter
 
-\backslash 
+\backslash
 euro{}
-\family default 
+\family default
  in TeX mode, like this : 
-\latex latex 
+\begin_inset ERT
+status inlined
+
+\begin_layout Standard
 
-\backslash 
+\backslash
 euro{}
-\latex default 
+\end_layout
+
+\end_inset
+
 .
-\layout Standard
+\end_layout
+
+\begin_layout Standard
 
-There is another problem with the euro symbol : it is not included in the
- latin1 character encoding.
- So to have the glyph displayed on screen you should select iso8859-15 screen
- fonts.
+The shape of the symbol in the printed version tends to be better when you
+ install the eurosym package too.
+ It is available at 
+\begin_inset LatexCommand \url{/fonts/eurosym}
+
+\end_inset
+
+ in the CTAN.
+ Then you declare eurofont with the 
+\family typewriter
+eurosym
+\family default
+ option, like this : 
+\family typewriter
+
+\backslash
+usepackage[eurosym]{eurofont}
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+
+As a next step, we'll configure LyX to display a WYSIWYM euro symbol.
+ First you have to select latin9 screen fonts, as the euro is not in the
+ common latin1 encoding.
  In the 
-\family sans 
+\family sans
 Edit\SpecialChar \menuseparator
 Preferences
-\family default 
- popup, you enter 
-\family typewriter 
+\family default
+ popup, enter 
+\family typewriter
+iso8859-15
+\begin_inset Foot
+status collapsed
+
+\begin_layout Standard
+
+latin9 is the common name for the 
+\family typewriter
 iso8859-15
-\family default 
+\family default
+ encoding, and latin1 for 
+\family typewriter
+iso8859-1
+\family default
+.
+\end_layout
+
+\end_inset
+
+
+\family default
  in the 
-\family sans 
-Screen\SpecialChar ~
+\family sans
+Screen\InsetSpace ~
 fonts\SpecialChar \menuseparator
 Encoding
-\family default 
+\family default
  field, and of course you'll have to choose fonts that are available on
  your system in this encoding.
- You also need to choose an appropriate keymap file : 
-\family typewriter 
+\end_layout
+
+\begin_layout Standard
+
+You should properly configure your X server if you want the euro symbol
+ directly on your keyboard.
+ You can also try the keymap files in LyX : 
+\family typewriter
 european.kmap
-\family default 
+\family default
  and 
-\family typewriter 
+\family typewriter
 francais.kmap
-\family default 
+\family default
  should normally support the euro symbol at its usual place.
  Select your keymap in the 
-\family sans 
+\family sans
 Language\SpecialChar \menuseparator
 Keymap
-\family default 
+\family default
  fields.
-\layout Standard
+\end_layout
+
+\begin_layout Standard
 
 The last step is to tell LyX that the encoding of your document is latin9.
  You do this in the 
-\family sans 
+\family sans
 Format\SpecialChar \menuseparator
 Document
-\family default 
+\family default
  popup.
  It requires your LaTeX distribution to have the appropriate 
-\family typewriter 
+\family typewriter
 latin9.def
-\family default 
+\family default
  file for the 
-\family typewriter 
+\family typewriter
 inputenc
-\family default 
+\family default
  package.
- It is in my tetex-1.0 distribution, and I have understood that it is provided
- by the 
-\family typewriter 
-latex2html
-\family default 
- program, which you can grab here : 
-\begin_inset LatexCommand \url{http://saftsack.fs.uni-bayreuth.de/~latex2ht/}
+ It is in the recent LaTeX distributions, and is available at 
+\begin_inset LatexCommand \url{/macros/latex/unpacked}
 
-\end_inset 
+\end_inset
 
-.
-\layout Standard
+ in the CTAN.
+\end_layout
+
+\begin_layout Standard
 
 If you see an euro symbol here : ¤, and not some horrible glyph, that's
  OK.
  Now try to view the DVI file.
  If LaTeX doesn't complain and the printed version seems fine, you're done.
-\layout Section
+\end_layout
 
-The cent symbol
-\layout Standard
+\begin_layout Section
 
-The cent symbol is currently not available with LaTeX natively.
- You need to have the package wasysym, which should be included in your
- distribution.
- You can get it at 
-\begin_inset LatexCommand \url{/macro/latex/contrib/supported/wasysym}
+Other currency symbols
+\end_layout
 
-\end_inset 
+\begin_layout Standard
 
- in the CTAN.
- Then you insert the command : 
-\family typewriter 
-
-\backslash 
-usepackage{wasysym}
-\family default 
- in your LaTeX preamble.
- If your keymap allows the direct display of the cent symbol, great, if
- not you'll have to type 
-\family typewriter 
-
-\backslash 
-cent{}
-\family default 
+All the symbols we present here are not available with LaTeX natively.
+ But including the eurofont package gives access to all of them.
+\end_layout
+
+\begin_layout Description
+
+The\InsetSpace ~
+cent\InsetSpace ~
+symbol If your keyboard allows the direct display of the cent symbol
¢, great, if not you'll have to type 
+\family typewriter
+
+\backslash
+textcent{}
+\family default
  in TeX mode, like this : 
-\latex latex 
+\begin_inset ERT
+status inlined
 
-\backslash 
-cent{}
-\latex default 
-.
-\layout Section
+\begin_layout Standard
+
+\backslash
+textcent{}
+\end_layout
 
-The yen symbol
-\layout Standard
+\end_inset
 
-For the yen, it is the same story as above, but with the package amssymb,
- or amsfonts, available at 
-\begin_inset LatexCommand \url{/fonts/amsfonts}
+.
+\end_layout
 
-\end_inset 
+\begin_layout Description
 
- in the CTAN, and typing 
-\family typewriter 
+The\InsetSpace ~
+yen\InsetSpace ~
+symbol Same story as above, typing 
+\family typewriter
 
-\backslash 
+\backslash
 yen{}
-\family default 
+\family default
 , like this : 
-\latex latex 
+\begin_inset ERT
+status inlined
 
-\backslash 
-yen{}
-\latex default 
-.
-\layout Section
+\begin_layout Standard
+
+\backslash
+textyen{}
+\end_layout
 
-The general currency symbol
-\layout Standard
+\end_inset
 
-You know, it is the horrible little mix of cross and circle.
+, or directly ¥.
+\end_layout
+
+\begin_layout Description
+
+The\InsetSpace ~
+general\InsetSpace ~
+currency\InsetSpace ~
+symbol It is a horrible mix of cross and circle.
  You cannot obtain it on screen together with the euro symbol, because it
- is the latin1 character replaced by the euro in latin9.
- But you can always obtain it by including the 
-\family typewriter 
-wasysym
-\family default 
- package in the preamble, and by typing 
-\family typewriter 
-
-\backslash 
-currency{}
-\family default 
+ is corresponding in latin1 to the euro in latin9.
+ You have just to type 
+\family typewriter
+
+\backslash
+textcurrency{}
+\family default
  in TeX mode : 
-\latex latex 
+\begin_inset ERT
+status inlined
+
+\begin_layout Standard
+
+\backslash
+textcurrency{}
+\end_layout
+
+\end_inset
 
-\backslash 
-currency{}
-\latex default 
 .
-\layout Section
-
-The vertical broken bar
-\layout Standard
-
-Of course it is not a currency symbol, but it is one that you can't obtain
- with plain LaTeX, so let's tell something about it.
- You must include the 
-\family typewriter 
-wasysym
-\family default 
- package, and type 
-\family typewriter 
-
-\backslash 
-brokenvert{}
-\family default 
+ If your screen fonts are latin1, you'll see it here : ¤.
+ If they are latin9, you'll have a euro symbol instead.
+\end_layout
+
+\begin_layout Description
+
+The\InsetSpace ~
+vertical\InsetSpace ~
+broken\InsetSpace ~
+bar Of course it is not a currency symbol, but it is one
+ that you can't obtain with plain LaTeX, but provided when you include eurofont.
+ You type 
+\family typewriter
+
+\backslash
+textbrokenbar{}
+\family default
  in TeX mode : 
-\latex latex 
+\begin_inset ERT
+status inlined
 
-\backslash 
-brokenvert{}
-\latex default 
-.
-\layout Section
+\begin_layout Standard
 
-Conclusion
-\layout Standard
+\backslash
+textbrokenbar{}
+\end_layout
 
-Here we are, view the DVI, and complain to 
-\begin_inset LatexCommand \url{adrien.rebollo@gmx.fr}
+\end_inset
 
-\end_inset 
+.
+ You'll have it on your keyboard if your X configuration is real good, and
+ it will only display with latin1 screen fonts : ¦ .
+ (With latin9 it is an s with a caron.)
+\end_layout
 
- if you run into problems.
-\the_end
+\end_body
+\end_document