
다음과 같은 문제가 있습니다. 내 테이블이 caption[title]{long description...}
. 이제 다음 예와 같이 캡션에 추가된 각주로 소스 중 일부에 소스를 추가해야 합니다.
나는 이것을 시도했다:그림의 \caption에 \footnote 사용, 그러나 문제는 문서 시작 부분의 표 목록에도 각주가 표시된다는 것입니다.
'붉은 여우 - 속성'은 이고 [title]
나머지 텍스트는 다음 {long description}
과 같이 사용됩니다.scrreprt 클래스의 캡션에서 테이블 제목 추가
또한 모든 단일 캡션에 각주를 사용하지 않으므로 솔루션은 하나를 추가하는 옵션을 제공한다는 점에서 유연성이 있어야 합니다(필수는 아님).
위 형식이 가능한가요?
원하지 않는 결과 없이 안전하게 작동하는 솔루션을 찾고 있습니다.
MWE:
\documentclass[a4paper, 12pt, headsepline, smallheadings]{scrreprt}
\usepackage[labelfont={small,bf}, textfont=small, labelsep=colon,singlelinecheck=false,format=plain, parindent=1em]{caption}
\newlength\myindention
\setlength\myindention{1em}
\usepackage{chngcntr}
\counterwithout{table}{chapter}
\let\oldcaption\caption
\renewcommand*\caption[2][]{%
\oldcaption[#1]{#1\\\hspace*{\myindention}#2}%
}
\begin{document}
\listoftables
\chapter{Introduction}
\begin{table}[h]
\caption[title table 1]{description table 1}
\fbox{content}
\end{table}
\end{document}
감사해요.
답변1
만약오직\footnotemark
차이점은 제목 끝에 가 필요할 때가 있다는 점입니다 . +
이를 추가하는 토글(별표 표시된 매크로의 일반화)을 정의할 수 있습니다.
\documentclass{scrreprt}
\usepackage[labelfont={small,bf}, textfont=small, labelsep=colon,
singlelinecheck=false,format=plain, parindent=1em]{caption}
\usepackage{xparse}
\newlength\myindention
\setlength\myindention{1em}
\let\oldcaption\caption
\RenewDocumentCommand { \caption } { t{+} O{} m } {%
\oldcaption[#2]{%
#2%
\IfBooleanT{#1}{\footnotemark}
\\%
\hspace*{\myindention}#3
}%
}
\begin{document}
\listoftables
\chapter{Introduction}
\begin{table}[h]
\caption[title table 1]{description table 1}
\fbox{content}
\end{table}
\begin{table}[h]
\caption+[title table 2]{description table 2}
\fbox{content}
\end{table}
\footnotetext{Source.}
\end{document}
그런 다음 \caption
MWE에서와 같이 작동하고 \caption+
동일한 작업을 수행하지만 \footnotemark
제목 끝(즉, \IfBooleanT
줄)에 추가합니다. 명확하게 하려면:
- 소스가 포함된 테이블:
\caption+[title]{description}
그\footnotetext
이후 - 소스가 없는 테이블:
\caption[title]{description}
만
답변2
매우 우아하지는 않지만 작동하는 것 같습니다.
\documentclass[a4paper, 12pt, headsepline, smallheadings]{scrreprt}
\usepackage[labelfont={small,bf}, textfont=small, labelsep=colon,singlelinecheck=false,format=plain, parindent=1em]{caption}
\newlength\myindention
\setlength\myindention{1em}
\usepackage{chngcntr}
\counterwithout{table}{chapter}
\usepackage{xparse}
\let\oldcaption\caption
\RenewDocumentCommand\caption{D [] {} D [] {} m}{%
\def\tempa{}%
\def\tempb{#1}%
\def\tempc{#2}%
\ifx\tempa\tempb\def\tempb{#3}\fi%
\ifx\tempa\tempc\let\tempc\tempb\fi%
\oldcaption[\tempb]{\tempc\\\hspace*{\myindention}#3}%
}
\begin{document}
\listoftables
\chapter{Introduction}
\begin{table}[h]
\caption[title table 1][title table 1\footnotemark]{description table 1}
\fbox{content}
\end{table}
Anywhere on the same page where the float appears\footnotetext{blah}
but at least before the next footnote\footnote{the nextone}
\end{document}
하지만 다른 사람이 더 나은 것을 제안할 수 있을 것으로 기대하므로 시간이 중요할 경우에만 이것을 추천하고 싶습니다!