カスタム BibLaTeX スタイル

カスタム BibLaTeX スタイル

次の BibLaTeX スタイルを作成する必要があります。

ここに画像の説明を入力してください

現在、次のような出力が得られます:

ここに画像の説明を入力してください

ファイル.bib名はLibtest.bib

@unpublished {mi:2009,
author = {T. Miller and X. Meyer and K. Nahel},
title = {Arbitrary title: extensive latex work pays of at university most likely},
type = {Unpublished working paper},
institution = {Random University}
location = {Random location}
date = {2009}
}

テスト:

\documentclass[a4paper, 12pt, headsepline, headings=small,]{scrreprt}
\overfullrule=1mm
\usepackage[onehalfspacing]{setspace}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[backend=bibtex8,
    style=authoryear-icomp,
    dashed=false,
    autocite=footnote,
    maxcitenames=3,
    mincitenames=1,
    maxbibnames=100,
    sorting=nty
    ]{biblatex}
\bibliography{Libtest}
\renewbibmacro*{cite:labelyear+extrayear}{%
\iffieldundef{labelyear}
  {}
  {\printtext[bibhyperref]{%
   \printtext[parens]{% 
   \printfield{labelyear}%
   \printfield{extrayear}}}}}
\bibliography{Libtest}
\begin{document}
\cite{mi:2009}  argue...
\printbibliography
\end{document}

おそらく誰かが「and」をカンマに変更し、上記の出力の残りの部分を実現するのを手伝ってくれるでしょうか?

よろしく、トム。

答え1

お客様は、名前の頭文字のみを印刷するスタイルを好んでいるようですので、firstinits=trueパッケージ読み込みオプションとして使用します。

また、すべての名前に「姓、名」の形式が必要なので、 を発行します\DeclareNameAlias{sortname}{last-first}。最後の「and」を削除するには、を使用します\renewcommand*{\finalnamedelim}{\multinamedelim}

書式指定は適用されませtitle

\DeclareFieldFormat*{title}{#1}

年を括弧から取り除くには、前文に次のコードを追加します。

\renewbibmacro*{date+extrayear}{%
  \iffieldundef{\thefield{datelabelsource}year}
    {}
    {%\printtext[parens]{%
       \setunit{\addcomma\space}%
       \iffieldsequal{year}{\thefield{datelabelsource}year}
         {\printdateextralabel}%
         {\printfield{labelyear}%
          \printfield{extrayear}}}}%}%

「機関、場所」の順序に変更するには、

\renewbibmacro*{publisher+location+date}{%
  \printlist{publisher}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\addcomma\space}
  \usebibmacro{date}%
  \newunit}

\renewbibmacro*{institution+location+date}{%
  \printlist{institution}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\addcomma\space}
  \usebibmacro{date}%
  \newunit}

\renewbibmacro*{organization+location+date}{%
  \printlist{organization}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\addcomma\space}
  \usebibmacro{date}%
  \newunit}

@articles「トライ」の「in」を取り除くにはこれ:

\renewbibmacro{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}

以下は、ボリュームと番号を「#vol (#nr)」としてフォーマットします。

\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit*{\addspace}%
  \printfield[parens]{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

ムウェ

\documentclass{article}  
\usepackage[ngerman]{babel}
\usepackage{csquotes}
\usepackage[style=authoryear-icomp, dashed=false, autocite=footnote, maxcitenames=3,
    mincitenames=1, maxbibnames=100, sorting=nty, firstinits=true, backend=biber]{biblatex}
\usepackage{filecontents}
\usepackage{hyperref}
\begin{filecontents*}{\jobname.bib}
@unpublished {mi:2009,
  author = {T. Miller and X. Meyer and K. Nahel},
  title = {Arbitrary title: extensive latex work pays of at university most likely},
  type = {Unpublished working paper},
  institution = {Random University},
  location = {Random location},
  date = {2009},
}
@inproceedings{author2010title,
  AUTHOR   = {Smith, Agent},
  TITLE    = {{Entangled in the Matrix}},
  eventtitle= {Cyberwhatever Symposium},
  ADDRESS  = {Berlin},
  DATE     = {2010-06-01}
}
\end{filecontents*}
\addbibresource{\jobname.bib}
\addbibresource{biblatex-examples.bib}

\renewcommand*{\finalnamedelim}{\multinamedelim}
\DeclareNameAlias{sortname}{last-first}

\DeclareFieldFormat*{title}{#1}
\DeclareFieldFormat*{journaltitle}{#1}
\renewbibmacro*{cite:labelyear+extrayear}{%
\iffieldundef{labelyear}
  {}
  {\printtext[bibhyperref]{%
   \printtext[parens]{% 
   \printfield{labelyear}%
   \printfield{extrayear}}}}}

\renewbibmacro*{date+extrayear}{%
  \iffieldundef{\thefield{datelabelsource}year}
    {}
    {%\printtext[parens]{%
       \setunit{\addcomma\space}%
       \iffieldsequal{year}{\thefield{datelabelsource}year}
         {\printdateextralabel}%
         {\printfield{labelyear}%
          \printfield{extrayear}}}}%}%

\renewbibmacro*{publisher+location+date}{%
  \printlist{publisher}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\addcomma\space}
  \usebibmacro{date}%
  \newunit}

\renewbibmacro*{institution+location+date}{%
  \printlist{institution}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\addcomma\space}
  \usebibmacro{date}%
  \newunit}
\renewbibmacro*{organization+location+date}{%
  \printlist{organization}%
  \setunit*{\addcomma\space}%
  \printlist{location}%
  \setunit*{\addcomma\space}
  \usebibmacro{date}%
  \newunit}

\renewbibmacro{in:}{%
  \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}

\renewbibmacro*{volume+number+eid}{%
  \printfield{volume}%
  \setunit*{\addspace}%
  \printfield[parens]{number}%
  \setunit{\addcomma\space}%
  \printfield{eid}}

\begin{document}
  \cite{mi:2009,markey,wilde,knuth:ct:a,baez/article,reese,itzhaki,cicero,author2010title,bertram}
  \printbibliography
\end{document}

与える ここに画像の説明を入力してください

関連情報