nomencl 格式问题。如何使描述右对齐?

nomencl 格式问题。如何使描述右对齐?

我正在使用 Nomencl 包,它运行良好。我不知道如何让描述部分从页面的右边距开始,符号部分从左边距开始。这是我目前得到的结果:

\documentclass[twoside]{ecsthesis}      % Use the Thesis Style
\graphicspath{{../Figures/}}   % Location of your graphics files
\usepackage[sort &compress]{natbib}  % Use Natbib style for the refs.\part{title}
\usepackage[noprefix]{nomencl}
\usepackage{chemmacros}
\usepackage{mhchem}
\usepackage{wasysym}
\usepackage{hyperref}
\usepackage{cleveref}

 \usepackage{upgreek}
 \usepackage{epigraph}
 \usepackage{tipa}
 \usepackage{array}

   \setlength\epigraphwidth{8cm}
      \setlength\epigraphrule{0pt}
     \renewcommand{\nomname}{List of Symbols}
    \setlength{\nomlabelwidth}{1\hsize}  
 \renewcommand{\nomlabel}[1]{#1 \dotfill}
 \setlength{\nomitemsep}{-\parsep}   
 \makenomenclature
 \begin{document}

 Hello world
 \tableofcontents
\printnomenclature
\chapter{Hello}
Hello
\chapter{World}
 World
    \nomenclature{OECD}{Organisation for Economic Co-operation and Development}
\nomenclature{EIA}{Energy Information Administration}
\nomenclature{GHGs}{Green House Gases}
\nomenclature{BRE}{Building Research Establishment}
\nomenclature{HVAC}{Heating Ventilation Air Conditioning}
\nomenclature[Q]{$ \dot{Q} $}{Heat Transfer Rate}
\nomenclature[k]{$ k $}{Thermal Conductivity }
\nomenclature[A]{$ A $}{Area of Heat Exchange}


  \end{document}

我希望有更类似于目录的东西(中间有点)。谢谢,M。

答案1

只要你的描述不太长,这就可以完成工作:

  1. 复制该文件nomencl.ist;调用它mynomencl.ist并将其保存在当前工作目录中。在末尾mynomencl.ist添加以下行

    item_0 ""
    

    保存更改。

  2. 在您的文档中:

    \documentclass[twoside]{book}
    \usepackage[noprefix]{nomencl}
    \usepackage{longtable}
    \usepackage{hyperref}
    \usepackage{cleveref}
    
    \makeatletter
    \def\@@@nomenclature[#1]#2#3{%
    \def\@tempa{#2}\def\@tempb{#3}%
    \protected@write\@nomenclaturefile{}%
    {\string\nomenclatureentry{#1\nom@verb\@tempa @{\nom@verb\@tempa}\protect\dotfill%
    \begingroup\nom@verb\@tempb\protect\nomeqref{\theequation}%
    |nompageref}{\thepage}}%
    \endgroup
    \@esphack}
    \def\thenomenclature{%
    \setlength\parindent{0pt}%
    \@ifundefined{chapter}{\section*}{\chapter*}{\nomname}%
    \nompreamble
    }
    \def\endthenomenclature{\nompostamble}
    \renewcommand\nomentryend{\par}
    \makeatother
    
    \renewcommand{\nomname}{List of Symbols}
    
    \makenomenclature
    
    \begin{document}
    
     Hello world
    \printnomenclature
    \chapter{Hello}
    Hello
    \chapter{World}
     World
    \nomenclature{OECD}{Organisation for Economic Co-operation and Development}
    \nomenclature{EIA}{Energy Information Administration}
    \nomenclature{GHGs}{Green House Gases}
    \nomenclature{BRE}{Building Research Establishment}
    \nomenclature{HVAC}{Heating Ventilation Air Conditioning}
    \nomenclature[Q]{$ \dot{Q} $}{Heat Transfer Rate}
    \nomenclature[k]{$ k $}{Thermal Conductivity}
    \nomenclature[A]{$ A $}{Area of Heat Exchange}
    
    \end{document}
    
  3. 使用以下方式处理文档

    pdflatex name
    makeindex name.nlo -s mynomencl.ist -o name.nls
    pdflatex name
    pdflatex name
    

以下是包含示例代码的结果列表:

在此处输入图片描述

相关内容