stone-zeng / fduthesis

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

参考文献引用的又一奇怪的要求 #195

Closed plong511 closed 3 years ago

plong511 commented 3 years ago

各位不好意思我又有问题了,刚发现经院还有一个奇怪的格式要求没满足…… 就是文中的引用,如果是两个作者的,应该是张三和李四(2020)或Zhang and Li (2020)这种格式的,而gb7714-2015是两个以上一律等或et al. 如果我改成chinese-erj的引用格式,两个作者倒是可以显示了,但变成了 张三,李四(2020)或 Zhang, Li (2020)这样,还是不对。 是否有办法调整一下?

hushidong commented 3 years ago

见:


\documentclass[twoside]{article}
\usepackage{ctex}
\usepackage[backend=biber,citestyle=gb7714-2015ay,bibstyle=gb7714-2015,mincitenames=1,maxcitenames=2]{biblatex}
\DefineBibliographyStrings{english}{
        andincite         = {and},
        andincitecn       = {和},
}

\usepackage[colorlinks]{hyperref}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{duhamel,
Author = {Umarov, S. R. and Sa\u{\i}damatov, E. M.},
Title = {A generalization of Duhamel’s principle for differential equations of fractional order},
Journal = {Doklady Mathematics},
Volume = {75},
Number = {1},
Pages = {94-96},
DOI = {10.1134/S1064562407010267},
Year = {2007},
}

@ARTICLE{DUBAR2013--,
  author       = {DUBAR, K L.  AND MITCHELL, D A.},
  title        = {Revealing nature's synthetic potential through the study of ribosomal natural product biosynthesis},
  Journaltitle = {ACS chemical biology},
  DATE         = {2013},
  VOLUME       = {8},
  pages        = {473-487},
  url          = {http://pubs.acs.org/doi/pdfplus/10.1021/cb3005325},
  urldate      = {2013-10-16}
}

@ARTICLE{DUBAR2008--,
  author       = {DUBAR, K L.  AND MITCHELL, D A.},
  title        = {A study on online pharmaceutical operating situation and supervision mechanism},
  Journaltitle = {Shanghai food and drug information research},
  DATE         = {2008},
  number       = {1},
  pages        = {8-11},
}

@ARTICLE{关立哲2014--,
  author       = {关立哲 and 韩纪富 and 张晨延},
  title        = {科技期刊编辑审读中要注重比较思维的科学运用},
  Journaltitle = {编辑学报},
  DATE         = {2014},
  VOLUME       = {26},
  number       = {2},
  pages        = {144-146}
}

@ARTICLE{关立哲2005--,
  author       = {韩纪富 and 张晨延},
  title        = {从交易费用的角度谈如何构建药品流通的良性机制},
  Journaltitle = {中国物价},
  DATE         = {2005},
  number       = {8},
  pages        = {42-45},
}

\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

正文\cite{关立哲2005--,关立哲2014--}\cite{DUBAR2008--,DUBAR2013--}\cite{duhamel}正文

%\printbibliography[env=numerical]
\printbibliography
    \end{document} 

结果为: 图片

plong511 commented 3 years ago

见:


\documentclass[twoside]{article}
\usepackage{ctex}
\usepackage[backend=biber,citestyle=gb7714-2015ay,bibstyle=gb7714-2015,mincitenames=1,maxcitenames=2]{biblatex}
\DefineBibliographyStrings{english}{
        andincite         = {and},
        andincitecn       = {和},
}

\usepackage[colorlinks]{hyperref}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@Article{duhamel,
Author = {Umarov, S. R. and Sa\u{\i}damatov, E. M.},
Title = {A generalization of Duhamel’s principle for differential equations of fractional order},
Journal = {Doklady Mathematics},
Volume = {75},
Number = {1},
Pages = {94-96},
DOI = {10.1134/S1064562407010267},
Year = {2007},
}

@ARTICLE{DUBAR2013--,
  author       = {DUBAR, K L.  AND MITCHELL, D A.},
  title        = {Revealing nature's synthetic potential through the study of ribosomal natural product biosynthesis},
  Journaltitle = {ACS chemical biology},
  DATE         = {2013},
  VOLUME       = {8},
  pages        = {473-487},
  url          = {http://pubs.acs.org/doi/pdfplus/10.1021/cb3005325},
  urldate      = {2013-10-16}
}

@ARTICLE{DUBAR2008--,
  author       = {DUBAR, K L.  AND MITCHELL, D A.},
  title        = {A study on online pharmaceutical operating situation and supervision mechanism},
  Journaltitle = {Shanghai food and drug information research},
  DATE         = {2008},
  number       = {1},
  pages        = {8-11},
}

@ARTICLE{关立哲2014--,
  author       = {关立哲 and 韩纪富 and 张晨延},
  title        = {科技期刊编辑审读中要注重比较思维的科学运用},
  Journaltitle = {编辑学报},
  DATE         = {2014},
  VOLUME       = {26},
  number       = {2},
  pages        = {144-146}
}

@ARTICLE{关立哲2005--,
  author       = {韩纪富 and 张晨延},
  title        = {从交易费用的角度谈如何构建药品流通的良性机制},
  Journaltitle = {中国物价},
  DATE         = {2005},
  number       = {8},
  pages        = {42-45},
}

\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

正文\cite{关立哲2005--,关立哲2014--}\cite{DUBAR2008--,DUBAR2013--}\cite{duhamel}正文

%\printbibliography[env=numerical]
\printbibliography
    \end{document} 

结果为: 图片

能否告诉我需要输入哪些命令直接加在模板上吗? 我加了 \DefineBibliographyStrings{english}{ andincite = {and}, andincitecn = {和}, } 这一段在导言区,似乎不认

hushidong commented 3 years ago

放导言区,biblatex调用之后。我没细研究模板,不知道biblatex是什么时候调用的。

那么就这样处理:

\AtEndPreamble{
\DefineBibliographyStrings{english}{
        andincite         = {and},
        andincitecn       = {和},
}
}
plong511 commented 3 years ago

@stone-zeng 这段应该加在什么地方呢?我试了导言区的几个地方,不是报错就是没有效果

hushidong commented 3 years ago

mincitenames=1,maxcitenames=2 这两个选项,也别忘了,也要传给biblatex

plong511 commented 3 years ago

mincitenames=1,maxcitenames=2 这两个选项,也别忘了,也要传给biblatex

这两个选项倒是顺利地加上去了,但现在变成了Zhang, Li (2020)这种形式,and怎么也加不上去

stone-zeng commented 3 years ago
\PassOptionsToPackage{mincitenames=1, maxcitenames=2}{biblatex}
\documentclass{fduthesis}

\fdusetup{
  style = {
    bib-backend = biblatex,
    bib-style = gb7714-2015,
    cite-style = gb7714-2015ay,
  }
}

\AtEndPreamble{
  \DefineBibliographyStrings{english}{
    andincite   = {and},
    andincitecn = {和},
  }
}

\begin{document}
...
\end{document}
plong511 commented 3 years ago
\PassOptionsToPackage{mincitenames=1, maxcitenames=2}{biblatex}
\documentclass{fduthesis}

\fdusetup{
  style = {
    bib-backend = biblatex,
    bib-style = gb7714-2015,
    cite-style = gb7714-2015ay,
  }
}

\AtEndPreamble{
  \DefineBibliographyStrings{english}{
    andincite   = {and},
    andincitecn = {和},
  }
}

\begin{document}
...
\end{document}

\AtEndPreamble{ \DefineBibliographyStrings{english}{ andincite = {and}, andincitecn = {和}, } } 这一段还是没有效果。请问我有没有办法直接修改cls文件?

plong511 commented 3 years ago
\PassOptionsToPackage{mincitenames=1, maxcitenames=2}{biblatex}
\documentclass{fduthesis}

\fdusetup{
  style = {
    bib-backend = biblatex,
    bib-style = gb7714-2015,
    cite-style = gb7714-2015ay,
  }
}

\AtEndPreamble{
  \DefineBibliographyStrings{english}{
    andincite   = {and},
    andincitecn = {和},
  }
}

\begin{document}
...
\end{document}

这一段加上去后什么效果都没有,甚至还不会报错

stone-zeng commented 3 years ago

……我这里都是测试好了的,你看看是不是按照这个格式写的(没让直接复制啊喂),以及辅助文件删掉之后再编译试试。

plong511 commented 3 years ago

……我这里都是测试好了的,你看看是不是按照这个格式写的(没让直接复制啊喂),以及辅助文件删掉之后再编译试试。

我没有直接复制呀...我百思不得其解的是 \AtEndPreamble{ \DefineBibliographyStrings{english}{ andincite = {and}, andincitecn = {和}, } } 这一段加上去后什么变化都没有,甚至不会报错

stone-zeng commented 3 years ago

加:

image

不加:

image

plong511 commented 3 years ago

加:

image

不加:

image

我已经放弃这个方式了。。。我发现原来的chinese-erj格式是可以实现这样的。但有两个问题,一是我没法只设置cite-style是chinese-erj的而bib-style保持gb7714-2015。二是,chinese-erj的文中引文格式,英文名之间是&而不是and,这个有办法解决吗?

hushidong commented 3 years ago

用chinese-erj,同样用这句:

\AtEndPreamble{
\DefineBibliographyStrings{english}{
andincite = {and},
andincitecn = {和},
}
}

就是把&换成了and

hushidong commented 3 years ago

不加的话,你就在系统里面搜索chinese-erj.CBX,把

\DefineBibliographyStrings{english}{
andincite = {and},
andincitecn = {和},
}

放进去,目的是把把\&改成and

stone-zeng commented 3 years ago

不要直接改 TeX 发行版自带的所有文件,如果要改,就复制到编译所在的当前目录下,会覆盖系统同名文件的。

plong511 commented 3 years ago

不要直接改 TeX 发行版自带的所有文件,如果要改,就复制到编译所在的当前目录下,会覆盖系统同名文件的。

我发现在本地用TexStudio编译是可以实现的,但在overleaf上就没有效果,这会是什么原因呢? 不行的话也可以的,只要能编译出来就好