学无先后,达者为师

网站首页 编程语言 正文

latex报错:Misplaced alignment tab character &. ...Endpoints Controller and Service Acc,Latex Misplac

作者:别出BUG求求了 更新时间: 2023-11-15 编程语言

编译后报错:

Misplaced alignment tab character &. …Endpoints Controller and Service Acc,Latex Misplaced alignment tab character &. 的一种可能错误

问题解析:

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

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

\bibitem{buttafavaNonlineofsightImagingUsing2015}
Buttafava, M., Zeman, J., Tosi, A., Eliceiri, K. & Velten, A. Non-line-of-sight imaging using a time-gated single photon avalanche diode. Optics express 23, 20997–21011 (2015).

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

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{buttafavaNonlineofsightImagingUsing2015}

Buttafava, M., Zeman, J., Tosi, A., Eliceiri, K. \& Velten, A. Non-line-of-sight imaging using a time-gated single photon avalanche diode. Optics express 23, 20997–21011 (2015).

编译出的结果为:

2.

2. 将&改为and

\bibitem{buttafavaNonlineofsightImagingUsing2015}

Buttafava, M., Zeman, J., Tosi, A., Eliceiri, K. and Velten, A. Non-line-of-sight imaging using a time-gated single photon avalanche diode. Optics express 23, 20997–21011 (2015).

编译结果为
在这里插入图片描述
当然,回到最初的问题,最好的方法还是按照投稿说明将bibtex得到的bbl文件直接复制到main.tex的最后。

原文链接:https://blog.csdn.net/weixin_39589455/article/details/128533712

  • 上一篇:没有了
  • 下一篇:没有了
栏目分类
最近更新