2 列术语

2 列术语

我正在尝试将命名法分成两列。目前,当我使用多列时,第一列顶部有一个空格,用于自动标题。我删除了自动标题,只放了一个标准标题,这样我就可以将其居中。但是,第一列仍保留了标题的空间,而第二列从页面顶部开始。我希望两列都从同一行开始。我该如何修改它才能做到这一点??

\documentclass[]{article}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{verbatim}%to make comments
\usepackage{multicol}%for multiple columns



%Nomenclature Package
%----------------------------------------------
\usepackage{nomencl}
\makenomenclature
%% this modifies item separation:
\setlength{\nomitemsep}{8pt}
%% This will add the subgroups for Nomenclature
%----------------------------------------------

\usepackage{etoolbox}
\renewcommand\nomgroup[1]{% 
  \item[\bfseries
  \ifstrequal{#1}{A}{Stuff}{%
  \ifstrequal{#1}{B}{Other Stuff}{%
  \ifstrequal{#1}{C}{More Stuff}{}}}%
]}
%End Nomenclature Package (don'tforget \printnomenclature)
%----------------------------------------------


\title{Nomenclatures Example}
\author{}
\date{\today}



\begin{document}
\maketitle

\newpage


%% This will add the units
%----------------------------------------------
\newcommand{\nomunit}[1]{%
\renewcommand{\nomentryend}{\hspace*{\fill}#1}}
%----------------------------------------------
\begin{center}
\textbf{Nomenclature}
\end{center}
\begin{multicols}{2}
\renewcommand{\nomname}{}%change title
\printnomenclature
\end{multicols}
\nomenclature[A]{$m$}{Mass \nomunit{[Kg]}}
\nomenclature[A]{$V$}{Velocity \nomunit{[m/s]}}
\nomenclature[A]{$t$}{Time \nomunit{[s]}}
\nomenclature[B, 03]{${R}$}{Real Numbers}
\nomenclature[B, 02]{${C}$}{Complex Numbers}
\nomenclature[B, 01]{${H}$}{Quaternions}
\nomenclature[C]{$V$}{Constant Volume}
\nomenclature[A]{$\rho$}{Friction Index}

\end{document}

答案1

我将使用章节标题作为命名法,但您可以根据需要更改它。诀窍是在可选参数中添加标题\begin{multicols}

\documentclass[]{article}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{verbatim}%to make comments
\usepackage{multicol}%for multiple columns
\usepackage{etoolbox}

%Nomenclature Package
%----------------------------------------------
\usepackage{nomencl}
\makenomenclature

\setlength{\nomitemsep}{8pt}

\newcommand{\nomunit}[1]{%
  \renewcommand{\nomentryend}{\hspace*{\fill}#1}%
}

\renewcommand\nomgroup[1]{% 
  \item[\bfseries
  \ifstrequal{#1}{A}{Stuff}{%
  \ifstrequal{#1}{B}{Other Stuff}{%
  \ifstrequal{#1}{C}{More Stuff}{}}}%
]}

\patchcmd{\thenomenclature}
 {\section*{\nomname}}
 {\begin{multicols}{2}[\section*{\nomname}]}
 {}{}
\appto\endthenomenclature{\end{multicols}}
\setlength{\columnsep}{2pc}
%----------------------------------------------

\title{Nomenclatures Example}
\author{}
\date{\today}



\begin{document}
\maketitle

\newpage

\printnomenclature

\nomenclature[A]{$m$}{Mass \nomunit{[kg]}}
\nomenclature[A]{$V$}{Velocity \nomunit{[m/s]}}
\nomenclature[A]{$t$}{Time \nomunit{[s]}}
\nomenclature[B, 03]{${R}$}{Real Numbers}
\nomenclature[B, 02]{${C}$}{Complex Numbers}
\nomenclature[B, 01]{${H}$}{Quaternions}
\nomenclature[C]{$V$}{Constant Volume}
\nomenclature[A]{$\rho$}{Friction Index}

\end{document}

在此处输入图片描述

对于糟糕的专栏突破,你必须对自己的运气有信心。

相关内容