引用 @misc 网站,不带年份

引用 @misc 网站,不带年份

我想引用一些网站(一些组织网站,如 NOAA 等),但我不想显示任何年份。这就是我所做的:

梅威瑟:

在此处输入图片描述

%\RequirePackage{filecontents}
\begin{filecontents}{ref.bib}
@misc{pngea,    
  author = "{PANGAEA}",    
  title = "{PANGAEA}. {Data} Publisher for {Earth \& Environmental Science}",    
  year = "2019",   
  url = "https://www.pangaea.de",    
  note = "[Online; last accessed January 2019]"  
} 
@misc{ncdcpc,    
  author = "{NOAA NCDC Paleoclimate}", 
  title = "Paleoclimatology Data, {National} Climatic Data Center,
     {National Oceanic and Atmospheric Administration}",    
  year = "2019",   
  url = "https://www.ncdc.noaa.gov/data-access/paleoclimatology-data",  
  note = "[Online; last accessed January 2019]"  
}
\end{filecontents}

\documentclass[12pt,twoside,a4paper,fleqn]{article} 
%\documentclass[natbib,fleqn,smallextended]{svjour3} %
%%\usepackage{filecontents} 
% %Author list
\usepackage[noblocks,auth-lg]{authblk} % %
\usepackage[version=3]{mhchem} % for upright CO2 
\usepackage{graphicx}
\usepackage{floatrow} %\usepackage{tabularx}%modifiable tabular
%\usepackage[usestackEOL]{stackengine} 
\usepackage{longtable}
\usepackage{graphbox}%change float alignments 
% %setting spacing
\usepackage{setspace} 
\doublespacing %\singlespacing %\onehalfspacing
%For other sizes use the \setstretch command like this:
%\setstretch{1.8} 
\usepackage[square,authoryear]{natbib}
\usepackage{color} 
\usepackage[vmargin=1in, hmargin=0.8in]{geometry} 
%line Numbers 
\usepackage{lineno}
\linenumbers*[1] %to set numbering format 

\usepackage{enumerate}
%Maths 
\usepackage{amsmath} 
\usepackage{amssymb} %for deg
\usepackage{gensymb} %for permil 
\usepackage{wasysym} % Headers and Footers 
\usepackage{fancyhdr} % for rotating floats
\usepackage{lscape} %for subfigures and tables
\usepackage[font=small,labelfont=bf]{caption}
\usepackage[font=footnotesize]{subfig} %automatic referencing

\usepackage[spaces,hyphens]{url}
\usepackage[hidelinks]{hyperref} 
\usepackage[capitalise]{cleveref}

\begin{document}
\citep[e.g.,][]{ncdcpc,pngea} 
\bibliographystyle{unsrtnat}
\bibliography{ref}
\end{document}

答案1

由于您正在使用natbib引文管理包,因此您可以设置“引文别名”。例如,

\defcitealias{pngea}{PANGAEA}

然后,如果您输入\citepalias{pngea},您将得到“PANGAEA”。

修改后的 MWE:

在此处输入图片描述

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@misc{pngea,    
  author = "{PANGAEA}",    
  title  = "{PANGAEA}. {Data} Publisher for {Earth~\& Environmental Science}",    
  year   = "2019",   
  url    = "https://www.pangaea.de",    
  note   = "[Online; last accessed 22 January 2019]"  
} 
@misc{ncdcpc,    
  author = "{NOAA NCDC Paleoclimate}", 
  title  = "Paleoclimatology Data, {National Climatic Data Center},
            {National Oceanic and Atmospheric Administration}",    
  year   = "2019",   
  url    = "https://www.ncdc.noaa.gov/data-access/paleoclimatology-data",  
  note   = "[Online; last accessed 22 January 2019]"  
}
\end{filecontents}

\documentclass[12pt,twoside,a4paper,fleqn]{article} 
%\documentclass[natbib,fleqn,smallextended]{svjour3} % 
%%Author list
\usepackage[noblocks,auth-lg]{authblk} % %
\usepackage[version=3]{mhchem} % for upright CO2 
\usepackage{graphicx}
\usepackage{floatrow} 
%\usepackage{tabularx}%modifiable tabular
%\usepackage[usestackEOL]{stackengine} 
\usepackage{longtable}
\usepackage{graphbox}%change float alignments 
%% set spacing
\usepackage{setspace} 
%\doublespacing %
\singlespacing %\onehalfspacing
% For other sizes use the \setstretch command like this:
% \setstretch{1.8} 

\usepackage[square,authoryear]{natbib}
%% Citation aliases without years
\defcitealias{pngea}{PANGAEA}
\defcitealias{ncdcpc}{NOAA}

\usepackage{xcolor} 
\usepackage[vmargin=1in, hmargin=0.8in]{geometry} 
%Show Line Numbers 
\usepackage{lineno}
\linenumbers*[1] %to set numbering format 

\usepackage{enumerate}
%Maths 
\usepackage{amsmath} 
\usepackage{amssymb} %for deg
\usepackage{gensymb} %for permil 
\usepackage{wasysym} 
% Headers and Footers 
\usepackage{fancyhdr} 
% for rotating floats
\usepackage{lscape} 
%for subfigures and tables
\usepackage[font=small,labelfont=bf]{caption}
\usepackage[font=footnotesize]{subfig} 

%cross-referencing
\usepackage[spaces,hyphens]{url}
\usepackage[hidelinks]{hyperref} 
\usepackage[capitalise]{cleveref}

\begin{document}
\verb+\citep+: \citep{ncdcpc,pngea} 

\verb+\citepalias+: \citepalias{ncdcpc,pngea}

\bibliographystyle{unsrtnat}
\bibliography{mybib}
\end{document}

相关内容