
我剛剛在網路上搜了很多,但找不到答案。
這就是我的參考書目現在的樣子。正如您所看到的,即使未給出此信息,它也會顯示“In:”。
基本上,我怎麼刪除“In:”?
這是我的 LaTeX 標題:(我不知道這一切有何相關。)
\documentclass[11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{textcomp}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage[backend=biber, natbib=true, style=authoryear-icomp]{biblatex}
\addbibresource{~/res/library.bib} %% point at your bib file
答案1
您可以透過重新定義in:
bibmacro 來做到這一點:如果沒有journaltitle
字段,則不列印任何內容:
\renewbibmacro*{in:}{%
\iffieldundef{journaltitle}
{}
{\printtext{\bibstring{in}\intitlepunct}}}
@online
但請考慮使用不同的條目類型(例如)或為條目添加正確的欄位是否會更好。
微量元素
\documentclass{article}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{Author2019,
author = {Author, An},
title = {Some Title},
date = {2019},
url = {http://www.example.com/a}
}
@online{Author2018,
author = {Author, Another},
title = {Some Other Title},
date = {2018},
url = {http://www.example.com/b}
}
\end{filecontents}
\usepackage[style=authoryear-icomp]{biblatex}
\addbibresource{\jobname.bib}
\renewbibmacro*{in:}{%
\iffieldundef{journaltitle}
{}
{\printtext{\bibstring{in}\intitlepunct}}}
\begin{document}
\nocite{*}
\printbibliography
\end{document}