首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用短小的作者引文进行书签/重划

使用短小的作者引文进行书签/重划
EN

Stack Overflow用户
提问于 2018-01-17 14:52:24
回答 2查看 1.7K关注 0票数 8

在我的报告中,我引用了AERA、APA和NCME的教育和心理测试标准。

代码语言:javascript
运行
复制
@Book{standards,
  title = {{Standards for Educational and Psychological Testing}},
  author = {{American Educational Research Association} and {American Psychological Association} and {National Council on Measurement in Education}},
  shortauthor = {AERA},
  publisher = {American Educational Research Association},
  address = {Washington, DC},
  year = {2014}
}

根据APA风格指南第6版,应使用可识别的创作组织缩写。我第一次在课文中引用这本书时,应该是这样的:

以下是一些填充文本(美国教育研究协会AERA、美国心理协会和全国教育测量委员会,2014年)。下面是一些更多的填充文本(AERA等人,2014年)。

然而,我现在的引文是这样的:

以下是一些填充文本(美国教育研究协会、美国心理协会和全国教育测量委员会,2014年)。下面是一些更多的填充文本(美国教育研究协会等,2014年)。

有没有办法在预订中实现这些引用?下面是一个可重复的最小示例:https://github.com/wjakethompson/bookdown-citations

EN

回答 2

Stack Overflow用户

发布于 2018-04-09 21:35:07

我开发了一种部分有效的解决方案。此解决方案打印长作者和缩短版本,但只适用于单个作者,并且由于它使用LaTeX来实现自定义,因此只适用于PDF输出

通过修改您提供的示例,我创建了一个书目test.bib,如下所示:

代码语言:javascript
运行
复制
@Book{standards2,
  title = {{Standards for Educational and Psychological Testing}},
  author = {{American Educational Research Association}},
  shortauthor = {AERA},
  publisher = {American Educational Research Association},
  address = {Washington, DC},
  year = {2014}
}

还创建了一个文件header.tex。这定义了一个新的LaTeX命令\citefull,它以(author [shortauthor], year)格式打印引文。这个方法是在this answer的基础上松散的。文件内容如下:

代码语言:javascript
运行
复制
\DeclareCiteCommand{\citefull}
  {\boolfalse{citetracker}%
   \boolfalse{pagetracker}%
   \DeclareNameAlias{labelname}{first-last}%
   \usebibmacro{prenote}}
  {\ifciteindex
     {\indexnames{labelname}}
     {}%
   (\printnames{author}
   [\printnames{shortauthor}],
   {\printdate})
   }

  {\usebibmacro{postnote}}

% Adds a comma between the author and year
\renewcommand*{\nameyeardelim}{\addcomma\space}

下面是Rmarkdown文件。更改使用圣经作为引文包。要获得完整的引用,可以使用命令\citefull{}

代码语言:javascript
运行
复制
---
output: 
  pdf_document:
    includes:
      in_header:  header.tex
    citation_package: biblatex
bibliography: test.bib
biblio-style: authoryear

---

\citefull{standards2}

[@standards2]

补充说明 正如我所说的,这是一个部分解决方案,因为它不适用于多个作者,而且我必须承认,我对定制LaTeX引用的知识并没有延伸到那么远!希望有人能够扩展这个答案来改进这个功能。 我尝试使用解决方案explained here,但由于它需要在biblatex之前加载LaTeX包,因此需要修改pandoc .tex模板。我觉得这比使用头文件更不理想。 即使我确实编辑了原来的模板,我仍然有问题使这个解决方案的工作。我得到了一个错误的\DeclareLanguageMappingSuffix,无法确定我是在哪里搞砸了。 我希望这些注释能帮助那些考虑寻找更好的解决方案的人。

票数 2
EN

Stack Overflow用户

发布于 2018-04-10 12:41:43

我能够改进由Mikey Harper提供的解决方案。它仍然是一个部分解决方案,因为它使用的是LaTeX包,因此只适用于PDF。其主要思想是使用this LaTeX solution并使其适应RMarkdown。test.bib含量

代码语言:javascript
运行
复制
@Book{standards,
  title = {{Standards for Educational and Psychological Testing}},
  author = {{American Educational Research Association} and {American Psychological Association} and {National Council on Measurement in Education}},
  shortauthor = {{AERA et al.}},
  publisher = {American Educational Research Association},
  address = {Washington, DC},
  year = {2014}
}

Rmd文件:

代码语言:javascript
运行
复制
---
output: 
  pdf_document:
    citation_package: biblatex
bibliography: test.bib
biblio-style: apa
biblatexoptions:
  - sortcites
header-includes:
  - \DeclareLanguageMapping{english}{american-apa}
---

[@standards]

[@standards]

结果:

这并不完全是所要求的格式,因为短作者位于作者列表的末尾,但是根据this question,没有更好的解决方案。因此,我打开了https://github.com/plk/biblatex-apa/issues/63

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48303890

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档