stone-zeng / fduthesis

LaTeX thesis template for Fudan University
LaTeX Project Public License v1.3c
820 stars 207 forks source link

参考文献格式如何自定义 #200

Closed xnuohz closed 3 years ago

xnuohz commented 3 years ago

image 请问如何将作者姓名改为首字母大写的形式

sikouhjw commented 3 years ago

加大括号 {Devlin}

xnuohz commented 3 years ago

加大括号 {Devlin}

我的bib里是这么写的,加了大括号的

@inproceedings{devlin2018bert,
 address = {Minneapolis, Minnesota},
 author = {Devlin, Jacob and Chang, Ming-Wei and Lee, Kenton and Toutanova, Kristina},
 booktitle = {Proceedings of the 2019 Conference of the North {A}merican Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)},
 doi = {10.18653/v1/N19-1423},
 pages = {4171--4186},
 publisher = {Association for Computational Linguistics},
 title = {{BERT}: Pre-training of Deep Bidirectional Transformers for Language Understanding},
 url = {https://www.aclweb.org/anthology/N19-1423},
 year = {2019}
}
sikouhjw commented 3 years ago

加大括号 {Devlin}

我的bib里是这么写的,加了大括号的

@inproceedings{devlin2018bert,
 address = {Minneapolis, Minnesota},
 author = {Devlin, Jacob and Chang, Ming-Wei and Lee, Kenton and Toutanova, Kristina},
 booktitle = {Proceedings of the 2019 Conference of the North {A}merican Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)},
 doi = {10.18653/v1/N19-1423},
 pages = {4171--4186},
 publisher = {Association for Computational Linguistics},
 title = {{BERT}: Pre-training of Deep Bidirectional Transformers for Language Understanding},
 url = {https://www.aclweb.org/anthology/N19-1423},
 year = {2019}
}

里面再加

xnuohz commented 3 years ago

加大括号 {Devlin}

我的bib里是这么写的,加了大括号的

@inproceedings{devlin2018bert,
 address = {Minneapolis, Minnesota},
 author = {Devlin, Jacob and Chang, Ming-Wei and Lee, Kenton and Toutanova, Kristina},
 booktitle = {Proceedings of the 2019 Conference of the North {A}merican Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)},
 doi = {10.18653/v1/N19-1423},
 pages = {4171--4186},
 publisher = {Association for Computational Linguistics},
 title = {{BERT}: Pre-training of Deep Bidirectional Transformers for Language Understanding},
 url = {https://www.aclweb.org/anthology/N19-1423},
 year = {2019}
}

里面再加

author = {{Devlin}, {Jacob} and {Chang}, {Ming-Wei} and {Lee}, {Kenton} and {Toutanova}, {Kristina}},

这样改的话还是没有效果

sikouhjw commented 3 years ago

加大括号 {Devlin}

我的bib里是这么写的,加了大括号的

@inproceedings{devlin2018bert,
 address = {Minneapolis, Minnesota},
 author = {Devlin, Jacob and Chang, Ming-Wei and Lee, Kenton and Toutanova, Kristina},
 booktitle = {Proceedings of the 2019 Conference of the North {A}merican Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers)},
 doi = {10.18653/v1/N19-1423},
 pages = {4171--4186},
 publisher = {Association for Computational Linguistics},
 title = {{BERT}: Pre-training of Deep Bidirectional Transformers for Language Understanding},
 url = {https://www.aclweb.org/anthology/N19-1423},
 year = {2019}
}

里面再加

author = {{Devlin}, {Jacob} and {Chang}, {Ming-Wei} and {Lee}, {Kenton} and {Toutanova}, {Kristina}},

这样改的话还是没有效果

删除辅助文件再编译吗?

xnuohz commented 3 years ago

gbt7714-plain.bst和gbt7714-unsrt.bst都是控制格式的文件,里面有个#1 'uppercase.name :=, 我给改成#0 'uppercase.name :=了,重新编译也没有效果

xnuohz commented 3 years ago

overleaf上的

sikouhjw commented 3 years ago

嗯……我都测试过了,texlive2021+bibtex 我说的方法是没问题的,我也提示了「删除辅助文件」

xnuohz commented 3 years ago

好吧,我自己再试试,多谢

zepinglee commented 3 years ago

加大括号 {Devlin}

不要这样改,会破坏其他格式

xnuohz commented 3 years ago

加大括号 {Devlin}

不要这样改,会破坏其他格式

求教,应该怎么写

zepinglee commented 3 years ago

gbt7714-plain.bstgbt7714-unsrt.bst 都是控制格式的文件,里面有个#1 'uppercase.name :=, 我给改成#0 'uppercase.name :=了,重新编译也没有效果

求教,应该怎么写

从 TeX Live 2020 开始这俩文件名已经改成了 gbt7714-numerical.bstgbt7714-author-year.bst。你可以从 https://github.com/CTeX-org/gbt7714-bibtex-style 拷贝一份 gbt7714-numerical.bst 然后修改 uppercase.name 前面的 #0,这样 fduthesis 就会调用修改后的版本。

另外一种方案是使用 biblatex。

xnuohz commented 3 years ago

gbt7714-plain.bstgbt7714-unsrt.bst 都是控制格式的文件,里面有个#1 'uppercase.name :=, 我给改成#0 'uppercase.name :=了,重新编译也没有效果

求教,应该怎么写

从 TeX Live 2020 开始这俩文件名已经改成了 gbt7714-numerical.bstgbt7714-author-year.bst。你可以从 https://github.com/CTeX-org/gbt7714-bibtex-style 拷贝一份 gbt7714-numerical.bst 然后修改 uppercase.name 前面的 #0,这样 fduthesis 就会调用修改后的版本。

另外一种方案是使用 biblatex。

我试试

xnuohz commented 3 years ago

image

bib-backend = bibtex,
bib-style = {gbt7714-numerical.bst},

这么改之后,确实小写了,但左侧编号没了,怎么打开呢? image

zepinglee commented 3 years ago

这么改之后,确实小写了,但左侧编号没了,怎么打开呢?

bib-style = {numerical},

xnuohz commented 3 years ago

这么改之后,确实小写了,但左侧编号没了,怎么打开呢? image

bib-style = {numerical},

这一句没有效果,出来的还是跟原来一样,不过大小写问题终于没了hhh image

zepinglee commented 3 years ago

这一句没有效果,出来的还是跟原来一样,不过大小写问题终于没了hhh

嗯?我从 513f7e9 bash install-unix.sh 新装了一份,同样拷贝、修改 gbt7714-numerical.bst,并不会有这个问题。

Screen Shot 2021-05-19 at 22 29 40
xnuohz commented 3 years ago

请问gbt7714-numerical.bst里面哪个参数是控制行号显示与否的?

zepinglee commented 3 years ago

请问gbt7714-numerical.bst里面哪个参数是控制行号显示与否的?

序号不是 bst 控制的,而是取决于 natbib 的 LaTeX 宏设置的 cite style。你不妨在 \begin{document} 前重新设置下 \bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}

xnuohz commented 3 years ago

在 \begin{document} 里面设置这个ok了,感谢您的解答