zepinglee / gbt7714-bibtex-style

GB/T 7714-2015 BibTeX Style
LaTeX Project Public License v1.3c
1.16k stars 197 forks source link

询问:是否有接口在全局super的参考文献引用的情况下,进行inline引用? #95

Closed liziwl closed 2 years ago

liziwl commented 2 years ago

是否有接口在全局super的参考文献引用的情况下,进行inline(非上标的数字)引用?

sikouhjw commented 2 years ago

你需要的可能是 \citestyle{numbers},可以自定义一个命令

\newcommand{\mycite}[1]{\setcitestyle{numbers}\cite{#1}\setcitestyle{super}}
zepinglee commented 2 years ago

是否有接口在全局super的参考文献引用的情况下,进行inline(非上标的数字)引用?

目前没有提供,可以设置

\makeatletter
\DeclareRobustCommand\parencite{%
  \begingroup
  \citestyle{numbers}%
  \let\NAT@ctype\z@
  \NAT@partrue
  \NAT@swatrue
  \@ifstar{%
    \NAT@fulltrue
    \NAT@cites
  }{%
    \NAT@fullfalse
    \NAT@cites
  }%
}
\makeatother

我在下个版本把这个加进去吧。

zepinglee commented 2 years ago

你需要的可能是 \citestyle{numbers},可以自定义一个命令

\newcommand{\mycite}[1]{\setcitestyle{numbers}\cite{#1}\setcitestyle{super}}

感谢帮忙回复!https://github.com/zepinglee/gbt7714-bibtex-style/issues/95#issuecomment-1067924571 的设置可以支持 \parencite[][]{} 这样带可选参数的形式。

liziwl commented 2 years ago

感谢两位的回复!完美解决问题。