# (Framed) environment blank spaces

Could be a very beginner question, but still. Considering the following:

\usepackage{framed}
\usepackage{tikz}
\usepackage{listings}
...
\newcommand{\some}{\textcolor{red}{\lstinline{some}}}
\newcommand{\other}{\textcolor{blue}{\lstinline{other}}}
...
\begin{document}
....
\begin{framed}
\some \other
\end{framed}
....
\end{document}


Which goes into this:

Why is there no white space between some and other, when there is a blank space there in the source? How would it be possible to make it consider the blank space in the output?

• Because TeX gobbles white space after commands. Use \some\ \other, for example to insert an explicit space character – user31729 Mar 22 '18 at 9:26
• You could use the xspace package as well. And well be punished by some certain Italian Professor for using it. I will be punished for suggesting it ;-) – user31729 Mar 22 '18 at 9:33
• Thanks! What about passing some math as argument to a new command? Considering this \newcommand{\evenmore}[1]{\textcolor{blue}{\lstinline{#1}}} with \evenmore{$\sim$}? – Mihai Mar 22 '18 at 9:39