
\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}