引文编号位置(上标)

引文编号位置(上标)

问题:如何更改参考编号的位置?在此文档中,我想将参考 [1] 移至 Casson 的上标位置。

请帮我。

梅威瑟:

\documentclass[12pt]{article}
\usepackage[a4paper,top=0.6 in,bottom=0.6 in,left=0.6 in,right=0.6 in]{geometry}
%%%%%%%%%==============watermark
%\usepackage[printwatermark]{xwatermark}
%\newwatermark[allpages,color=red!50,angle=45,scale=3,xpos=0,ypos=0]{DRAFT}
%%%%%%%==================
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[misc]{ifsym}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{multirow}
\usepackage[numbers,sort&compress]{natbib}%%% to arrange citation in sequence
\usepackage{setspace}
\usepackage{multicol}
%%===========color reference===========
%%===========color reference===========
\usepackage{graphicx}
\usepackage{delarray}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{calc,shapes}
\usepackage{parskip}
\usepackage{fancyhdr}
\pagestyle{fancy}
%%% remove these two draw line
\fancyhf{} % sets both header and footer to nothing
\renewcommand{\headrulewidth}{0pt}
% your new footer definitions here
%%%% above
\usepackage{lastpage}
\lhead{}
\rhead{}
\chead{}
%\cfoot{Page \thepage \hspace{1pt} of \pageref{LastPage}}
\lfoot{}
\rfoot{}
%\renewcommand{\headrulewidth}{0.4pt}
%\renewcommand{\footrulewidth}{0.4pt}
\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\newcommand{\DrawBox}[2]{%
    \begin{tikzpicture}[overlay,remember picture]
    \draw[->,shorten >=5pt,shorten <=5pt,out=70,in=130,distance=0.5cm,#1] (MarkA.north) to (MarkC.north);
    \draw[->,shorten >=5pt,shorten <=5pt,out=50,in=140,distance=0.3cm,#2] (MarkA.north) to (MarkB.north);
    \end{tikzpicture}
}
\usepackage{cellspace}
\setlength\cellspacetoplimit{4pt}
\setlength\cellspacebottomlimit{4pt}
\usepackage{nomencl}
\makenomenclature
%++++++++++++++++++++++++++++++++++++++++++
%\usepackage{makecell, multirow}
%\usepackage{siunitx}
%\usepackage{etoolbox}
%\newrobustcmd\B{\DeclareFontSeriesDefault[rm]{bf}{b}\bfseries}                          
%\usepackage[skip=4ex, font=small, labelfont=bf]{caption}
%++++++++++++++++++++++++++++++++++++++++++
%%%%%%%%%%%% Table insert %%%%%%%%%%%%%%%%%%%
\usepackage{siunitx,booktabs,caption}
%%%%%%%%%%%% Table insert %%%%%%%%%%%%%%%%%%%
%\linespread{1.25}
\setstretch{1.5}
\begin{document}
\section{Introduction}
Casson \textcolor{blue}{\cite{casson1959flow}} originally proposed the Casson fluid. The Casson fluid model has been demonstrated by Blair\textcolor{blue}{\cite{blair1959equation}}. 
\bibliographystyle{unsrtnat}
\clearpage
\bibliography{Bibliography.bib}
\end{document}

Bibliography.bib 项目如下。

@article{casson1959flow,
  title={A flow equation for pigment-oil suspensions of the printing ink type},
  author={Casson, N},
  journal={Rheology of disperse systems},
  year={1959},
  publisher={Pargamon Press}
}


@article{blair1959equation,
  title={An equation for the flow of blood, plasma and serum through glass capillaries},
  author={Blair, GW Scott},
  journal={Nature},
  volume={183},
  number={4661},
  pages={613--614},
  year={1959},
  publisher={Nature Publishing Group}
} 

答案1

由于您正在加载natbib,因此您可以使用其\bibpunct命令来设置引用的样式。它有六个参数,因此我在这里在注释中说明每个参数的作用。请参阅natbib 文档,第 13 页。

例如,在序言的末尾放入:

\bibpunct%
    {[}% punctuation before citation number
    {]}% punctuation after citation number
    {;}% punctuation between citations when more than one
    {s}% style: here "s" means "numerical superscript"
    {}% punctuation between author and year in author-year cituations
    {}% punctuation between years in author-year citations

“s”样式将使它们成为上标(与常规数字样式“n”样式相反)。

如果您希望它们全部都是蓝色,就像在示例文档中一样,您可以将其添加到开始标点符号的声明中:

\bibpunct%
    {\color{blue}[}% punctuation before citation number
    {]}% punctuation after citation number
    {;}% punctuation between citations when more than one
    {s}% style: here "s" means "numerical superscript"
    {}% punctuation between author and year in author-year cituations
    {}% punctuation between years in author-year citations

然后你只需Casson\cite{casson1959flow}在体内进行即可。

我的输出

以下是完整修改后的代码:

\documentclass[12pt]{article}
\usepackage[a4paper,top=0.6 in,bottom=0.6 in,left=0.6 in,right=0.6 in]{geometry}
%%%%%%%%%==============watermark
%\usepackage[printwatermark]{xwatermark}
%\newwatermark[allpages,color=red!50,angle=45,scale=3,xpos=0,ypos=0]{DRAFT}
%%%%%%%==================
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[misc]{ifsym}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{mathtools}
\usepackage{multirow}
\usepackage[numbers,sort&compress]{natbib}%%% to arrange citation in sequence
\usepackage{setspace}
\usepackage{multicol}
%%===========color reference===========
%%===========color reference===========
\usepackage{graphicx}
\usepackage{delarray}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\usetikzlibrary{calc,shapes}
\usepackage{parskip}
\usepackage{fancyhdr}
\pagestyle{fancy}
%%% remove these two draw line
\fancyhf{} % sets both header and footer to nothing
\renewcommand{\headrulewidth}{0pt}
% your new footer definitions here
%%%% above
\usepackage{lastpage}
\lhead{}
\rhead{}
\chead{}
%\cfoot{Page \thepage \hspace{1pt} of \pageref{LastPage}}
\lfoot{}
\rfoot{}
%\renewcommand{\headrulewidth}{0.4pt}
%\renewcommand{\footrulewidth}{0.4pt}
\newcommand{\tikzmark}[1]{\tikz[overlay,remember picture] \node (#1) {};}
\newcommand{\DrawBox}[2]{%
    \begin{tikzpicture}[overlay,remember picture]
    \draw[->,shorten >=5pt,shorten <=5pt,out=70,in=130,distance=0.5cm,#1] (MarkA.north) to (MarkC.north);
    \draw[->,shorten >=5pt,shorten <=5pt,out=50,in=140,distance=0.3cm,#2] (MarkA.north) to (MarkB.north);
    \end{tikzpicture}
}
\usepackage{cellspace}
\setlength\cellspacetoplimit{4pt}
\setlength\cellspacebottomlimit{4pt}
\usepackage{nomencl}
\makenomenclature
%++++++++++++++++++++++++++++++++++++++++++
%\usepackage{makecell, multirow}
%\usepackage{siunitx}
%\usepackage{etoolbox}
%\newrobustcmd\B{\DeclareFontSeriesDefault[rm]{bf}{b}\bfseries}                          
%\usepackage[skip=4ex, font=small, labelfont=bf]{caption}
%++++++++++++++++++++++++++++++++++++++++++
%%%%%%%%%%%% Table insert %%%%%%%%%%%%%%%%%%%
\usepackage{siunitx,booktabs,caption}
%%%%%%%%%%%% Table insert %%%%%%%%%%%%%%%%%%%
%\linespread{1.25}
\setstretch{1.5}

%%%%%%%%% NEW LINES to change citation style
\bibpunct%
    {\color{blue}[}% punctuation before citation number
    {]}% punctuation after citation number
    {;}% punctuation between citations when more than one
    {s}% style: here "s" means "numerical superscript"
    {}% punctuation between author and year in author-year cituations
    {}% punctuation between years in author-year citations

\begin{document}
\section{Introduction}
Casson\cite{casson1959flow} originally proposed the Casson fluid. The Casson fluid model has been demonstrated by Blair\cite{blair1959equation}. 
\bibliographystyle{unsrtnat}
\clearpage
\bibliography{Bibliography.bib}
\end{document}

(或者,另外,您可以加载 hyperref 包,并使用选项\usepackage[citecolor=blue]{hyperref}使它们同时具有颜色和超链接,这可能会更好。)

相关内容