2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > Latex Misplaced alignment tab character . 的一种可能错误

Latex Misplaced alignment tab character . 的一种可能错误

时间:2022-07-31 18:02:44

相关推荐

Latex Misplaced alignment tab character . 的一种可能错误

问题描述

某期刊真是讲究,如果使用bibtex,要把.bbl里的内容粘贴到main.tex的最后。其实这个也不难,只要正常编译完成之后把bbl中的内容复制到main.tex中即可。

但是刚开始不懂,还以为要手动把每一条参考文献写到bib里,于是就用了zotero中先导出 由所选条目生成条目-->再选择参考文献格式-->复制到剪切板-->手动复制到main.tex最后,如下所示:

\bibitem{buttafavaNonlineofsightImagingUsing}

Buttafava,M.,Zeman,J.,Tosi,A.,Eliceiri,K.&Velten,A.Non-line-of-sightimagingusingatime-gatedsinglephotonavalanchediode.Opticsexpress23,20997–21011().

然后再次编译的时候就会报错:

Misplaced alignment tab character &. ..., M., Zeman, J., Tosi, A., Eliceiri, K. &

log文件记录如下:

l.416 ..., M., Zeman, J., Tosi, A., Eliceiri, K. &

Velten, A. Non-line-of-si...

I can't figure out why you would want to use a tab mark here. If you just want an ampersand, the remedy is

simple: Just type `I\&' now. But if some right brace up above has ended a previous alignment prematurely,

you're probably due for more error messages, and you might try typing `S' now just to see what is salvageable.

问题解决

没看懂它的报错信息,但这里的问题就是&比较特殊,编译器进行了转义而并没有当成普通的"&"进行编译,从而导致了某种错误。所以有两种解决方法

1. 将& 改为 \&

\bibitem{buttafavaNonlineofsightImagingUsing}

Buttafava,M.,Zeman,J.,Tosi,A.,Eliceiri,K. \&Velten,A.Non-line-of-sightimagingusingatime-gatedsinglephotonavalanchediode.Opticsexpress23,20997–21011().

编译出的结果为:

2. 将&改为and

\bibitem{buttafavaNonlineofsightImagingUsing}

Buttafava,M.,Zeman,J.,Tosi,A.,Eliceiri,K. andVelten,A.Non-line-of-sightimagingusingatime-gatedsinglephotonavalanchediode.Opticsexpress23,20997–21011().

编译结果为

当然,回到最初的问题,最好的方法还是按照投稿说明将bibtex得到的bbl文件直接复制到main.tex的最后。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。