diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/semtex/semtex.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/semtex/semtex.sty | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/latex/semtex/semtex.sty b/Master/texmf-dist/tex/latex/semtex/semtex.sty index 28c9303f69a..077cdb1983f 100644 --- a/Master/texmf-dist/tex/latex/semtex/semtex.sty +++ b/Master/texmf-dist/tex/latex/semtex/semtex.sty @@ -1,5 +1,5 @@ \RequirePackage{xparse} -\ProvidesExplPackage{semtex}{2020/09/27}{0.44}{} +\ProvidesExplPackage{semtex}{2020/10/03}{0.45}{} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % @@ -12,23 +12,32 @@ % Bullets: -\box_if_exist:NF \g__semantex_bullet_box +\cs_new_protected:Npn\semantex_set_mathsurround_to_zero: { - \box_new:N \g__semantex_bullet_box - \hbox_set:Nn \g__semantex_bullet_box { $\cdot$ } - \box_scale:Nnn \g__semantex_bullet_box {1.2} {1.2} - \tl_set:Nn\g_semantex_bullet - { - \box_move_up:nn{-0.25ex}{\box_use:N \g__semantex_bullet_box} - } - - \tl_set:Nn\g_semantex_double_bullet{\g_semantex_bullet \g_semantex_bullet} - - \tl_set_eq:NN\SemantexBullet \g_semantex_bullet - - \tl_set_eq:NN \SemantexDoubleBullet \g_semantex_double_bullet + % This is equivalent to "\m@th" + \dim_set:Nn \mathsurround { 0pt } } +\cs_new_protected:Npn\semantex_bullet: +{ + \mathord{\mathpalette\__semantex_bullet_auxiliary:Nn{0.5}} +} + +\box_new:N \l__semantex_bullet_box + +\cs_new_protected:Npn\__semantex_bullet_auxiliary:Nn#1#2 +{ + \hbox_set:Nn \l__semantex_bullet_box { $\semantex_set_mathsurround_to_zero: #1 \bullet$ } + \box_scale:Nnn \l__semantex_bullet_box { #2 } { #2 } + \vcenter{ \hbox:n { \box_use_drop:N \l__semantex_bullet_box } } +} + +\cs_new_protected:Nn\semantex_double_bullet: {\semantex_bullet: \semantex_bullet:} + +\cs_set_eq:NN\SemantexBullet \semantex_bullet: + +\cs_set_eq:NN \SemantexDoubleBullet \semantex_double_bullet: + % Parentheses: \cs_set:Npn\SemantexLeft { \mathopen{}\mathclose\bgroup\left } |