书目格式

书目格式

我有一个关于参考书目的问题。我不是 LaTeX 专家,目前我无所谓是否必须使用嵌入式参考书目或 bobtex。问题是,我如何才能完成我需要的格式。以下是参考书目成员的示例:

[1] Doe J.: How to format bibliography?. JohnDoe limited, Warsaw, 2015.

如您所见,作者姓名位于点和冒号之间。标题应为斜体。逗号后是出版商、城镇和年份。我将不胜感激所有与此相关的帮助!

答案1

为了实现你想要的,你可以修改utphys.bst文件如下:

首先,你必须更换

FUNCTION {output.nonnull}
{ 's :=
  output.state mid.sentence =
    { ", " * write$ }
    { output.state after.quote =
    { " " * write$ }
    { output.state after.block =
        { add.period$ write$
          newline$
          "\newblock " write$
        }
        { output.state before.all =
        'write$
        { output.state after.quoted.block =
            { write$
              newline$
              "\newblock " write$
            }
            { add.period$ " " * write$ }
          if$
        }
          if$
        }
      if$
    }
      if$
      mid.sentence 'output.state :=
    }
  if$
  s
}

by(这将用冒号替换最后一位作者后的逗号):

FUNCTION {output.nonnull}
{ 's :=
  output.state mid.sentence =
    { ": " * write$ } % Modified
     { output.state after.quote =
    { " " * write$ }  % between Title and journal
    { output.state after.block =
        { add.period$ write$   
          newline$
          "\newblock " write$
        }
        { output.state before.all =
        'write$
        { output.state after.quoted.block =
            { write$
              newline$
              "\newblock " write$
            }
            { add.period$ " " * write$ }
          if$
        }
          if$
        }
      if$
    }
      if$
      mid.sentence 'output.state :=
    }
  if$
  s
}

你还应该替换代码:

FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := % Modified
      nameptr #1 >
    { namesleft #1 >
        { ", " * t * }
        { numnames #2 >
        { "," * }
        'skip$
          if$
          t "others" =
        { " {\em et~al.}" * }
        { string.and * t * }
          if$
        }
      if$
    }
    't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}

(这将把姓名格式更改为{jj.~}{vv~}{ll}{ f},其中:jj代表后缀,例如 Sr,vv代表部分,ll代表姓氏,f代表名字的首字母):

FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr "{jj.~}{vv~}{ll}{ f}" format.name$ 't :=
      nameptr #1 >
    { namesleft #1 >
        { ", " * t * }
        { numnames #2 >
        { "," * } % { "," * }
        'skip$
          if$
          t "others" =
        { " {\em et~al.}" * }
        { string.and * t * } 
          if$

        }
      if$
    }
    't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
} 

要制作文章标题italic并删除其周围的引号,您必须替换代码:

FUNCTION {format.title}
{ title empty$
    { "" }
    { "``" title "t" change.case$ * ",''" * }
  if$
}

FUNCTION {format.title.p}
{ title empty$
    { "" }
    { "``" title "t" change.case$ * ".''" * }
  if$
}

通过代码:

FUNCTION {format.title}
{ title empty$
    { "" }
    { "" title emphasize "t" change.case$ * "." * } % Modified
  if$
}

FUNCTION {format.title.p}
{ title empty$
    { "" }
    { "``" title "t" change.case$ * " ''." * } 
  if$
}

为了防止出现“期刊名称”,italic您必须更换

FUNCTION {format.journal}
{ journal missing$   
    { "" }
    {journal emphasize " " *
     format.volume *
     format.number *
     format.date.paren *
     format.pages.nopp *
      }
    if$
}

经过

FUNCTION {format.journal}
{ journal missing$   
    { "" }
     {journal " " *  % Modified
     format.volume *
     format.number *
     format.date.paren *
     format.pages.nopp *
      }
    if$
    }

A梅威瑟:

  \documentclass{article}
   \begin{filecontents*}{test.bib}
     @book{Albuquerque2015,
       address = {Cham},
       author = {Albuquerque, Ulysses Paulino},
       doi = {10.1007/978-3-319-06517-5},
       isbn = {978-3-319-06516-8},
       pages = {67},
       publisher = {Springer International Publishing},
       title = {{Speaking in Public About Science}},
       year = {2015}
       }
     @article{B,
      author = {AuthorA, A. and AuthorB, B. and AuthorC, C.},
      journal = {Journal of Physics},
      pages = {1233},
      title = {{Title of the paper}},
      volume = {567},
      year = {2016}
        }
  \end{filecontents*}
  \begin{document}

   ~\nocite{*}

 %Bibleography

 \bibliographystyle{utphys}
 \bibliography{test}
 \end{document}

它给:

在此处输入图片描述

更新:为了在缩写名称后有一个点并and在姓氏前删除,您FUNCTION {format.names}必须将其替换为:

 FUNCTION {format.names}
    { 's :=
      #1 'nameptr :=
      s num.names$ 'numnames :=
      numnames 'namesleft :=
        { namesleft #0 > }
        { s nameptr "{jj.~}{vv~}{ll}{ f.}" format.name$ 't :=
          nameptr #1 >
        { namesleft #1 >
            { ", " * t * }
            { numnames #2 >
            { ", " * } % { "," * }
            'skip$
              if$
              t "others" =
            { " {\em et~al.}" * }
            { t * } 
              if$

            }
          if$
        }
        't
          if$
          nameptr #1 + 'nameptr :=
          namesleft #1 - 'namesleft :=
        }
      while$
    }

这给出了我上述的 MWE: 在此处输入图片描述

相关内容