0

I am using LuaLaTeX for a manual and I am running into a spacing issue I am not sure how to resolve. I defined a new command that is simply used to make some text bold. However, I have found that this command eats spaces that follow the command so that the bold word is right next to the word that follows. I don't want to add a space in the definition because sometimes the word comes at the end of a sentence and I don't want an extra space. Below is a sample. How do I get the \lualatex command to behave such that the command does not eat spaces that come after it?

\newcommand{\lualatex}{{\bf lualatex}}

This manual is written in \LaTeX and is processed via the 
\lualatex executable. The \lualatex executable has the Lua
scripting language embedded which provides a power method
of extending the capability of \lualatex.
Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
  • The standard \LaTeX-command eats space too. What did you do to avoid it? – Ulrike Fischer Aug 17 '15 at 15:30
  • I guess it does. I hadn't looked closely enough at this. – Lance Larsen Aug 17 '15 at 15:31
  • So is there a way to handle this for the \LaTeX comand as well? – Lance Larsen Aug 17 '15 at 15:33
  • You can use the xspace package to automatically insert a space . But in the long run it is better to get use to end such commands with {} or \ when using them. See also this answer: http://tex.stackexchange.com/a/86620/2388 – Ulrike Fischer Aug 17 '15 at 15:40
  • 1
    Off-topic here but two things: \bf has been deprecated in LaTeX2e for over twenty years (use \textbf{lualatex} here); the 'common' style for executables is monospaced (\texttt{lualatex}) (your call, of course). – Joseph Wright Aug 17 '15 at 15:41
  • Ok. I wasn't aware this was depricated. Thanks for the info. And the previous responses did address this quiestion. Thanks for the help. – Lance Larsen Aug 17 '15 at 16:12

0 Answers0