Ниже приведен формат, который я использую, KOMA-Script, по какой-то причине после использования \usepackage[format=hang]{caption}
подписи рисунка во второй строке происходит сдвиг вправо от первой заглавной буквы. Я хотел бы выровнять по первой заглавной букве. Что не так?
\AtBeginDocument{%
\renewcommand{\ref}[1]{\mbox{\autoref{#1}}}
}
\def\refnamechanges{%
\renewcommand*{\equationautorefname}[1]{}%
\renewcommand{\sectionautorefname}{sec.\negthinspace}%
\renewcommand{\subsectionautorefname}{sec.\negthinspace}%
\renewcommand{\subsubsectionautorefname}{sec.\negthinspace}%
\renewcommand{\figureautorefname}{Fig.\negthinspace}%
\renewcommand{\tableautorefname}{Tab.\negthinspace}%
}
\@ifpackageloaded{babel}{\addto\extrasenglish{\refnamechanges}}{\refnamechanges}
\usepackage[figure]{hypcap}
\let\myTOC\tableofcontents
\renewcommand\tableofcontents{%
\frontmatter
\pdfbookmark[1]{\contentsname}{}
\myTOC
\mainmatter }
\setkomafont{captionlabel}{\bfseries}
\setcapindent{1em}
\usepackage[format=hang]{caption}
\usepackage{calc}
\usepackage{cite}
\renewcommand{\chaptermark}[1]{\markboth{#1}{#1}}
\renewcommand{\sectionmark}[1]{\markright{\thesection\ #1}}
\renewcommand{\bottomfraction}{0.5}
\let\mySection\section\renewcommand{\section}{\suppressfloats[t]\mySection}
решение1
Удалять \setcapindent{1em}
:
\documentclass{scrartcl}
\setkomafont{captionlabel}{\bfseries}
%\setcapindent{1em}% <- remove this line
\usepackage[format=hang]{caption}
\usepackage{blindtext}% dummy text
\begin{document}
\begin{figure}[hbp]
\caption{\blindtext}
\end{figure}
\end{document}
Примечание: Стиль подвешивания подписей является стандартным для классов KOMA-Script. Так что, похоже, нет необходимости загружать пакет caption
:
\documentclass{scrartcl}
\setkomafont{captionlabel}{\bfseries}
\usepackage{blindtext}% dummy text
\begin{document}
\begin{figure}
\caption{\blindtext}
\end{figure}
\end{document}