hyperref 换行问题

hyperref 换行问题

我正在使用xelatex并收到以下警告:

!!!** WARNING ** Annotation out of page boundary.!!!
!!!** WARNING ** Current page's MediaBox: [0 0 597.6 842.4]!!!
!!!** WARNING ** Annotation: [303.194 712.675 612.035 728.575]!!!
!!!** WARNING ** Maybe incorrect paper size specified.!!!
 )

我在网上找到的所有答案都对我不起作用。它们没有改变任何东西,只是提供错误。

我发现当我删除

\setmainfont{Times New Roman}

这个问题就消失了。

\documentclass[a4paper, 12pt]{article}
\special{papersize=8.3in,11.7in}

\usepackage[top=0.5in, bottom=1.0in, left=0.8in, right=0.8in, includehead, includefoot]{geometry}
\usepackage{fancyhdr}
\usepackage{lastpage}
\usepackage{enumitem}        % configure lists

\usepackage{fontspec}
\usepackage{amsfonts}

\usepackage{mathtools}
\usepackage{amsmath}
\usepackage{commath}        % \dif sign
\usepackage{array}

\usepackage[breaklinks=true]{hyperref}

\setmainfont{Times New Roman}

\begin{document}

\section{Implementation and results}
\label{sec:implementation_and_results}
% Implementation and results {{{
% -----------------------------------------------------------------------------
The implementation is one-dimensional Euler equations simulation using Roe
solver written in C++.
The code is located in a public git \cite{Git} repository, url:
\url{https://bitbucket.org/WscriChy/1d-euler-equations/}.
Compilation prerequisites and instructions could be found in the
\textit{``ReadMe.md''} file.

OpenCl \cite{OpenCl} is used for the problem computations. Changes to the
solver as well as boundary conditions and initialization data could be applied
without recompilation of the application by modifying \textit{``Kernel.cl''},
which is an OpenCl file.

The boundary conditions are \textit{solid walls} that the fluid reflects at
this boundaries in a particular way,
%
\begin{align}
  p_{0} &= p_{1}, \nonumber \\
  {\rho}_{0} &= {\rho}_{1}, \\
  u_{0} &= -u_{1} \nonumber
\end{align}
%
for the left boundary. The same approach is applied for the right one.



% References {{{
% -----------------------------------------------------------------------------
\begin{thebibliography}{100}
  \bibitem{LeVeque} R.J. LeVeque, \emph{Finite Volume Methods for Hyperbolic
    Problems}, vol. 31, Cambridge University Press, 2002.
  \bibitem{Anderson} John D. Anderson, Jr., \emph{Computational Fluid Dynamics,
    The basics with applications}, 1995.
  \bibitem{Git} \emph{Git manual page}, URL: \url{http://gitmanual.org/}.
  \bibitem{OpenCl} \emph{The open standard for parallel programming of
  heterogeneous systems}, URL: \url{http://www.khronos.org/opencl/}.
\end{thebibliography}
% -----------------------------------------------------------------------------
% References }}}


\end{document}

结果

答案1

在此处输入图片描述

字体更改只是意外相关的,警告告诉您链接已超出页面范围,更改字体只会更改段落设置,以便链接可能会中断。/您可以将其添加-到 URL 中断字符列表中,然后事情就会按如下所示进行:

\usepackage[breaklinks=true]{hyperref}
\expandafter\def\expandafter\UrlBreaks\expandafter{\UrlBreaks\do\-}

\setmainfont{Times New Roman}

相关内容