hyperref and \verb

Fernando Gouvea fqgouvea at colby.edu
Wed Jan 29 16:32:24 CET 2020


As I mentioned, it compiles fine without hyperref, so there are no 
missing braces anywhere. It also compiles fine if I add

\let\url\relax

(I was using that before to avoid deciding what to do about urls.) So it 
really does seem to be an interaction between hyperref and \footnote.

Yes, hyperref is currently the last package to be loaded.

I guess I'll just have to settle for \texttt and avoid using any 
math-mode characters.

Fernando

PS: another email coming up on a weirder hyperref thing...

On 1/29/2020 10:19 AM, Peter Flynn wrote:
> On 29/01/2020 14:57, Fernando Gouvea wrote:
>> I am working on a book, and the publisher has just (as I was
>> finishing) asked me to use \hyperref to make links active on the
>> electronic version. Adding \usepackage{hyperref} and making no other
>> changes, I get a new error message:
>>
>>> ! LaTeX Error: \verb illegal in command argument.
>
> This does look like TeX is seeing \verb while it is processing the 
> argument of a previous command. Can you check first that there aren't 
> any missing close-curly-braces anywhere before the \verb?
>
> Hyperref makes LOTS of very deep-seated changes to LaTeX. For this 
> reason it should always be the last package you load.
>
> Can you try moving your \usepackage{hyperref} to after all other 
> \usepackage commands and see if that helps.
>
>> This happens because I used something like \verb|Qp| in a footnote. 
>> Despite the error message, the resulting pdf looks ok. Of course, I 
>> haven't actually tried using any hyperref functionality yet. Can
>> anyone explain what is going on?
>
> You might also try using a different delimiter, eg \verb`Op` or \verb+Op+
>
> ///Peter
> .

-- 
=============================================================
Fernando Q. Gouvea         http://www.colby.edu/~fqgouvea
Carter Professor of Mathematics
Dept. of Mathematics and Statistics
Colby College
5836 Mayflower Hill
Waterville, ME 04901

The shema of the postmodern church: "Hear, O Israel, get into tribes
and share your stories."
   -- Kim Fabricius

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texhax/attachments/20200129/a28ab72b/attachment.html>


More information about the texhax mailing list.