LaTeX 中的脚注会产生奇怪的空格

LaTeX 中的脚注会产生奇怪的空格

我必须写一篇论文,我应该使用脚注,但有些脚注表现得很奇怪,并且没有明显的原因就留了太多空格。这是我的代码:

%******************************************************************************
% Authors should submit papers according to this format.
% LaTeX is a high-quality typesetting system. If you want to know more about LaTeX, please visit http://www.latex-project.org/
%******************************************************************************
%%***************************************************************
\documentclass[twoside,10.5pt]{article}%                         *
\usepackage{mathrsfs}%                                           *
\usepackage{pifont}%                                             *
%\usepackage{url}%                                                *
\usepackage{hyperref}
\usepackage{amsmath}%                                            *
\usepackage{amsthm}%                                             *
\usepackage{txfonts}%                                            *
\usepackage{geometry}%                                           *
\usepackage{latexsym}%                                           *
\usepackage{amssymb}%                                            *
\usepackage{graphicx}%                                           *
\usepackage{geometry}%                                           *
\usepackage{xcolor} %                                            *Please do not change any words here.
\geometry{paperheight=28.5cm,paperwidth=21cm,top=2.5cm,%         *
bottom=2.6cm,left=2.5cm,right=2.5cm,headheight=0.8cm,%             *
headsep=0.9cm,textheight=20cm,footskip=1cm}%                   *
\setlength{\parindent}{0pt} \setlength{\parskip}{5pt}%           *
\renewcommand{\baselinestretch}{1.0}%                            *                                                        *
%%***************************************************************
\pagestyle{empty}
\begin{document}
%================TITLE===========================================
\begin{center}
{\LARGE{ report}}\\[20pt]
\end{center}

\emph{Past}

 a lot of text \footnote{Barnett, W., \& Han, A, "Facebook in 2011", Case. No. E-406, May 12, 2011, pp. 1-28.}.\\
 a lot of text\footnote{Thompson, N., \& FRED Vogelstein, F., INSIDE THE TWO YEARS THAT SHOOK FACEBOOK—AND THE WORLD, wired.com, \url{www.wired.com/story/inside-facebook-mark-zuckerberg-2-years-of-hell/} , Retrieved May 30, 2018.}

\bigskip

\emph{Present}

 a lot of text\footnote{Rizzo, S., \& Kelly, M., Fact-checking Mark Zuckerberg's testimony on Facebook and data collection., washingtonpost.com, \url{www.washingtonpost.com/news/fact-checker/wp/2018/04/13/fact-checking-mark-zuckerbergs-testimony-on-facebook-and-data-collection}, Retrieved May 30, 2018.}



\end{document}

我得到以下脚注:

在此处输入图片描述

最后一个,以里佐尤其如此,我不知道为什么,我也尝试过启用/禁用该包url,但没有帮助。我必须使用此布局,所以我无法更改它来解决问题,有人可以看看并告诉我问题可能是什么吗?

答案1

您应该在开始文档之前使用此命令

\makeatletter
\g@addto@macro{\UrlBreaks}{\UrlOrds}
\makeatother

你发现下面的源代码

    %******************************************************************************
% Authors should submit papers according to this format.
% LaTeX is a high-quality typesetting system. If you want to know more about LaTeX, please visit http://www.latex-project.org/
%******************************************************************************
%%***************************************************************
\documentclass[twoside,10.5pt]{article}%                         *
\usepackage{mathrsfs}%                                           *
\usepackage{pifont}%                                             *
%\usepackage{url}%                                                *
\usepackage{hyperref}
\usepackage{amsmath}%                                            *
\usepackage{amsthm}%                                             *
\usepackage{txfonts}%                                            *
\usepackage{geometry}%                                           *
\usepackage{latexsym}%                                           *
\usepackage{amssymb}%                                            *
\usepackage{graphicx}%                                           *
\usepackage{geometry}%                                           *
\usepackage{xcolor} %                                            *Please do not change any words here.
\geometry{paperheight=28.5cm,paperwidth=21cm,top=2.5cm,%         *
bottom=2.6cm,left=2.5cm,right=2.5cm,headheight=0.8cm,%             *
headsep=0.9cm,textheight=20cm,footskip=1cm}%                   *
\setlength{\parindent}{0pt} \setlength{\parskip}{5pt}%           *
\renewcommand{\baselinestretch}{1.0}%                            *                                                        *
%%***************************************************************
\pagestyle{empty}
\makeatletter
\g@addto@macro{\UrlBreaks}{\UrlOrds}
\makeatother
\begin{document}
%================TITLE===========================================
\begin{center}
{\LARGE{ report}}\\[20pt]
\end{center}

\emph{Past}

 a lot of text \footnote{Barnett, W., \& Han, A, "Facebook in 2011", Case. No. E-406, May 12, 2011, pp. 1-28.}.\\
 a lot of text\footnote{Thompson, N., \& FRED Vogelstein, F., INSIDE THE TWO YEARS THAT SHOOK FACEBOOK—AND THE WORLD, wired.com, \url{www.wired.com/story/inside-facebook-mark-zuckerberg-2-years-of-hell/} , Retrieved May 30, 2018.}

\bigskip

\emph{Present}

 a lot of text\footnote{Rizzo, S., \& Kelly, M., Fact-checking Mark Zuckerberg's testimony on Facebook and data collection., washingtonpost.com, \url{www.washingtonpost.com/news/fact-checker/wp/2018/04/13/fact-checking-mark-zuckerbergs-testimony-on-facebook-and-data-collection}, Retrieved May 30, 2018. }



\end{document}

编译结果: 在此处输入图片描述

如果您想强制使用脚注的第一段文字,您可以使用如下美元表达式:

 a lot of text\footnote{$\text{Rizzo, S., \& Kelly, M., Fact-checking Mark Zuckerberg's testimony on Facebook and data collection., washingtonpost.com,}$ \url{www.washingtonpost.com/news/fact-checker/wp/2018/04/13/fact-checking-mark-zuckerbergs-testimony-on-facebook-and-data-collection}, Retrieved May 30, 2018. }

结果 :

在此处输入图片描述

或者像这样使用 href{}{} :

\footnote{Rizzo, S., \& Kelly, M., Fact-checking Mark Zuckerberg's testimony on Facebook and data collection., washingtonpost.com, \href{www.washingtonpost.com/news/fact-checker/wp/2018/04/13/fact-checking-mark-zuckerbergs-testimony-on-facebook-and-data-collection}{www.washingtonpost.com/..../fact-checking-mark-zuckerbergs-testimony-on-facebook-and-data-collection}, Retrieved May 30, 2018.}

在此处输入图片描述

最良好的祝愿阿卜杜勒卡里姆

相关内容