我在这里问了问题: 以表格样式格式化 nomencl
一切都进行得很顺利,但是,列表扩大了,我需要利用这些longtable
属性:即重复页眉和页脚。
脚本nomentbl
稍作makeindex
修改如下:
actual '@'
quote '%'
delim_0 ""
delim_1 ""
delim_2 ""
item_0 ""
delim_t " \\\\\n"
line_max 1000
headings_flag 1
group_skip "[1.1\\parskip]"
preamble "\n\\begin{thenomenclature}\n
\\begin{longtable}[l]{p{\\textwidth*\\real{0.10}}p{\\textwidth*\\real{0.65}}c! {\\extracolsep{0pt}}lll}
\\toprule \\\\
\\multicolumn{1}{l}{Symbol}&\\multicolumn{1}{l}{Quantity}& \\multicolumn{1}{l}{Unit} \\\\%% <------ header here
\\midrule \\\\ "
postamble "\\bottomrule\\\\\n\\end{longtable}\n\\end{thenomenclature}\n"
keyword "\\nomenclatureentry"
%%
%%
\endinput
基本命名声明如下:
\makenomenclature
\nomenclature[a ]{$A$}{Area}{m2}{}
一切运行顺利,直到我改变一切,使页眉和页脚重复。
我收到的错误如下:
! Missing } inserted
<inserted text>
}
1.18 \bottomrule
我仔细检查了所有的荣誉称号,但还是没能找出问题所在。为了找出错误,我把缩写缩减为一个,但还是没能成功。
有什么建议可以改进/解决这个问题吗?
NLS 文件输出:
\begin{thenomenclature}
%
\begin{longtable}[l]%
{p{\textwidth*\real{0.15}}p{\textwidth*\real{0.65}}c!{\extracolsep{0pt}}lll}
\toprule \\
\multicolumn{1}{l}{Symbol}&\multicolumn{1}{l}{Quantity}& \multicolumn{1}{l}{Unit} \\%% <------ header here
\midrule \\
\endhead
{$A$}&\begingroup Area\endgroup &\begingroup m2\endgroup &\begingroup \endgroup &\begingroup \nomeqref {0}\nompageref{i}, \nompageref{ix} \\
\bottomrule\endfoot
\end{longtable}
\end{thenomenclature}
所做的更改
- 在上面的 nomtbl 脚本末尾添加了 \endinput
- 添加了 nls 文件
- 额外观察:注释掉
\printnomenclature
可以让 LaTeX 编译;问题仅限于命名问题(本主题)
答案1
最后,经过一晚上的编码,我发现了问题所在。在此,我想贡献我改编的 nomenbtl.ist 文件,使用 longtable 并适用于多页:
%%
%% This is file `nomentbl.ist',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% nomentbl.dtx (with options: `idxstyle')
%%
%% Copyright (C) 2006 by Brian Elmegaard <[email protected]>
%%
%% This file can be redistributed and/or modified under the terms
%% of the LaTeX Project Public License distributed from CTAN
%% archives in the directory macros/latex/base/lppl.txt; either
%% version 1.2 of the license, or (at your option) any later version.
%%
%% Nomenclature style file for MAKEINDEX.
%% For nomentbl v0.4
%%
%% Written by Brian Elmegaard
%%
%% RdN March 2012: adapted this script to facilitate two page and long
%% table usage. In addition, some changes are made:
%% - headings_flag set to zero
%% - group_skip changed
%% - heading removed
actual '@'
quote '%'
delim_0 ""
delim_1 ""
delim_2 ""
item_0 ""
delim_t " \\\\\n"
line_max 1000
headings_flag 0
group_skip "[1.1\\parskip]"
preamble "\n\\begin{thenomenclature}\n
\\begin{longtable}[l]{p{\\textwidth*\\real{0.10}}p{\\textwidth*\\real{0.65}}c! {\\extracolsep{0pt}}lll}
\\toprule
\\multicolumn{1}{l}{Symbol}&\\multicolumn{1}{l}{Quantity}& \\multicolumn{1}{l}{Unit} \\\\%% <------ header here
\\midrule \\endhead \\bottomrule\\endfoot\\\\"
postamble "\n\\end{longtable}\n\\end{thenomenclature}\n"
keyword "\\nomenclatureentry"
%%
%%
%%
%% End of file `nomentbl.ist'.
希望它能帮助其他人...