我正在制作定理、定义等的长索引列表,并且数字与列表中的文本重叠 - 这是一个例子:
\documentclass[a4paper]{report}
\usepackage[english]{babel}
\usepackage[margin=2cm]{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{stix}
\usepackage{mathtools}
\usepackage[document]{ragged2e}
\usepackage{wasysym}
\usepackage{booktabs}
\usepackage{enumitem}
\usepackage{pgfplots}
\usepackage{tikz}
\usepackage{float}
\usepackage{thmtools}
\usepackage{mdframed}
\usepackage{etoolbox}
\usetikzlibrary{arrows,bending,calc,patterns}
%\newcommand\irregularcircle[2]{% radius, irregularity
% \pgfextra {\pgfmathsetmacro\len{(#1)+rand*(#2)}}
% +(0:\len pt)
% \foreach \a in {10,20,...,350}{
% \pgfextra {\pgfmathsetmacro\len{(#1)+rand*(#2)}}
% -- +(\a:\len pt)
% } -- cycle
%}
\newfloat{diag}{htbp}{dia}[section]
\floatname{diag}{Diagram}
\makeatletter
\everymath{\if@display\else\thickmuskip=2mu plus 2mu\fi}
\renewcommand*{\listof}[2]{%
\@ifundefined{ext@#1}{\float@error{#1}}{%
\@namedef{l@#1}{\@dottedtocline{1}{1.5em}{3em}}% <------- replaced 2.3em with 3em here
\float@listhead{#2}%
\begingroup\setlength{\parskip}{\z@}%
\@starttoc{\@nameuse{ext@#1}}%
\endgroup}}
\patchcmd\thmt@mklistcmd
{\thmt@thmname}
{\check@optarg{\thmt@thmname}}
{}{}
\patchcmd\thmt@mklistcmd
{\thmt@thmname\ifx}
{\check@optarg{\thmt@thmname}\ifx}
{}{}
\protected\def\check@optarg#1{%
\@ifnextchar\thmtformatoptarg\@secondoftwo{#1}%
}
\makeatother
\declaretheoremstyle[
spaceabove=6pt,
spacebelow=6pt,
headfont=\normalfont\bfseries,
postheadspace=1em,
notefont=\bfseries,
notebraces={(}{)},
bodyfont=\itshape
]{thmstyle}
\declaretheorem[style=thmstyle,name=Definition,numberwithin=section]{mydef}
\begin{document}
\renewcommand{\listtheoremname}{Definitions}
\addcontentsline{toc}{section}{\listtheoremname}
\listoftheorems[ignoreall,show=mydef]
\chapter{Mathematics = Set Theory?}
\setcounter{section}{16}
\section{Set Theory}
\begin{mydef}[Principle of Comprehension]
\label{def:PrincipleofComprehension}
\hfill \break
If $\phi(x)$ is a property or condition pertaining to objects $x$, then there exists a set whose elements are precisely the objects that have the property $\phi(x)$
\end{mydef}
\end{document}
其结果是:
我怎样才能在数字和文本之间添加一些空格?
答案1
我会回答这个问题,以便将其从未回答的帖子中删除。结果发现它是使用 amsthm + thmtools 时 \listoftheorems 中的水平间距问题,并且也在那里得到了回答。