I want to highlight some code~ish thing in a report like this:
blahblahblah...Then you should use ./runprog to start up the program etc etc...
How can I do this?
I want to highlight some code~ish thing in a report like this:
blahblahblah...Then you should use ./runprog to start up the program etc etc...
How can I do this?
Use the colorbox command from xcolor package:
\documentclass{article}
\usepackage{xcolor}
\newcommand{\SEBox}[1]{\texttt{\colorbox{gray!14}{#1}}}
\begin{document}
\SEBox{blahblah}
\end{document}
\texttt changes font to typewriter style; \colorbox changes the text background color to 10% transparent gray (gray!10).
– jak123
Jun 08 '15 at 06:42
[1] number of arguments passed to the command, and #1 means use argument #1 here. For example, you can write \newcommand{\SEBox}[2][gray!10]{\texttt{\colorbox{#2}{#1}}} to be able to change the background color. Check this out: http://www.emerson.emory.edu/services/latex/latex_19.html
– jak123
Jun 08 '15 at 06:46
texdoc installed. So if you want to learn about a certain package you can just launch from the terminal texdoc package-name to see its documentation (e.g. texdoc mathtools).
– Bakuriu
Jun 08 '15 at 09:43
\veb{foo}. Packages likelistingsandmintedhave inline versions\lstinlineand\mintinline. A general overview can be found in http://www.dickimaw-books.com/latex/thesis/html/verbatim.html and https://en.wikibooks.org/wiki/LaTeX/Source_Code_Listings. See also Should I use \lstinline for the language keywords embedded in text? and Inline code and short verb with minted. – moewe Jun 08 '15 at 06:41mintedfor inline code. Its implementation is (was? up to1/2 years ago?) really buggy. It broke other much more important features. – Bakuriu Jun 08 '15 at 09:41\keysor\menufrom the packagemenukeys(although its original purpose is not a general “codish thing”). – Scz Jun 08 '15 at 10:45