
我使用biblatex
和風格authoryear
。我使用該命令\textcite
進行文字引用。目前\textcite
輸出類似:
但我想用斜體(包括括號),如下圖:
我知道這個類似的帖子如何將文字引用設為斜體?然而它的重點是\cite
and \parencite
,而不是\textcite
。
我的MWE:
\documentclass{article}
\usepackage[french]{babel}
\usepackage[
backend=biber,
natbib=true,
bibencoding=utf8,
style=authoryear,
sorting=nyt,
maxcitenames=2,
giveninits=true,
uniquename=init]{biblatex}
% Because of the use of the french option of babel with biblatex, all names are in uppercase. This revert to lowercase except the first letter of the names.
\DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily}
\addbibresource{biblatex-examples.bib}
\begin{document}
\textcite{cicero}
\printbibliography[
title={Bibliographie},
]
\end{document}
答案1
您可以使用與連結的問答中相同的方法。從您的樣式複製 的定義\textcite
(在本例中authoryear.cbx
, 二。 v3.18b 中的 126-137) 並將 a\mkbibemph
加入包裝器程式碼。
\documentclass{article}
\usepackage[french]{babel}
\usepackage[
backend=biber,
style=authoryear,
maxcitenames=2,
giveninits=true,
uniquename=init,
]{biblatex}
\DefineBibliographyExtras{french}{\restorecommand\mkbibnamefamily}
\DeclareCiteCommand{\textcite}[\mkbibemph]
{\boolfalse{cbx:parens}}
{\usebibmacro{citeindex}%
\iffirstcitekey
{\setcounter{textcitetotal}{1}}
{\stepcounter{textcitetotal}%
\textcitedelim}%
\usebibmacro{textcite}}
{\ifbool{cbx:parens}
{\bibcloseparen\global\boolfalse{cbx:parens}}
{}}
{\usebibmacro{textcite:postnote}}
\addbibresource{biblatex-examples.bib}
\begin{document}
\textcite{cicero}
\printbibliography[
title={Bibliographie},
]
\end{document}
請注意, 的定義\textcite
取決於樣式。\textcite
在更複雜的樣式中,其實作要複雜得多。一般方法仍然有效,但可能需要一些調整。