定理编号与定理之间如何留空格?

定理编号与定理之间如何留空格?
\documentclass[12pt,openany]{book}

\usepackage{extsizes}


\renewcommand{\baselinestretch}{1.2}

\usepackage[
    top=1.75cm, % Top margin
    bottom=3.5cm, % Bottom margin
    left=3.25cm, % Left margin
    right=3.25cm, % Right margin
        footskip=2.5cm, % footskip margin
]{geometry}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc} 

\usepackage{tikz}
\usepackage{microtype}
\usepackage[none]{hyphenat}
\usepackage{multicol}

\usepackage{hyperref}
\hypersetup{pdfpagemode={UseOutlines},
bookmarksopen=true,
bookmarksopenlevel=0,
hypertexnames=false,
colorlinks=true,% Set to false to disable coloring links
citecolor=magenta,% The color of citations
linkcolor=black,% The color of references to document elements (sections, figures, etc)
urlcolor=mdtRed,% The color of hyperlinks (URLs)
pdfstartview={FitV},
unicode,
breaklinks=true,
}
\usepackage{enumitem}
\usepackage{nameref}
\usepackage{amsfonts,amsmath,amssymb,amsthm,etoolbox}

   \newtheoremstyle{custom}% name
    {12pt}% Space above
    {3pt}% Space below
    {\parshape 3 0pt \textwidth \parindent \dimexpr\textwidth-\parindent 0pt \textwidth}% Body font
    {}% Indent amount
    {\bfseries}% Theorem head font
    {}% Punctuation after theorem head
    {\newline}% Space after theorem head
    {\thmname{#1}\thmnumber{ #2}{\mdseries\thmnote{ [#3]}}}% Theorem head spec(can be left empty, meaning ‘normal’)
\theoremstyle{custom}
\swapnumbers
 \newtheorem{theo}{Teorema}[section]
    \newenvironment{thm}
      {\pushQED{\qed}\renewcommand{\qedsymbol}{$\square$}\thmx}
      {\popQED\endthmx}
\newtheorem*{demostracion}{Demostración}
\newtheorem{definition}{Definición}[section]
\newtheorem{pro}{Proposición}[section]
\usepackage{MnSymbol}
\usepackage{wasysym}
\usepackage{float}
\setlength{\parindent}{1em}
\setlength{\parskip}{0.8em}

\renewcommand\rmdefault{cmr}
\renewcommand\sfdefault{cmss}
\renewcommand\ttdefault{cmtt}

\usepackage[gen]{eurosym}

\usepackage{titlesec}

\setcounter{secnumdepth}{4}

\renewcommand{\chaptername}{Tema}

\usepackage{titlesec, blindtext, color}
\definecolor{gray75}{gray}{0.75}
\newcommand{\hsp}{\hspace{20pt}}
\titleformat{\chapter}[hang]{\Large}{\textbf{\chaptername $~$ \thechapter.} }{0pt}{\Large}

\newcommand{\Mysquare}{\raisebox{.25\height}{\tiny$\square$}}
%\newcommand{\Mysquare}{\square}

\usepackage{fancyhdr}
% Set the page style to "fancy"...
\pagestyle{fancy}
%... then configure it.
\fancyhead{} % clear all header fields

\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}
\fancyhead[L]{}
\fancyhead[R]{\chaptername\ \thechapter\ --\ \leftmark}
%\fancyhead[RO,LE]{\textbf{The performance of new graduates}}
%\fancyfoot{} % clear all footer fields
\fancyfoot{}
\fancyfoot[c]{\thepage}
\fancyfoot[l]{OPOSICIONES}
\fancyfoot[r]{Azahara Carpintero}

\fancypagestyle{plain}{%
\fancyfoot[c]{\thepage}
\fancyfoot[l]{left}
\fancyfoot[r]{right}
}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\usepackage{xcolor,graphicx,eso-pic}
\usepackage{lipsum}
\usepackage{transparent}
%\usepackage{mtpro2}
\newcommand*{\Scale}[2][4]{\scalebox{#1}{$#2$}}%
\newcommand*{\Resize}[2]{\resizebox{#1}{!}{$#2$}}%

\usepackage{wrapfig}
\usepackage[none]{hyphenat}

\begin{document}
\sloppy
\chapter{Dumy Chapter}
\section{Dumy Section}
\begin{theo}[\bfseries Fundamental de la programación lineal]
 \textit{ Si un PPL tiene soluciones óptimas. alguna de ellas se alcanza en uno de los vértices del conjunto convexo $S$ de soluciones factible. Si, además, se alcanza solución óptima en más de un vértice de $S$, también son soluciones óptimas las combinaciones lineales convexas de dichos vértices. } 
\end{theo}
\end{document}

我想在定理编号和定理之间添加等于章节编号和章节标题之间空格的空格。

答案1

不确定您的意思,但是\swapnumbers如果您定义并使用指定最后一个参数的自定义定理样式,则您不应该使用\newtheoremstyle

这是您前言的编辑版本,相当混乱:首先加载软件包,这样可以避免重复和不兼容。请注意,hyperref必须是最后一个(除了您的软件包中不存在的几个例外)。

我添加了关于软件包的评论。特别是,抑制连字,但使用babel以获得西班牙语的正确连字。

我还更改了\newtheoremstyle声明,因为\parshape原来的声明没有任何意义。请注意,使用此新代码,您无需为定理标签或正文指定字体。

注意:您thm根据 进行定义thmx,但不要定义后者。

\documentclass[12pt,openany]{book}
%\usepackage[utf8]{inputenc}% no longer needed
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}

\usepackage{fix-cm}% not extsizes

\usepackage[
  a4paper, % did you forget?
  top=1.75cm, % Top margin
  bottom=3.5cm, % Bottom margin
  left=3.25cm, % Left margin
  right=3.25cm, % Right margin
  footskip=2.5cm, % footskip margin
  headheight=14.5pt, % as requested by fancyhdr
]{geometry}

\usepackage{tikz}
\usepackage{microtype}
%\usepackage[none]{hyphenat} % don't! really, I mean it.
\usepackage{multicol}
\usepackage{wrapfig}

\usepackage{enumitem}
\usepackage{nameref}
\usepackage{amsfonts,amsmath,amssymb,amsthm,etoolbox}
%\usepackage{MnSymbol} % are you sure?
\usepackage{wasysym}
\usepackage[gen]{eurosym}

%\usepackage{float} % don't use [H]
\usepackage{titlesec}
\usepackage{fancyhdr}
\usepackage{lipsum}
\usepackage{transparent}
%\usepackage{mtpro2}
\usepackage{xcolor,graphicx,eso-pic}

\usepackage{hyperref} % should be last
\hypersetup{
  pdfpagemode={UseOutlines},
  bookmarksopen=true,
  bookmarksopenlevel=0,
  hypertexnames=false,
  colorlinks=true,% Set to false to disable coloring links
  citecolor=magenta,% The color of citations
  linkcolor=black,% The color of references to document elements (sections, figures, etc)
  urlcolor=mdtRed,% The color of hyperlinks (URLs)
  pdfstartview={FitV},
  unicode,
  breaklinks=true,
}

\newtheoremstyle{custom}% name
  {12pt}% Space above
  {3pt}% Space below
  {\itshape}% Body font
  {}% Indent amount
  {\bfseries}% Theorem head font
  {}% Punctuation after theorem head
  {\newline}% Space after theorem head
  {\thmname{#1}\thmnumber{ #2}\thmnote{ [#3]}}% Theorem head spec

\theoremstyle{custom}

\newtheorem{theo}{Teorema}[section]
\newenvironment{thm}
  {\pushQED{\qed}\renewcommand{\qedsymbol}{$\square$}\thmx}
  {\popQED\endthmx}
\newtheorem*{demostracion}{Demostración}
\newtheorem{definition}{Definición}[section]
\newtheorem{pro}{Proposición}[section]

\setlength{\parindent}{1em}
\setlength{\parskip}{0.8em}

\titleformat{\chapter}[hang]
  {\Large\bfseries}
  {\chaptername\ \thechapter. }
  {0pt}
  {}


%\renewcommand\rmdefault{cmr}
%\renewcommand\sfdefault{cmss}
%\renewcommand\ttdefault{cmtt}

\renewcommand{\baselinestretch}{1.2}
\setcounter{secnumdepth}{4}

\addto\captionsspanish{\renewcommand{\chaptername}{Tema}}

% Set the page style to "fancy"...
\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}
\renewcommand{\headrulewidth}{0.4pt}
\renewcommand{\footrulewidth}{0.4pt}
\pagestyle{fancy}
%... then configure it.
\fancyhead{} % clear all header fields
\fancyhead[L]{}
\fancyhead[R]{\chaptername\ \thechapter\ --\ \leftmark}
%\fancyhead[RO,LE]{\textbf{The performance of new graduates}}
%\fancyfoot{} % clear all footer fields
\fancyfoot{}
\fancyfoot[c]{\thepage}
\fancyfoot[l]{OPOSICIONES}
\fancyfoot[r]{Azahara Carpintero}

\fancypagestyle{plain}{%
  \fancyfoot[c]{\thepage}%
  \fancyfoot[l]{left}%
  \fancyfoot[r]{right}%
}

% personal commands
\newcommand*{\Scale}[2][4]{\scalebox{#1}{$#2$}}%
\newcommand*{\Resize}[2]{\resizebox{#1}{!}{$#2$}}%
\definecolor{gray75}{gray}{0.75}
\newcommand{\hsp}{\hspace{20pt}}

\newcommand{\Mysquare}{\raisebox{.25\height}{\tiny$\square$}}
%\newcommand{\Mysquare}{\square}


\begin{document}
%\sloppy % why?

\chapter{Dumy Chapter}

\section{Dumy Section}

\begin{theo}[Fundamental de la programación lineal]
Si un PPL tiene soluciones óptimas. alguna de ellas se alcanza en uno 
de los vértices del conjunto convexo $S$ de soluciones factible. Si, 
además, se alcanza solución óptima en más de un vértice de $S$, también 
son soluciones óptimas las combinaciones lineales convexas de dichos vértices.
\end{theo}

\end{document}

在此处输入图片描述

相关内容