对齐 glossary-longextra 中的缩写描述

对齐 glossary-longextra 中的缩写描述

缩写的描述应该对齐。
缩写应该仍然在左侧。
缩写和描述之间应该留出更多空间。
我的.tex文件

\documentclass{report}

\usepackage{float}
\usepackage{hyperref}

\usepackage{amsmath,amsfonts,amssymb,bm}
\usepackage{siunitx}

\usepackage[record,% using bib2gls
 abbreviations, % create list of abbreviations
 symbols, % create list of symbols
 stylemods={longextra} % load glossary-longextra.sty
]{glossaries-extra}

\GlsXtrLoadResources[
  src={abbreviations},% data in abbreviations.bib
  sort-field={name}, % sort by name field
  sort={letter-nocase}, % case-insensitive letter sort
  type=abbreviations, % put the entries in this glossary
  save-locations=false % no number list required
]

\GlsXtrLoadResources[
  src={symbols}, % data in symbols.bib
  sort-field={name}, % sort by name field
  sort={letter-nocase}, % case-insensitive letter sort
  type=symbols, % put these terms in the symbols list
  field-aliases={unit=symbol},% convert unit key to symbol
  save-locations=false % don't save location lists
]

\begin{document}

    \pagenumbering{Roman}
    \setcounter{page}{1}
    
    \glsaddall
    \printunsrtglossary[type=abbreviations]
    
    % change column headers:
    \renewcommand{\entryname}{Symbol}
    \renewcommand{\symbolname}{Unit}
    
    \renewcommand*{\arraystretch}{1}% default is 1
    \printunsrtglossary[type=symbols,style=long-name-desc-sym]

\end{document}

abbreviations.bib文件:

@abbreviation{pmsm,
  short = {PMSM},
  long = {Permanentmagnet-Synchronmaschine}
}

@abbreviation{fxlms,
  short = {FxLMS},
  long = {Filtered-$x$-Least-Mean-Squares}
}

@abbreviation{avc,
  short = {AVC},
  long = {Active Vibration Control}
}

@abbreviation{anc,
  short = {ANC},
  long = {Active Noise Cancelling}
}

@abbreviation{fir,
  short = {FIR},
  long = {Finite Impulse Response, dt.: Endliche Impulsantwort}
}

@abbreviation{lms,
  short = {LMS},
  long = {Least-Mean-Squares}
}

@abbreviation{np,
  short = {NP},
  long = {Nordpol}
}

@abbreviation{sp,
  short = {SP},
  long = {Südpol}
}

@abbreviation{ipmsm,
  short = {IPMSM},
  long = {Interior Permanent Magnet Synchronous Machine, dt.:Permanentmagnet-Synchronmaschine mit vergrabenen Magneten}
}

@abbreviation{gcd,
  short = {GCD},
  long = {Greatest Common Divisor, dt.: Größter gemeinsamer Teiler}
}

@abbreviation{lcm,
  short = {LCM},
  long = {Least Common Multiple, dt.: Kleinstes gemeinsames Vielfaches}
}

@abbreviation{emf,
  short = {EMF},
  long = {Electromotive Force, dt.: Elektromotorische Kraft}
}

@abbreviation{fft,
  short = {FFT},
  long = {Fast Fourier Transform, dt.: Schnelle Fourier-Transformation}
}

缩写结果列表如下:

在此处输入图片描述

期望结果:

在此处输入图片描述

答案1

我在以下帖子的帮助下找到了答案
将首字母缩略词和长描述左对齐

只需创造自己的风格

\newglossarystyle{mystyle}{%
\renewenvironment{theglossary}%
 {\begin{longtabu} to \linewidth {p{0.15\linewidth}p{0.85\linewidth}}}%
 {\end{longtabu}}%
\renewcommand*{\glossaryheader}{}%
% indicate what to do at the start of each logical group
\renewcommand*{\glsgroupheading}[1]{}%
\renewcommand*{\glsgroupskip}{}%
\renewcommand*{\glossaryentryfield}[5]{%
\glsentryitem{##1}\glstarget{##1}{##2} 
   %\glstarget{##2}{##2}% Name
    & ##3% Description
    \\% end of row
    }
}
...
\glsaddall
    \renewcommand*{\arraystretch}{1.4}% default is 1
    \printunsrtglossary[type=abbreviations,style=mystyle,title={Abkürzungsverzeichnis}]
...

结果如下:

在此处输入图片描述

相关内容