缺少插入 $。

缺少插入 $。

我在 LaTeX 中收到以下错误:

! Missing $ inserted.
<inserted text>
                $
l.172 ..._relations/jan-june97/bridges_2-18.html.}

我正在使用,\usepackage{url}所以不确定为什么会出现错误。以下是第 172 行的代码:

Her walk to school inspired the 1964 Norman Rockwell painting that he titled, 
"The Problem We Live With." This is a painting of a small black girl, escorted 
by four federal marshals, walking to school beside a wall bearing a scrawled 
racial slur and the letters KKK. Harvard psychiatry Professor Robert Coles 
witnessed the scene in New Orleans. Professor Coles has written a children's 
book about Rudy Bridges' experiences called "The Story of Ruby." In the book, 
Coles reminds children of the heroism of Bridges' action, by showing her facing 
an empty classroom because agry parents kept their children home and all but one 
teacher refused to teach a black child."\footnote{Excerpted from Online 
NewsHour:A Conservation with Ruby Bridges Hall-February 18, 1987,page 
1-https://www.pbs.org/newshour/bb/race_relations/jan-june97/bridges_2-18.html.}

你能帮我吗?

答案1

仅加载url包是不够的。文档正文中的 URL 字符串需要包含在\url指令中。

在此处输入图片描述

\documentclass{article}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{xurl} % 'extended url'
\setlength\textheight{5.5cm} % just for this example
\begin{document}
Her walk to school inspired the 1964 Norman Rockwell painting that he titled, 
``The Problem We Live With.'' This is a painting of a small black girl, escorted 
by four federal marshals, walking to school beside a wall bearing a scrawled 
racial slur and the letters KKK\@. Harvard psychiatry Professor Robert Coles 
witnessed the scene in New Orleans. Professor Coles has written a children's 
book about Rudy Bridges' experiences called ``The Story of Ruby.'' In the book, 
Coles reminds children of the heroism of Bridges' action, by showing her facing 
an empty classroom because agry parents kept their children home and all but one 
teacher refused to teach a black child.\footnote{Excerpted from Online NewsHour: 
A Conservation with Ruby Bridges Hall---February 18, 1987, page~1---%
\url{https://www.pbs.org/newshour/bb/race_relations/jan-june97/bridges_2-18.html}.}
\end{document}

相关内容