LaTeX 中的自定义列表?
我正在为大学编写一个脚本,其中使用自定义命令插入除章节之外的部分文本的日期(当前仅显示 marginpar
),例如:
\lesson{1}
\section{A}
\section{B}
\subsection{C}
\lesson{2}
\subsection{D}
除了通常的 \listoffigures
、\listoftables
和 \tableofcontents
我想要一个允许按课程编号访问的列表。它应该看起来像 \listoffigures
除了带有自定义标签(因为课程没有标题),例如:
Lesson 1 ..... Page 1
Lesson 2 ..... Page 5
是否有一个包允许我像创建一样简单地定义新列表新柜台?或者我是否必须深入研究现有列表的来源并破解我自己的列表?
(memoir
包文档在开头有一个渲染示例列表,这将是我需要的自定义列表的另一个示例)
任何用于谷歌搜索的关键字都将受到赞赏!
I'm writing a script for college where I insert the date of a part of text apart from the chapters using a custom command (currently just displaying a marginpar
), like:
\lesson{1}
\section{A}
\section{B}
\subsection{C}
\lesson{2}
\subsection{D}
Apart from the usual \listoffigures
, \listoftables
and \tableofcontents
I want a list that allows access by lesson number. It should look like the \listoffigures
except with a custom label (since the lessons don't have captions), for example:
Lesson 1 ..... Page 1
Lesson 2 ..... Page 5
Is there a package that allows me to define new lists like that as easy as creating new counters? Or do I have to dig into the source for the existing lists and hack my own?
(the memoir
package documentation has a list of rendered examples at the beginning, that would be another example of a custom list like I need it)
Any keywords to google for are appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会执行以下操作:
1)在开头打开一个文件:
2)每个命令(如
\lesson
)应在文件中放入一行:3)在处理结束时,关闭文件并读入:
您必须定义像
\lessonfooline
这样的命令。希望这个大纲有帮助。
I would do the following:
1) Open a file at the beginning:
2) Each command like
\lesson
should put a line into the file:3) At the end of the processing, close the file and read it in:
You'll have to define the commands like
\lessonfooline
.Hope this outline helps.