## LaTeX forum ⇒ Text Formatting ⇒ verbatim inside savebox, newwatermark... Topic is solved

Information and discussion about LaTeX's general text formatting features (e.g. bold, italic, enumerations, ...)
erwann
Posts: 64
Joined: Thu Aug 25, 2016 2:24 am

### verbatim inside savebox, newwatermark...  Topic is solved

Hello, how do I get verbatim to work inside savebox, newwatermark?

\newwatermark*[allpages,color=red!50,angle=45,scale=2,xpos=0,ypos=0]{% What I would like, but generates error% \verb|Copyright (2018) <!-- e --><a href="mailto:name@gmail.com">name@gmail.com</a><!-- e -->| % Poor workaround:	$\mathrm{Copyright (2018) <!-- e --><a href="mailto:name@gmail.com">name@gmail.com</a><!-- e -->}$}
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)

Tags:

kaiserkarl13
Posts: 593
Joined: Tue Mar 25, 2008 5:02 pm
You don't. The \verb command and the verbatim environment must be able to be rendered immediately; they cannot appear in footnotes, headers, section headings, captions, and so forth.

If you want fixed-width fonts in such contexts, use the \texttt command. By the way, next time give a minimum working example so we don't have to spend ten minutes trying to figure out which package provides the newwatermark command.

I made the following minimal working example of something that actually generates a document:
\documentclass{article}\usepackage{textcomp}\usepackage{xcolor}\usepackage{xwatermark}\newwatermark*[allpages,color=red!50,angle=45,scale=2,xpos=0,ypos=0]{% Better?    Copyright \copyright 2018 \href{mailto:name@gmail.com}{\texttt{name@gmail.com}}}\begin{document}hello\end{document}

You're going to want to adjust the parameters, because scale=2 is too big.

erwann
Posts: 64
Joined: Thu Aug 25, 2016 2:24 am
By the way, next time give a minimum working example so we don't have to spend ten minutes trying to figure out which package provides the newwatermark command.

Sorry. I thought someone would know off the top of his head, I would have been happy with just try "texttt".
x_86 / Linux Mint 18.3 / texlive 2015.20160320-1ubuntu0.1 / TeXworks 0.5r1361 (Debian)

### Who is online

Users browsing this forum: No registered users and 4 guests