文档中缩写词的额外空格

文档中缩写词的额外空格

我正在处理一些首字母缩略词,当我编译时,每个首字母缩略词都有额外的空格,例如这个缩写,高等教育( HE)而不是高等教育(HE)。即使在第一次之后也是如此:HE 是......(额外的空格)

%% ----------------------------------------------------------------
%% Thesis.tex -- MAIN FILE (the one that you compile with LaTeX)
%% ---------------------------------------------------------------- 

% Set up the document
\documentclass[a4paper, 11pt, oneside]{Thesis}  % Use the "Thesis" style, based on the ECS Thesis style by Steve Gunn
\graphicspath{Figures/}  % Location of the graphics files (set up for graphics to be in PDF format)
\usepackage{verbatim}  % Needed for the "comment" environment to make LaTeX comments
\usepackage{vector}  % Allows "\bvec{}" and "\buvec{}" for "blackboard" style bold vectors in maths
\usepackage{graphicx}
\usepackage{mathtools}
\usepackage{tikz}
%\usepackage{natbib}
\usepackage{siunitx}
\usepackage{color}
\usepackage{threeparttable}
\usepackage{hyperref}
\usepackage{listings}
\parskip=0cm
\usepackage[tooltip]{acro} 


\def\mycolor#1{\textcolor{blue}{#1}}
\DeclareAcronym{HE}{short =\mycolor{HE}, long = Higher Education, class = abbrev}

\begin{document}

\clearpage  % Start a new page
\chapter{List of Abbreviations}
\lhead{\emph{List of abbreviation}}
\printacronyms[heading=none]



\chapter{Introduction}

the very susceptible area is precisely \ac{HE}, which runs under the seal of "bulwark of the Revolution" and that, beyond from a political argument, it becomes for many also a principle for research. The \ac{HE} is very ...




\end{document}  % The End
%% ---------------------------

有人能帮助我吗?运行代码所需的另外两个文件是:

论文目录补丁文件

答案1

问题在于虚假空格。该文件Thesis.cls很多并且应该由知道他们在做什么的人来修改。

此处导致问题的空格仅在特定组合中才可见:acro使用tooltip选项和以下几行Thesis.cls

\pdfstringdefDisableCommands{
   \let\\\space
}

它应该是

\pdfstringdefDisableCommands{%
   \let\\\space
}

(注意%)。在 中进行此更改是安全的Thesis.cls。但您还应该联系分发该类文件的人(可能带有指向 tex.sx 上您的问题的指针)。

一个更简单的例子可以观察到同样的效果(它也将首字母缩略词的格式移动到\acsetup,使用\newcommand而不是 ,\def并将错误更正"..."``...''

\documentclass[a4paper, 11pt, oneside]{book}

\usepackage{acro}
\usepackage{xcolor}
\newcommand\mycolor[1]{\textcolor{blue}{#1}}

\acsetup{
  tooltip ,
  short-format = \mycolor
}

\usepackage{hyperref}
\pdfstringdefDisableCommands{%
   \let\\\space
}

\DeclareAcronym{HE}{
  short = HE,
  long = Higher Education,
  class = abbrev
}

\begin{document}

\chapter{List of Abbreviations}

\printacronyms[heading=none]

\chapter{Introduction}

the very susceptible area is precisely \ac{HE}, which runs under the seal of
``bulwark of the Revolution'' and that, beyond from a political argument, it
becomes for many also a principle for research. The \ac{HE} is very ...

\end{document}

相关内容