1

In my report, the phrase "separated representation" is used very frequently. So, I created a macro

\newcommand{\seprep}[1]{separated representation}

However, when I use the command, it eats up the next few characters.

Such type of \sepreps are commonly

it generates the following output. Please note the missing "a" in "are". enter image description here

Please let me know if there is a solution to this problem. Thank you.

3
  • 3
    This is expected as you defined a macro that takes one mandatory argument, you did not give it one and thus it eats up spaces and chars until it has found enough to qualify as an argument, in this case it eats the a
    – daleif
    Jul 4, 2017 at 17:01
  • 6
    Solution, (1) your macro dies not use arguments, so use [0] or remove the argument specification. (2) macros do always eat up spaces so best to use \seprep{} even if it does not take any arguments, this stops is from eating spaces. In general, fi you really save anything buy writing like this? Perhaps better to just adjust your editor to insert a user defined template, which will just be those words.
    – daleif
    Jul 4, 2017 at 17:05
  • Your suggestion works. Thank you. I will look into how to use user-defined templates
    – kksagar
    Jul 5, 2017 at 9:23

0

Your Answer

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

Browse other questions tagged or ask your own question.