
我在命名法中創建了兩列,\multicols
我的問題是如何拆分列。我想要的是讓左列成為符號,右列成為下標。還有一種方法可以為兩列添加標題嗎?程式碼如下:
\section*{ } %Introduction SECTION
\begin{multicols}{2} %Add symbols here
\nomenclature{\textit{P}}{Pressure}
\nomenclature{\textit{T}}{Ambient or Atmospheric Temperature}
\nomenclature{\textit{$F_{design}$}}{Design Load on Joint $(N)$}
\nomenclature{\textit{$\mu_{F_{max}}$}}{Average Maximum Joint Strength $(N)$}
\nomenclature{\textit{$\rho$}}{Density}
\nomenclature{\textit{V}}{Velocity}
\nomenclature{\textit{R}}{Universal Gas Constant}
\columnbreak %Add subscripts here
\nomenclature{\textit{atm}}{Atmospheric or Ambient}
\nomenclature{\textit{1}}{Settling Chamber}
\nomenclature{\textit{2}}{Test Section}
\printnomenclature[\nomwidest]
\end{multicols}
\pagebreak
答案1
您似乎將術語條目的定義與它們的列印混淆了。\nomenclature
僅定義一個條目,因此將它們放入環境中是沒有意義的multicols
。您通常將它們放在定義項目的頁面上。此外,出於同樣的原因,它\columnbreak
不會執行任何與命名法列印相關的操作。所有格式化/列印都將在\printnomenclature
命令內進行,因此操作應該在此處進行。此外,在列印之前,您必須使用 處理條目makeindex
,這會對條目進行排序。因此,如果必須將它們收集到兩組中,則必須確保排序將它們收集到這些組中。您可以透過為\nomenclature
定義條目組提供可選參數來實現此目的。對於這兩個組,這些可選參數的第一個字母應該不同。我選擇了sy
,xu
但你選擇什麼並不重要。首字母應該不同,字母順序決定輸出中組的順序。然後定義一個宏\nomgroup
,它將第一個字母大寫作為參數(例如 S 和 X)。然後我們用它來格式化群組標籤。 S 將用於列印“符號”,X 將用於進行分欄並列印“下標”。我們將 multicols 的內容放在序言和後序中。順便說一句,如果您想更改條目的順序,您可以在可選參數中添加一些額外的內容,因為它將用於排序。
這是一個工作範例。
\documentclass{article}
\usepackage{ifthen}
\usepackage{nomencl}
\usepackage{multicol}
\renewcommand{\nomgroup}[1]{%
\ifthenelse{\equal{#1}{S}}{\item[\large\textbf{Symbols}]}{%
\ifthenelse{\equal{#1}{X}}{\columnbreak\item[\large\textbf{Subscripts}]}{}}}
\renewcommand{\nompreamble}{\begin{multicols}{2}}
\renewcommand{\nompostamble}{\end{multicols}}
\makenomenclature
\begin{document}
\nomenclature[sy ]{\textit{P}}{Pressure}
\nomenclature[sy ]{\textit{T}}{Ambient or Atmospheric Temperature}
\nomenclature[sy ]{\textit{$F_{design}$}}{Design Load on Joint $(N)$}
\nomenclature[sy ]{\textit{$\mu_{F_{max}}$}}{Average Maximum Joint Strength $(N)$}
\nomenclature[sy ]{\textit{$\rho$}}{Density}
\nomenclature[sy ]{\textit{V}}{Velocity}
\nomenclature[sy ]{\textit{R}}{Universal Gas Constant}
\nomenclature[xu ]{\textit{atm}}{Atmospheric or Ambient}
\nomenclature[xu ]{\textit{1}}{Settling Chamber}
\nomenclature[xu ]{\textit{2}}{Test Section}
\printnomenclature
\end{document}