多字母标识符的字母间距随机变化

多字母标识符的字母间距随机变化

我在我的论文中使用多字母标识符,为其编写了宏,例如:

\newcommand{\spec}{\mathit{Spec}}

在文本中,我总是将这些标识符称为:

some words $\spec$ even more words

然而,在某些文本中,LaTeX 会改变字母之间的间距:输出如下所示

“有些词 S pec 甚至更多词”

而不是通常的

“一些词语指定甚至更多的词语”。

如何防止 latex 添加空格并始终输出后者?

编辑:这是一个最小示例。第一页的间距很奇怪,第二页的间距是正确的。有什么想法吗?

\documentclass[%
twoside=true,
paper=a4,
BCOR=5mm,
headinclude=true,
footinclude=true,
fontsize=10pt,
titlepage=true,
abstract=off,
parskip=half-,
headsepline,
footsepline,
cleardoublepage=empty,
open=right,
numbers=noenddot,
fleqn,
index=totoc,
listof=totoc,
american
]{scrreprt}

\PassOptionsToPackage{%
drafting,           % timestamp on every page
pdfspacing         % makes use of pdftex’ letter spacing capabilities
}{classicthesis}

\PassOptionsToPackage{american}{babel}
\usepackage{babel}


\usepackage{classicthesis}
\newcommand{\spec}{\mathit{Spec}}
\newcommand{\sd}{\mathit{stopdead}}
\newcommand{\bb}{\mathit{b}}


\begin{document}

\chapter{$\bb$-conformance}

Some words $\spec$ some more words.
This is very weird $\sd$-semantics behavior and $\sd$-semantics looks really ugly.

\newpage

Some words $\spec$ some more words.
This is normal $\sd$-semantics behavior.

\end{document}

答案1

这似乎是 的一个错误;当使用时,它会在章节标题中classicthesis被触发。\b\mathit

\textit当您使用而不是 时,这种情况似乎不会发生\mathit

\documentclass[%
twoside=true,
paper=a4,
BCOR=5mm,
headinclude=true,
footinclude=true,
fontsize=10pt,
titlepage=true,
abstract=off,
%parskip=half-,% <--- PLEASE, DON'T USE THIS
headsepline,
footsepline,
cleardoublepage=empty,
open=right,
numbers=noenddot,
fleqn,
index=totoc,
listof=totoc,
american
]{scrreprt}


\usepackage[american]{babel}
\usepackage[
  drafting,
  pdfspacing,
]{classicthesis}

\newcommand{\spec}{\textit{Spec}}
\newcommand{\sd}{\textit{stopdead}}
\newcommand{\bb}{\textit{b}}


\begin{document}

\chapter{\texorpdfstring{$\bb$}{b}-conformance}

Some words $\spec$ some more words.
This is very weird $\sd$-semantics behavior and
$\sd$-semantics looks really ugly.

Some words $\spec$ some more words.
This is normal $\sd$-semantics behavior.

\end{document}

在此处输入图片描述

还要注意,b标题中的不是大写的;用于\texorpdfstring避免虚假警告。

请不要使用parskip-

相关内容