I know there are various techniques to keep things on the same line. I have a two-word variable input. For example, Settings App.
Let's say there are a group of apps, and I would like them always formatted the same.
I could go about this different ways. The straightforward solution is to write each one manually:
\textit{Settings~App}
This is not really a good solution, because I cannot differentiate between other \textit{} text and \textit{} app text.
So, I put it into a variable/macro.
\newcommand\app[1]{\textit{#1}}
\app{Settings App}
or LaTeX3 syntax
\usepackage{xparse}
\NewDocumentCommand{\app}{m}{\textit{#1}}
\app{Settings App}
The problem is, other people who might be writing text will forget the tilde. The consequence is not ensuring an unlinebreakable space and not being able to easily search for occurrences of an app name.
So, my question is whether there is something I can add into my macro definition above that will ensure a non-linebreakable space without the explicit tilde?
\mbox{...}
?\mbox{}
not linebreakable? That would be easy.