\lstinline I can include inline code snippets in a paragraph. I would like to provide a macro that selects formatting, etc, for lstinline so I can just do, say,
I had implemented this as a short inline, like this:
So I could then write
~snippet~, and that works fine. However, If I need to use
~ in the snippet it doesn't work. The same applies if I change the short inline character to something else. So, I thought of just having a well defined macro, something like:
Which also works, except when certain characters are in the snippet. For example, this
does not work because of the
~. I found a similar question (which inspired the above
\codeinline macro) but I don't want to have to escape characters in the snippet, I just want it treated verbatim in the same way as lstinline does. I hope that it is possible because lstinline does it.
It is possible to write a wrapper around
lstinline that works as well as
lstinline works ?