我想知道是否有簡單的方法來提取一個乳膠文件的標題與他們是從數字的數字。 例如,如果我有3個數字在我的乳膠文件中定義的,我需要創建一個文件與這些數字的標題,例如,製作字幕頁
Fig. 1. Caption of Fig. 1
Fig. 2. Another caption
Fig. 3. Yet another caption
是否有這樣做使用乳膠的方法嗎?或者我應該與其他程序一起做? 我有幾個數字,所以我不想一個接一個地提取字幕,因爲我必須手動編號。
解決方案。 我解決了這個問題。我使用另一個文件來包含數字列表並分別處理它們。我包括在該文件中包含的數字修改的列表如下
{\renewcommand*\numberline[1]{Fig.\,#1:\space}
\makeatletter
\renewcommand*\[email protected][2]{\noindent#1\par}
\makeatother
\listoffigures}
然後,我包括它與\include
命令原始文件。然後它創建數字文件列表file.lof
,我使用該文件編譯一個最小文件以分別生成數字列表。
\documentclass{article}
\usepackage{subfigure} % This avoids problems with subfigures captions
\usepackage{amsmath,amssymb} % I used math in my captions
\nofiles % This makes the aux and lof file not to be deleted
\begin{document}
\include{list} % Includes the same file as before
\end{document}
我正在使用不同於文章的類,因此我需要在auxiliar文件中複製一些重新定義。將file.lof
重命名爲這個新文件,這樣乳膠就可以找到它,它將完成這項工作。我把所有這些放在一個腳本中,現在它自動運行。 Hth。
[TeX.StackExchange.com](http://tex.stackexchange.com/) – 2010-11-19 12:44:26