부록의 비그림 참조

부록의 비그림 참조

나는 부록 A, 부록 B 등과 같은 여러 가지 다른 부록을 포함하는 맞춤형 부록 섹션을 가지고 있습니다. 각 부록에는 표, 그림, 때로는 PDF에서 가져온 페이지(그림 아님)가 있으므로 캡션을 지정하지 않고 목차에 표시되지 않는 사용자 정의 섹션 제목을 지정합니다. . 여기 MWE가 있습니다.

\documentclass[12pt, a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[dvips]{graphicx} % to include images
\usepackage[bookmarksnumbered, breaklinks=true,colorlinks=true, linkcolor=black, urlcolor=blue, citecolor=blue, bookmarks=true]{hyperref}
\usepackage[nameinlink,noabbrev]{cleveref}
\crefname{page}{p.}{pp.}
\crefname{figure}{figure}{figures}

\settypeblocksize{237mm}{150mm}{*} % size of text block on page
\setulmargins{3.5cm}{*}{*} % sets start of text on page after ruled header
\setheadfoot{\onelineskip}{2\onelineskip}
\setheaderspaces{2cm}{*}{*} % start of rule header line on page
\setlrmarginsandblock{3.5cm}{2.5cm}{*} % left and right margins
\checkandfixthelayout

%%% MAKE CHAPTER IN APPENDIX LOOK LIKE SECTIONS
\cftinsertcode{APP}{
  \setlength\cftchapterindent{\cftsectionindent}
  \setlength\cftbeforechapterskip{0pt}
  \renewcommand*{\cftappendixname}{\appendixname\space}
  \renewcommand{\cftchapteraftersnum}{:}
  \renewcommand\cftchapterdotsep{\cftdotsep} % Chapters should use dots in ToC
  \renewcommand\cftchapterfont{\normalfont}
  \renewcommand\cftchapterpagefont{\normalfont}
}

%%% PREVENT APPENDIX SECTIONS TO BE ADDED TO TOC
\newcommand{\nocontentsline}[3]{}
\newcommand{\tocless}[2]{\bgroup\let\addcontentsline=\nocontentsline#1{#2}\egroup}

%%% CUSTOM CHAPTER STYLE FOR APPENDICES
\makechapterstyle{appendix}{%
  \chapterstyle{default}
  \setlength{\beforechapskip}{3.5ex}
  \renewcommand*{\chapterheadstart}{\vspace{\beforechapskip}}
  \setlength{\afterchapskip}{2.3ex}
  \renewcommand{\chapnumfont}{\normalfont\bfseries\Large}
  \renewcommand{\chapnamefont}{\normalfont\bfseries\Large}
  \renewcommand{\chaptitlefont}{\normalfont\bfseries\Large}
  \renewcommand{\printchapternum}{\chapnumfont~\thechapter}
  \renewcommand{\afterchapternum}{:\space}
}

\renewcommand{\contentsname}{Table of Contents}
\maxsecnumdepth{subsubsection} % chapters, sections, subsections numbered
\maxtocdepth{subsection}

\begin{document}

% TABLE OF CONTENTS
\SingleSpacing
\tableofcontents*
\clearpage % Force a break to new page

\chapter{Chapter title}
\section{A first section title}
\section{A second section title}
Just some text. I'd like to reference Appendix A2 here by doing (see \Cref{appendix:A2}, \cpageref{appendix:A2}), but it only references to A not to A2.

\appendix
\appendixpage % cover page appendix
\cftinserthook{toc}{APP}
\chapterstyle{appendix}

%appendix A content
\chapter{Some title for first appendix}
\label{appendix:A}

\tocless\section{Information Form - Page 1/2}
\begin{figure}[!htb]
\label{appendix:A1}
\fbox{\includegraphics[page=1,width=14.5cm]{info.pdf}}
\end{figure}

\tocless\section{Information Form - Page 2/2}
\begin{figure}[!htb]
\label{appendix:A2}
\fbox{\includegraphics[page=2,width=14.5cm]{info.pdf}}
\end{figure}

\chapter{Some title for next appendix}
\label{appendix:B}
Nothing here yet.

\end{document}

일단 컴파일된 모습은 다음과 같습니다.예시 PDF... 제 문제는 부록 A2를 본문에서 참조하고 싶다는 것입니다. 현재 참조에는 부록 A로 되어 있지만 부록 A2로 읽어야 합니다. 이것이 어떻게 달성될 수 있는지 제안해 주시겠습니까? 감사해요.

답변1

\caption에 의해 내부적으로 수행되는 사전 명령이 필요하기 때문에 \label없이 사용하는 것은 쓸모가 없습니다 . 즉, 매뉴얼이 두 예제의 문제를 해결해야 하지만 캡션 없는 '가짜' 섹션이 더 많이 있으면 지루해질 수 있습니다. .\caption\refstepcounter\refstepcounter{figure}\label{...}

\documentclass[12pt, a4paper]{memoir}
\usepackage[utf8]{inputenc}
\usepackage[demo]{graphicx} % to include images
\usepackage[bookmarksnumbered, breaklinks=true,colorlinks=true, linkcolor=black, urlcolor=blue, citecolor=blue, bookmarks=true]{hyperref}
\usepackage[nameinlink,noabbrev]{cleveref}
\crefname{page}{p.}{pp.}
\crefname{figure}{figure}{figures}

\settypeblocksize{237mm}{150mm}{*} % size of text block on page
\setulmargins{3.5cm}{*}{*} % sets start of text on page after ruled header
\setheadfoot{\onelineskip}{2\onelineskip}
\setheaderspaces{2cm}{*}{*} % start of rule header line on page
\setlrmarginsandblock{3.5cm}{2.5cm}{*} % left and right margins
\checkandfixthelayout

%%% MAKE CHAPTER IN APPENDIX LOOK LIKE SECTIONS
\cftinsertcode{APP}{
  \setlength\cftchapterindent{\cftsectionindent}
  \setlength\cftbeforechapterskip{0pt}
  \renewcommand*{\cftappendixname}{\appendixname\space}
  \renewcommand{\cftchapteraftersnum}{:}
  \renewcommand\cftchapterdotsep{\cftdotsep} % Chapters should use dots in ToC
  \renewcommand\cftchapterfont{\normalfont}
  \renewcommand\cftchapterpagefont{\normalfont}
}

%%% PREVENT APPENDIX SECTIONS TO BE ADDED TO TOC
\newcommand{\nocontentsline}[3]{}
\newcommand{\tocless}[2]{\bgroup\let\addcontentsline=\nocontentsline#1{#2}\egroup}

%%% CUSTOM CHAPTER STYLE FOR APPENDICES
\makechapterstyle{appendix}{%
  \chapterstyle{default}
  \setlength{\beforechapskip}{3.5ex}
  \renewcommand*{\chapterheadstart}{\vspace{\beforechapskip}}
  \setlength{\afterchapskip}{2.3ex}
  \renewcommand{\chapnumfont}{\normalfont\bfseries\Large}
  \renewcommand{\chapnamefont}{\normalfont\bfseries\Large}
  \renewcommand{\chaptitlefont}{\normalfont\bfseries\Large}
  \renewcommand{\printchapternum}{\chapnumfont~\thechapter}
  \renewcommand{\afterchapternum}{:\space}
}

\renewcommand{\contentsname}{Table of Contents}
\maxsecnumdepth{subsubsection} % chapters, sections, subsections numbered
\maxtocdepth{subsection}

\begin{document}

% TABLE OF CONTENTS
\SingleSpacing
\tableofcontents*
\clearpage % Force a break to new page

\chapter{Chapter title}
\section{A first section title}
\section{A second section title}
Just some text. I'd like to reference Appendix A2 here by doing (see \Cref{appendix:A2}, \cpageref{appendix:A2}), but it only references to A not to A2.

\appendix
\appendixpage % cover page appendix
\cftinserthook{toc}{APP}
\chapterstyle{appendix}

%appendix A content
\chapter{Some title for first appendix}
\label{appendix:A}

\tocless\section{Information Form - Page 1/2}
\begin{figure}[!htb]
\refstepcounter{figure}%
\label{appendix:A1}
\fbox{\includegraphics[page=1,width=14.5cm]{info.pdf}}
\end{figure}

\tocless\section{Information Form - Page 2/2}
\begin{figure}[!htb]
\refstepcounter{figure}%
\label{appendix:A2}
\fbox{\includegraphics[page=2,width=14.5cm]{info.pdf}}
\end{figure}

\chapter{Some title for next appendix}
\label{appendix:B}
Nothing here yet.

\end{document}

관련 정보