![\ref 的 Tufte-book 問題](https://rvso.com/image/328473/%5Cref%20%E7%9A%84%20Tufte-book%20%E5%95%8F%E9%A1%8C.png)
我第一次排版時得到的??
是\ref
.第二次就空白了。我正在使用TeXShop。我著手製作一個範例,用於biblatex
獲取每章的參考文獻清單以及書末的另一個清單。它使參考文獻列表可以,但不能使標記\ref
。怎麼了?
\documentclass[nobib]{tufte-book}
\usepackage[
style=authoryear,
autocite=footnote,
backend=biber,
natbib=true
]{biblatex}
\addbibresource{references.bib}
\begin{document}
\begin{refsection}
\chapter{First chapter}\label{ch01}
\section{Foo}\label{ch01:sec01}
Some text \citep{Duffie:96}.
\section{Bee}
Refer to \ref{ch01:sec01} of chapter \ref{ch01}.
\printbibliography[heading=subbibliography]
\end{refsection}
\begin{refsection}
\chapter{Second chapter}
\section{Bar}
Some text\autocite{Eason1999}.
Remember section \ref{ch01:sec01} of chapter \ref{ch01} down here.
\printbibliography[heading=subbibliography]
\end{refsection}
\chapter{Later}
This,\autocite{hashemian} should be a side note but not this \citep{hashemian}.
\printbibliography
\end{document}
這是參考文獻.bib:
%% This BibTeX bibliography file was created using BibDesk.
%% http://bibdesk.sourceforge.net/
%% Created for Sam Cox at 2016-02-17 17:46:29 -0500
%% Saved with string encoding Unicode (UTF-8)
@book{Duffie:96,
Address = {Princeton, NJ 08540},
Author = {Duffie, J. Darrell},
Date-Added = {2016-02-17 22:36:09 +0000},
Date-Modified = {2016-02-17 22:36:09 +0000},
Edition = {2nd},
Publisher = {Princeton University Press},
Title = {Dynamic Asset Pricing Theory},
Year = {1996}}
@article{Eason1999,
Author = {Eason, Stephen W. and Hirst, Brian L. and Vukelic, Milan},
Date-Added = {2016-02-17 22:35:52 +0000},
Date-Modified = {2016-02-17 22:35:52 +0000},
Journal = {Record of the Society of Actuaries},
Number = {3},
Pages = {1--20},
Title = {Security Blanket for Life (and Health)},
Volume = {25},
Year = {1999}}
@book{childs_temperature,
Address = {Great Britain},
Author = {Childs, Peter R N},
Edition = {1},
Isbn = {0 7506 5080 X},
Publisher = {Butterworth - Heinemann},
Title = {Practical Temperature Measurement},
Year = {2001}}
@phdthesis{hashemian,
Author = {Hashemian, Hashem Mehrdad},
School = {{The University of Western Ontario}},
Title = {Measurements of dynamic temperatures and pressures in nuclear power plants},
Type = {PhD {T}hesis},
Year = {2011}}
答案1
文檔類別中的章節標題未編號tufte-book
。由於\ref
想要列印章節號但找不到它,它在日誌檔案中抱怨:
Package hyperref Warning: Suppressing empty link on input line 18.
如果您開啟章節編號(透過新增\setcounter{secnumdepth}{1}
至文件的序言),應該可以解決問題。
但請注意,預設情況下,中的標題tufte-book
並不能很好地列印編號,因此您可能需要稍微調整格式。
作為替代方案,您可以考慮使用\nameref
而不是\ref
列印章節/節的名稱而不是編號。