
現在、著者フィールドに行を追加することでこれを取得しています:
Author = {{\includegraphics[scale = 0.03]{bullet3}} Mosco Vicent}
しかし、それを自動的に実行し、ソースに応じて異なるアイコンを追加する方法を見つけたいと思っています。Beamer でも同様のことができることは知っています。
最善の方法は、カスタム参考文献スタイルを作成することだと思います。私は次のスタイルを使用しています。
https://drive.google.com/file/d/1ZXw4UA_d2rbcegvGrTGuMLuAdsiGE8XY/view?usp=sharing
誰か私に解決策を教えてもらえますか?
答え1
参考文献スタイルファイルを編集することでこれを行うことができます.bst
: 検索と置換
FUNCTION {start.entry}
{ newline$
"\bibitem{" write$
cite$ write$
"}" write$
newline$
""
initialize.prev.this.status
}
による
FUNCTION {start.entry}
{ newline$
"\bibitem{" write$
cite$ write$
"}" "\faBook\ " * write$
newline$
""
initialize.prev.this.status
}
そして、\usepackage{fontawesome}
パッケージをプリアンブルに含めてファイルをコンパイルします。出力は次のようになります。
ロード後に色を変更して\textcolor{blue}{\faBook}
(ここでは青ですが、任意の色を使用できます) 、上記のコード\usepackage{xcolor}
の代わりに使用できます。つまり、\faBook
FUNCTION {start.entry}
{ newline$
"\bibitem{" write$
cite$ write$
"}" "\textcolor{blue}{\faBook}\ " * write$
newline$
""
initialize.prev.this.status
}
アイコンのリストはこちらパッケージから を使うことができますawesome
。(私の例では です\faBook
。 も使用できます\faNewspaperO
。) も使用できます。awesome5
これはパッケージよりも新しく、アイコンが多くありますawesome
。
アップデート:
次のように画像を挿入できます\includegraphics
: (読み込みを忘れないでください\usepackage{graphicx}
)
FUNCTION {start.entry}
{ newline$
"\bibitem{" write$
cite$ write$
"}" "\includegraphics[width=7pt, height=10pt]{Image-root}" * write$
newline$
""
initialize.prev.this.status
}
Image-root
上記に適切なものを追加すると、出力は次のようになります。
.bst
または、ファイルを編集せずに、プリアンブルに次のコードを追加するだけで実行できます。(アンドリュー・スワンの回答)
\makeatletter
\def\@bibitem#1{\item\if@filesw \immediate\write\@auxout
{\string\bibcite{#1}{\value{\@listctr}}}\fi\ignorespaces}
\def\@biblabel#1{[#1] \includegraphics[width=7pt, height=10pt]{image-root}}
\makeatother