
私はプログラムを文書化するために Doxygen を使用しています。Doxygen は大量の tex ファイルを作成し、私は TeX Live を使用して tex ファイルから pdf ファイルを生成します。
以前は動作していましたが、ソース コードを少し変更した後、Doxygen ドキュメントに問題がないにもかかわらず、LaTeX のコンパイル警告が表示され、コンパイルに失敗します。
新しい警告は次のとおりです。
`LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
そして次のような警告がたくさんあります:
`LaTeX Warning: Reference `LastPage' on page 60 undefined on input line 170`.
コンパイルは次のように終わります:
make: *** [refman.pdf] Error 1
exit code: 2(0 for SUCCESS).loggingLevel: 20. Build will exit.
何度か再実行してみましたが、変化がありません。どなたか助けていただけませんか?
編集: これは私のメインの tex ファイルです:
\documentclass[oneside]{book}
% Packages required by doxygen
\usepackage{calc}
\usepackage{doxygen}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{makeidx}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{textcomp}
\usepackage[table]{xcolor}
% Font selection
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
\usepackage[scaled=.90]{helvet}
\usepackage{courier}
\usepackage{amssymb}
\usepackage{sectsty}
\renewcommand{\familydefault}{\sfdefault}
\allsectionsfont{%
\fontseries{bc}\selectfont%
\color{darkgray}%
}
\renewcommand{\DoxyLabelFont}{%
\fontseries{bc}\selectfont%
\color{darkgray}%
}
% Page & text layout
\usepackage{geometry}
\geometry{%
a4paper,%
top=2.5cm,%
bottom=3.5cm,%
left=2.5cm,%
right=2.5cm,%
headheight=2.5cm%
}
\tolerance=750
\hfuzz=15pt
\hbadness=750
\setlength{\emergencystretch}{15pt}
\setlength{\parindent}{0cm}
\setlength{\parskip}{0.2cm}
\makeatletter
\renewcommand{\paragraph}{%
\@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{%
\normalfont\normalsize\bfseries\SS@parafont%
}%
}
\renewcommand{\subparagraph}{%
\@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{%
\normalfont\normalsize\bfseries\SS@subparafont%
}%
}
\makeatother
% Headers & footers
\usepackage{fancyhdr}
\usepackage{lastpage}
\pagestyle{fancy}
\lhead{\includegraphics[width=3cm]{doxygen-logo-header.jpg}}
\rhead{Page \thepage \ of\ \pageref{LastPage}}
\chead{\fancyplain{}{massage}}
\lfoot{\fancyplain{}{massage2}}
\cfoot{\fancyplain{}{massage3}}
\rfoot{\fancyplain{}{massage4}}
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\chaptermark}[1]{%
\markboth{#1}{}%
}
\renewcommand{\sectionmark}[1]{%
\markright{\thesection\ #1}%
}
% Indices & bibliography
\usepackage{natbib}
\usepackage[titles]{tocloft}
\setcounter{tocdepth}{3}
\setcounter{secnumdepth}{5}
\makeindex
% Hyperlinks (required, but should be loaded last)
\usepackage{ifpdf}
\ifpdf
\usepackage[pdftex,pagebackref=true]{hyperref}
\else
\usepackage[ps2pdf,pagebackref=true]{hyperref}
\fi
\hypersetup{%
colorlinks=true,%
linkcolor=blue,%
citecolor=blue,%
unicode%
}
% Custom commands
\newcommand{\clearemptydoublepage}{%
\newpage{\pagestyle{empty}\cleardoublepage}%
}
%===== C O N T E N T S =====
\begin{document}
% Titlepage & ToC
\pagestyle{empty}
\hypersetup{pageanchor=false}
\pagenumbering{roman}
\begin{titlepage}
\vspace*{7cm}
\begin{center}%
\includegraphics{doxygen-logo-pdf.jpg}\\[1cm]
{\Huge Library Reference }\\
\vspace*{1.5cm}
{\Large COMPANY}\\
{\large VERSION }\\
\vspace*{1cm}
\end{center}
\end{titlepage}
\fancypagestyle{plain}{\fancyhf{}%
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}}
\tableofcontents
\clearemptydoublepage
\pagenumbering{arabic}
\hypersetup{pageanchor=true}
\pagestyle{fancy}
%--- Begin generated contents ---
\chapter{Module Index}
\input{modules}
\chapter{Data Structure Index}
\input{annotated}
\chapter{File Index}
\input{files}
\chapter{Module Documentation}
\input{group}
\chapter{Data Structure Documentation}
\input{struct}
\chapter{File Documentation}
\input{file}
%--- End generated contents ---
% Index
\newpage
\phantomsection
\addcontentsline{toc}{part}{Index}
\printindex
\end{document}
問題はページとテキストのレイアウトにあるようです。「bottom=3.5cm,%」を「bottom=2.5cm,%」に変更すると動作します。これが問題なのか、それともこれが実際の問題を回避するための方法にすぎないのかはわかりません。ソース ファイルは頻繁に変更されるため、毎回 tex ファイルを変更したくないので、長期的な解決策を探しています。
私の tex ファイルに問題が見つかった場合、または問題の原因についてのアイデアがある場合は、ぜひお知らせください。ありがとうございます!