在这个问题,我设法使用 获得了单段参考书目paralist
。现在我想去掉第一个项目符号。我让它适用于普通paraenum
列表,但它无法用于参考书目。我该如何处理这个问题?
这里有一个例子:删除项目符号是可行的,但不是在参考书目中:
\documentclass{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage[colorlinks=true,citecolor=blue,]{hyperref}
\usepackage{natbib}
\bibpunct{(}{)}{;}{a}{,}{,}
\setlength{\bibsep}{0.0cm}
% ========== DEFINE COUNTER DEPENDENT BULLET ============
\makeatletter
\newcommand{\mybullet}{%
\ifnum\value{enumi}=1
\else
\textbullet
\fi
}
\makeatother
\usepackage{paralist}
% ====== REDEFINE BIBLIOGRAPHY ===================
\renewenvironment{thebibliography}[1]{\let\par\relax%
\section*{\refname}\inparaenum}{\endinparaenum}
\let\oldbibitem\bibitem
\renewcommand{\bibitem}{\item[\mybullet] \oldbibitem}
\begin{document}
% ====== IT WORKS IN PARALIST =========
Test paralist without first bullet:
\begin{inparaenum}[\mybullet]
\item bullet-free first item
\item second item
\item third item
\end{inparaenum}
% ====== BUT NOT IN THE BIBLIOGRAPHY =========
Let us cite \citet{Author:1976} \citep[but also][]{Someone:2000}.
% ========== BIBLIOGRAPHY ============
\begin{thebibliography}{93}
\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi
\bibitem[{Author {et~al.}(1976)Author, Other, \&
Yetanother}]{Author:1976}
Author, F., Other, S., \& Yetanother, T. 1976, Obscure Journal, 25, 314
\bibitem[{Someone {et~al.}(2000)Someone, Someother, \& Thirdone}]{Someone:2000}
Someone, F., Someother, S., \& Thirdone, T. 2000, Otherjournal, 321, 42
\end{thebibliography}
\end{document}
此外,如果有人设法修复从引文到参考书目的超链接(不一定是到特定的项目),那就太好了!
答案1
这将有助于
% ====== REDEFINE BIBLIOGRAPHY ===================
\renewenvironment{thebibliography}[1]{\let\par\relax%
\section*{\refname}\inparaenum[\mybullet]}{\endinparaenum}
\let\oldbibitem\bibitem
\renewcommand{\bibitem}{\item \oldbibitem}
完整代码:
\documentclass{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage[colorlinks=true,citecolor=blue,]{hyperref}
\usepackage{natbib}
\bibpunct{(}{)}{;}{a}{,}{,}
\setlength{\bibsep}{0.0cm}
% ========== DEFINE COUNTER DEPENDENT BULLET ============
\makeatletter
\newcommand{\mybullet}{%
\ifnum\value{enumi}=1
\else
\textbullet
\fi
}
\makeatother
\usepackage{paralist}
% ====== REDEFINE BIBLIOGRAPHY ===================
\renewenvironment{thebibliography}[1]{\let\par\relax%
\section*{\refname}\inparaenum[\mybullet]}{\endinparaenum}
\let\oldbibitem\bibitem
\renewcommand{\bibitem}{\item \oldbibitem}
\begin{document}
% ====== IT WORKS IN PARALIST =========
Test paralist without first bullet:
\begin{inparaenum}[\mybullet]
\item bullet-free first item
\item second item
\item third item
\end{inparaenum}
% ====== BUT NOT IN THE BIBLIOGRAPHY =========
Let us cite \citet{Author:1976} \citep[but also][]{Someone:2000}.
% ========== BIBLIOGRAPHY ============
\begin{thebibliography}{93}
\expandafter\ifx\csname natexlab\endcsname\relax\def\natexlab#1{#1}\fi
\bibitem[{Author {et~al.}(1976)Author, Other, \&
Yetanother}]{Author:1976}
Author, F., Other, S., \& Yetanother, T. 1976, Obscure Journal, 25, 314
\bibitem[{Someone {et~al.}(2000)Someone, Someother, \& Thirdone}]{Someone:2000}
Someone, F., Someother, S., \& Thirdone, T. 2000, Otherjournal, 321, 42
\end{thebibliography}
\end{document}