두 번째 그림 목록의 제목을 변경하는 방법

두 번째 그림 목록의 제목을 변경하는 방법

내 문서에는 텍스트 본문에 포함된 그림에 대한 그림 목록이 있습니다. 이것은 기본적으로 계획대로 작동했습니다. 그러나 부록에 나오는 그림에 대해서는 별도의 그림 목록도 필요합니다. 이 두 부록 모두 첫 번째 페이지에 "[부록] 그림 목록"이라는 라벨을 붙이고 각 후속 페이지에는 "[부록] 그림 목록(계속)"이라는 라벨을 붙여야 합니다.

제목을 변경하기 위해 스타일 파일에 명령이 입력되었습니다.

\newcommand\listfigurename{LIST OF FIGURES}
\newcommand\listfigurecont{LIST OF FIGURES (Continued)}

나는 캡션 패키지를 사용하여 본문과 부록 그림이 모두 동일한 목록에 나타나는 문제를 개선하려고 노력했습니다.

\DeclareCaptionType{myfigure}[Figure]

그런 다음 내 부록 수치를 다음과 같이 입력합니다.

\begin{myfigure}[htpb]
\centering
\psfragscanon
\psfrag{Batman}[][]{Primary}
\psfrag{Roof Disp.}[][]{$Roof Disp. (in)$}
\psfrag{Roof Acc.}[][]{$Roof Acc. (g)$}
\psfrag{Robin}[][]{Secondary}
\psfrag{Time (s)}[][]{$Time (s)$}
\includegraphics[width=0.75\textwidth]{RDCHY034.eps}
\caption{Mean roof displacement response, Chi Chi CHY034 motion, founded on dense sand.}
\vspace{0.3cm}
\includegraphics[width=0.75\textwidth]{RACHY034.eps}
\caption{Mean roof acceleration response, Chi Chi CHY034 motion, founded on dense sand.}
\end{myfigure}

이 수치는 좋아 보입니다. 목록 제목을 제외한 모든 항목이 설정되었습니다.

그림과 표에 사용한 코드는 다음과 같습니다.

\clearpage
\tableofcontents
\clearpage
\listoffigures 
\clearpage
\listoftables
\clearpage
\renewcommand\listfigurename{LIST OF APPENDIX FIGURES}
\renewcommand\listfigurecont{LIST OF APPENDIX FIGURES (Continued)}
\listofmyfigures 
%\renewcommand\listfigurename{LIST OF APPENDIX FIGURES}
%\renewcommand\listfigurecont{LIST OF APPENDIX FIGURES (Continued)}
\clearpage

결과가 좀 이상하네요. 부록 그림이 한 페이지만 있는 경우 제목은 "부록 그림 목록"으로 표시됩니다. 문제 없습니다. 부록 그림이 한 페이지 이상으로 나오면 첫 번째 페이지에는 "내 피규어 목록"으로, 중간 페이지에는 모두 "부록 그림 목록(계속)"로 올바르게 읽히고, 마지막 페이지에는 "LIST OF TABLES( 계속되는)."

나는 다양한 것을 시도했지만 아무 것도 바뀌지 않는 것 같습니다. 어떤 도움이라도 주시면 감사하겠습니다. 이는 Word에 부록 그림 목록을 입력하여 문서에 밀어넣기 전 최후의 수단입니다.

답변1

새로운 종류의 float를 정의할 필요가 없습니다. 여기에 한 가지 가능성이 있습니다. \listofappfigures와 완전히 유사한 명령 을 정의했지만 그림에 대한 \listoffigures외부 파일과 다른 이름을 사용했습니다 . 요령은 단순히 부록의 시작 부분 .laf에서 그림의 확장자를 에서 으로 변경하는 것인데 .lof, 이는 의 재정의를 통해 수행할 수 있습니다 . 또한 각 장이 새 목록에 약간의 수직 간격을 추가하도록 패치되었습니다(기본 LoF와 마찬가지로). 두 번째 페이지의 제목을 만드는 데 afterpage 패키지가 사용되었습니다. 네가 해야 할 일은 단지 말하기만 하면 된다.laf\ext@figure\@chapter

\addtocontents{laf}{\protect\afterpage{\bfseries\listappfigurecont\par\vskip20pt}}

부록 어딘가에 처음 몇 개의 숫자 뒤에 있습니다.

\documentclass{book}
\usepackage{afterpage}
\usepackage{xpatch}

\newcommand\listappfigurename{LIST OF APPENDIX FIGURES}
\newcommand\listappfigurecont{{\LARGE LIST OF FIGURES (Continued)}}

\makeatletter
\xpatchcmd{\@chapter}{\addtocontents{lof}{\protect\addvspace{10\p@}}}{\addtocontents{lof}{\protect\addvspace{10\p@}}\addtocontents{laf}{\protect\addvspace{10\p@}}}{}{}

\newcommand\listofappfigures{%
  \renewcommand\listfigurename{\listappfigurename}
    \if@twocolumn
      \@restonecoltrue\onecolumn
    \else
      \@restonecolfalse
    \fi
    \chapter*{\listfigurename}%
      \@mkboth{\MakeUppercase\listfigurename}%
              {\MakeUppercase\listfigurename}%
    \@starttoc{laf}%
    \if@restonecol\twocolumn\fi
    }
\makeatother

\newcommand\testfig{%
  \begin{figure}\caption{Caption for the figure~\thefigure}\end{figure}\clearpage}

\begin{document}

\listoffigures
\listofappfigures

\chapter{Some Chapter}
\testfig
\testfig
\testfig

\chapter{Some Chapter}
\testfig
\testfig

\appendix
\makeatletter
\renewcommand\ext@figure{laf}
\makeatother

\chapter{Some Appendix}
\testfig\testfig\testfig\testfig\testfig
\testfig\testfig\testfig\testfig\testfig
\addtocontents{laf}{\protect\afterpage{\bfseries\listappfigurecont\par\vskip20pt}}
\testfig\testfig\testfig\testfig\testfig
\testfig\testfig\testfig\testfig\testfig
\chapter{Some Other Appendix}
\testfig\testfig\testfig\testfig\testfig
\testfig\testfig\testfig\testfig\testfig
\testfig\testfig\testfig\testfig\testfig
\testfig\testfig\testfig\testfig\testfig
\testfig\testfig\testfig\testfig\testfig

\end{document}

표준 LoF 이미지:

여기에 이미지 설명을 입력하세요

그리고 두 번째 페이지에 계속되는 제목을 보여주는 새로운 그림 목록 이미지:

여기에 이미지 설명을 입력하세요

관련 정보