
でこの質問、 を使用して 1 段落の参考文献を取得できました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}