871 |
871 |
% |\AMCntextVHead| that is originally defined as
|
872 |
872 |
% |\def\AMCntextVHead#1{\emph{b#1}}|. This default value is
|
873 |
873 |
% useful to number the binary digits. Default value is |false|.
|
|
874 |
% \item[|Tvhead=|\meta{text}] A coma separated list as |{H,T,O,t,h,th}|
|
|
875 |
% for header in vhead vertical mode. Needs |vhead| to be set
|
|
876 |
% (defaults to the empty list |{}|).
|
|
877 |
% \item[|vheadunitindex=|\meta{num}] The index
|
|
878 |
% of the Ones place in the |Tvhead| list, counting from the right.
|
|
879 |
% If zero, changed to |decimals + 1| (defaults to zero).
|
|
880 |
% For example, if |Tvhead={H,T,O,t,h,th}|, should be set as
|
|
881 |
% |vheadunitindex=4| (at least if |decimals| is not set to 3).
|
874 |
882 |
% \item[|hspace=|\meta{space}] sets the horizontal space between
|
875 |
883 |
% boxes (defaults to |.5em|).
|
876 |
884 |
% \item[|vspace=|\meta{space}] sets the certical space between
|
... | ... | |
3798 |
3806 |
vhead .bool_set:N = \amc_num_vhead_bool,
|
3799 |
3807 |
vhead .initial:n = { false },
|
3800 |
3808 |
vhead .default:n = { true },
|
|
3809 |
Tvhead .code:n = {\clist_set:Nx \amc_tvhead_clist {\clist_reverse:n {#1}}},
|
|
3810 |
Tvhead .initial:n = {}, % \c_empty_clist does not work with \clist_reverse:n
|
|
3811 |
vheadunitindex .int_set:N = \amc_vheadunitindex_int,
|
|
3812 |
vheadunitindex .initial:n = 0,
|
3801 |
3813 |
nozero .bool_set:N = \amc_num_nozero_bool,
|
3802 |
3814 |
nozero .initial:n = { false },
|
3803 |
3815 |
nozero .default:n = { true },
|
... | ... | |
4147 |
4159 |
% Then we parse the options from \meta{opts}:
|
4148 |
4160 |
% \begin{macrocode}
|
4149 |
4161 |
{\keys_set:nn { amcnumeric } { #2 }
|
|
4162 |
% \end{macrocode}
|
|
4163 |
% if Tvhead is set, we adapt the AMCntextVHead macro
|
|
4164 |
% \begin{macrocode}
|
|
4165 |
\int_compare:nTF {\amc_vheadunitindex_int = 0}
|
|
4166 |
{\int_set:Nn \amc_vheadunitindex_int {\amc_num_decd_int + 1}}
|
|
4167 |
{}
|
|
4168 |
|
|
4169 |
\clist_if_empty:NTF \amc_tvhead_clist
|
|
4170 |
{}
|
|
4171 |
{
|
|
4172 |
\def\AMCntextVHead##1{
|
|
4173 |
\int_set:Nn \l_tmpa_int
|
|
4174 |
{\int_max:nn
|
|
4175 |
{(##1) - \amc_num_decd_int + \amc_vheadunitindex_int}
|
|
4176 |
{0}}
|
|
4177 |
\emph{\clist_item:Nn \amc_tvhead_clist {\l_tmpa_int}}}}
|
|
4178 |
|
4150 |
4179 |
\bool_if:nTF { \bool_if_p:N\amc_num_significant_bool
|
4151 |
4180 |
&& \int_compare_p:n { \amc_num_base_int != 10 } } {
|
4152 |
4181 |
\message{^^J!~AMCnumeric~Error:~significant=true~can't~be~used~with~base!=10.^^J}
|