我正在尝试为我的论文创建一个附录,该附录应在适当的章节标题下包含几个 PDF 文件,并相应地显示在目录中。我面临的三个问题是--
- 页码是阿拉伯语连续的,而我需要罗马字母的附录页面。
- 如果我将章节标题定为附录 A,则附录一词会在目录中出现两次。如果我仅将章节命名为“A”,则页面后面的标题仍为“A”,而不是附录 A。[见截图]。
- 章节标题和包含的 PDF 页面之间存在不必要的大量空白(即使 PDF 缩小了)[见屏幕截图]。可能,这是 {pdfpages} 包的默认行为。这是我的主要问题。因此,如果同一部分下包含多个 PDF 页面,则页眉和页脚仍然缺失。我知道每个主题只问一个问题是适当的,但由于这些问题密切相关,我想将它们分组。拆分它们将需要在另一个主题下重复 90% 的内容。
当前输出屏幕
\documentclass[listof=totoc,a4paper,11pt,oneside,chapterprefix=true,sfdefaults=false]{scrbook}
\usepackage{etoolbox}
%Header Footer
\usepackage[automark,headsepline,markcase=upper]{scrlayer-scrpage}
\usepackage[page,toc,titletoc,title]{appendix}
\automark[chapter]{chapter}
\clearpairofpagestyles
\setkomafont{pageheadfoot}{}
\setkomafont{pagefoot}{\bfseries\small}
\ohead{\headmark}
\lefoot*{\pagemark{} \rule[-\dp\strutbox]{1pt}{\baselineskip} Page}
\rofoot*{Page \rule[-\dp\strutbox]{1pt}{\baselineskip} \pagemark}
\ifoot*{MAKAUT, WB}
\AddToHook{cmd/mainmatter/after}{%
\renewcommand*{\chapterpagestyle}{empty}% instead of plain → manual
\pagestyle{empty}%
}
\AddToHook{cmd/mainmatter/after}{%
\renewcommand*{\chapterpagestyle}{plain}%
\pagestyle{headings}%
}
\usepackage[margin=1in,head=27.2pt]{geometry}
\usepackage{pdfpages}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{acronym}
\usepackage[T1]{fontenc}
\usepackage{setspace}
\usepackage[normalem]{ulem} % for underline with normalem option
\usepackage{ragged2e} % For justified text
\usepackage[center]{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage[misc]{ifsym}
\usepackage{csquotes}
\usepackage[section]{placeins}
\usepackage{multicol}% used for the two-column index
\usepackage[bottom]{footmisc}% places footnotes at page bottom
% Example
\hypersetup{
colorlinks = true, %Colours links instead of ugly boxes
urlcolor = blue, %Colour for external hyperlinks
linkcolor = blue, %Colour of internal links
citecolor = red %Colour of citations
}
% Define a new font command
\newcommand{\setchapterfont}{\fontsize{12}{14}\selectfont\fontfamily{ptm}\selectfont}
% Patch the \mainmatter command to change font settings
\preto{\mainmatter}{\setchapterfont}
\begin{document}
\frontmatter
\setcounter{page}{1}
\tableofcontents
\listoftables
\listoffigures
\mainmatter
%\include{Introduction}
%\include{Literature}
%\include{chapter8}
\backmatter
%\printbibliography
\begin{appendices}
\addchap{Appendix A}\label{A}
\addsec{Plagiarism Certificate}
%\includepdf[pages={1},scale=0.8]{./Certificates/Plag_cert.pdf}
\addsec{Enrollment Certificate}
%\includepdf[pages={1},scale=0.8]{./Certificates/Enrollment.pdf}
\addsec{Coursework Certificate}
%\includepdf[pages={1},scale=0.8]{./Certificates/Coursework_completion.pdf}
\addsec{Registration Certificate}
%\includepdf[pages={1},scale=0.8]{./Certificates/Registration.pdf}
\chapter{Appendix B}\label{B}
\section{Journals}
%\includepdf[pages={1},scale=0.7]{./Journals/EVOS_Published.pdf}
%\includepdf[pages={1},scale=0.7]{./Journals/wpc.pdf}
%\includepdf[pages={1},scale=0.7]{./Journals/sensors.pdf}
\section{Conferences}
%\includepdf[pages={1},scale=0.7]{./Conferences/Haldia_cert.pdf}
%\includepdf[pages={1},scale=0.7]{./Conferences/Haldia.pdf}
%\includepdf[pages={1},scale=0.7]{./Conferences/Thermo_cert.pdf}
%\includepdf[pages={1},scale=0.7]{./Conferences/Thermometer.pdf}
%\includepdf[pages={1},scale=0.7]{./Conferences/Brainware_cert.pdf}
%\includepdf[pages={1},scale=0.7]{./Conferences/Brainware.pdf}
\section{Book Chapter}
%\includepdf[pages={1},scale=0.7]{./Books/Book1.pdf}
%\includepdf[pages={1},scale=0.7]{./Books/Book2.pdf}
\section{International Patent}
%\includepdf[pages={1},scale=0.7]{./Patents/Patent Certificate1.pdf}
%\includepdf[pages={1},scale=0.7]{./Patents/Patent Certificate2.pdf}
%\includepdf[pages={1},scale=0.7]{./Patents/SA Patent Certificate.pdf}
\section{Public recognition}
%\includepdf[pages={1}]{./Patents/TOI.pdf}
\end{appendices}
\end{document}
'''
答案1
答案由 Ulrike Fischer 和 John Kormylo 提供
\includepdf
总是创建新页面。请\includegraphics
改用。- 您可以通过删除附录包的 titletoc 选项来丢失重复的“附录”。
\pagenumbering{roman}
之后立即包含\backmatter
。
所以我修改后的代码如下--
\documentclass[listof=totoc,a4paper,11pt,oneside,chapterprefix=true,sfdefaults=false]{scrbook}
\usepackage{etoolbox}
%%%%%%%%%Header Footer
\usepackage[automark,headsepline,markcase=upper]{scrlayer-scrpage}
\usepackage[page,toc,title]{appendix}
\automark[chapter]{chapter}
\clearpairofpagestyles
\setkomafont{pageheadfoot}{}
\setkomafont{pagefoot}{\bfseries\small}
\ohead{\headmark}
\lefoot*{\pagemark{} \rule[-\dp\strutbox]{1pt}{\baselineskip} Page}
\rofoot*{Page \rule[-\dp\strutbox]{1pt}{\baselineskip} \pagemark}
\ifoot*{MAKAUT, WB}
\AddToHook{cmd/mainmatter/after}{%
\renewcommand*{\chapterpagestyle}{empty}% instead of plain → manual
\pagestyle{empty}%
}
\AddToHook{cmd/mainmatter/after}{%
\renewcommand*{\chapterpagestyle}{plain}%
\pagestyle{headings}%
}
\usepackage[margin=1in,head=27.2pt]{geometry}
\usepackage{pdfpages}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{acronym}
\usepackage[T1]{fontenc}
\usepackage{setspace}
\usepackage[normalem]{ulem} % for underline with normalem option
\usepackage{ragged2e} % For justified text
\usepackage[center]{caption}
\usepackage{subcaption}
\usepackage{float}
\usepackage[misc]{ifsym}
\usepackage{csquotes}
\usepackage[section]{placeins}
\usepackage{multicol}% used for the two-column index
\usepackage[bottom]{footmisc}% places footnotes at page bottom
% Example
\hypersetup{
colorlinks = true, %Colours links instead of ugly boxes
urlcolor = blue, %Colour for external hyperlinks
linkcolor = blue, %Colour of internal links
citecolor = red %Colour of citations
}
% Define a new font command
\newcommand{\setchapterfont}{\fontsize{12}{14}\selectfont\fontfamily{ptm}\selectfont}
% Patch the \mainmatter command to change font settings
\preto{\mainmatter}{\setchapterfont}
\begin{document}
\frontmatter
\setcounter{page}{1}
\tableofcontents
\listoftables
\listoffigures
\mainmatter
%\include{Introduction}
%\include{Literature}
%\include{chapter3}
%\include{chapter4}
%\include{chapter5}
%\include{chapter6}
%\include{chapter7}
%\include{chapter8}
\backmatter
\pagenumbering{roman}
%\printbibliography
\begin{appendices}
\addchap{Appendix A}\label{A}
\addsec{Plagiarism Certificate}
\includegraphics[width=0.8\textwidth, angle=0]{./Certificates/Plag_cert.pdf}
\addsec{Enrollment Certificate}
\includegraphics[width=0.8\textwidth, angle=0]{./Certificates/Enrollment.pdf}
\addsec{Coursework Certificate}
\includegraphics[width=1.0\textwidth, angle=0.5]{./Certificates/Coursework_completion.pdf}
\addsec{Registration Certificate}
\includegraphics[width=1.0\textwidth, angle=0.5]{./Certificates/Registration.pdf}
\addchap{Appendix B}\label{B}
\addsec{Journals}
\includegraphics[width=0.8\textwidth, angle=0]{./Journals/EVOS_Published.pdf}
\newpage
\includegraphics[width=1.0\textwidth, angle=0]{./Journals/wpc.pdf}
\newpage
\includegraphics[width=1.0\textwidth, angle=0]{./Journals/sensors.pdf}
\newpage
\addsec{Conferences}
\includegraphics[width=1.0\textwidth, angle=0]{./Conferences/Haldia_cert.pdf}
\newpage
\includegraphics[width=1.0\textwidth, angle=0]{./Conferences/Haldia.pdf}
\newpage
\includegraphics[width=1.0\textwidth, angle=0]{./Conferences/Thermo_cert.pdf}
\newpage
\includegraphics[width=1.0\textwidth, angle=0]{./Conferences/Thermometer.pdf}
\newpage
\includegraphics[width=1.0\textwidth, angle=0]{./Conferences/Brainware_cert.pdf}
\newpage
\includegraphics[width=1.0\textwidth, angle=0]{./Conferences/Brainware.pdf}
\newpage
\addsec{Book Chapter}
\includegraphics[width=1.0\textwidth, angle=0]{./Books/Book1.pdf}
\newpage
\includegraphics[width=1.0\textwidth, angle=0]{./Books/Book2.pdf}
\newpage
\addsec{International Patent}
\includegraphics[width=1.0\textwidth, angle=0]{./Patents/Patent Certificate1.pdf}
\newpage
\includegraphics[width=1.0\textwidth, angle=0]{./Patents/Patent Certificate2.pdf}
\newpage
\includegraphics[width=1.0\textwidth, angle=0]{./Patents/SA Patent Certificate.pdf}
\newpage
\addsec{Public recognition}
\includegraphics[width=1.0\textwidth, angle=0]{./Patents/TOI.pdf}
\end{appendices}
\end{document}