Debian Codegraph @

texmf-dist/doc/fonts/metsymb/README.md

raw
1 # metsymb
2
3 metsymb is a **LaTeX package** that introduces vectorial definitions of professional meteorological symbols. Individual symbols are first designed using [TikZ](https://www.ctan.org/pkg/pgf). They are then bundled into a dedicated font with [FontForge](https://fontforge.org/en-US/), and eventually tied to dedicted LaTeX commands. The metsymb **OpenType font** is a side-product that can be used on its own.
4
5 This README contains information about the metsymb source code and repository.
6
7 **For the description of the metsymb LaTeX package, see [this file](source/metsymb.pdf).**
8
9
10 ## Table of contents
11
12 - [License and Copyright](#license-and-copyright)
13 - [Installation](#installation)
14 - [Troubleshooting and bug reports](#troubleshooting-and-bug-reports)
15 - [Suggesting new symbols](#suggesting-new-symbols)
16 - [Contributing](#contributing)
17
18
19 ## License and Copyright
20
21 The metsymb package is released under the terms of the BSD-3-Clause license. The terms of this license are available at https://opensource.org/licenses/BSD-3-Clause, and in the LICENSE file included in the package.
22
23 The copyright (C) 2021-2023 of metsymb is owned by MeteoSwiss. The contributors to the code are listed in AUTHORS.
24
25
26 ## Installation
27
28 Depending on your needs, you may want to install metsymb:
29 - [as a LaTeX package](#install-metsymb-as-a-latex-package), or
30 - [as an OpenType font](#install-metsymb-as-an-opentype-font)
31
32
33 ### Install metsymb as a LaTeX package
34 Since metsymb includes a new font, its manual installation is a bit hairier (:scream:) than regular packages. **It is thus strongly recommended to use your favorite TeX package
35 manager to install metsymb, given that it lives on CTAN**.
36
37 Should you be willing/requireds to install the package manually nonetheless, here are some guidelines:
38
39 1. Download the latest metsymb [release](https://github.com/MeteoSwiss/metsymb/releases).
40 If you are interested in the latest changes, you can also clone the [metsymb Github repo](https://github.com/MeteoSwiss/metsymb) directly.
41
42 2. Create the TeX `.sty` file:
43 ```
44 cd some/path/to/metsymb/source/
45 latex metsymb.ins
46 ```
47
48 3. Many of the package files will need to be placed under specific locations within your TeX-tree,
49 which I shall call `tex_loc` for simplicity.
50
51 In my case (Mac OSX 10.15), `tex_loc = /usr/local/texlive/2020/texmf-dist/`. To find your own `tex_loc`, you can try the following command: `kpsewhich --var-value=TEXMFLOCAL`. In case of trouble, the following resources may prove useful:
52 * https://tex.stackexchange.com/questions/88423/manual-font-installation
53 * https://tug.org/fonts/fontinstall.html
54
55 Having identified your `tex_loc`, place the following files where they belong in the tree:
56 ```
57 cp metsymb.tfm tex_loc/fonts/tfm/public/metsymb/
58 cp metsymb.afm tex_loc/fonts/afm/public/metsymb/
59 cp metsymb.pfb tex_loc/fonts/type1/public/metsymb/
60 cp metsymb.otf tex_loc/fonts/opentype/public/metsymb/
61 cp umetsymb.fd tex_loc/tex/latex/metsymb/
62 cp metsymb.sty tex_loc/tex/latex/metsymb/
63 cp metsymb.map tex_loc/fonts/map/dvips/metsymb/
64 cp metsymb.enc tex_loc/fonts/enc/dvips/metsymb/
65 ```
66
67 4. At this point, we need to tell TeX about these new files. Run the following commands to do so:
68 ```
69 sudo mktexlsr
70 sudo updmap-sys --enable Map metsymb.map
71 sudo updmap-sys
72 ```
73 :warning: `sudo` is required under OS X, but not necessarily elsewhere ?
74
75 :wave: The bash file `manual_install.sh` can be used to automate these different steps with the command `sh manual_install.sh`. Before you run it blindly, **mind the TeX-tree paths in there, that will most certainly need to be adjusted to your needs !**
76
77 And that's it !
78
79 You should now be able to compile the metsymb documentation with the command: `pdflatex metsymb.dtx`.
80
81 You should also be able to run the Python example with the command: `python metsymb_mwe.py`.
82
83 If these two commands work, you have successfully installed the metsymb package manually, and can now access it in your LateX documents and matplotlib figures. :tada:
84
85
86 ### Installing metsymb as an OpenType font
87
88 Deploy the [`metsymb.otf`](https://github.com/MeteoSwiss/metsymb/blob/develop/metsymb/metsymb.otf) file on your system like you would any other OpenType font, and you should
89 have access to its symbols in your favorite text editor.
90
91
92 ## Troubleshooting and bug reports
93
94 If you encounter any issue when installing or using metsymb, you can check if it has already been reported [here](https://github.com/MeteoSwiss/metsymb/issues?q=is%3Aissue). If not, please create a new [Github Issue](https://github.com/MeteoSwiss/metsymb/issues) to report it and get help.
95
96
97 ## Suggesting new symbols
98
99 If your favorite meteorological symbol is not yet included in metsymb,
100 you can suggest its inclusion by creating a new [Github Issue](https://github.com/MeteoSwiss/metsymb/).
101
102 ## Contributing
103
104 If you simply cannot wait to see your favorite symbol included inside metsymb, you should check our [contributing guidelines](CONTRIBUTING.md).