以下は私が使用しているフォーマット、KOMA-Scriptです。何らかの理由で、使用後、\usepackage[format=hang]{caption}
2行目の図のキャプションが最初の大文字から右にシフトします。最初の大文字に揃えたいのですが、何が間違っているのでしょうか?
\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}