Text Formatting\verb in title (\chapter)?

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
Post Reply
amoz
Posts: 14
Joined: Mon Mar 16, 2009 1:42 pm

\verb in title (\chapter)?

Post by amoz »

Hi all,

I wonder how I can put one word in verbatim in the title of a book chapter.

I would like to use something like

Code: Select all

\chapter{Inventory of \verb#r.le# Routines}
Thanks for helping me out!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

\verb in title (\chapter)?

Post by localghost »

Neither the \verb command nor the verbatim environment can be used as arguments to other commands. But you can try typewriter style.

Code: Select all

\chapter{Inventory of \texttt{r.le} Routines}

Best regards and welcome to the board
Thorsten
amoz
Posts: 14
Joined: Mon Mar 16, 2009 1:42 pm

Re: \verb in title (\chapter)?

Post by amoz »

This is the work-around I was looking for! Thanks a lot.
Post Reply