I have to include small code snippets like method and class names within continuous text.
I do not want to display those snippets as complete seperated listings, they should be displayed inline, similar to the option this site offers with backticks
.
But let's face it, the options that are available out of the box are just plain ugly.
What I have in mind is the notation GitHub (and many other sites) use:
So, in particular:
- rounded corners
- contrastring border color
- different background color
- fixed width code font
- pretty (vertical) alignment within the text
I found many options to draw boxes around text (fancybox
, colorbox
, mdframed
and others)
but none of those packages seemed to be capable to fulfill all of my requirements (then again, I'm not really a LaTeX expert).
So the question is: How can we make inline code pretty?