I am using numeric-comp style. But the year for article has parentheses whereas year for 'incollection' and 'inproceedings' do not.
I am a beginner at LaTeX and would like to remove the parentheses from the article year.
Here is my current code,
\usepackage[backend=bibtex,
natbib=true,
%dashed=false,
sorting=none,
maxcitenames=3,
maxbibnames=10,
firstinits=true,
isbn=false,
doi=false,
url=false,
eprint=false,
defernumbers=true,
abbreviate=false,
style=numeric-comp]{biblatex}
%-- formatting hell for biblatex
%-- remove "In:"
\renewbibmacro{in:}{}
% Add spaces
\setlength\bibitemsep{3.5\itemsep}
%-- no "quotes" around titles of chapters/article titles
\DeclareFieldFormat[article, inbook, incollection, inproceedings, misc, thesis, unpublished]
{title}{#1}
%-- no punctuation after volume
\DeclareFieldFormat[article]
{volume}{ {#1} }
%-- puts number/issue between brackets
\DeclareFieldFormat[article, inbook, incollection, inproceedings, misc, thesis, unpublished]
{number}{\mkbibparens{#1}}
%-- and then for articles directly the pages w/o any "pages" or "pp."
\DeclareFieldFormat[article]
{pages}{#1}
%-- for some types replace "pages" by "p."
\DeclareFieldFormat[inproceedings, incollection, inbook]
{pages}{p. #1}
%-- format 16(4):224--225 for articles
\renewbibmacro*{volume+number+eid}{
\printfield{volume}
\printfield{number}
\printunit{\addcolon}
}
%-- citations with square brackets (== \usepackage[square]{natbib})
\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{references.bib}
and here is an example of how the types of reference are outputted
[8] H. Han, C. Park, J. Heo, and S. K. Kang. Muffler Sound Development Using Analysis of Acoustic Source of Engine Exhaust System. SAE 2014 World Congress & Exhibition. SAE International, 2014.
[9] M. Harrison. Interior noise: assessment and control. Vehicle Refinement. Edited by M. Harrison. Oxford: Butterworth-Heinemann, 2004, p. 145 –233.
[10] A. Singh, S. Bharadwaj, and S. Narayan. Analysis of Various NVH Sources of a Combustion Engine. Tehniˇcki glasnik 10 (1-2):(2016), 29–37.
[11] G. Kwon, H. Jo, and Y. J. Kang. Model of psychoacoustic sportiness for vehicle interior sound: Excluding loudness. Applied Acoustics 136:(2018), 16 –25.
\makeatletter...\makeatother
to obtain square brackets around the citation number with the style you use. This is only necessary forauthoryear
andauthortitle
-like styles.%
in\renewbibmacro*{volume+number+eid}
(see tex.stackexchange.com/q/7453/35864) (if you want spaces, produce them with\setunit{\addspace}
and friends instead, see §4.11.7 Using the Punctuation Tracker of thebiblatex
manual). A few other things could also be handled more elegantly.