← Back to team overview

ubuntu-developer-manual team mailing list archive

Inline code and the pipe symbol (|)

 

Hello, everyone.

I've redefined the pipe symbol (|) to delimit inline code.  This means
that instead of writing:

  First, we will initialize the \lstinline|x| and \lstinline|y| variables to 0.

you can write:

  First, we will initialize the |x| and |y| variables to 0.

I think the benefits of that are fairly obvious. :)

One downside though, is that you can no longer use the pipe like this:

  \prompt \userinput{ls | less} % this won't work any more!

Instead, you must use the \textpipe command:

  \prompt \userinput{ls \textpipe\ less} % works again

Also note the \  after the \textpipe command. This <backslash><space>
forces LaTeX to insert a white space after the pipe.  Another way of
ensuring the proper spacing is to add an empty set of braces after the
\textpipe command:

  \prompt \userinput{ls \textpipe{} less} % also works

The only place in the manual where we're currently using the pipe is
in the bzr chapter. I've already made the necessary changes there.
(Apologies for any conflicts, Kyle!)

Please let me know if you have any questions.

--Kevin



Follow ups