latex - Biblatex:网站引用为斜体,删除“nd”时使用标题而不是作者
问题描述
我正在尝试使用带有 BibLaTeX 的 authoryear 风格引用一个网站。
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{filecontents}{ref.bib}
@online{nanopore,
author = "{Oxford Nanopore Technologies}",
title = "Oxford Nanopore Technologies Github",
url = "https://github.com/nanoporetech"
}
\end{filecontents}
\usepackage[
backend=biber,
style=authoryear,
sorting=nyt,
citestyle=authoryear,
maxbibnames=99
]{biblatex}
\addbibresource{ref.bib}
\begin{document}
\parencite{nanopore}
\end{document}
这给了我
这很好,除了我想删除“nd”,所以我这样做是为了删除它:
\DeclareLabeldate[online]{%
\field{date}
\field{year}
\field{eventdate}
\field{origdate}
\field{urldate}
}
然后我的引文发生了变化,所以 1)它打印的是标题而不是作者,2)引文是斜体的(这可能是因为它打印的是标题而不是作者)。
知道为什么会发生这种情况以及如何防止它吗?
提前致谢!
解决方案
您可以更改在线类型的“nd”的翻译:
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{filecontents}{ref.bib}
@online{nanopore,
author = "{Oxford Nanopore Technologies}",
title = "Oxford Nanopore Technologies Github",
url = "https://github.com/nanoporetech"
}
\end{filecontents}
\usepackage[
backend=biber,
style=authoryear,
sorting=nyt,
citestyle=authoryear,
maxbibnames=99,
]{biblatex}
\DefineBibliographyStrings{english}{%
nodate = {\ifboolexpr{test{\ifentrytype{online}}}{\unspace}{n\adddot d\adddot}},
}
\addbibresource{ref.bib}
\begin{document}
\parencite{nanopore}
\end{document}
推荐阅读
- python - 无法在 Django 项目中读取静态文件 CSS
- java - Json 包含特定子项的 Null 值
- python - 为什么我的函数总是返回 None 而不是 True 或 False?
- android - 查看菜单文件的绑定?
- sqlite - 如何在颤动中保存共享首选项中的复选框状态?
- rest - 具有相同的路由要求而不是身份验证?
- amazon-web-services - 仅使用 API Gateway 从 S3 访问 AWS Lambda
- xml - VB.NET、XML、写入和保存,带有内部文本和属性
- token - 如何获取新的刷新令牌 - Identity Server 4
- pycharm - 有没有办法在 PyCharm 中编写代码时自动格式化代码?