Debian Codegraph @

texmf-dist/source/latex/siunitx/siunitx-binary.dtx

raw
1 % \iffalse meta-comment
2 %
3 % File: siunitx-binary.dtx Copyright (C) 2021,2023,2024,2026 Joseph Wright
4 %
5 % It may be distributed and/or modified under the conditions of the
6 % LaTeX Project Public License (LPPL), either version 1.3c of this
7 % license or (at your option) any later version. The latest version
8 % of this license is in the file
9 %
10 % https://www.latex-project.org/lppl.txt
11 %
12 % This file is part of the "siunitx bundle" (The Work in LPPL)
13 % and all files in that bundle must be distributed together.
14 %
15 % The released version of this bundle is available from CTAN.
16 %
17 % -----------------------------------------------------------------------
18 %
19 % The development version of the bundle can be found at
20 %
21 % https://github.com/josephwright/siunitx
22 %
23 % for those people who are interested.
24 %
25 % -----------------------------------------------------------------------
26 %
27 %<*driver>
28 \documentclass{l3doc}
29 % Additional commands needed in this source
30 \ProvideDocumentCommand\email{m}{\href{mailto:#1}{\nolinkurl{#1}}}
31 % The next line is needed so that \GetFileInfo will be able to pick up
32 % version data
33 \usepackage{siunitx}
34 \begin{document}
35 \DocInput{\jobname.dtx}
36 \end{document}
37 %</driver>
38 % \fi
39 %
40 % \GetFileInfo{siunitx.sty}
41 %
42 % \title{^^A
43 % \pkg{siunitx-binary} -- Binary units^^A
44 % \thanks{This file describes \fileversion,
45 % last revised \filedate.}^^A
46 % }
47 %
48 % \author{^^A
49 % Joseph Wright^^A
50 % \thanks{^^A
51 % E-mail:
52 % \email{[email protected]}^^A
53 % }^^A
54 % }
55 %
56 % \date{Released \filedate}
57 %
58 % \maketitle
59 %
60 % \begin{documentation}
61 %
62 % \section{Additional binary units}
63 %
64 % This submodule provides binary units and prefixes. These are not formally
65 % part of the \acro{SI} but are recommended by \acro{BIPM} as units of
66 % information.
67 %
68 % \begin{function}{\kibi, \mebi, \gibi, \tebi, \pebi, \exbi, \zebi, \yobi}
69 % Prefixes, all of which are integer powers of $2$: the powers are \emph{not}
70 % stored or available for conversion.
71 % \end{function}
72 %
73 % \begin{function}{\bit, \byte}
74 % Units for bits and bytes.
75 % \end{function}
76 %
77 % \end{documentation}
78 %
79 % \begin{implementation}
80 %
81 % \section{\pkg{siunitx-binary} implementation}
82 %
83 % Start the \pkg{DocStrip} guards.
84 % \begin{macrocode}
85 %<*package>
86 % \end{macrocode}
87 %
88 % \begin{macro}{\kibi, \mebi, \gibi, \tebi, \pebi, \exbi, \zebi, \yobi}
89 % All very simple.
90 % \begin{macrocode}
91 \siunitx_declare_prefix:Nn \kibi { Ki }
92 \siunitx_declare_prefix:Nn \mebi { Mi }
93 \siunitx_declare_prefix:Nn \gibi { Gi }
94 \siunitx_declare_prefix:Nn \tebi { Ti }
95 \siunitx_declare_prefix:Nn \pebi { Pi }
96 \siunitx_declare_prefix:Nn \exbi { Ei }
97 \siunitx_declare_prefix:Nn \zebi { Zi }
98 \siunitx_declare_prefix:Nn \yobi { Yi }
99 % \end{macrocode}
100 % \end{macro}
101 %
102 % \begin{macro}{\bit, \byte}
103 % \begin{macrocode}
104 \siunitx_declare_unit:Nn \bit { bit }
105 \siunitx_declare_unit:Nn \byte { B }
106 % \end{macrocode}
107 % \end{macro}
108 %
109 % \begin{macrocode}
110 %</package>
111 % \end{macrocode}
112 %
113 % \end{implementation}
114 %
115 % \PrintIndex