將長版本加入詞彙表縮寫詞中

將長版本加入詞彙表縮寫詞中

是否可以在詞彙表顯示中顯示首字母縮寫的長形式?

我有很多縮寫詞,文檔顯示的末尾只顯示簡短版本。

微量元素:

\documentclass[12pt, twoside, a4paper]{report}

%Packages utilisés

\usepackage[utf8]{inputenc}
\usepackage{glossaries}
\usepackage{glossaries-extra}

\setglossarystyle{altlist}
\setabbreviationstyle[acronym]{long-short}

\newacronym
    [description={riggity raggity}]
    {bop}{BOP}{Breathing Out Parents}    
 
\newacronym
    [description={music style}]
    {rnb}{RNB}{Rythm N' Blues}   
    
\makenoidxglossaries

\begin{document}

Blabla \gls{bop} and \gls{rnb}. But \gls{rnb} is better.

\printnoidxglossaries
\end{document}    

給出: MWE影像

我希望條目也顯示長格式。是否可以 ?

答案1

好吧有點晚了,但也許任何人都可能需要這個作為一種方法的靈感:

\documentclass{article}
\usepackage[acronym]{glossaries}

\newacronym[description={riggity raggity}]{bop}{BOP}{Breathing Out Parents}    
\newacronym[description={music style}]{rnb}{RNB}{Rythm N' Blues}   

\newglossarystyle{yourStyle}{%
    \renewenvironment{theglossary}%
    {\begin{longtable}{p{.15\textwidth}p{.3\textwidth}p{.5\textwidth}}}%
        {\end{longtable}}%
    \renewcommand*{\glossaryheader}{%                   setting the table's header
        \bfseries  & \bfseries Meaning & \bfseries Description
        \\\tabularnewline\endhead}%
    \renewcommand*{\glsgroupheading}[1]{}%              no heading between groups
    \renewcommand*{\glossentry}[2]{%                    main entries displayed 
        \textbf{\glstarget{##1}{\glossentryname{##1}}}% name
        & \glsentrylong{##1}%                           meaning
        & \glossentrydesc{##1}%                         description
        \tabularnewline%                                end of row
    }%
    \renewcommand*{\glsgroupskip}{}%                    no distance between groups
}

\makeglossaries
\begin{document}
    Blabla \gls{bop} and \gls{rnb}. But \gls{rnb} is better.
    
    \printglossary[type=\acronymtype,style=yourStyle]
\end{document}  

在此輸入影像描述

相關內容