我希望我的论文不会抱怨互联网地址太长。我该如何修复包含我论文设置的代码?
\documentclass[12pt]{article}
\title{\textbf{Gummi 0.8.0}}
\author{me}
\date{}
\addtolength{\topmargin}{-3cm}
\addtolength{\textheight}{3cm}
\usepackage{setspace}
\usepackage{mathpazo}
\usepackage[%
left=3cm,%
right=3cm,%
top=2.5cm,%3
bottom=2.5cm,%
headheight=33pt,%
]{geometry}%
\usepackage[finnish]{babel}
\usepackage[T1]{fontenc}
\usepackage{hyperref}
\usepackage{scrlayer-scrpage}
\clearpairofpagestyles
\ohead*{\pagemark}
\begin{document}
\setlength{\footheight}{17.99445pt}
\topskip0pt
\vspace*{\fill}
\thispagestyle{empty}
\begin{center}
smth
$\,$
Me
\end{center}
\vspace*{\fill}
\begin{center}
\vspace{10em}
\end{center}
{\raggedleft some data
}
\newpage
\setcounter{page}{1}
\onehalfspacing
\tableofcontents
\newpage
\noindent \section{Johdanto} Olen
\section{Lähteet}
\begin{itemize}
\item[] Kruger, J., Dunning, D. \textit{Unskilled and unaware of it: how difficulties in recognizing one's own incompetence lead to inflated self-assessments} (30.11.1999).\url{https://lesn.appstate.edu/olson/Protected/Articles/pdf%20docs/
Kruger%20&%20Dunning%20(1999)%20%5BClueless%20article%5D.pdf}
\end{itemize}
\end{document}
答案1
如何解决这个问题?
如果你加载网址包中,换行符可以出现在 的参数中的任何位置\url
。(通常,但不一定,\url
指令的参数是 URL 字符串。)
\documentclass[12pt]{article}
\usepackage{scrlayer-scrpage}
\usepackage{mathpazo}
\usepackage[hmargin=3cm,vmargin=2.5cm]{geometry}
\usepackage[finnish]{babel}
\usepackage[T1]{fontenc}
\usepackage{xurl}
\usepackage[colorlinks,allcolors=blue]{hyperref}
\begin{document}
\begin{itemize}
\item[] Kruger, J., Dunning, D.
\textit{Unskilled and unaware of it: How difficulties in recognizing one's own incompetence lead to inflated self-assessments} (30.11.1999).
\url{https://lesn.appstate.edu/olson/Protected/Articles/pdf%20docs/Kruger%20&%20Dunning%20(1999)%20%5BClueless%20article%5D.pdf}
\end{itemize}
\end{document}