引用方括号和圆括号

引用方括号和圆括号

我想知道如何用圆括号引用我的互联网来源,用方括号引用我的其他来源。我想用 () 替换 Wikipedia 引用中的 []。

\documentclass[paper=a4,paper=portrait,pagesize=auto,fontsize=12pt]{scrartcl}

\usepackage[sorting=nyt,style=authoryear, backend=bibtex8]{biblatex}

\makeatletter
\newrobustcmd*{\parentexttrack}[1]{%
  \begingroup
  \blx@blxinit
  \blx@setsfcodes
  \blx@bibopenparen#1\blx@bibcloseparen
  \endgroup}

\AtEveryCite{%
  \let\parentext=\parentexttrack%
  \let\bibopenparen=\bibopenbracket%
  \let\bibcloseparen=\bibclosebracket}
\makeatother

\addbibresource{Literatur}

\begin{document}
\parencite{Wikipedia.8.05.2017}
\parencite{Yoshizawa.1990}

\printbibliography[heading=bibintoc, title=Literaturverzeichnis}, nottype=misc]
\printbibliography[heading=bibintoc, title={Internetverzeichnis}, type=misc]
\end{document}

内容Literature.bib

@misc{Wikipedia.8.05.2017,
  author = {Wikipedia, the free encyclopedia},
  year = {2017},
  title = {Massenspektrometrie},
  url = {https://de.wikipedia.org/wiki/Massenspektrometrie#Arten_von_Analysatoren},
urldate = {29.05.2017} }


@article{Yoshizawa.1990,
  author = {Yoshizawa, Shigeru and Matsushima, Rie and Watanabe, Mariyo F. and Harada, Ken-ichi and Ichihara, Akira and Carmichael, Wayne W. and Fujiki, Hirota},
  year = {1990},
  title = {Inhibition of protein phosphatases by microcystis and nodularin associated with hepatotoxicity},
  pages = {609--614},
  volume = {116},
 number = {6},
  issn = {0171-5216},
  journal = {Journal of Cancer Research and Clinical Oncology},
  doi = {10.1007/BF01637082},
 }

答案1

在这种情况下,您不能使用当前使用的重新定义,因为我们必须能够使用圆括号。

相反

\DeclareCiteCommand{\parencite}
  {\ifentrytype{online}{\bibopenparen}{\bibopenbracket}%
   \usebibmacro{prenote}}%
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}%
   \ifentrytype{online}{\bibcloseparen}{\bibclosebracket}}

到你的序言中。

对于所有其他类型,请使用圆括号,对于其他@online类型,请使用方括号。(如果您@online@misc必须使用@misc,替换\ifentrytype{online}\ifentrytype{misc})。

请注意,这不会为 提供良好的输出\parencite{foo,bar}。但不清楚在这种情况下你想要什么。

平均能量损失

\documentclass[ngerman]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[backend=biber, style=authoryear]{biblatex}

\addbibresource{biblatex-examples.bib}

\DeclareCiteCommand{\parencite}
  {\ifentrytype{online}{\bibopenparen}{\bibopenbracket}%
   \usebibmacro{prenote}}%
  {\usebibmacro{citeindex}%
   \usebibmacro{cite}}
  {\multicitedelim}
  {\usebibmacro{postnote}%
   \ifentrytype{online}{\bibcloseparen}{\bibclosebracket}}

\begin{document}
\parencite{sigfridsson} and \parencite{ctan}
\printbibliography
\end{document}

给出

[Sigfridsson und Ryde 1998] 和(CTAN 2006)

在引用中。

相关内容