
Tenho um problema com \bibliography{}
a titulação automática de comandos.
O Latex assume que o título é igual a \section{*}\\ References
, mas \section*{References}
é necessário.
Aqui está a imagem do problema
Aqui está o arquivo de estilo
\ProvidesPackage{chsu}[2019/08/16 chsu Style Package]
\RequirePackage{amsmath,amssymb,amsfonts,amsthm} %различные математические пакеты
\RequirePackage[utf8]{inputenc} %кодировка символов
\RequirePackage[T1,T2A]{fontenc} %кодировка шрифтов (T1 - латин, T2A - кирил)
\RequirePackage[english,russian]{babel} %русский и английский языки в документе, переносы
\RequirePackage[
left=2.5cm,
right=1.5cm,
top=2cm,
bottom=2cm
]{geometry} %поля страницы
\RequirePackage{setspace} %для разных разметок
\onehalfspacing %полуторный интерлиньяж
\RequirePackage{indentfirst} %первая строка абзаца всегда красная
\parindent = 1.25cm %абзацный отступ
\RequirePackage{enumitem} %пакет для списков
\setlist[enumerate,itemize]{leftmargin=1.87cm,nosep,noitemsep} %списки выравниваются по абзацу
\renewcommand\labelitemi{---} %вместо точки у списков будет тире
\RequirePackage{color} %цвета в pdf (для ссылок)
\RequirePackage[pdfhighlight=/I,colorlinks=true]{hyperref} %ссылки в pdf
\RequirePackage[all]{hypcap} %по ссылке переносит на рисунок, а не название
\RequirePackage[nottoc]{tocbibind} %добавляет библиографию в содержание
\renewcommand{\section}{\@startsection{section}{1}{0pt}
{1.3pt}
{1.3pt}
{\centering\hyphenpenalty=10000\normalfont\bfseries}
} % заголовок по ГОСТ
\renewcommand{\subsection}{\@startsection{subsection}{2}{0pt}
{1.3pt}
{1.3pt}
{\centering\hyphenpenalty=10000\normalfont\bfseries}
} % подзаголовок по ГОСТ
\renewcommand{\subsubsection}{\@startsection{subsubsection}{3}{0pt}
{1.3pt}
{1.3pt}
{\centering\hyphenpenalty=10000\normalfont\bfseries}
} % подподзаголовок по ГОСТ
\def\capfigure{figure} %заменяет знак в названии рисунка точку на тире
\def\captable{table}
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\ifx\@captype\capfigure
\centering #1~---~#2 \par
\else
#1~---~#2 \par
\fi
\vskip\belowcaptionskip}
\addto\captionsrussian{\def\figurename{Рисунок}} %вместо рис. - рисунок (ГОСТ)
\renewcommand{\thefigure}{\thesection.\arabic{figure}} %сквозная нумерация рисунков
\newtheoremstyle{forthm} %стиль для теорем
{0em}
{0em}
{\itshape}
{1.25cm}
{\bfseries}
{ \normalfont{---} }
{0em}
{}
\theoremstyle{forthm} %обозначение, что теоремы будут с этим стилем
\newtheorem{theorem}{Теорема}[section] %команда для теоремы
\newtheorem{lemmma}{Лемма}[section] %команда для леммы
\newtheoremstyle{fordefn} %стиль для определений
{0em}
{0em}
{}
{1.25cm}
{\bfseries}
{ \normalfont{---} }
{0em}
{}
\theoremstyle{fordefn} %обозначение, что определения будут с этим стилем
\newtheorem{definition}{Определение}[section] %команда для определения
\newtheorem{prop}{Утверждение}[section] %команда для утверждения
\newcommand{\hm}[1]{#1\nobreak\discretionary{}{\hbox{\ensuremath{#1}}}{}} %команда делает повторение символа в строчной формуле
\endinput
Responder1
O MWE reduzido
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\renewcommand{\section}{\@startsection{section}{1}{0pt}
{1.3pt}
{1.3pt}
{\centering\hyphenpenalty=10000\normalfont\bfseries}
}
\makeatother
\begin{document}
\section*{Foo}
\end{document}
reproduz o problema que você descreve
O problema aqui é um espaço espúrio no final da redefinição de \section
. O caractere de fim de linha desprotegido produzirá um espaço indesejado que causará estragos em suas manchetes se você usar o formulário com estrela. Uma definição correta seria
\renewcommand{\section}{\@startsection{section}{1}{0pt}
{1.3pt}
{1.3pt}
{\centering\hyphenpenalty=10000\normalfont\bfseries}}
ou
\renewcommand{\section}{\@startsection{section}{1}{0pt}
{1.3pt}
{1.3pt}
{\centering\hyphenpenalty=10000\normalfont\bfseries}%
}
Todos os \section
comandos semelhantes a - chsu
são afetados e precisam ser corrigidos. Se possível, por favor reporte este bug ao mantenedor da classe/pacote.
Com a versão fixa o resultado é
como esperado.