\RequirePackage{xparse}
\ProvidesExplPackage{semtex}{2020/10/03}{0.45}{}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%																%
%		semtex -- for documents stripped of SemanTeX markup		%
%		https://ctan.org/pkg/semantex							%
%		(C) 2020 Sebastian Ørsted								%
%       sorsted@gmail.com										%
%																%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Bullets:

\cs_new_protected:Npn\semantex_set_mathsurround_to_zero:
{
	 % 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 }

\cs_set:Npn\SemantexRight { \aftergroup\egroup\right }