![定理中单词和数字之间的固定大小的空间](https://linux22.com/image/349275/%E5%AE%9A%E7%90%86%E4%B8%AD%E5%8D%95%E8%AF%8D%E5%92%8C%E6%95%B0%E5%AD%97%E4%B9%8B%E9%97%B4%E7%9A%84%E5%9B%BA%E5%AE%9A%E5%A4%A7%E5%B0%8F%E7%9A%84%E7%A9%BA%E9%97%B4.png)
我在文档中使用了一些命令来防止 LaTeX 断字:
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
\interfootnotelinepenalty=10000
我还定义了新的类似定理的环境:
\documentclass[10pt,twoside]{book}
\usepackage{amsthm}
\declaretheoremstyle[
spaceabove=6pt,
spacebelow=6pt,
headindent=0pt,
headfont=\normalfont\bfseries,
notefont=\mdseries,
notebraces={(}{)},
headpunct=.,
bodyfont=\normalfont\itshape,
postheadspace=1em,
%qed=\qedsymbol
]{THEOREMstyle}
\declaretheorem[%
style=THEOREMstyle,%
parent=section,%
name=\normalfont\bfseries Theorem%
]{Theorem}
问题如下:有时 TeX 会拉伸单词“Theorem”和数字之间的空格,因此看起来像
Theorem 1.1.1 Text --------
我可以以某种方式指定空间长度,所以它总是看起来像
Theorem 1.1.1. And here the stretching of the text is allowed
更新。以下是代码的一部分(应该用 Lua 或 XeLaTeX 编译)来展示该问题:
\documentclass[10pt,twoside]{book}
%\usepackage{showframe}
%\usepackage{layout}
\usepackage{geometry}
\geometry{
paperheight=8.27in,
paperwidth=5.85in,
top=0.8in,
bottom=0.8in,
outer=0.5in,
inner=1in,
voffset=0in,
%footskip=2em
marginparwidth=0.5in,
marginparsep=0.2in
}
%
\usepackage{alphalph}
\renewcommand{\thefootnote}{\textfrak{\alphalph{\value{footnote}}}}
\usepackage{marginnote}
\reversemarginpar
\usepackage{lastpage}
\usepackage{fancyhdr}
\setlength{\headheight}{16pt}
%\fancypagestyle{A}{
% \fancyhf{}%
\fancyhead[RO]{\ifthenelse{\value{chapter}=0}{}{\textsl{\thesubsection. \Subsectiontitle}}}
\fancyhead[LO]{}
\fancyhead[RE]{\textsl{\leftmark}}
\fancyhead[LE]{\ifthenelse{\value{chapter}=0}{}{\textsl{\rightmark}}}
\fancyhead[CE]{}
\fancyhead[CO]{}
\fancyfoot[C]{}
\fancyfoot[RO,LE]{\thepage}
%}
\renewcommand\footrule{\begin{minipage}{1\textwidth}
\hrule width \hsize height 2pt \kern 1mm \hrule width \hsize
\end{minipage}\par}%
\renewcommand\headrule{\vspace{-5pt}
\begin{minipage}{1\textwidth}
\hrule width \hsize \kern 1mm \hrule width \hsize height 2pt
\end{minipage}}%
\fancypagestyle{plain}{%
\fancyhf{}%
\fancyhead[RO,RE,LE,LO,CO,CE]{}
\fancyfoot[RO,LE,RE,LO]{}
\fancyfoot[C]{\thepage\ из \pageref{LastPage}}%
\renewcommand\footrule{\begin{minipage}{1\textwidth}
\hrule width \hsize height 2pt \kern 1mm \hrule width \hsize
\end{minipage}\par}%
\renewcommand\headrule{}%
}
\pagestyle{fancy}
%
\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=10000
\hbadness=10000
\interfootnotelinepenalty=10000
\newcommand{\Subsectiontitle}{}
\newcommand{\Subsection}[1]{\subsection{#1}\renewcommand{\Subsectiontitle}{\uppercase{#1}}}
\usepackage{emptypage}
\usepackage{makeidx}
\makeindex
\usepackage[toc]{glossaries}
\makeglossaries
\setcounter{tocdepth}{4}
\usepackage[raggedright]{titlesec}
\titleformat{\paragraph}[hang]{\normalfont\normalsize\bfseries}{\theparagraph}{1em}{}
\titlespacing*{\paragraph}{0pt}{3.25ex plus 1ex minus .2ex}{0.5em}
\usepackage{lscape}
\usepackage{ragged2e}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{thmtools}
\usepackage{yfonts}
\usepackage{mathtools}
\usepackage{comment}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amsthm}
\usepackage{mathabx}
\usepackage{wasysym}
\usepackage{wrapfig}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\usepackage{skull}
\usepackage{faktor}
\usepackage{xfrac}
\usepackage{enumitem}
\usepackage{lipsum}
%
\usepackage{multicol}
\usepackage{tabularx}
\setlength\tabcolsep{0pt}
\setlength{\columnsep}{1cm}
\setlength{\columnseprule}{0.4pt}
%
\usepackage[russian]{babel}
\usepackage{mathptmx}
\usepackage{polyglossia}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{Times New Roman}
\newfontfamily\cyrillicfont{Times New Roman}
\usepackage{mathrsfs}
\setmainlanguage{russian}
\newcommand{\TT}{\item[]}
\newcommand{\HA}{\item[${}^{\bigstar}$]}
\newcommand{\HH}{\item[${}^{\skull}$]}
\newcommand{\BO}{\item[${}^{\includegraphics[height=6pt]{accordion.png}}$]}
\newcounter{qcounter}%local counter for QUESTIONS environment
\newcounter{subqcounter}
\newcounter{enumercounter}
\newcounter{tmp} %counter that is the number of the last task
\newcounter{pageend} %counter that is the number of first task
\setcounter{tmp}{0}
\setcounter{pageend}{-1}
\newcounter{NAME}
\setcounter{NAME}{1}
\renewcommand{\theNAME}{\Alph{NAME}}
\newenvironment{questions}{
\begin{list}{
\bfseries\upshape\arabic{qcounter}.
}{
\renewcommand{\makelabel}[1]{%
\textbf{\refstepcounter{qcounter}\arabic{chapter}.\arabic{qcounter}##1.}}%
\usecounter{qcounter}
\setlength{\labelwidth}{2em}
\setlength{\labelsep}{0.5em}
\setlength{\leftmargin}{\labelwidth+\labelsep+0.5em}
\setlength{\itemsep}{2pt}
\setlength{\listparindent}{1em}
\setlength{\parsep}{1pt}
\setlength{\topsep}{6pt}
}
}{
\end{list}
}
\newenvironment{subquestions}{
\begin{list}{
\bfseries(\roman{subqcounter})
}{
\renewcommand{\makelabel}[1]{%
\textbf{\refstepcounter{subqcounter}(\roman{subqcounter}##1)}}%
\usecounter{subqcounter}
\setlength{\labelwidth}{2.5em}
\setlength{\labelsep}{0.5em}
\setlength{\leftmargin}{\labelwidth+\labelsep+0.5em}
\setlength{\itemsep}{1pt}
\setlength{\listparindent}{1em}
\setlength{\parsep}{1pt}
\setlength{\topsep}{1pt}
}
}{
\end{list}
}
\newenvironment{enumer}{
\begin{list}{
\bfseries(\roman{enumercounter})
}{
\renewcommand{\makelabel}[1]{%
\textbf{\refstepcounter{enumercounter}\Roman{enumercounter}##1.}}%
\usecounter{enumercounter}
\setlength{\labelwidth}{2em}
\setlength{\labelsep}{0.5em}
\setlength{\leftmargin}{\labelwidth+\labelsep+0.5em}
\setlength{\rightmargin}{0em}
\setlength{\itemsep}{3pt}
\setlength{\listparindent}{1em}
\setlength{\parsep}{1pt}
\setlength{\topsep}{2pt}
}
}{
\end{list}
}
\newcommand{\sep}{\vspace{3pt}\hrule\vspace{3pt}}
\newcommand{\bb}[1]{$#1\times#1$}
\newcommand{\bbb}[2]{$#1\times#2$}
\newcommand{\EX}[2]{
\begin{exercise}
#1 \textbf{Ответ:} \rotatebox[origin=c]{180}{#2}.
\end{exercise}
}
\declaretheoremstyle[
spaceabove=6pt,
spacebelow=6pt,
headindent=0pt,
headfont=\normalfont\bfseries,
notefont=\mdseries,
notebraces={(}{)},
headpunct=.,
bodyfont=\normalfont\itshape,
postheadspace=1em,
%qed=\qedsymbol
]{THEOREMstyle}
\declaretheorem[%
style=THEOREMstyle,%
parent=section,%
%parent=subparagraph,
name=\normalfont\bfseries Теорема%
]{Theorem}
\declaretheorem[%
style=THEOREMstyle,%
%parent=section,%
sibling=Theorem,%
name=\normalfont\bfseries Лемма%
]{Lemma}
\declaretheorem[%
style=THEOREMstyle,%
%parent=section,%
sibling=Theorem,%
name=\normalfont\bfseries Утверждение%
]{Statement}
\declaretheorem[%
style=THEOREMstyle,%
%parent=section,%
sibling=Theorem,%
name=\normalfont\bfseries Предложение%
]{Proposition}
\declaretheorem[%
style=THEOREMstyle,%
parent=Theorem,%
name=\normalfont\bfseries Следствие%
]{Corollary}
\declaretheoremstyle[
spaceabove=6pt,
spacebelow=6pt,
headindent=0pt,
headfont=\normalfont\bfseries,
notefont=\mdseries,
notebraces={(}{)},
headpunct=.,
bodyfont=\normalfont,
postheadspace=1em,
%qed=\qedsymbol
]{DEFINITIONstyle}
\declaretheorem[%
style=DEFINITIONstyle,%
parent=section,%
name=\normalfont\bfseries Определение%
]{Definition}
\declaretheorem[%
style=DEFINITIONstyle,%
numbered=no,%
name=\normalfont\bfseries Замечание%
]{Remark}
\declaretheorem[%
style=DEFINITIONstyle,%
parent=chapter,%
name=\normalfont\bfseries Упражнение%
]{Exercise}
\declaretheorem[%
style=DEFINITIONstyle,%
parent=chapter,%
name=\normalfont\bfseries Пример%
]{Example}
\newcommand{\EXER}[2]{
\begin{Exercise}
#1 \noindent\textbf{Ответ:} \noindent\rotatebox[origin=c]{180}{#2}.
\end{Exercise}
}
\newcommand{\BTH}{\begin{Theorem}}
\newcommand{\ETH}{\end{Theorem}}
\newcommand{\BLM}{\begin{Lemma}}
\newcommand{\ELM}{\end{Lemma}}
\newcommand{\BPR}{\begin{Proposition}}
\newcommand{\EPR}{\end{Proposition}}
\newcommand{\BST}{\begin{Statement}}
\newcommand{\EST}{\end{Statement}}
\newcommand{\BCR}{\begin{Corollary}}
\newcommand{\ECR}{\end{Corollary}}
\newcommand{\BDF}{\begin{Definition}}
\newcommand{\EDF}{\end{Definition}}
\newcommand{\BEX}{\begin{Example}}
\newcommand{\EEX}{\end{Example}}
\newcommand{\BRM}{\begin{Remark}}
\newcommand{\ERM}{\end{Remark}}
\newcommand{\QUESTIONSB}{\begin{questions}\setcounter{qcounter}{\value{tmp}}}
\newcommand{\QUESTIONSE}{\setcounter{tmp}{\value{qcounter}}\end{questions}}
\newcommand{\TITLE}[3]{
\title{\Huge #1}
\date{#2}
\author{#3}
\begin{titlepage}
\maketitle
\end{titlepage}
\tableofcontents
}
\newcommand{\IMG}[2]
{%
\setlength{\columnsep}{2pt}%
\setlength{\intextsep}{0pt}%
\begin{wrapfigure}{r}{#1}
\includegraphics[width=#1]{#2}
\end{wrapfigure}
}%
%\begin{document}ааа\end{document}
\begin{document}
\BDF
Назовём систему функций замкнутым классом, если любая композиция функций из этой системы является функцией из этой системы.
Например, $P_2$ --- замкнутый класс.
\EDF
\BDF
Система функций $B$ называется базисом в замкнутом классе $F$, если $[B]=F$, причём никакую функцию из $B$ нельзя убрать, чтобы условие сохранилось.
\EDF
\BDF
Система функций $B$ называется базисом в замкнутом классе $F$, если $[B]=F$, причём никакая функция из $B$ не выражается через другие.
\EDF
\end{document}