About \newcommand

Gregory Gamble greg.gamble at uwa.edu.au
Mon Aug 9 23:55:08 CEST 2021


> Hello! I have written an article, and habitually I use \newcommand for some words commonly write and with emphasis. For example \newcommand{\gnr}
> {\emph{género}}, but the problem is when I call the command and then compile because in the pdf the word género appears together to the next word, ie:
> (in .tex file)
> El \gnr puede definirse ....
> (in .pdf file compiled)
> El géneropuede definirse .... (can not show emphatic word género) Also occur without emphatic or without LaTeX command.
> As you can see, appears together with the words género and puede, how can you do it to separate the words?
> Not works fine if I define \newcommand{\gnr}{\emph{género }}, ie with a space final because may occur that I write a comma or dot.
>
> Thanks a lot, regards!
> Darío

Dear Dario,

Either always put the \gnr in curly braces:  {\gnr}
or in the cases where you intend to follow \gnr with a space, do it with \<space> ... as in: \gnr\ puede

Regards,
Greg Gamble
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20210809/48e11193/attachment-0001.html>


More information about the texhax mailing list.