# How to define a MathJax specific macros (Rule and Space)

MathJax has a specific macros \Rule #1 #2 #3 (command is used to create a rule with a specified width (#1), height(#2), and depth(#3)) and \Space #1 #2 #3(command is used to create a space with a specified width (#1), height(#2), and depth(#3)). How to define this macros in LaTeX? I know about \rule, but for example \Rule{1em}{1ex}{2pt} can not simple convert to \rule command.

\newcommand{\Rule}[3]{\vrule width #1 height #2 depth #3\relax}

• @DenisSletkov I'd say \hspace*{#1}\vrule width 0pt height #2 depth #3\relax Oct 3 '20 at 13:43