My issue is that I'm trying to write variable names in italic, but as some of them have underscores in their names, LaTeX assumes that I am writing an equation and it messes up the rest of my document after that point.
Here is a sample of my code:

```
As variable \textit{sensor.linear_acceleration} is a matrix

```

The underscore in `linear_acceleration` is what makes my whole document math modded, and `is a matrix` renders as if it was an equation.

How can I display that underscore in italic without LaTeX making everything an equation?