Skip to content

Commit

Permalink
Minor copy edits [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwright committed Jan 26, 2021
1 parent 90bfffe commit b5473d4
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions l3experimental/l3bitset/l3bitset.dtx
Expand Up @@ -50,7 +50,7 @@
% This package defines and implements the data type \texttt{bitset}, a vector of
% bits. The size of the vector may grow dynamically.
% Individual bits can be set and unset by index and by name.
% The index is like all other indices in expl3 modules \emph{1-based}.
% The index is like all other indices in \pkg{expl3} modules \emph{1-based}.
% A \texttt{bitset} can be output as binary number or---as needed e.g. in a
% PDF dictionary---as decimal (arabic) number.
% Currently only a small subset of the functions provided by the \pkg{bitset}
Expand All @@ -64,7 +64,7 @@
% than $2^{31} - 1$.
% The export function
% \cs{bitset_to_arabic:N} can use functions from the \texttt{int} module only if
% the largest index used for this bitset is smaller then 32, for longer
% the largest index used for this bitset is smaller then $32$, for longer
% bitsets \texttt{fp} is used and this is slower.
%
% \section{Creating bitsets}
Expand All @@ -79,11 +79,11 @@
% \}
% \end{syntax}
% Creates a new \meta{bitset var} or raises an error if the name is already taken.
% The declaration is global. The \meta{bitset var} is initially 0.
% The declaration is global. The \meta{bitset var} is initially $0$.
%
% Bitsets are implemented as string variables consisting of
% \texttt{1}'s and \texttt{0}'s.
% The rightmost number is the index position 1, so
% The rightmost number is the index position $1$, so
% the string variable can be viewed directly as the binary number.
% But one shouldn't rely on the internal representation, but use the
% dedicated \cs{bitset_to_bin:N} instead to get the binary number.
Expand All @@ -92,12 +92,11 @@
% argument of \cs{bitset_new:Nn} declares names for some indices,
% which can be used to set and unset bits.
%

% \meta{index\ldots} should be a positive number.
% It can be an \meta{integer expression} which evaluates to a positive number.
% The expression is evaluated when the index is used, not a declaration time.
% The names \meta{name\ldots}
% should be unique. Using a number as name, e.g |10=1|, is allowed,
% should be unique. Using a number as name, e.g.~|10=1|, is allowed,
% but the index position |10| can then only be reached if some other
% name for it exists, e.g. |ten=10|.
% It is not necessary to give every index
Expand Down Expand Up @@ -167,7 +166,7 @@
% \cs{bitset_set_true:Nn} \meta{bitset var} \Arg{name/index}\\
% \cs{bitset_gset_true:Nn} \meta{bitset var} \Arg{name/index}
% \end{syntax}
% This sets the bit of the index position represented by \Arg{name/index} to 1.
% This sets the bit of the index position represented by \Arg{name/index} to $1$.
% \Arg{name/index} should be either a declared name or a positive,
% unsigned explicit integer (not an integer expression).
% If it is both a name and a number, the name will take precedence.
Expand All @@ -182,11 +181,11 @@
% \cs{bitset_gset_false:Nn} \meta{bitset var} \Arg{name/index}
% \end{syntax}
% This unsets the bit of the index position represented by \Arg{name/index} (sets
% it to 0).
% it to $0$).
% \Arg{name/index} should be either a declared name or a positive,
% unsigned explicit integer (not an integer expression).
% If it is both a name and a number, the name will take precedence.
% The index is 1-based. If the index position is larger
% The index is $1$-based. If the index position is larger
% than the current length of the bit vector
% nothing happens. If the leading (left most) bit is unset,
% zeros are not trimmed but stay in the bit vector and a still shown
Expand All @@ -211,7 +210,7 @@
% \end{syntax}
% \cs{bitset_item:Nn} outputs \texttt{1} if the bit with
% the index number represented by \Arg{name/index} is set and \texttt{0} otherwise.
% \Arg{name/index} is a declared name or a positiv, unsigned explicit number.
% \Arg{name/index} is a declared name or a positive, unsigned explicit number.
% \end{function}
%
% \begin{function}[EXP,added = 2020-12-13]
Expand All @@ -231,8 +230,8 @@
% This leaves the current value of the bitset expressed as
% a decimal number in the input stream. If no bit has been set yet,
% the output is zero. The function uses \cs{int_from_bin:n} if the largest
% index that have been set or unset is smaller then 32, and a slower implementation
% based on \cs{fp_eval} otherwise.
% index that have been set or unset is smaller then $32$, and a slower implementation
% based on \cs{fp_eval:n} otherwise.
% \end{function}
%
%
Expand All @@ -252,7 +251,6 @@
% Writes the value of the \meta{bitset var} in the log file.
% \end{function}
%

% \end{documentation}
%
% \begin{implementation}
Expand Down

0 comments on commit b5473d4

Please sign in to comment.