Namareba食べたい

備忘録てきなもの。だらだら書いていきます。

texの罠その1 Referencesの中のURL

罠ってほどではないけどハマったとこをメモ

Referencesの中でURLを書くときに気をつけること

  1. '/'は\slashに直す
  2. URL を構成する他の文字は{}で区切る
  3. '~'や'_'のまえにも\を付ける

以下具体例

\begin{thebibliography}{40}
\bibitem{1}
hohogehogehoge hogehoge hoge 
https://www.owasp.org/index.php/Cross-site_Scripting_(XSS)
\end{thebibliography}

\begin{thebibliography}{40}
\bibitem{1}
hohogehogehoge hogehoge hage
https:\slash\slash{}www.owasp.\slash{}index.php\slash{}Cross-site\_Scripting\_(XSS)
\end{thebibliography}


てなぐあい。特に、アンダースコアは分かりづらいし、pdfにしたときの被害がでかい。