我正在使用该软件包acronym
,但遇到了一个问题。我有一个很长的首字母缩略词“ADD1/SREBP1”。我将其定义如下:
\acro{srebp}[ADD1/\-SREBP1]{adipocyte determination-and differentiation-dependent
factor 1/ste\-rol regulatory element binding protein 1}
但在文本中它没有被分离,并且会创建一个 badbox。我该如何解决这个问题?
我添加了一个 MWE:
\documentclass[a4paper,11pt,titlepage,twoside,openright,draft]{book}
\usepackage[italian,english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{acronym}
\usepackage{etoolbox}
\makeatletter
\patchcmd\@acf{\hskip\z@}{}{}{}
\patchcmd\@acf{\hskip\z@}{}{}{}
\makeatother%this patch fixes white spaces after acronyms
\begin{document}
I cite the acronym first here \ac{srebp}. Then in the end of a row like this
but depends pf course on margins \ac{srebp}.
\begin{acronym}[AAAAAAA]
\acro{srebp}[ADD1\slash SREBP1]{adipocyte determination-and differentiation-dependent
factor 1/ste\-rol regulatory element binding protein 1}
\end{acronym}
\end{document}
答案1
重新定义内部宏\AC@acs
,以便它不使用\mbox
(这可以防止换行)。
\documentclass[a4paper,11pt,titlepage,twoside,openright,draft]{book}
\usepackage[italian,english]{babel}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{acronym}
\makeatletter
\renewcommand*\AC@acs[1]{%
\expandafter\AC@get\csname fn@#1\endcsname\@firstoftwo{#1}}
\makeatother
\begin{document}
I cite the acronym first here \ac{srebp}. Then in the end of a row like
this but debpnds pf course on margins \ac{srebp}.
\begin{acronym}[AAAAAAA]
\acro{srebp}[ADD1\slash SREBP1]{adipocyte determination-and differentiation-dependent
factor 1/ste\-rol regulatory element binding protein 1}
\end{acronym}
\end{document}