我在论文中引用哈佛风格,我想稍微修改一下文字引文的表达方式。我正在使用Biblatex,并且使用了一些规范来使文本引用和参考书目与哈佛参考文献相兼容,所以一切都很好。
但是,文字引文看起来不太像我想要的方式。年和页码之间用逗号分隔,但我想使用冒号,并且在页码之前插入“ p / pp”。我宁愿删除它。
当前,我的前置弹头看起来如下:
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{soul}
\usepackage{tabularx}
\usepackage{dcolumn}
\usepackage{graphicx}
\usepackage{geometry}
\usepackage{fancyhdr}
\setlength{\headsep}{1.2cm}
\setlength{\headheight}{14.5pt}
\pagestyle{fancy}
\lhead{Header}
\chead{Headrer}
\rhead{Header}
\usepackage{setspace}
\doublespacing
\usepackage{listings}
\usepackage{color}
\usepackage{subcaption}
\usepackage{hanging}
\usepackage[english]{babel}
\usepackage[babel]{csquotes}
\PassOptionsToPackage{hyphens}{url}\usepackage{hyperref}
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\usepackage{fontspec}
\setmainfont{Times New Roman}
\usepackage[style=ext-authoryear, giveninits=true, uniquename=init, backend=biber, maxbibnames=99, innamebeforetitle = true,]{biblatex}
\DeclareNameAlias{default}{last-first}
\DeclareNameAlias{author}{last-first}
\DeclareFieldFormat{editortype}{\mkbibparens{#1}}
\DeclareDelimFormat{editortypedelim}{\addspace}
\DeclareFieldAlias{translatortype}{editortype}
\DeclareDelimAlias{translatortypedelim}{editortypedelim}
\renewbibmacro{in:}{%
\ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}}
\nocite{*}
\renewcommand*{\nameyeardelim}{\addcomma\space}
\makeatletter
\renewbibmacro*{bbx:in:editor}[1]{%
\ifboolexpr{
test \ifuseeditor
and
not test {\ifnameundef{editor}}
}
{\ifboolexpr{togl {bbx:innameidem} and test {\bbx@ineditoridem}}
{\bibstring[\mkibid]{idem\thefield{gender}}}
{\printnames[ineditor][1-42]{editor}}%
\setunit{\printdelim{editortypedelim}}%
\usebibmacro{#1}%
\clearname{editor}}
{}}
\makeatother
\newcommand\chap[1]{
\chapter*{#1}
\addcontentsline{toc}{chapter}{#1}
\markboth{#1}{#1}}
\newcommand\secTOC[1]{
\section*{#1}
\addcontentsline{toc}{section}{#1}
\markboth{#1}{#1}}
\raggedbottom
\begin{document}
\noindent Example sentence \parencite[20-22]{Andreadisetal}. Another sentence \parencite[30-31]{Bruns&Highfield}.
\printbibliography
\end{document}
参考是:
@InCollection{Andreadisetal,
author = {Andreadis, I. and Cremonesi, C. and Kartsounidou, E. and Kasprowicz, D. and Hess, A.},
title = {Attitudinal and Behavioral Responses to Populist Communication: The Impact of Populist Message Elements on Populist Attitudes and Voting Intentions},
booktitle = {Communicating populism: comparing actor perceptions, media coverage, and effects on citizens in Europe},
year = {2019},
publisher = {Routledge},
location = {New York},
editor = {Reinemann, C. and Stanyer, J. and Aalberg, T. and Esser, F. and De Vreese, C.H.},
}
@InCollection{Bruns&Highfield,
author = {Bruns, A. and Highfield, T.},
title = {Is Habermas on Twitter? Social Media and the Public Sphere},
booktitle = {The Routledge Companion to Social Media and Politics},
year = {2016},
editor = {Bruns, A. and Enli, G. and Skogerbø, E. and Larsson, A.O. and Christensen, C.},
publisher = {Routledge},
location = {New York},
}
当我运行它时,输出看起来像这样:
但是我希望是(Andreadis et al。,2019:20-22)和Bruns and Highfield,2016:30-31),并在年份和页面之间使用冒号而不是逗号,并放弃p / pp。
我可以使用哪些选项进行此操作?
您可以使用以下方法删除pp.
和p.
:>
\DefineBibliographyStrings{english}{% page = {}, pages = {}, }
并用冒号替换逗号:
\renewcommand{\postnotedelim}{\addcolon}
\documentclass{book} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{soul} \usepackage{tabularx} \usepackage{dcolumn} \usepackage{graphicx} \usepackage{geometry} \usepackage{fancyhdr} \setlength{\headsep}{1.2cm} \setlength{\headheight}{14.5pt} \pagestyle{fancy} \lhead{Header} \chead{Headrer} \rhead{Header} \usepackage{setspace} \doublespacing \usepackage{listings} \usepackage{color} \usepackage{subcaption} \usepackage{hanging} \usepackage[english]{babel} \usepackage[babel]{csquotes} \PassOptionsToPackage{hyphens}{url}\usepackage{hyperref} \setcounter{secnumdepth}{5} \setcounter{tocdepth}{5} %\usepackage{fontspec} %\setmainfont{Times New Roman} \usepackage[style=ext-authoryear, giveninits=true, uniquename=init, backend=biber, maxbibnames=99, innamebeforetitle = true,]{biblatex} \DeclareNameAlias{default}{last-first} \DeclareNameAlias{author}{last-first} \DeclareFieldFormat{editortype}{\mkbibparens{#1}} \DeclareDelimFormat{editortypedelim}{\addspace} \DeclareFieldAlias{translatortype}{editortype} \DeclareDelimAlias{translatortypedelim}{editortypedelim} \renewbibmacro{in:}{% \ifentrytype{article}{}{\printtext{\bibstring{in}\intitlepunct}}} \nocite{*} \renewcommand*{\nameyeardelim}{\addcomma\space} \makeatletter \renewbibmacro*{bbx:in:editor}[1]{% \ifboolexpr{ test \ifuseeditor and not test {\ifnameundef{editor}} } {\ifboolexpr{togl {bbx:innameidem} and test {\bbx@ineditoridem}} {\bibstring[\mkibid]{idem\thefield{gender}}} {\printnames[ineditor][1-42]{editor}}% \setunit{\printdelim{editortypedelim}}% \usebibmacro{#1}% \clearname{editor}} {}} \makeatother \newcommand\chap[1]{ \chapter*{#1} \addcontentsline{toc}{chapter}{#1} \markboth{#1}{#1}} \newcommand\secTOC[1]{ \section*{#1} \addcontentsline{toc}{section}{#1} \markboth{#1}{#1}} \raggedbottom \begin{filecontents*}{\jobname.bib} @InCollection{Andreadisetal, author = {Andreadis, I. and Cremonesi, C. and Kartsounidou, E. and Kasprowicz, D. and Hess, A.}, title = {Attitudinal and Behavioral Responses to Populist Communication: The Impact of Populist Message Elements on Populist Attitudes and Voting Intentions}, booktitle = {Communicating populism: comparing actor perceptions, media coverage, and effects on citizens in Europe}, year = {2019}, publisher = {Routledge}, location = {New York}, editor = {Reinemann, C. and Stanyer, J. and Aalberg, T. and Esser, F. and De Vreese, C.H.}, } @InCollection{Bruns&Highfield, author = {Bruns, A. and Highfield, T.}, title = {Is Habermas on Twitter? Social Media and the Public Sphere}, booktitle = {The Routledge Companion to Social Media and Politics}, year = {2016}, editor = {Bruns, A. and Enli, G. and Skogerbø, E. and Larsson, A.O. and Christensen, C.}, publisher = {Routledge}, location = {New York}, } \end{filecontents*} \addbibresource{\jobname.bib} \DefineBibliographyStrings{english}{% page = {}, pages = {}, } \renewcommand{\postnotedelim}{\addcolon} \begin{document} \noindent Example sentence \parencite[20-22]{Andreadisetal}. Another sentence \parencite[30-31]{Bruns&Highfield}. \printbibliography \end{document}