标题中的信用数字 APA

标题中的信用数字 APA

我必须根据 APA 指南引用一张图片。我在官方指南中找到了这张图片:在此处输入图片描述

在 LaTeX 中是否有任何方便的方法可以做到这一点?

上面显示的示例的引用条目是:

@article{sampleentry,
author = {Wang, Xiaoye and Lind, Mats and Bingham, Geoffrey},
year = {2018},
month = {06},
pages = {},
title = {Large Continuous Perspective Change With Noncoplanar Points Enables Accurate Slant Perception},
volume = {44},
journal = {Journal of Experimental Psychology: Human Perception and Performance},
doi = {10.1037/xhp0000553}
}

我尝试过这个:

From \citetitle{testouille}, by \citeauthor{testouille}, \citeyear{testouille}, in \textit{\journalcite{testouille}}, \volumecite{testouille}(\numbercite{testouille}), p.\pagecite{testouille} (\doicite{testouille})

然而,正如你所想象的,你不能仅仅引用数字的数量。

编辑:

Cicada 提供了部分答案,我几乎没有编辑就得到了这个:

\DeclareCiteCommand{\mycite}%
{\usebibmacro{prenote}\addspace} {%
\mkbibquote{\thefield{title}}%
\addcomma\addspace by \printnames[][-\value{listtotal}]{author}%
\addcomma\addspace \thefield{year}%
\addcomma\addspace \mkbibitalic{\thefield{journaltitle}}%
\addcomma\addspace \mkbibitalic{\thefield{volume}}%
\mkbibparens{\thefield{number}}%
\addcomma\addspace%
} {} {\usebibmacro{postnote}%
\addspace%
\mkbibparens{\url{\thefield{doi}}}%
\adddot%
}

根据这个答案,我设法举了一个例子:

\documentclass{report}

\usepackage[english]{babel}

\usepackage{sectsty}

%\input{glossary-entries}
\usepackage{framed}
\usepackage{multirow}

\usepackage{caption}
\usepackage{subcaption}

\usepackage[backend=biber, style = apa, autocite=inline]{biblatex}
\DeclareLanguageMapping{english}{english-apa}
\addbibresource{referencestest.bib}

\DeclareCiteCommand{\mycite}%
{\usebibmacro{prenote}\addspace} {%
\mkbibquote{\thefield{title}}%
\addcomma\addspace by \printnames[][-\value{listtotal}]{author}%
\addcomma\addspace \thefield{year}%
\addcomma\addspace \mkbibitalic{\thefield{journaltitle}}%
\addcomma\addspace \mkbibitalic{\thefield{volume}}%
\mkbibparens{\thefield{number}}%
\addcomma\addspace%
} {} {\usebibmacro{postnote}%
\addspace%
\mkbibparens{\url{\thefield{doi}}}%
\adddot%
}

\usepackage{fullpage}

\edef\restoreparindent{\parindent=\the\parindent\relax}
\usepackage{parskip}
\restoreparindent

\makeindex


\begin{document}

\pagenumbering{Roman}



\chapterfont{\centering}

\pagebreak
\setcounter{page}{3}




\tableofcontents{}


\chapter{Introduction}

Of course, the viability of autonomous cars won't be discussed in this document. It could be discussed in a next document.

\pagenumbering{arabic}

\pagebreak


\section{Lorem}
\renewcommand{\baselinestretch}{1.5}

\section{Ipsum}


\section{Lorem2}


\chapter{Ipsum2}

\section{Lorem3}

\section{Ipsum3}


\section{Lorem4}

From "Large Continuous Perspective Change With Noncoplanar Points Enables Accurate Slant Perception", by X. M. Wang, M. Lind and G. P. Bingham, 2018, \textit{Journal of Experimental Psychology: Human Perception and Performance}, 44(10), p. 1513 (https://doi.org/10.1037/xhp0000553). Copyright 2018 by the American Psychological Association.

From \mycite{test2}



\end{document}

这是入门测试2:

@article{test2,
author = {Wang, Xiaoye Michael and Lind, Mats and Bingham, Geoffrey P.},
organization = {American Psychological Association},
year = {2018},
month = {06},
pages = {1513},
title = {Large Continuous Perspective Change With Noncoplanar Points Enables Accurate Slant Perception},
volume = {44},
number = {10},
journal = {Journal of Experimental Psychology: Human Perception and Performance},
doi = {10.1037/xhp0000553}
}

这是我得到的:

在此处输入图片描述

M.第一段是我应该得到的(名字的首字母,然后是姓氏)。第二段是我得到的。doi 没有显示,并且和之间没有空格Bingham

先感谢您。

答案1

类、包、选项和命令用法以及设置的选择将影响您如何(以及是否)可以做某事——因此您仍然必须在这方面做出选择。例如,apa7如果您被限制使用其他类,则通过自定义编码处理 URL,而不是让其处理它。

独立于这些事项,并经过一些测试,并使用apa7带有 biblatex 选项的documentclass style = apa6,;使用 biblatex 选项将名字放在第一位\DeclareNameAlias{author}{given-family}并切换首字母giveninits=true,;然后定义一个bybibstring;并将版权声明添加到 bibentry;并将 MWE 的混乱程度降至最低——一个自定义的但仍然笨重的引用命令(\copyrightcite像这样命名和使用\copyrightcite[From][1513]{test2}:)产生以下内容,并显示手动编码输出与 cite 输出的比较:

版权声明

原始图像:

原始要求

注意:参考 bibentry 仍然与图像不匹配。带有 的 bibentry 永远author = {Wang, Xiaoye and Lind, Mats and Bingham, Geoffrey},不会产生X. M. Wang, M. Lind, and G. P. Bingham,因此指南源中仍有一些不同步的地方。

平均能量损失

\begin{filecontents*}[overwrite]{\jobname.bib}

@article{test2,
author = {Wang, Xiaoye and Lind, Mats and Bingham, Geoffrey},
date = {2018-06},
pages = {},
title = {Large Continuous Perspective Change With Noncoplanar Points Enables Accurate Slant Perception},
title+an:copyright = {="Copyright 2018 by the American Psychological Association"},
volume = {44},
number={10},
journal = {Journal of Experimental Psychology: Human Perception and Performance},
doi = {https://doi.org/10.1037/xhp0000553}
}
\end{filecontents*}



\documentclass[jou,colorlinks]{apa7}

%\usepackage[english]{babel}
%\usepackage{sectsty}
%\usepackage{framed}
%\usepackage{multirow}
%\usepackage{caption}
%\usepackage{subcaption}

\usepackage[style = apa6, 
sortcites=true,
sorting=nyt,
autocite=inline,
giveninits=true,
]{biblatex}
\addbibresource{\jobname.bib}

\DeclareNameAlias{author}{given-family}
\DeclareLanguageMapping{english}{english-apa}
  \NewBibliographyString{by}
\DefineBibliographyStrings{english}{%
by = {by}
}
%\addbibresource{referencestest.bib}

  


\DeclareCiteCommand{\copyrightcite}%
{\usebibmacro{prenote}\addspace} {%
\mkbibquote{\thefield{title}}%
\addcomma\addspace \mkbibbold{\bibstring{by}\addspace\printnames[][-\value{listtotal}]{author}%
\addcomma\addspace \thefield{year}%
\addcomma\addspace} \mkbibitalic{\thefield{journaltitle}}%
\addcomma\addspace \mkbibitalic{\thefield{volume}}%
\mkbibparens{\thefield{number}}%
\addcomma\addspace%
} {} {\usebibmacro{postnote}%
\addspace%
\mkbibparens{\url{\thefield{doi}}}%
\adddot%
\hasfieldannotation[title][copyright]{%
\adddot\addspace%
\getfieldannotation[title][copyright]\adddot}{}%
}

%\usepackage{fullpage}
%
%\edef\restoreparindent{\parindent=\the\parindent\relax}
%\usepackage{parskip}
%\restoreparindent
%
%\makeindex


\begin{document}

%\pagenumbering{Roman}
%
%
%
%\sectionfont{\centering}
%
%\pagebreak
%\setcounter{page}{3}
%
%
%
%
%\tableofcontents{}
%
%
%\section{Introduction}
%
%Of course, the viability of autonomous cars won't be discussed in this document. It could be discussed in a next document.
%
%\pagenumbering{arabic}
%
%\pagebreak
%
%
%\section{Lorem}
%
%\section{Ipsum}
%
%
%\section{Lorem2}
%
%
%\section{Ipsum2}
%
%\section{Lorem3}
%
%\section{Ipsum3}
%
%
%\section{Lorem4}
\section{Source}
\begin{quotation}\noindent
\begin{verbatim}
@article{test2,
author = {Wang, Xiaoye and Lind, Mats and Bingham, Geoffrey},
date = {2018-06},
pages = {},
title = {Large Continuous Perspective Change With Noncoplanar Points Enables Accurate Slant Perception},
title+an:copyright = {="Copyright 2018 by the American Psychological Association"},
volume = {44},
number={10},
journal = {Journal of Experimental Psychology: Human Perception and Performance},
doi = {https://doi.org/10.1037/xhp0000553}
}

\end{verbatim}
\end{quotation}

\renewcommand{\baselinestretch}{1.5}
\section{Manual}
From "Large Continuous Perspective Change With Noncoplanar Points Enables Accurate Slant Perception", by X. M. Wang, M. Lind and G. P. Bingham, 2018, \textit{Journal of Experimental Psychology: Human Perception and Performance}, 44(10), p. 1513 (https://doi.org/10.1037/xhp0000553). Copyright 2018 by the American Psychological Association.

\section{Custom: \textbackslash copyrightcite}
\copyrightcite[From][1513]{test2}

\section{Usual: \textbackslash cite}
\cite[From][1513]{test2}

\end{document}

相关内容