Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于参考文献的两个问题 #296

Closed
4 tasks
GitatHub opened this issue Jul 13, 2020 · 36 comments
Closed
4 tasks

关于参考文献的两个问题 #296

GitatHub opened this issue Jul 13, 2020 · 36 comments

Comments

@GitatHub
Copy link

GitatHub commented Jul 13, 2020

检查 / Check

编译环境 / Compilation Environment

  • 操作系统 / Operating System

    • Windows 7/8/10
    • macOS
    • [ x] Linux
  • TeX 发行版 / Tex Distribution

    • [ x] TeX Live 2020
    • MiKTeX
    • CTeX

描述问题 / Problem Description

问题描述:

  1. 同一个作者在同一年的多篇文章,在正文中会以 Mo 2020a, Mo 2020b 等方式显示,
    但是在参考文献列表里,却没有 a b 区分,类似:
    Mo H, Nature, 2020
    Mo H, Science, 2020
    2020后面没有字母区分

  2. zepinglee 的repo 已经移除了 ucas 分支
    https://github.com/CTeX-org/gbt7714-bibtex-style/tree/master/variants

gbt7714-xxx.bst:文献样式定义文件。由 zepinglee 开发,在最新国标的基
础上对 ucas 进行了定制。与文献样式有关的问题,请查阅开发者所提供的文档,
并建议适当追踪 ucas 样式分支的更新。

日志文件 / .log file

将编译生成的 .log 文件拖入下行空白处:

问题截图 / Screenshots

将出现的问题或需要实现的效果的 截图照片 拖入下行空白处:

最小工作示例(MWE) / Minimal Working Example

@mohuangrui
Copy link
Owner

  1. 对于同一个作者在同一年的多篇文章,a, b 是用来区分引用标识的,文献列表中同一个作者在同一年的多篇文章有不同的题目等,自然不需要加a, b。
  2. 时间太久我也不记得基于国标改了什么,应该是没改什么,所以直接使用国标即可。这个不影响,我下次更新下链接。

@GitatHub
Copy link
Author

GitatHub commented Jul 16, 2020

  1. 对于同一个作者在同一年的多篇文章,a, b 是用来区分引用标识的,文献列表中同一个作者在同一年的多篇文章有不同的题目等,自然不需要加a, b。

不。电子版我们可以通过点链接的方式到达参考文献列表中的某一文献,但是多数规范是以印刷出来为标准的。
如果不在参考文献列表里加入 a b c 这样的标识,读者不能确定正文中的 Mo 2020a 是指哪一篇论文。
这个问题至少在 2017年的模板里没有,应该是后来更新时引入的。
如果这是国标更新引入的,那么这个绝对是个错误的标准。我估计是BUG。

  1. 时间太久我也不记得基于国标改了什么,应该是没改什么,所以直接使用国标即可。这个不影响,我下次更新下链接。

嗯,仅仅是提醒。

@hushidong
Copy link

hushidong commented Jul 17, 2020

国标在年份后是有abc区分的,
甚至一文作者有等,另一文没有,也是区分加abc的。
祥见第10节示例。
10.2.3节分别给出了中英文示例,均采用abc区分。

@GitatHub
Copy link
Author

如果你需要唯一识别,那你就应该考虑 numbers 样式而非 authoryear,如果要用 authoryear,那就需接受其本身的特点,而这并非国标的问题。authoryear中引入的et al,and,abc等都会导致一定的模糊,事实上,siam等期刊要求文献列表中同一作者同一年份时用 ‘-’ 标记作者。所以继续讨论下去是没有意义的。

从没听说过什么 author year 不能加 a b c 标识,我只知道贵模板 2017 年的时候 author year 的 作者后面是有 a b c 的。
所有的英文期刊 authoryear 方式下,也有 abc 标识的。
比如附图。
正文,年份后面加 a b
authoryear
参考文献,年份后面有 a b
ref

正文,年份后面加 a b
authoryearCN
参考文献,年份后面有 a b
refCN

所以,这个问题有解决的意义。

@GitatHub
Copy link
Author

GitatHub commented Jul 17, 2020

你是对的。所以这个模板在这方面应该是出了BUG。
对这个要求在意的,或许可以考虑使用历史版本。

国标在年份后是有abc区分的,
甚至一文作者有等,另一文没有,也是区分加abc的。
祥见第10节示例。
10.2.3节分别给出了中英文示例,均采用abc区分。

@mohuangrui
Copy link
Owner

@GitatHub 是 bst 出了问题,已更新

@hushidong 已初步加入你的 gbt-biblatex 样式,谢谢

@hushidong
Copy link

好的,后面我对比一下bst的结果,修正一下,确保间距等格式一致。

@hushidong
Copy link

hushidong commented Jul 18, 2020

我有一个疑问,著录格式是不是要求国标作者年制的格式,还是有特殊的要求格式,我记得就是之前的著录格式与国标是有差别的,为此我还特意增加了一个选项mergedate=none来适应他的。如果是要求国标格式,那么就不用说这个事情了。

目前遵守国标的格式,我仔细测试了一下,bibtex和biblatex两种方法主要有如下差异:

  1. biblatex生成的超链接仅在年份上面,而基于bibtex的方法是整个标注标签。另外hyperref宏包放到导言区最后,似乎影响了biblatex正常的超链接生成,而基于bibtex的方法是没有影响的。我将hyperref前移以后解决,编译也没有出现任何问题。
  2. bibtex生成的俄文的标注标签,目前存在问题,多了名的信息,即ДубровинА. И, 其实应是Дубровин
  3. bibtex生成incollection类型的文献类型标识,目前存在问题,类型标识成了M,应是G
  4. bibtex中文排序是基于用户给定的key域信息,而biblatex的排序是严格基于作者名和标题名的拼音来进行排序的,所以
    袁训来, 陈哲, 肖书海为作者的三篇文献,篇二排在最前,篇一排在最后,因为二的拼音是e,而一的拼音是y。这个和bibtex生成的顺序是不一致的。
  5. 文献著录表中的英文作者的大小写,由于bibtex是直接生成的大写字母所以符合国标全部大写的要求,而biblatex生成的文献表作者是通过MakeUppercase宏实现大写的,由于arttratex.Sty中的\renewcommand{\MakeUppercase}[1]{参考文献 没有生成到目录 #1}定义将其作用失效了,所以没有大写的效果了。
  6. 文献著录表中标题的大小写,由于bibtex是直接生成的sentencecase格式,所以出来的是sentencecase格式,而biblatex需要用makesentencecase宏处理,考虑其鲁棒性,所以没有采用,而是直接原样输出,所以标题的大小写是由bib文件输入内容控制的。

可以用我提交的pr进行测试比较。见 #298

然后bibtex存在问题的地方,第2和3条可以请lee zeping确认一下。

@mohuangrui
Copy link
Owner

@hushidong 辛苦了

  1. “hyperref宏包放到导言区最后,似乎影响了biblatex正常的超链接生成,而基于bibtex的方法是没有影响的。我将hyperref前移以后解决,编译也没有出现任何问题”。

hyperref 放置在导言区最后是必要的,也是其hyperref文档所建议的,不放最后虽然编译没有问题,但不代表没有隐藏其他问题。如果可以,应该考虑biblatex哪出了问题。

2 + 3. 好的,@zepinglee 请确认下 @hushidong 的建议

  1. 这个你曾经提起过,这个问题不大,对于有需求的用户可以自行调整下bib文件

  2. 这个没关系,绝大数人不想要全部大写,还要求改bibtex的默认设定

  3. 这个原样输出挺好的

关于pr,首先hyperrref的问题我觉得还需更深入的理解下,然后我仍坚持bibtex为默认,毕竟biblatex还是尚未为学术期刊所广泛接受 :D

@zepinglee
Copy link

  1. 我原来是用分支处理 thu、ustc 等学校的修改版,后来感觉更新时不够方便,所以改成生成到 variants 目录,还添加了测试。ucas 的还没处理。
  2. 关于俄文,有没有完整的 bib 来测试下?
  3. incollection 是指合集中析出的文献,比如标准中这个例子:

Screen Shot 2020-07-19 at 13 21 28

@hushidong
Copy link

hushidong commented Jul 19, 2020

@zepinglee 俄文的就用这个bib条目吧,你看一下authoryear的标注标签。

@Article{Dubrovin1906,
author = { Дубровин, А. И },
title = { Открытое письмо Председателя Главного Совета Союза Русского Народа Санкт-Петербургскому Антонию, Первенствующему члену Священного Синода },
journal = { Вече },
year = { 1906 },
volume = { },
edition = { 97 },
month = { 7 дек. 1906 },
pages = { 1-3 },
hyphenation = { russian },
language = { russian }
}

另外incollection问题,我想你这样的处理也没有啥问题的。我之前有所区分主要是考虑三类标识符,M,C,G
我这样考虑的,inbook用M,inproceedings用C,而incollection用的G。
但我想一般用户根本不需要那么仔细的区分,所以这个是无所谓的。

另外,国标中的所有条目,包括正文中的,我之前都测试过,所以你直接从我那把bib拷过去,就可以测试,不用再去写bib了。

@mohuangrui
那个{\MakeUppercase}重定义是处于什么考虑,把latex常用宏定义掉,会不会影响用户自己的宏使用?

关于hyperref我再测试一下,我单独做一个文件hyperref放前放后都是正常的,主要是模板放后似乎有点问题,我看看是什么导致的,找到个解决方法。

至于pr是给你方便测试的,默认bibtex什么按你自己考虑处理就行。不过citep和citet命令还是需要改一下,由于g7714-2015样式默认定义了citep和citet命令,且与希望的格式略有差异,所以providecommand可能无法正确设置,所以需要renew进行重定义。

@zepinglee
Copy link

俄文的姓名处理有误主要是 BibTeX 尝试取首字母时,并不能处理 UTF-8 编码下的西里尔字母(两个字节)。如果要修的话,倒是可以检测语言,再进行细致的处理,但我不太感兴趣了。

我最打算用 lua 写个 citeproc,这样就可以在 LaTeX 中使用 CSL 的那套东西了。

BibTeX 的 inbook 规定的域比较奇怪,并不含 booktitle,这点跟 biblatex 不同。
Screen Shot 2020-07-19 at 16 28 32
所以直接当成 book 处理了。

\MakeUppercase 的处理应该是为了去掉页眉的强制大写(\chaptermark 命令中。)

@zepinglee
Copy link

@mohuangrui @GitatHub 你们学校有没有官方的参考文献格式要求或者?如果有的话我可以在 CTeX-org/gbt7714-bibtex-style/variants 搞个 ucas 的。印象中之前不同所的格式要求还不太一样

@hushidong
Copy link

@zepinglee 好呀,好呀,好事,支持你。
我之前看了一下csl那套东西,的确有其好处的,还能用在非latex文档里头,我初步看了一下目前好像已经有了国标的csl,但不是非常完善的。

你是要写个引擎了,把csl解析然后,输出latex的内容是吧,这挺好的。我之前写了个bibmap利用python做的,可以利用python代码来写样式,然后输出latex内容,但那时我还不知道csl那套东西,所以没有考虑去做,现在则没有那么多精神再去写了。

@hushidong
Copy link

hushidong commented Jul 19, 2020

@mohuangrui
超链接的问题,跟biblatex作者交流了下,已经搞清楚了。见plk/biblatex#1029

主要原因是biblatex是在atendpreamble中判断hyperref是否已经加载,然后做不同的处理逻辑。因为hyperref这个atendpreamble晚于biblatex的atendpreamble,所以自然就无法检测到了。

可以有两种解决方法
1是提前atendpreamble命令放到biblatex之前,不影响任何东西,唯一就是语句的位置换一下。

2是不动位置,biblatex加手动超链接选项,以及开关语句。

@mohuangrui
Copy link
Owner

@hushidong @zepinglee 感谢两位的解答和讨论:

  1. 重定义MakeUpperCase是特意的,其最后的效果也是需要的,比如biblatex,并不希望作者名全大写,而是只要首字母大写。

@hushidong :

  1. 谢谢关于 hyperref 的解答,我将采用你的提议解决。
  2. 虽然采用bibtex默认,但biblatex确实对多语言混排具有更高的适应性,将来合适时我将采用biblatex默认。
  3. 当前有一个小问题就是
\DefineBibliographyStrings{english}{
        andincite         = {和},
        andincitecn       = {和},
        andothersincitecn = {等},
        andothersincite   = {等{\adddot}},%adddot才能避开标点追踪
}

那个 \adddot 不太对,改成中文后,变成了 “等.” 。然后,你在 #247 中的上述设定为何对非authoryear的无效?(我对上述设定做了全局可见,而不是只对authoryear)

@zepinglee

  1. ucas 的要求基本与国标一致,只是 英文的 “et al.” 和 “and” 需要改为中文的 “等” 和 “和”。你曾经为此提供过两个接口:“\bibetal” “\biband”,但似乎最新的版本中已经不存在了?因为我重定了这两个命令不再有效果。
  2. 感觉突然修改bst的名称影响还是挺大的 :D

@zepinglee
Copy link

@zepinglee

  1. ucas 的要求基本与国标一致,只是 英文的 “et al.” 和 “and” 需要改为中文的 “等” 和 “和”。你曾经为此提供过两个接口:“\bibetal” “\biband”,但似乎最新的版本中已经不存在了?因为我重定了这两个命令不再有效果。
  2. 感觉突然修改bst的名称影响还是挺大的 :D

我待会再加一下

@mohuangrui
Copy link
Owner

@zepinglee 非常感谢!觉得提供这些一般性的接口还是很有价值的,同时还有你提供的那些 load.config 函数,这样可以通过一个核文件实现不同的设定,否则维持那么多学校的不同版本实在是太幸苦了。再次感谢你一直以来提供的支持和帮助,幸苦了!

@hushidong
Copy link

@mohuangrui
DefineBibliographyStrings 那一段设置国标不需要的,之前记得给出来是为了测试你们资环学院等后面有个点的情况。

@mohuangrui
Copy link
Owner

@hushidong 国标是可以不需要,只是ucas 的要求基本与国标一致,但引用处英文的 “et al.” 和 “and” 需要改为中文的 “等” 和 “和”。

对了,我没找到你的 gb-7714 对 citep 和citet的定义,它们具体是怎样的?如果你的定义更合适的话,那就用 providecmmand 更好,因为providecommand只是为了提供一个兼容性

@hushidong
Copy link

hushidong commented Jul 20, 2020

@mohuangrui 好的。biblatex大多数设置可以通过选项来实现,可以这么修改

\ifartx@biber%
%\RequirePackage{hyperref}
\ifartx@numbers% enable numbered citation style
\ifartx@super% enable superscripted citation style
\RequirePackage[backend=biber,hyperref=true,style=gb7714-2015]{biblatex}%
\else
\RequirePackage[backend=biber,hyperref=true,style=gb7714-2015]{biblatex}%
\fi
\fi
\ifartx@authoryear% enable author year citation style
\RequirePackage[backend=biber,hyperref=true,style=gb7714-2015ay,%
gbcitelocal=chinese,maxcitenames=2,hyperref=manual]{biblatex}%
\DefineBibliographyStrings{english}{
andincitecn = {和},
andothersincitecn = {等},
}
\fi
\ifartx@alpha% enable alpha citation style
\RequirePackage[backend=biber,hyperref=true,style=alphabetic]{biblatex}%
\fi
\addbibresource{Biblio/ref.bib}%
\renewrobustcmd*{\citet}{\textcite}
\renewrobustcmd*{\citep}{\parencite}
\fi

另一处:
\AtEndPreamble{%
\RequirePackage{hyperref}% load at last
\ifartx@biber%
\BiblatexManualHyperrefOn
\fi
\hypersetup{% set hyperlinks
pdfencoding=auto,% allows non-Latin based languages in bookmarks
psdextra=true,% extra support for math symbols in bookmarks
%bookmarks=true,% show bookmarks bar
bookmarksnumbered=true,% put section numbers in bookmarks
pdftitle={@title},% title
pdfauthor={@author},% author
pdfsubject={@title},% subject
%pdftoolbar=true,% show toolbar
%pdfmenubar=true,% show menu
pdffitwindow=false,% window fit to page when opened
pdfstartview={FitH},% fits the width of the page to the window
%pdfnewwindow=true,% links in new window
%backref=true,% do bibliographical back references
%pagebackref=true,% backreference by page number
colorlinks=true,% false: boxed links; true: colored links
linkcolor=black,% color of internal links
citecolor=blue,% color of links to bibliography
filecolor=blue,% color of file links
urlcolor=blue,% color of external links
}
\ifartx@xlink% set link color to black
\hypersetup{% set hyperlinks
hidelinks,% remove link color and border
}
\fi
}

另外,citep和citet在*.cbx中定义的,我初步测试是似乎存在问题的,我有点忘了之前出于那种考虑写的,可能有点像顺序编码制的代码,所以直接重定义较好。

结果为:
image

@mohuangrui
Copy link
Owner

@hushidong 谢谢,不过目前的问题是,通过那样修改可以让 authoryear 的 et al 和 and 变为中文的 等 和 和,但是,numbers 样式下 citet 中的却变不过来,即使将 \DefineBibliographyStrings{english} 移出 \if 变为全局设定。或许说起来比较绕口,你测试下 biber,numbers 就明白了

对于 citet 和 citep, 我的测试倒是发现你的没有问题

@hushidong
Copy link

好的,我晚上试一下,numbers的情况。

我之前定义的ay下的citet对于非压缩情况是没有问题的,但是在压缩情况下括号位置不对。
textcite则有另外的问题,如果加页码的话位置也有点问题。

这些本来也是小问题,一般用户都不会碰到,但作为样式设计还是要考虑全面。

所以,昨天我认真研究下,找到了个暴力的解决方法,还需要测一下,不同的应用下的情况。

@mohuangrui
Copy link
Owner

@hushidong 好的,非常感谢,辛苦了!

对于,citet 和 citep,建议你在 gb-7714中直接链接到 biblatex 相应的 paracite 和 textcite 比较省事和robust。当然,我的考虑肯定没有你的深入。

我等你将 biber,numbers 的解决方案出来后,再一并更新你指出的关于 hyperref 和 cite 命令等问题

@zepinglee
Copy link

我把 ucas 的版本放在了 https://github.com/CTeX-org/gbt7714-bibtex-style/tree/master/variants/ucas
两个测试文件 https://github.com/CTeX-org/gbt7714-bibtex-style/blob/master/test/testbst/ucas-numerical.bblhttps://github.com/CTeX-org/gbt7714-bibtex-style/blob/master/test/testbst/ucas-numerical.bbl

建议将 ucasthesisbst 文件改名为跟 ucas 相关的,这样可以避免错误地调用 TeX Live 的 gbt7714bst

@zepinglee
Copy link

@mohuangrui 好的。biblatex大多数设置可以通过选项来实现,可以这么修改

\ifartx@biber%
%\RequirePackage{hyperref}

用 ``` 修饰代码块可以保留缩进。

@mohuangrui
Copy link
Owner

@zepinglee 非常感谢!

我在ucasthesis中对biband和bibetal做了相应的处理,特别是对中英文版本做了相应的切换,以同时适应国际和国内学生。因此直接调用gbt7714是合适的。之所以现在还加上了bst文件,主要是因为你在2020-03更新了文件名,这样导致未更新LaTeX的无法从ctan调用到你的gbt,所以暂时手动加进去作为过渡。

我看你已在 gbt 中也加了 biband 和 bibetal,这样兼容性增加了不少,再次感谢!

@hushidong
Copy link

hushidong commented Jul 21, 2020

@mohuangrui 已经ok了,citet已经能够正确处理压缩和上标的问题了。

代码这么改:

%- Biber processor + biblatex package
\ifartx@biber%
    %\RequirePackage{hyperref}
    \ifartx@numbers% enable numbered citation style
        \ifartx@super% enable superscripted citation style
            \RequirePackage[backend=biber,hyperref=manual,gbcitelocal=chinese,
            style=gb7714-2015,mincitenames=1,maxcitenames=2]{biblatex}%
        \else
            \RequirePackage[backend=biber,hyperref=manual,gbcitelocal=chinese,
            style=gb7714-2015,mincitenames=1,maxcitenames=2]{biblatex}%
            \renewrobustcmd*{\citet}{\textcite}
            \renewrobustcmd*{\citep}{\parencite}
        \fi
    \fi
    \ifartx@authoryear% enable author year citation style
        \RequirePackage[backend=biber,hyperref=true,style=gb7714-2015ay,%
        gbcitelocal=chinese,maxcitenames=2,hyperref=manual]{biblatex}%
        \renewrobustcmd*{\citep}{\parencite}
    \fi
    \ifartx@alpha% enable alpha citation style
        \RequirePackage[backend=biber,hyperref=manual,style=alphabetic]{biblatex}%
    \fi
    \DefineBibliographyStrings{english}{
            andincitecn       = {和},
            andothersincitecn = {等},
        }
    \addbibresource{Biblio/ref.bib}%
\fi
%-
%-> Link support
%-
\AtEndPreamble{%
    \RequirePackage{hyperref}% load at last
    \ifartx@biber%
        \BiblatexManualHyperrefOn
    \fi
    \hypersetup{% set hyperlinks
        pdfencoding=auto,% allows non-Latin based languages in bookmarks
        psdextra=true,% extra support for math symbols in bookmarks
        %bookmarks=true,% show bookmarks bar
        bookmarksnumbered=true,% put section numbers in bookmarks
        pdftitle={\@title},% title
        pdfauthor={\@author},% author
        pdfsubject={\@title},% subject
        %pdftoolbar=true,% show toolbar
        %pdfmenubar=true,% show menu
        pdffitwindow=false,% window fit to page when opened
        pdfstartview={FitH},% fits the width of the page to the window
        %pdfnewwindow=true,% links in new window
        %backref=true,% do bibliographical back references
        %pagebackref=true,% backreference by page number
        colorlinks=true,% false: boxed links; true: colored links
        linkcolor=black,% color of internal links
        citecolor=blue,% color of links to bibliography
        filecolor=blue,% color of file links
        urlcolor=blue,% color of external links
    }
    \ifartx@xlink% set link color to black
        \hypersetup{% set hyperlinks
            hidelinks,% remove link color and border
        }
    \fi
}

另外由于bbx,cbx都有更新,在ctan更新之前,你先把这四个文件
gb7714-2015.bbx
gb7714-2015.cbx
gb7714-2015ay.bbx
gb7714-2015ay.cbx
放到目录下,用于测试吧。

后面ctan更新后可以删除,或者留着也行。

@mohuangrui
Copy link
Owner

@hushidong 非常感谢,解决的很理想!

如果一定要鸡蛋里挑点骨头,那就是从 biber,authoryear 切换为 biber,numbers 或 biber,super 时会报错,这样得删除一下缓存文件。如果能把这个兼容性提高一下,那就更完美了。

l.249 ...986document, chu2004tushu, chen2005zhulu}
                                                  
? ^C! Interruption.
\blx@runfilter ...{\let #1\@empty \dolistloop }{#1
                                                  }}#1\let \do \noexpand 
l.249 ...986document, chu2004tushu, chen2005zhulu}

@hushidong
Copy link

我测试了一下,从 biber,authoryear 切换为 biber,numbers 或 biber,super 时,没有报错现象,
我的环境是win10+texlive2020

是不是从bibtex转biber出现错误,这时可以理解的,因为bbl文件存在差异,读取的时候会出现问题。

@mohuangrui
Copy link
Owner

@hushidong 不好意思,是我的版本问题。我的linux上是Texlive2017,有点老了。windows上的Miktex和Mac上的texlive2019没有问题。

@mohuangrui
Copy link
Owner

@zepinglee @hushidong 再次感谢两位的诸多帮助和支持!

@hushidong
Copy link

客气,好的,你在2017,2019都编译成功啦,说明biblatex-gb7714-2015包的兼容性还是成功的,我已经好久没有在低版本测试了,biblatex更新了很多,我都怕biblatex-gb7714-2015的一些更新导致在低版本上运行不了了,看来到2017还是可以的,至于更低的2015,2016可能都不一定行了。

@mohuangrui
Copy link
Owner

@hushidong 是的,2017,2019,2020都没问题,为了测试版本和系统兼容,特意弄个Linux,mac,windows三个系统,安装Texlive和miktex的不同版本,再加上 xelatex,pdflatex,luatex以及现在的bibtex和biber还有authoryear、numbers、super不同样式等。凡此种种,以前一般是都尽量测试一遍,现在很难有这个精力了。要把兼容性维持好还是比较费力气的。

@Youguang
Copy link

Youguang commented May 7, 2022

两个参考文献,作者姓氏、年份相同,正文中有 a、b区分,参考文献列表中无a、b区分。尝试了如下方法,有没有更好的解决方法?

尝试了使用 biber,相同姓氏的情况正文中自动添加了名字缩写( K. S. WeinerM. W. Weiner),再进一步改为Weiner K SWeiner M W从而跟参考文献列表中的姓名格式保持一致。把:

\RequirePackage[backend=biber,style=\artxbiberauy,mincitenames=1,maxcitenames=2]{biblatex}%

改成了:

        \RequirePackage[backend=biber,style=\artxbiberauy,mincitenames=1,maxcitenames=2,mergedate=none,gbpub=false,sortcites=false]{biblatex}%
            \renewrobustcmd*{\citet}{\textcite}%
            \renewrobustcmd*{\citep}{\parencite}%
            
            \DeclareNameFormat{labelname}{% uniquename = last, first name initials, https://tex.stackexchange.com/a/126178/181532
                \ifcase\value{uniquename}%
                    \usebibmacro{name:family}
                    {\namepartfamily}
                    {\namepartgiven}
                    {\namepartprefix}
                    {\namepartsuffix}%
                \or
                    \ifuseprefix
                    {\usebibmacro{name:family-given}
                        {\namepartfamily}
                        {\namepartgiveni}
                        {\namepartprefix}
                        {\namepartsuffixi}}
                    {\usebibmacro{name:family-given}
                        {\namepartfamily}
                        {\namepartgiveni}
                        {\namepartprefixi}
                        {\namepartsuffixi}}%
                \or
                    \usebibmacro{name:family-given}
                    {\namepartfamily}
                    {\namepartgiven}
                    {\namepartprefix}
                    {\namepartsuffix}%
                \fi
                \usebibmacro{name:andothers}}
            
            \renewrobustcmd*{\bibinitperiod}{}% remove '.' after name initials, https://tex.stackexchange.com/a/228443/181532
            \renewcommand*{\revsdnamepunct}{}% remove ',' after last name, https://tex.stackexchange.com/a/17593/181532

例子:

@article{Weiner_2017_538,
   author = {Weiner, K. S. and Barnett, M. A. and Lorenz, S. and Caspers, J. and Stigliani, A. and Amunts, K. and Zilles, K. and Fischl, B. and Grill-Spector, K.},
   title = {The Cytoarchitecture of Domain-specific Regions in Human High-level Visual Cortex},
   journal = {Cerebral Cortex},
   volume = {27},
   number = {1},
   pages = {146-161},
   ISSN = {1460-2199 (Electronic)
1047-3211 (Linking)},
   year = {2017},
   type = {Journal Article}
}

@article{Weiner_2017_644,
   author = {Weiner, M. W. and Veitch, D. P. and Aisen, P. S. and Beckett, L. A. and Cairns, N. J. and Green, R. C. and Harvey, D. and Jack, C. R., Jr. and Jagust, W. and Morris, J. C. and Petersen, R. C. and Salazar, J. and Saykin, A. J. and Shaw, L. M. and Toga, A. W. and Trojanowski, J. Q. and Alzheimer's Disease Neuroimaging, Initiative},
   title = {The {Alzheimer's Disease Neuroimaging Initiative} 3: Continued innovation for clinical trial improvement},
   journal = {Alzheimer's \& Dementia},
   volume = {13},
   number = {5},
   pages = {561-571},
   ISSN = {1552-5279 (Electronic)
1552-5260 (Linking)},
   year = {2017},
   type = {Journal Article}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants