我对 LaTeX 还比较陌生,我正在尝试学习如何基于书籍类创建一类文档。我可以添加索引并在编译时打印它,只要我将所有内容保留为默认值即可。当我尝试将参数传递给时,makeindex
我收到一个错误(这\makeindex
变成了这个\makeindex[intoc, columns=3]
),这是我收到的错误:
缺少 \begin{document}。\makeindex[
这是我的课程文件:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{MyStyle}[2022/08/29 Baseline book style class]
%load the base class for New class
\LoadClass[12]{book}
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
%Make index
\RequirePackage{makeidx}
\makeindex[intoc, columns=3]
如果我删除它,它就可以编译并运行
[intoc, 列=3]
这是主要的 tex 文件:
\documentclass{MyStyle}[2022/08/29]
\title{Style Guide}
\author{Daniel Fonseca Corradini De Ferrand}
\begin{document}
\maketitle
\tableofcontents
\listoffigures
\listoftables
%not my text
You may have several mobile devices that you want to
\index{sync} with windows 7.\index{remote} devices are seen
by \index{Windows} 7 as removable \index{storage devices}.
\printindex
\end{document}
我如何\makeindex
从类文件中传递参数?