\usepackage[acronym]{glossaries} 异常 → 未定义的控制序列。 \ACRO

\usepackage[acronym]{glossaries} 异常 → 未定义的控制序列。 \ACRO

这是我的thesis.tex

  \documentclass[
        11pt,
        a4paper,
        egregdoesnotlikesansseriftitles,
        toc=chapterentrywithdots,
        ,openright,
        twoside,
        titlepage,
        parskip=half,
        headings=normal,  % reduces heading size
        listof=totoc,
        bibliography=totoc,
        index=totoc,
        captions=tableheading,  % caption below table
        chapterprefix,
        listof=flat,
        final
    ]{scrbook}
 
    % custom head and foot
    \usepackage[automark]{scrlayer-scrpage}
    \pagestyle{scrheadings}
    \ihead{\headmark}
    \chead{}
    \ohead{\pagemark}
    \renewcommand*\chaptermarkformat{\chapappifchapterprefix{\ }% 
      \thechapter.\enskip}
    
    \RedeclareSectionCommand[tocindent=0pt]{section}
    \RedeclareSectionCommand[tocindent=0pt]{subsection}
    %\RedeclareSectionCommand[tocnumwidth=70pt]{chapter}
    
    \usepackage{scrhack}
    
    % other packages
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{lmodern,relsize,textcomp,csquotes}
    \usepackage{amsmath,amsfonts}
    \usepackage[english, ngerman]{babel}  % flip for German thesis
    \usepackage[final]{graphicx}
    \usepackage{setspace,geometry,xcolor}
    \usepackage{makeidx}
    \usepackage{paralist,ifthen,todonotes}
    \usepackage{url}
    \usepackage{pdfpages}
    \usepackage{footmisc}
    \usepackage{float} %Für [H] Bild fix an der Stelle
    %\usepackage[printonlyused]{acronym} erstmal Glossaries testen
    \usepackage[acronym]{glossaries}
    \setacronymstyle{long-short}
    
    
    
    % table setup
    \usepackage{longtable}
    \usepackage{array}
    \usepackage{ragged2e}
    \usepackage{lscape}
    
    % pdf hyperref
    \usepackage[
        bookmarks=true,
        bookmarksopen=true,
        bookmarksnumbered=true,
        bookmarksopenlevel=1,
        pdftitle={\titel},
        pdfauthor={\autor},
        pdfcreator={\autor},
        pdfsubject={\titel},
        pdfkeywords={\keywords},
        pdfpagelabels=true,
        colorlinks=true,
        linkcolor=black,
        urlcolor=magenta,
        anchorcolor=black,
        citecolor=black,
        filecolor=magenta,
        menucolor=red,
        plainpages=false,
        hypertexnames=true,
        linktocpage=true,
    ]{hyperref}
    
    
    % configure your listings style
    \usepackage{listings}
    \lstset{
        tabsize=3,
        extendedchars=true,
        frame=single,
        showstringspaces=true,
        numbers=left,
        numberstyle=\small,
        breakautoindent=true
    }
    
    % page setup
    % \setlength{\topskip}{\ht\strutbox}
    \geometry{paper=a4paper,left=2.5cm,top=3.0cm,bindingoffset=.8cm}
    \onehalfspacing
    \frenchspacing
    \clubpenalty = 10000
    \widowpenalty = 10000 
    \displaywidowpenalty = 10000
    
  

    
    %GLossar 
    \makeglossaries
    \input{acronyms}
    
    
    \begin{document}
        
    
    \frontmatter
    \include{cover}\cleardoublepage 
    \include{content/0_abstract}\cleardoublepage
    
    \tableofcontents
    
    \mainmatter
    \include{content/1_intro}
    \include{content/2_grundlagen}
    \include{content/3_Konzeption}
    \include{6_fazit}
    \include{content/7_abrev}
    \backmatter
    \listoffigures
    
    
    \listoftables
    
    
    \renewcommand{\lstlistlistingname}{List of Listings}  % change for German thesis
    \lstlistoflistings
    
    \printglossary[type=\acronymtype,title={Abkürzungsverzeichnis}]
    
    
    
    \cleardoublepage
    \bibliographystyle{wmaainf}
    \bibliography{refs}
    
    \end{document}

双击错误它会打开文件thesis.acr

\ACRO{total-barriers}{1}
\ACRO{usage}{rbg=={0}}
\ACRO{pages}{}
\ACRO{barriers}{}

也许它来自我之前用于缩写词的其他包?

我尝试过的步骤:

删除文件的内容thesis.acr

我唯一想要的是:

我的文档中的缩写列表

这是我的acronyms.tex

\newacronym{pco}{PCo}{Plant Connectivity}
\newacronym{sps}{SPS}{Speicherprogrammierbare Steuerung}
\newacronym{sap_jco}{SAP JCo}{SAP Java Connector}
\newacronym{rbg}{RBG}{Regalbediengerät}
\newacronym{rbg-gen}{RBG}{Regalbediengerätes}

谢谢大家的帮助。


\documentclass[
        11pt,
        a4paper,
        egregdoesnotlikesansseriftitles,
        toc=chapterentrywithdots,
        ,openright,
        twoside,
        titlepage,
        parskip=half,
        headings=normal,  % reduces heading size
        listof=totoc,
        bibliography=totoc,
        index=totoc,
        captions=tableheading,  % caption below table
        chapterprefix,
        listof=flat,
        final
    ]{scrbook}
 
    % custom head and foot
    \usepackage[automark]{scrlayer-scrpage}
    \pagestyle{scrheadings}
    \ihead{\headmark}
    \chead{}
    \ohead{\pagemark}
    \renewcommand*\chaptermarkformat{\chapappifchapterprefix{\ }% 
      \thechapter.\enskip}
    
    \RedeclareSectionCommand[tocindent=0pt]{section}
    \RedeclareSectionCommand[tocindent=0pt]{subsection}
    %\RedeclareSectionCommand[tocnumwidth=70pt]{chapter}
    
    \usepackage{scrhack}
    
    % other packages
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{lmodern,relsize,textcomp,csquotes}
    \usepackage{amsmath,amsfonts}
    \usepackage[english, ngerman]{babel}  % flip for German thesis
    \usepackage[final]{graphicx}
    \usepackage{setspace,geometry,xcolor}
    \usepackage{makeidx}
    \usepackage{paralist,ifthen,todonotes}
    \usepackage{url}
    \usepackage{pdfpages}
    \usepackage{footmisc}
    \usepackage{float} %Für [H] Bild fix an der Stelle
    %\usepackage[printonlyused]{acronym} erstmal Glossaries testen
    \usepackage[acronym]{glossaries}
    \setacronymstyle{long-short}
    
    
    
    % table setup
    \usepackage{longtable}
    \usepackage{array}
    \usepackage{ragged2e}
    \usepackage{lscape}
    
    % pdf hyperref
    \usepackage[
        bookmarks=true,
        bookmarksopen=true,
        bookmarksnumbered=true,
        bookmarksopenlevel=1,
        pdftitle={\titel},
        pdfauthor={\autor},
        pdfcreator={\autor},
        pdfsubject={\titel},
        pdfkeywords={\keywords},
        pdfpagelabels=true,
        colorlinks=true,
        linkcolor=black,
        urlcolor=magenta,
        anchorcolor=black,
        citecolor=black,
        filecolor=magenta,
        menucolor=red,
        plainpages=false,
        hypertexnames=true,
        linktocpage=true,
    ]{hyperref}
    
    
    % configure your listings style
    \usepackage{listings}
    \lstset{
        tabsize=3,
        extendedchars=true,
        frame=single,
        showstringspaces=true,
        numbers=left,
        numberstyle=\small,
        breakautoindent=true
    }
    
    % page setup
    % \setlength{\topskip}{\ht\strutbox}
    \geometry{paper=a4paper,left=2.5cm,top=3.0cm,bindingoffset=.8cm}
    \onehalfspacing
    \frenchspacing
    \clubpenalty = 10000
    \widowpenalty = 10000 
    \displaywidowpenalty = 10000
    
    %GLossar 
    \makeglossaries
    

    \begin{document}
     

    \newacronym{pco}{PCo}{Plant Connectivity}
    \newacronym{sps}{SPS}{Speicherprogrammierbare Steuerung}
    \newacronym{sap_jco}{SAP JCo}{SAP Java Connector}
    \newacronym{rbg}{RBG}{Regalbediengerät}
  
    \frontmatter
    \tableofcontents
    \mainmatter
    \backmatter
    \listoffigures
    
    
    \listoftables 
    \renewcommand{\lstlistlistingname}{List of Listings}  % change for German thesis
    \lstlistoflistings
    
    \printglossary[type=\acronymtype,title={Abkürzungsverzeichnis}]
    
    
    \cleardoublepage
    
    \end{document}

这是否更好?

相关内容