长缩写描述中的换行符

长缩写描述中的换行符

我想要在
长缩写描述中添加换行符。

我尝试过\linebreak

\documentclass[
    pdftex,a4paper,11pt,oneside,fleqn,
    bibliography=totoc,listof=totoc,
    headlines=2.1,headsepline,
    numbers=noenddot
]{scrreprt}

%%%----- Schriftart -----------------------------
\usepackage[utf8]{inputenc}     % Texcodierung ansinew
\usepackage[ngerman]{babel}             % deutsche Silbentrennung
\usepackage[T1]{fontenc}                    % T1 Schriften
\usepackage{textcomp}
\usepackage{lmodern}
    
%%%----- PDF Format -----------------------------
\usepackage{float}
\usepackage[pdftex,pdfpagelabels,bookmarks,bookmarksopen,bookmarksnumbered,
    bookmarksopenlevel      = 1,
    pdfstartpage                    = 1,
    pdfstartview                    = FitV, 
    pdfpagelayout                   = SinglePage,
    plainpages                      = false,
    hypertexnames                   = false,
    colorlinks                      = true, 
    linkcolor                           = black,
    citecolor                           = black,
    urlcolor                            = black
]{hyperref}

\usepackage[backend=bibtex]{biblatex}
\usepackage{siunitx}
\usepackage{tabu}

\usepackage[record,% using bib2gls
 abbreviations, % create list of abbreviations
 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
]

\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
    }
}

\begin{document}

    \glsaddall
    \renewcommand*{\arraystretch}{1.4}% default is 1
    \printunsrtglossary[type=abbreviations,style=mystyle,title={Abkürzungsverzeichnis}]
    
\end{document}

文件abbreviations.bib

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

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

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

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

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

不幸的是,这给了我以下结果:

在此处输入图片描述

InteriorPermanentSynchronous之间空格太多Machine

答案1

可以按照
@Heiko Theißen 评论中所述用 而不是 来解决问题。
\hfill\vadjust{}\linebreak\linebreak

在此处输入图片描述

相关内容