Debian Codegraph @

texmf-dist/doc/latex/smartunits/README.md

raw
1 smartunits
2 ==========
3
4 A [LaTeX](http://en.wikipedia.org/wiki/LaTeX) package that implements
5 automatic conversions between (some) metric and Imperial units. All units are
6 printed using siuntx
7
8 Example
9 -------
10
11 ```tex
12 \documentclass{article}
13 \usepackage{smartunits}
14 \begin{document}
15 \SmartUnitSettings{metric imperial, places=1}
16 \SmartUnit{km=100.0,figures=1} % 100 km (60 mi)
17 \SmartUnit{miles=62.15,places=1} % 100 km (62.2 mi)
18 \SmartUnit{cm=10} % 10 cm (3.9")
19 \SmartUnit{celsius=20} % 20 C (68.0 F)
20 \SmartUnit{miles=5.0} % 8.0 km (5.0 mi)
21 \SmartUnit{miles=5.0, figures=1} % 8 km (5 mi)
22 \SmartUnit{hours=0, minutes=59} % 0:59 (12:59 AM)
23 \SmartUnit{hours=12, minutes=12} % 12:12 (12:12 PM)
24 \SmartUnit{kg=10.0, places=1} % 10.0kg (22.0 lbs)
25 \SmartUnit{pound=10.0,figures=1} % 5kg (10 lbs)
26 \SmartUnit{l=10.0, places=1} % 10.0l (2.6gal)
27 \SmartUnit{L=10.0, places=1,uk} % 10.0L (2.2gal)
28 \end{document}
29 ```
30
31
32 Units supported
33 ---------------
34
35 Currently smartunits converts between the following five classes of units:
36
37 ============ ==============
38 Metric Imperial
39 ------------ -------------- -------------
40 kilometers miles (distance)
41 centimeters feet and inches (length)
42 Celsius Fahrenheit (temperature)
43 24-hour time 12-hour time (time)
44 litres USA/UK gallons (volume)
45 kilograms pounds (weight)
46 ============ ============== =============
47
48 It is quite easy to extend the code to other units. I am happy to consider new requests.
49
50 Requirements
51 ------------
52
53 The package requires
54 [pgfkeys](https://www.ctan.org/pkg/pgfkeys) and
55 [siunitx](https://www.ctan.org/pkg/siunitx).
56
57 ### Author
58
59 Copyright (c) 2016 [Andrew Mathas](mailto:[email protected])
60
61 Released under the [LaTeX Project Public
62 License](http://www.latex-project.org/lppl.txt) v1.3c or later