Single space after inline code?

by Pejman Poh   Last Updated January 06, 2018 16:23 PM

I'm writing a bunch of inline code like so:


% New Commands
\newcommand{\code}[1]{\texttt{#1}} % Create new \code blocks


Another important variable used in \malloc is \flp.


However what gets produced: Screenshot of result

There is no space after malloc(). I could fix this by appending a \space to the end of the newcommand but then __flp would mess up. How do I get \texttt to stop ignoring spaces after it's command.

I tried switching to \listings but whatever configs I had set up didn't fix the issue. I am not averse to switching back however.

Tags : spacing code

Related Questions

No space between characters under \texttt{} command

Updated February 15, 2018 01:23 AM

How to make this syntax tree not overlapping?

Updated May 02, 2017 01:23 AM

How to format an inline source code

Updated October 12, 2017 14:23 PM