I created a new command, however the spacement after calling it in the text, the there is an extra space than normal, E.G.:

\numproportion{1}{2} Daniel\\
1:2 Daniel

enter image description here


1. I'd like to have the spacement of the second line

2. I used ensuremath for eventually uses inside math mode, avoiding the spacement of : in this mode

  • By the way, what's the purpose of \ensuremath{\text{:}} instead of simply :? If your aim is to use \numproportion in math mode while getting no space around :, the way is \newcommand{\numproportion}[2]{#1{:}#2} – egreg Sep 24 '17 at 14:13
#1{:}#2% no space here says egreg

Your Answer

