
{readon}
나는 섹션 끝 부분에서 읽을 수 있는 추가 기사와 웹 사이트를 제공하기 위해 사용자 정의 환경을 사용합니다 . 이 목록에 있는 항목 \cite
의 URL도 인쇄하도록 어떻게 변경할 수 있습니까 ?@ONLINE
\documentclass{scrbook}
\usepackage[style=authortitle]{biblatex}
\addbibresource{\jobname.bib}
\usepackage{lipsum}
\begin{filecontents}{\jobname.bib}
@Online{penalties,
author = {David Carlisle},
title = {What are penalties and which ones are defined?},
date = {2012-04-09},
url = {https://tex.stackexchange.com/a/51264/4918},
urldate = {2017-06-28},
}
@Book{texbytopic,
author = {Eijkhout, Victor},
title = {\TeX{} by Topic},
address = {Berlin},
year = {2014},
}
\end{filecontents}
\newenvironment{readon}{%
\par\bigskip\noindent
\footnotesize
\textbf{Further reading \dots}
\begin{itemize}
}{
\end{itemize}
}
\begin{document}
\lipsum[1-3]
\begin{readon}
\item \cite[155\psqq]{texbytopic}
\item \cite{penalties} [[add URL here]]
\end{readon}
\printbibliography
\end{document}
답변1
@online
항목 의 URL을 인쇄하도록 인용 매크로를 수정할 수 있습니다.
\renewbibmacro*{cite}{%
\iffieldundef{shorthand}
{\ifnameundef{labelname}
{}
{\printnames{labelname}%
\setunit{\printdelim{nametitledelim}}}%
\usebibmacro{cite:title}}%
{\usebibmacro{cite:shorthand}}%
\usebibmacro{cite:url}}
\newbibmacro{cite:url}{%
\ifentrytype{online}
{\setunit{\addspace}%
\printfield{url}}
{}}
이는 bibmacro를 수정하므로 cite
솔루션은 스타일에 따라 다르지만 authoryear
일반적인 아이디어는 모든 스타일에 적용될 수 있습니다.