1

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.

3

I'd say

\newcommand{\Rule}[3]{\vrule width #1 height #2 depth #3\relax}
\newcommand{\Space}[3]{\hspace*{#1}\vrule width 0pt height #2 depth #3\relax}
2
  • Thank you, is there any possibility for Space command. Oct 3 '20 at 13:35
  • @DenisSletkov I'd say \hspace*{#1}\vrule width 0pt height #2 depth #3\relax
    – egreg
    Oct 3 '20 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.