以下の例では、「doi:10.2307/1968102」と印刷されるハイパーリンクを、句読点(:、.、/)のいずれかで自動的に分割するにはどうすればよいでしょうか。
注: .tex ファイルから PDF に直接コンパイルしているので、breakurl
パッケージは機能しません。
\documentclass{article}
\usepackage{hyperref}
\urlstyle{same}
\begin{document}
\begin{thebibliography}{9}
\bibitem{1}
N. Wiener, \emph{Tauberian theorems}, Ann. of Math. (2) \textbf{33} (1932),
\href{http://dx.doi.org/10.2307/1968102}{doi:10.2307/1968102}.
\end{thebibliography}
\end{document}
\nolinkurl
編集: わかりました。の 2 番目の引数に適用すると\href
、必要な動作が得られるようです。
\documentclass{article}
\usepackage{hyperref}
\urlstyle{same}
\begin{document}
\begin{thebibliography}{9}
\bibitem{1}
N. Wiener, \emph{Tauberian theorems}, Ann. of Math. (2) \textbf{33} (1932),
\href{http://dx.doi.org/10.2307/1968102}{\nolinkurl{doi:10.2307/1968102}}.
\end{thebibliography}
\end{document}
答え1
パッケージbreakurl
はあなたの問題を解決します
\documentclass{article}
\usepackage{hyperref}
\usepackage{breakurl}
\begin{document}
\begin{thebibliography}{9}
\bibitem{1}
N. Wiener, \emph{Tauberian theorems}, Ann. of Math. (2) \textbf{33} (1932),
\renewcommand\UrlFont{\rmfamily}
\burlalt{http://dx.doi.org/10.2307/1968102}{doi:10.2307/1968102}.
\href{http://dx.doi.org/10.2307/1968102}{doi:10.2307/1968102}.
\end{thebibliography}
\end{document}
latex
これはthenコマンドで機能しますdvipdf
。
編集:
奇妙なことに、pdflatex
同じファイルでコンパイルしても同じ出力は生成されません。次の行を追加する必要があります。
\burlalt{doi:10.2307/1968102}{http://dx.doi.org/10.2307/1968102}
それを機能させるためです。