我收到了下面的风格参考指南。我知道这完全是胡扯,但我必须遵循它。
我想删除标题“位于”末尾的句号。请不要碰 Bib 文件,除非得到明确的指示,否则我不太擅长。我对可以引用图像中描述的网站的任何内容都很感兴趣。如果可以从参考书目中的标题中删除日期,那将是一个额外的好处。这是我花了一周时间制作的 MWE。网站上有一个答案,但它太复杂了,我看不懂。
\documentclass[ a4paper,12pt]{article}
% !TeX program = xelatex
% !TeX spellcheck = en_GB
\usepackage{setspace}
\onehalfspacing
\usepackage[round,authoryear]{natbib}
\usepackage{hyperref}
\usepackage{xcolor}
\usepackage[normalem]{ulem}
\usepackage{hyperref}
\hypersetup{colorlinks,urlcolor=blue}
%% or
% \hypersetup{colorlinks=false,pdfborder=000}
% hack into hyperref
\makeatletter
\DeclareUrlCommand\ULurl@@{%
\def\UrlFont{\ttfamily\color{blue}}%
\def\UrlLeft{\uline\bgroup}%
\def\UrlRight{\egroup}}
\def\ULurl@#1{\hyper@linkurl{\ULurl@@{#1}}{#1}}
\DeclareRobustCommand*\ULurl{\hyper@normalise\ULurl@}
\makeatother
\raggedright
% stops indent of second line in Bibliograph
\setlength{\bibhang}{0pt}
\bibliographystyle{apalike}
\hypersetup{
%colorlinks = true, %Colours links instead of ugly boxes
%urlcolor = blue, %Colour for external hyperlinks
%linkcolor = blue, %Colour of internal links
citecolor = red, %Colour of citations
}
% This is needed for arial
\usepackage{fontspec}% this is needed for arial
\setmainfont{Arial} % this is need for arial
\usepackage[left=3.25cm,top=3cm,right=3.25cm,bottom=3cm]{geometry}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article {MCOSW,
author = "Hugh Glaser and Afraz Jafri and Ian Millard",
title = "Managing co-reference on the semantic web",
journal = "WWW2009 Workshop: Linked Data on the Web (LDOW2009)",
month = "April",
year = "2009",
}
@book{SPgood,
title = {A new look at the sacraments},
author = {Bausch, W. {\relax J}},
year = 1998,
publisher = {Twenty Third Publications, Mystic, Connecticut},
location = {Neverland and Wonderland}
}
@Misc{Tho98w,
Author = "F Brennan",
Title = "\emph{What do our Students Rightly Ask of us, the Church Who Are Many Parts, One Body, \textnormal{ 13 August, 2004, located at}}" ,
Note = " \ULurl{http://www.uniya.org/talks/brennan 13aug04.html},
[Accessed: 9th December, 2023]",
year = 1998,
}
\end{filecontents}
\begin{document}
Just in case I need multiple authors \citep{MCOSW}.
\vspace{0.5cm}
This is the correct citation \citep{SPgood}
\vspace{0.5cm}
This is a citation from a website \citep{Tho98w}
\bibliography{\jobname}
\end{document}
答案1
您确实应该避免编写一个 bib 文件,该文件假设字段将按特定顺序输出,例如这里以“位于”结尾的标题字段,并依赖 bibtex 在那里放置一些内容。如果您需要某些特殊文档,那么最好直接编写环境thebibliography
,而根本不使用 bibtex。
然而到了这一步,我只需删除尾随的.
将标题条目更改为
title = "\emph{What do our Students Rightly Ask of us, the Church Who Are Many Parts, One Body, \textnormal{ 13 August, 2004, located at}}\eatdot"
并在文档的参考书目之前添加
\def\eatdot.{}
\bibliography{\jobname}
然后如果你重新生成 bib 文件并运行 bibtex 来生成 bbl 它将看起来像
\newblock \emph{What do our Students Rightly Ask of us, the Church Who Are Many
Parts, One Body, \textnormal{ 13 August, 2004, located at}}\eatdot.
其中\eatdot.
不产生任何输出。