I want to add an inline text formatted as code
in Lyx. For example:
"The gradient is calculated via math::gradient(v)
"
I am aware of the Insert List command, but it is not what I'm looking for since the code listing is not inserted inline. I have searched everywhere, but I can't find the way to do it.
Thanks in advance.
Best Answer
You can insert an inline program listing in LyX as follows:
Starting with LyX 2.3.0, you can optionally choose to (globally) use the minted package for listings, by going to Document > Settings > Listings and selecting "Minted" in the combo box.