我想在 Latex 中写一个很长的数学参数列表及其各自的定义(见图)。我尝试了不同的选项(将其添加为表格,将其添加为词汇表),但似乎都没有正常工作。如您所见,列表很长,它将覆盖两个不同的页面。此外,我想避免列表的宽度长于文本的右边距。最后,列表的左侧部分不应与文本行对齐。
如果有人能帮助我,我将非常感激!提前谢谢!
对于索引,我把它们放在一个表格里,这似乎有效:
\renewcommand{\nomname}{\subsubsection{Indices}}
\vspace{-20mm}
\renewcommand{\nompreamble}{The following indices capture the dimension of the problem}
\mbox{}
\nomenclature{$k$}{ suppliers, $k\in \{1,…, K\}$}
\nomenclature{$i$}{ Minimum volume required on facility i [M cans]}
\printnomenclature
\renewcommand{\nomname}{\subsubsection{Parameters}}
\vspace{-20mm}
\renewcommand{\nompreamble}{The following product flow related parameters are used}
\mbox{}
\nomenclature{$Q_i$}{ Available capacity on facility i [M cans]}
\nomenclature{$V_i$}{ Minimum volume required on facility i [M cans]}
\printnomenclature
我尝试将其写成命名法,但由于我想为每个列表创建子部分(即一个用于索引,一个用于参数,一个用于变量),因此命名法似乎不起作用。希望这能有所帮助!
答案1
最后,我想我有你想要的东西。看一看:
\documentclass{article}
\usepackage{enumitem}
\usepackage{hyperref}
\usepackage{glossaries}
\makeglossaries
\newcommand{\mathgl}[2]{
\newglossaryentry{#1}{name={#1},description={#2}}
\begin{description}[labelwidth=1cm]
\item[\gls{#1}]#2
\end{description}
}
\begin{document}
\tableofcontents
\section{First section}
Here you have the first section with some introduction bla bla bla
\subsection{First subsection of the first section}
Now you have some formula here, with some parameters you want to describe\\
The first formula is: $Q_i * \varepsilon = 2V_i$\\
Probably, you will have more text here with some explanations about the formulas and its meaning and more blablabla\\
And here comes a second formula like $F_{c_i}^{\frac{1}{2}} + 1 = 2^{V_i}$
\subsubsection{Glossary of the 1.1}
\paragraph{The following product flow related parameters are used:\\}
\mathgl{$Q_i$}{Available capacity on facility $i$ [M cans]}
\mathgl{$V_i$}{Minimum volume required on facility $i$ [M cans]}
\mathgl{$F_{c_i}$}{Fixed cost of each facility $i$}
\subsection{Second subsection of the first section}
The formula here is: $L_c + 2^{Q_i} = V_c$
And you make a new subsubsection glossary for these parameters
\subsubsection{Glossary of the 1.2}
\paragraph{The following product flow related parameters are used:\\}
\mathgl{$Q_i$}{Available capacity on facility $i$ [M cans]}
\mathgl{$V_c$}{Transportation variable costs}
\mathgl{$L_c$}{Transportation fixed costs}
\printglossaries
\end{document}
它会产生:
答案2
按照@thewaywewalk 所说的,你可以简单地做:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[intoc]{nomencl}
\makenomenclature
%You can change the title of Nomenclature section this way
\renewcommand{\nomname}{Parameters}
\renewcommand{\nompreamble}{The following product flow related parameters are used}
\begin{document}
\tableofcontents
\section{First section}
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam lobortisfacilisis sem. Nullam nec mi et neque pharetra sollicitudin. Praesent imperdie...
\subsection{First subsection}
\clearpage
\mbox{}
\nomenclature{$Q_i$}{Available capacity on facility i [M cans]}
\nomenclature{$V_i$}{Minimum volume required on facility i [M cans]}
\printnomenclature
\end{document}
获得:
在第一页,并且:
在第二页。
答案3
与大多数评论员一样,我不太确定您到底在寻找什么,但也许这个longtable
软件包可以解决您的部分问题。
\documentclass[12pt]{article}
\usepackage{longtable}
\begin{document}
\begin{center}
\begin{longtable}{|c|c|c|c|}
\caption{A simple longtable example}
\hline
\textbf{First entry} & \textbf{Second entry} & \textbf{Third entry} & \textbf{Fourth entry} \\
\hline
\endfirsthead
\multicolumn{4}{c}{\tablename\ \thetable\ -- \textit{Continued from previous page}}
\hline
\textbf{First entry} & \textbf{Second entry} & \textbf{Third entry} & \textbf{Fourth entry} \\
\hline
\endhead
\hline
\multicolumn{4}{r}{\textit{Continued on next page}} \\
\endfoot
\hline
\endlastfoot
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\ 1 & 2 & 3 & 4 \\
\end{longtable}
\end{center}
\end{document}
我从这篇博文中复制了这个例子:https://texblog.org/2011/05/15/multi-page-tables-using-longtable/
附注:我看到您使用了千米和千克等单位,请注意,在科学中,这些单位通常都是小写的。为了使您的文档保持一致,我强烈建议您使用包siunitx
。甚至可能使用mhchem
CO2 的包 \ce{CO2},以获得下标 2。