Square and round Brackets for citation

I’m wondering how could I cite mi internet sources with round brackets and my other sources with square brackets. I want to replace the [] of the Wikipedia cite for ().

\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

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

\end{document}


Content of 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},
}

• Does that mean you want to use \parencite with square brackets and want to change to round brackets for @online entries? What should happen if you cite two sources in the same \parencite - a @book and an @online, say? Do I get square or round brackets? BTW: Please have a look at how to write a MWE/MWEB. Your MWE runs, but it contains many unneeded packages. Your example also includes no .bib file and example entries. – moewe Jun 19 '17 at 10:01

In that case you can't use the redefinitions you currently use, since we must be able to use round brackets.

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


This uses round brackets for @online and square brackets for all other types. (You should use @online instead of @misc for online entries, if you must use @misc, replace \ifentrytype{online} by \ifentrytype{misc}).

Note that this will not give good output for \parencite{foo,bar}. But it is unclear what you would want in that case.

MWE

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

\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}


gives

[Sigfridsson und Ryde 1998] and (CTAN 2006)

in the citations.