我有一份很长的文档,在memoir
文档末尾我设置了一个label
,到目前为止它一直有效。我对文档进行了一些更改,在不相关的地方,突然收到警告,说该引用未定义。最后一页到最后都是满的(带有 -bibliography biblatex
)。当我为了测试目的添加更多文本时,我的文档会增加一页,引用又回来了,当我删除那行额外的文本时,文档会缩小一页,引用又会丢失。这看起来像是一个错误,但我不确定,我也不确定哪个是相关的包。现在我可以创建一个临时命令,只需在其中写入最后一页的页码,并希望通过进一步的更改,我的文档会再次变长或变短,我不再需要它了,但如果真的有一个错误,那么正确的做法是什么?
编辑:
当我尝试从头开始生成 MWE 时,我无法重现该问题,但现在我刚刚遇到另一个相同问题的案例,该案例本身可以被最小化,确保它不是 MWE,并且确定所包含的参考书目完全被破坏,但为了识别错误,它应该足够了:
\documentclass[oldfontcommands,a4paper,showtrims]{memoir}
\usepackage{lipsum}%For demo only.
%\RequirePackage{verbatim} %For multi line comments
\usepackage{filecontents}
%%% Font Setup
\usepackage{fontspec,xltxtra,xunicode}
\setromanfont[Mapping=tex-text,Numbers=OldStyle,SmallCapsFont={* Caps}]{Latin Modern Roman}
%%%Page setup
\quarkmarks
\setpagecc{24.1cm}{16.4cm}{*}
\settypeblocksize{17cm}{11.8cm}{*}
\setlrmargins{1.5cm}{*}{*}
\checkandfixthelayout
\newcommand{\chapterfirstpage}{}
\newcommand{\chapterlastpage}{}
\newcommand{\shorttitle}{}
\nouppercaseheads
\makepagestyle{mystyle}
\makeevenhead{mystyle}{\textsc{\shorttitle}}{}{\thepage}
\makeoddhead{mystyle}{\thepage}{}{\textsc{\theauthor}}
\makeevenfoot{mystyle}{\textit{pp. \chapterfirstpage{}–\chapterlastpage{}}}{}{}
\makeoddfoot{mystyle}{\textit{pp. \chapterfirstpage{}–\chapterlastpage{}}}{}{}
\pagestyle{mystyle}
\renewcommand\printtoctitle[1]{\section*{#1}}
\renewcommand\aftertoctitle{}
\setsecnumdepth{paragraph} %Get numbering of headings back
\aliaspagestyle{chapter}{empty} % first page no page number
\counterwithout{section}{chapter} %remove chapter number from headings
%%%Footnote Setup
\setlength{\footmarkwidth}{\leftmargin}
\setlength{\footmarksep}{0em}
\footmarkstyle{#1\hfill}
\setfootnoterule{3pt}{0.125\columnwidth}{\normalrulethickness}
%%%Section header setup:
\setsecheadstyle{\bfseries}
\setsubsecheadstyle{\bfseries}
\setaftersubsecskip{1sp}
\setsubsubsecheadstyle{}
\setaftersubsubsecskip{1sp}
\setparaheadstyle{}
\setafterparaskip{1sp}
%%% Change section number formatting
\setsecnumformat{\csname ts#1\endcsname}
\newcommand{\tssection}{\thesection\qquad\quad}
\newcommand{\tssubsection}{\thesubsection\qquad}
\newcommand{\tssubsubsection}{\thesubsubsection\qquad}
\newcommand{\tsparagraph}{\theparagraph\enspace}
\begin{filecontents}{\jobname.bib}
@Book { astangahrdaya ,
shorthand = {Aṣṭāṅgahṛdaya},
title = {Aṣṭāṅgahṛdaya of Vāgbhaṭa. The romanised text accompanied by line and word indexes} ,
%shorttitle = {aṣṭāṅgahṛdaya} ,
editor = {Rahul Peter Das and Ronald Eric Emmerick},
%year = 1998,
location = {Groningen} ,
publisher = {Egbert Forsten. 1998},
options = {useeditor = false},
}
@Book { bharuci ,
title = {Bharuci's Commentary on the Manusmrti} ,
%shorttitle = { bharuci } ,
volumes = 2 ,
editor = {{J. D. M. Derrett}},
location = {Wiesbaden. 1973},
%year = 1973 ,
options = {useeditor = false},
}
@book { bṛhatsaṃhitā ,
title = {{Bṛhatsaṃhitā of Varāhamihira}},
key = {bṛhatsaṃhitā},
%shorttitle = {bṛhatsaṃhitā},
editor = {{ H. Kern. }},
location = { Calcutta },
publisher = {{Baptist mission press. 1865}},
%date = 1865,
options = {useeditor = false},
}
@book { carakasaṃhitā ,
title = {{Carakasaṃhitā of Agniveśa revised by Caraka and Dṛḍhabala }},
subtitle = {{ With the Commentary [āyurvedadīpikā] of Cakrapāṇidatta }},
editor= {{Jādavaji Trikamji Ācārya}},
%edition = {3rd ed.},
edition = 3,
location = {{Bombay}},
publisher = {{Nirnaya Sagar press}},
date = 1941,
options = {useeditor = false},
}
@book { chāndogyopaniṣad,
title = {Chāndogyopaniṣad},
series = {{Eighteen Principal Upaniṣads }},
volume = 1,
editor = {{ V.~P. Limaye and R.~D. Vadekar}},
location = {Poona},
publisher = {{Vaidika Saṃ\-śodhana Maṇḍala. 1958}},
%year = 1958,
options = {useeditor = false},
}
@book { jātakamālā,
title = {{Jātakamālā of Āryaśūra}},
editor ={{ Hendrik Kern}},
series = {{Harvard Oriental series}},
volume = 1,
location = {{Cambridge, Massachusetts}},
publisher = {{ Harvard University Press}},
year = 1943,
options = {useeditor = false},
}
@book {mahābhārata,
title = {{Mahābhārata}},
editor = {{V. Sukthankar, with the cooperation of S. K. Belvalkar, A. B. Gajendragadkar,V. Kane, R. D. Karmarkar, P. L. Vaidya, S. Winternitz, R. Zimmerman, and other scholars}},
note = {{illustrated by Shrimant Balasaheb Pant Pratinidhi. (Since 1943 ed. S. Belvalkar). 19 Vols.}},
location = {{Poona}},
publisher = {{Bhandarkar Oriental Research Institute}},
year = {{1927-1959}},
options = {useeditor = false},
}
@misc { Niśvāsatattvasaṃhitā,
title = {Niśvāsatattvasaṃhitā},
note = {{National Archives Kathmandu (NAK) MS~1--227, Nepal German Manuscript Preservation Project
(NGMPP) Reel No.\thinspace A~41/14. Palm--leaf, Folios 117,
early Nepalese (Kuṭilā) script. Described by Hara Prasād Śāstri
(1905:lxxvii and 137--140). The verse and chapter numeration used in footnotes is that of Goodall's edition in progress.}},
}
@book {skandapurāṇa ,
title = {{Skandapurāṇa. Vol. IIA: Adhyāyas 26--31.14. The Vārāṇasī Cycle}},
editor = {{ Hans T.~Bakker and Harunaga Isaacson}},
location = { Groningen},
publisher = {{Egbert Forston}},
year = 2004,
options = {useeditor = false},
}
@book {suśrutasaṃhitā ,
title = { suśrutasaṃhitā of Suśruta with the Commentaries of Dalhaṇa (Nibandhasaṅgraha) and Gayadāsa (Nyāyacandrikā, only on \textit{Nidānasthāna})},
editor = {Vaidya Jadavji Trikamji Acharya and Narayan Ram Acharya},
year = {1992 (Reprint)},
location = {Varanasi/Delhi},
publisher = {Chaukhambha Orientalia},
options = {useeditor = false},
}
@book { tantrāloka ,
title = {{ Tantrāloka of Abhi\-nava\-gupta with Commentary [ -viveka] of Rājānaka Jaya\-ratha}},
editor = {Madhusūdan Kaul Śāstrī},
series = {KSTS},
number = {23, 28, 30, 35, 29, 41, 47, 59, 52, 57 and 58},
location = {Bombay and Srinagar},
year = {1918-38},
options = {useeditor = false},
}
@book { vaikhānasadharmasūtra ,
%shorttitle = {vaikhānasadharmasūtra},
title = {{Vaikh\=anasag\d{r}hyas\=utra and Vaikh\=anasadharmas\=utra. The Domestic Rules of the Vaikh\=anasa School belonging to the Black Yajurveda}},
editor = {W. Caland},
location = {Calcutta},
publisher = {{The Asiatic Society of Bengal}},
year = 1927,
options = {useeditor = false},
}
@book { yājñavalkyasmṛti,
title = {{Yājñavalkyasmṛti of Yogīśvara Yājña\-valkya with the Commentary [Vīramitrodaya] of Mitra Miśra and [Mitākṣarā] of Vi\-jñāneśvara}},
subtitle = {{testsubtitle}},
editor = {{Nārāyaṇa Śāstrī Khiste and Jagannātha Śāstrī Hośiṅga}},
series = {{ Chowkhambha Sanskrit Series }},
number = {{62}},
location = { Benares},
publisher = {{Chowkhambha Sanskrit Series Office}},
year = 1929,
options = {useeditor = false},
}
\end{filecontents}
%%%Bibliography Setup
\usepackage[notes,short,backend=biber]{biblatex-chicago}
\setlength\bibitemsep{0pt} % no empty line between bib entries
%\addbibresource{prim.bib}
\addbibresource{\jobname.bib}
\author{Some Author}
\title{Some Title}
\begin{document}
\label{chX.firstpage}
\renewcommand{\chapterfirstpage}{\pageref{chX.firstpage}}
\renewcommand{\chapterlastpage}{\pageref{chX.lastpage}}
\renewcommand{\shorttitle}{\thetitle}%Or something shorter if necessary to fit page headers
\maketitle
\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
\tableofcontents*
\section{A Section}
\lipsum[1]
\subsection{A subsection}
\lipsum[2] Some more text to add a footnote on.\footnote{This is a footnote} And again some more text.\footnote{And this time a much longer footnote. Longer than one line. Still longer so we reach the line break.}
\subsubsection{A subsubsection}
\lipsum[3]
\paragraph{A paragraph}
\lipsum[4]
\nocite{*}%
\printbibliography[title=Primary Sources, heading=subbibliography]
\label{chX.lastpage}{}
\end{document}