在文件中,我想引用一份出版物,其中所有作者和章節開始之前的所有文字均以斜體顯示。斜體是必要的,並且可以在視覺上將其與文本的其餘部分區分開來。我將以下幾行放入序言中,他們做了他們應該做的事情。但我無法說出該期刊的名稱\itshape
。如果可能的話,我還想刪除每次印在期刊標題前面的「In:」一詞。
\preto\fullcite{\AtNextCite{\defcounter{maxnames}{99}}}
\preto\fullcite{\AtNextCitekey{\clearfield{url} \clearfield{doi}
\clearfield{eprint} \clearfield{pages} \clearfield{note}}}
\preto\fullcite{\AtNextCitekey{\normalfont\itshape}} %\sl for slanted
# This next line doesnt work
#\preto\fullcite{\AtNextCitekey{\DeclareFieldFormat{journaltitle}{\normalfont\itshape{#1}}} %\sl for slanted
先感謝您
答案1
您已經在註釋中發現了缺少的右括號,因此這裡有另一種方法定義一個新命令,\itfullcite
其輸出完全為斜體。為了確保不會發生切換,我們只需重新定義biblatex
命令\mkbibemph
和\mkbibitalic
。
\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear, backend=biber]{biblatex}
\makeatletter
\newrobustcmd*{\mkbibforceitalic}[1]{%
\begingroup
\mkbibitalic{%
\renewrobustcmd*{\mkbibemph}{\@firstofone}%
\renewrobustcmd*{\mkbibitalic}{\@firstofone}%
#1%
}%
\endgroup
}
\makeatother
\DeclareCiteCommand{\itfullcite}[\mkbibforceitalic]
{\usebibmacro{prenote}}
{\usedriver
{\DeclareNameAlias{sortname}{default}}
{\thefield{entrytype}}}
{\multicitedelim}
{\usebibmacro{postnote}}
\addbibresource{biblatex-examples.bib}
\begin{document}
\itfullcite{sigfridsson}
\printbibliography
\end{document}