
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[natbibapa]{apacite}
\title{For testing}
\begin{document}
Information about natbib in \citeauthor{sharelatex}.
\bibliographystyle{apacite}
\bibliography{bibli.bib}
\end{document}
これにより、「挿入された $ がありません」というエラーが発生します。mathmode は apacite または citeauthor とどのような関係があるのでしょうか?
答え1
問題は_
URL 内の で、これは通常、数式モードでのみ使用できます。これらを URL で使用するには、url
またはhyperref
パッケージのいずれかを使用します。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[natbibapa]{apacite}
\usepackage{url}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@misc{sharelatex,
title={ShareLaTeX, the Online LaTeX Editor},
url={nl.sharelatex.com/learn/Natbib_citation_styles},
journal={ShareLaTeX, Online LaTeX-verwerker}
}
\end{filecontents*}
\title{For testing}
\begin{document}
Information about natbib in \citeauthor{sharelatex}.
\bibliographystyle{apacite}
\bibliography{\jobname}
\end{document}