Acro 套件中的尾隨令牌

Acro 套件中的尾隨令牌

我最近透過 MacPorts 安裝了 texlive,並且嘗試使用我之前使用過的 acro 套件來表示一些首字母縮寫。我已正確定義所有首字母縮略詞,並且它們打印正確,除非它們位於句子末尾。下面是一個最小的工作範例。

\documentclass{article}
\usepackage{acro}

\DeclareAcronym{RR}{
  short = RR ,
  long  = rain rate
}
\begin{document}
In this sentence \ac{RR} is used before the end of the sentence.
It is very inteseting what happens when we wait until the end of the sentence to discuss \ac{RR}.
\end{document}

這是 pdflatex 的輸出:

    This is pdfTeX, Version 3.14159265-2.6-1.40.17 (TeX Live 2016/MacPorts 2016_4) (preloaded format=pdflatex)
     restricted \write18 enabled.
    entering extended mode
    (./Testing.tex
    LaTeX2e <2016/03/31>
    Babel <3.9r> and hyphenation patterns for 47 language(s) loaded.
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/base/article.cls
    Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/base/size10.clo))
    (/atmomounts/home/grad/kwodzicki/Library/texmf/tex/latex/misc/cgnieder-acro-83c
    237f56dd4/acro.sty
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/l3kernel/expl3.sty
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/l3kernel/expl3-code
    .tex)
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/l3kernel/l3pdfmode.
    def))
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/l3experimental/l3so
    rt/l3sort.sty)
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/l3packages/xparse/x
    parse.sty)
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/l3packages/l3keys2e
    /l3keys2e.sty)
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/l3packages/xtemplat
    e/xtemplate.sty)
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/etoolbox/etoolbox.s
    ty)
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/oberdiek/zref-abspa
    ge.sty
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/oberdiek/zref-base.
    sty
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/generic/oberdiek/ltxcmds.
    sty)
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/generic/oberdiek/infwarer
    r.sty)
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/generic/oberdiek/kvsetkey
    s.sty
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/generic/oberdiek/etexcmds
    .sty
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/generic/oberdiek/ifluatex
    .sty)))
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/generic/oberdiek/kvdefine
    keys.sty)
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/generic/oberdiek/pdftexcm
    ds.sty
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/generic/oberdiek/ifpdf.st
    y))
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/oberdiek/auxhook.st
    y))
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/generic/oberdiek/atbegshi
    .sty))
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/translations/transl
    ations.sty
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/cnltx/cnltx-base.st
    y
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/pgfopts/pgfopts.sty
    (/Volumes/localdata/opt/local/share/texmf/tex/latex/pgf/utilities/pgfkeys.sty
    (/Volumes/localdata/opt/local/share/texmf/tex/generic/pgf/utilities/pgfkeys.cod
    e.tex
    (/Volumes/localdata/opt/local/share/texmf/tex/generic/pgf/utilities/pgfkeysfilt
    ered.code.tex))))
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/xcolor/xcolor.sty
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/graphics-cfg/color.
    cfg)
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/pdftex-def/pdftex.d
    ef))
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/trimspaces/trimspac
    es.sty))
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/koma-script/scrlfil
    e.sty
    Package scrlfile, 2016/05/10 v3.20 KOMA-Script package (loading files)
                                        Copyright (C) Markus Kohm

    )))
    No file Testing.aux.

    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/context/base/mkii/supp-pd
    f.mkii
    [Loading MPS to PDF converter (version 2006.09.02).]
    )
    (/Volumes/localdata/opt/local/share/texmf-texlive/tex/latex/translations/transl
    ations-basic-dictionary-english.trsl)
    ! Undefined control sequence.
    <argument> \prop_get:Nn 
                                                    \l__acro_trailing_actions_prop {.}
    l.12 ...he end of the sentence to discuss \ac{RR}.

    ? s
    OK, entering \scrollmode...
    ! Undefined control sequence.
    <argument> \LaTeX3 error: 
                                                         A property list was misused.
    l.12 ...he end of the sentence to discuss \ac{RR}.

    ! Undefined control sequence.
    <argument> \LaTeX3 error: 
                                                         A property list was misused.
    l.12 ...he end of the sentence to discuss \ac{RR}.

    ! Undefined control sequence.
    <argument> \LaTeX3 error: 
                                                         A property list was misused.
    l.12 ...he end of the sentence to discuss \ac{RR}.

    [1{/Volumes/localdata/opt/local/var/db/texmf/fonts/map/pdftex/updmap/pdftex.map
    }] (./Testing.aux

    LaTeX Warning: Acronyms may have changed. Please rerun LaTeX.

    ) )
    (see the transcript file for additional information)</Volumes/localdata/opt/loc
    al/share/texmf-texlive/fonts/type1/public/amsfonts/cm/cmr10.pfb>
    Output written on Testing.pdf (1 page, 15517 bytes).
    Transcript written on Testing.log.

這是輸出文件中顯示的文字。

In this sentence rain rate (RR) is used before the end of the sentence. It is very inteseting what happens when we wait until the end of the sentence to discuss .RR.

正如您所看到的,當句子末尾的句點 (.) 之前使用首字母縮寫時,會出現一個非致命錯誤。錯誤是:

    ! Undefined control sequence.
            <argument> \prop_get:Nn 
                    \l__acro_trailing_actions_prop {.}
            l.12 ...he end of the sentence to discuss \ac{RR}.

從輸出文字來看,這會導致在首字母縮寫詞前放置一個句點。對這裡發生的事情有什麼想法嗎?我嘗試過 deactive-trailing-tokes,但這也給了錯誤。例如,如果我在我的最小工作範例中加載 acro 包後添加以下程式碼行:

\acsetup{deactivate-trailing-tokens = {dot}}

我收到以下錯誤:

    ! Undefined control sequence.
    \acro_deactivate_trailing_token:n ...emove_all:NV 
                        \l__acro_trailing_tokens_t...
    l.4 \acsetup{deactivate-trailing-tokens = {dot}}

我認為這是最近更新中引入的錯誤,因為我之前使用過這個包沒有問題。

相關內容