Coder Social home page Coder Social logo

meteoswiss / metsymb Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 1.74 MB

The metsymb LaTeX package provides dedicated TeX commands to generate (vectorial) meteorological symbols.

License: BSD 3-Clause "New" or "Revised" License

TeX 97.60% Shell 1.52% Python 0.88%

metsymb's Introduction

metsymb

DOI

metsymb is a LaTeX package that introduces vectorial definitions of official meteorological symbols. Individual symbols are first designed using TikZ. They are then bundled into a dedicated font with FontForge, and eventually tied to dedicted LaTeX commands. The metsymb OpenType font is a side-product that can be used on its own.

This README contains information about the metsymb source code and repository.

For the description of the metsymb LaTeX package, see this file.

Table of contents

License and Copyright

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.

The copyright (C) 2021-2023 of metsymb is owned by MeteoSwiss. The contributors to the code are listed in AUTHORS.

Installation

Depending on your needs, you may want to install metsymb:

Install metsymb as a LaTeX package

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 manager to install metsymb, given that it lives on CTAN.

Should you be willing/required to install the package manually nonetheless, here are some guidelines:

  1. Download the latest metsymb release. If you are interested in the latest changes, you can also clone the metsymb Github repo directly.

  2. Create the TeX .sty file:

    cd some/path/to/metsymb/source/
    latex metsymb.ins
    
  3. Many of the package files will need to be placed under specific locations within your TeX-tree, which I shall call tex_loc for simplicity.

    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:

    Having identified your tex_loc, place the following files where they belong in the tree:

    cp metsymb.tfm tex_loc/fonts/tfm/public/metsymb/
    cp metsymb.afm tex_loc/fonts/afm/public/metsymb/
    cp metsymb.pfb tex_loc/fonts/type1/public/metsymb/
    cp metsymb.otf tex_loc/fonts/opentype/public/metsymb/
    cp umetsymb.fd tex_loc/tex/latex/metsymb/
    cp metsymb.sty tex_loc/tex/latex/metsymb/
    cp metsymb.map tex_loc/fonts/map/dvips/metsymb/
    cp metsymb.enc tex_loc/fonts/enc/dvips/metsymb/
    
  4. At this point, we need to tell TeX about these new files. Run the following commands to do so:

    sudo mktexlsr
    sudo updmap-sys --enable Map metsymb.map
    sudo updmap-sys
    

    โš ๏ธ sudo is required under OS X, but not necessarily elsewhere ?

    ๐Ÿ‘‹ 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 !

And that's it !

You should now be able to compile the metsymb documentation with the command: pdflatex metsymb.dtx.

You should also be able to run the Python example with the command: python metsymb_mwe.py.

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. ๐ŸŽ‰

Installing metsymb as an OpenType font

Deploy the metsymb.otf file on your system like you would any other OpenType font, and you should have access to its symbols in your favorite text editor.

Troubleshooting and bug reports

If you encounter any issue when installing or using metsymb, you can check if it has already been reported here. If not, please create a new Github Issue to report it and get help.

Suggesting new symbols

If your favorite meteorological symbol is not yet included in metsymb, you can suggest its inclusion by creating a new Discussion on Github.

Contributing

If you simply cannot wait to see your favorite symbol included inside metsymb, you should check our contributing guidelines.

metsymb's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

metsymb's Issues

[BUG]: releases ZIP are not CTAN compliant

Is there already an issue for this?

  • I found no existing ticket for this bug.

Describe the bug

The following feedback was received from the CTAN gurus upon the first upload:

  1. The ZIP file should contain a top level directory simply with name metsymb\
  2. The files in the ZIP archive had bad permissions 755. They need to be corrected to 644.

Steps to reproduce

Trigger a new release ...

Relevant log output

No response

Environment

metsymb 1.2.0

Code of Conduct

  • I agree to follow the metsymb Code of Conduct.

[SYMB]: CL, CH, CM cloud symbols

Describe the new symbol
The International Cloud Atlas from the WMO defines a series of symbols associated to the different CL, CM and CH codes.

Justification
These are defined by the WMO, and as such a meaningful addition to metsymb.

Detailed specs and image
The images are here. However, there are some distinct differences, for some of these, with the cloud genera symbols. For example:

  • are \nimbostratus and CM-2 supposed to be the same ? And if not, shouldn't the incline still be the same angle (40 deg in \nimbostratus) ?
  • Should \cumulus and CL-2 be the same ?
  • Should \cirrostratus and CL-6 be the same ?
  • ...

These questions should be clarified before we move to the implementation inside metsymb, to ensure the most coherent look possible between the symbols, and across the entire metsymb font.

Pre-existing ?
Can't find vectorial versions anywhere obvious ...

[SYMB]: cloud symbols

Describe the new symbols
The 10 cloud symbols would make for a nice addition to metsymb.

Justification
These are official WMO symbols useful for scientific work.

Detailed specs and image
Official WMO page

Pre-existing ?
Can't find them in LaTeX ...

Using oktasymb with all matplotlib backends

At the moment, because oktasymb relies on tikz to create the okta symbols, their inclusion in matplotlib figures requires to use the pgf backend. See this link and that link for details.

One big limitation of this approach is that the different okta symbols cannot be display in matplotlib figures on-screen, or with any other backend.

It would be great to improve this, maybe with pict2e ? Or the assembly of a proper "font" ? See here for what the LaTeX hive mind has to suggest on that front.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.