以下是我使用的格式,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}