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

用法:移除\citeauthor*等引用命令引用中文文献时的标注标签中的作者姓名和等之间的空隙 #151

Open
note286 opened this issue Jan 11, 2023 · 5 comments

Comments

@note286
Copy link

note286 commented Jan 11, 2023

在文档中有提及:

对于中文著者,标注第一著者的姓名,其后附“等”。姓名与“et al.”“等”间留适当空隙。

但是我想要移除该空隙,请问如何操作呢?

\documentclass{article}
\usepackage{xeCJK}
\usepackage[style=gb7714-2015]{biblatex}
\addbibresource{ref.bib}
\begin{filecontents}[force]{ref.bib}
@book{xxx,
  author       = {蒋有绪 and 郭泉水 and 马娟 and others},
  title        = {中国森林群落分类及其群落特征},
  address      = {北京},
  publisher    = {科学出版社},
  year         = {1998},
}
\end{filecontents}
\begin{document}
\citeauthor*{xxx}\parencite{xxx}
\printbibliography
\end{document}

image

@hushidong
Copy link
Owner

不好意思啊,最近才看见:

做如下修改:

\documentclass{article}
\usepackage{xeCJK}
\usepackage[style=gb7714-2015]{biblatex}
\addbibresource{ref.bib}
\begin{filecontents}[force]{ref.bib}
@book{xxx,
  author       = {蒋有绪 and 郭泉水 and 马娟 and others},
  title        = {中国森林群落分类及其群落特征},
  address      = {北京},
  publisher    = {科学出版社},
  year         = {1998},
}
\end{filecontents}

\DeclareDelimFormat[cite,parencite,textcite,citeauthor*]{andothersdelim}{}


\begin{document}
\citeauthor*{xxx}\parencite{xxx}

\cite{xxx}

\parencite{xxx}

\textcite{xxx}

\citep{xxx}

\citet{xxx}

\printbibliography
\end{document} 

结果为:
图片

@note286
Copy link
Author

note286 commented Jan 28, 2023

完美解决,非常感谢!

P.S. 可以把该仓库的讨论区打开,日常交流咨询等可以在讨论区进行。

@note286
Copy link
Author

note286 commented Jan 28, 2023

是否可以移除\citeauthor*所产生的或者et al.字样呢?

\documentclass{article}
\usepackage{xeCJK}
\usepackage[style=gb7714-2015]{biblatex}
\addbibresource{ref.bib}
\begin{filecontents}[force]{ref.bib}
@book{xxx, author = {蒋有绪 and 郭泉水 and 马娟 and others},}
@book{yyy, author = {Ammar Sohail and Arif Hidayat and Muhammad Aamir Cheema and David Taniar},}
\end{filecontents}
\begin{document}
\citeauthor*{xxx}

\citeauthor*{yyy}

\printbibliography
\end{document}

image

@hushidong
Copy link
Owner

可以用下面的方式:

\documentclass{article}
\usepackage{xeCJK}
\usepackage[style=gb7714-2015]{biblatex}
\addbibresource{ref.bib}
\begin{filecontents}[force]{ref.bib}
@book{xxx,
  author       = {蒋有绪 and 郭泉水 and 马娟 and others},
  title        = {中国森林群落分类及其群落特征},
  address      = {北京},
  publisher    = {科学出版社},
  year         = {1998},
}

@book{yyy, author = {Ammar Sohail and Arif Hidayat and Muhammad Aamir Cheema and David Taniar},}

\end{filecontents}

\DeclareDelimFormat[cite,parencite,textcite,citeauthor*]{andothersdelim}{}

\DeclareNameFormat{namefmtwithoutother}{%
  \ifgiveninits
    {\usebibmacro{name:family}
      {\namepartfamily}
      {\space}
      {\namepartprefix}
      {\namepartsuffix}}
    {\usebibmacro{name:family}
      {\namepartfamily}
      {\space}
      {\namepartprefix}
      {\namepartsuffix}}%
}

\DeclareCiteCommand*{\citeauthor}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}}
     {}%
   \printnames[namefmtwithoutother][1-1]{labelname}}
  {\multicitedelim}
  {\usebibmacro{postnote}}


\begin{document}
\citeauthor*{xxx}

\citeauthor*{yyy}

\cite{xxx}

\cite{yyy}

\parencite{xxx}

\textcite{xxx}

\citep{xxx}

\citet{xxx}

\printbibliography
\end{document} 

结果为:
图片

@note286
Copy link
Author

note286 commented Jan 28, 2023

非常感谢!

@hushidong hushidong changed the title \citeauthor*引用中文文献时如何移除作者姓名和等之间的空隙 用法:移除\citeauthor*等引用命令引用中文文献时的标注标签中的作者姓名和等之间的空隙 May 27, 2023
@hushidong hushidong reopened this May 27, 2023
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

2 participants