我希望标题(或者更确切地说是“部分”)“附录”(德语:Anhang)位于页面的顶部,但对于 pdf,我尝试将其作为附录包含在内,然后立即跟进,而无需强制分页。
提前非常感谢您!
\documentclass[12pt,a4paper,headings=standardclasses,numbers=noenddot]{scrartcl}
\usepackage{showframe}
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.00cm, footskip=1cm]{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[ngerman]{isodate}
\usepackage[ngerman]{datetime}
\renewcommand\sectionformat{\mbox{\thesection.\enskip$|$\enskip}}% <- changed
\usepackage[ngerman]{datetime}
\RedeclareSectionCommand[
beforeskip=2\baselineskip,% changed to a positive value, if afterindent=false is set (needs version 3.26b)
afterindent=false,% < - added, needs version 3.26b
afterskip=.5\baselineskip,
tocentrynumberformat=\def\autodot{.} % replace \autodot by a fixed dot for section entries
]{section}
\RedeclareSectionCommand[
beforeskip=-1\baselineskip,
afterskip=.5\baselineskip]{subsection}
\RedeclareSectionCommand[
beforeskip=-1\baselineskip,
afterskip=.5\baselineskip]{subsubsection}
\RedeclareSectionCommand[
beforeskip=-1\baselineskip,
afterskip=.5\baselineskip]{paragraph}
\RedeclareSectionCommand[
beforeskip=-1\baselineskip,
afterskip=.5\baselineskip]{subparagraph}
\usepackage{authblk}
%----------------------------------------------------------------------------
% APPENDICES
%----------------------------------------------------------------------------
\newcommand*\appendixmore{% see the KOMA-Script documentation
\clearpage
\addsec{\appendixname}%
\renewcommand{\thesubsection}{\Alph{subsection}}%
}
%----------------------------------------------------------------------------
% FIGURES
%----------------------------------------------------------------------------
\usepackage{graphicx}
\graphicspath{ {./figures/} }
\usepackage{lscape}
%\usepackage{booktabs}
\usepackage[final]{pdfpages}
\usepackage{chngcntr}
\renewcommand{\listfigurename}{Abbildungsverzeichnis}
\renewcommand{\figurename}{Abb.}
\counterwithout{figure}{section}
\renewcommand{\listtablename}{Tabellenverzeichnis}
\renewcommand{\tablename}{Tab.}
\counterwithout{table}{section}
\begin{document}
\appendix
%\input{figures}
%\pagebreak
%\input{tables}
%\pagebreak
\includepdf[pages=1,scale=0.75,pagecommand=\thispagestyle{plain}\subsection{Auszug aus dem Tosa Nikki} \footnotesize{\textsc{Ki} (1957): \textit{Tosa Nikki} [Das Tagebuch von Tosa].}]{Iwanami1957TosaNikki.pdf}
\includepdf[pages=2,scale=0.75,pagecommand=\thispagestyle{plain}]{Iwanami1957TosaNikki.pdf}
\end{document}
答案1
您必须\addsec{\appendixname}
从 的定义中删除\appendixmore
。
\newcommand*\appendixmore{%
\clearpage
%\addsec{\appendixname}% <- remove this
\renewcommand{\thesubsection}{\Alph{subsection}}%
}
然后您可以将此命令添加到pagecommand
第一个包含页面的选项中。
\includepdf[pages=1,scale=0.75,
pagecommand=\thispagestyle{plain}%
\addsec{\appendixname}% <- add this
\subsection{Auszug aus dem Tosa Nikki}
{\footnotesize\textsc{Ki} (1957): \textit{Tosa Nikki} [Das Tagebuch von Tosa].\endgraf}% \footnotesize is a switch
]{example-image-a4.pdf}
注意\footnotesize
是一个开关,不带参数。
example-image-a4.pdf
使用包提供的示例mwe.sty
:
\documentclass[12pt,a4paper,headings=standardclasses,numbers=noenddot]{scrartcl}
\usepackage{showframe}
\usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.00cm, footskip=1cm]{geometry}
\usepackage[onehalfspacing]{setspace}
\usepackage[main=ngerman, english]{babel}
\usepackage[babel, german=quotes]{csquotes}
\usepackage[ngerman]{isodate}
\usepackage[ngerman]{datetime}
\renewcommand\sectionformat{\mbox{\thesection.\enskip$|$\enskip}}
\usepackage[ngerman]{datetime}
\RedeclareSectionCommand[
beforeskip=2\baselineskip,
afterindent=false,
afterskip=.5\baselineskip,
tocentrynumberformat=\def\autodot{.}
]{section}
\RedeclareSectionCommand[
beforeskip=-1\baselineskip,
afterskip=.5\baselineskip]{subsection}
\RedeclareSectionCommand[
beforeskip=-1\baselineskip,
afterskip=.5\baselineskip]{subsubsection}
\RedeclareSectionCommand[
beforeskip=-1\baselineskip,
afterskip=.5\baselineskip]{paragraph}
\RedeclareSectionCommand[
beforeskip=-1\baselineskip,
afterskip=.5\baselineskip]{subparagraph}
\usepackage{authblk}
%----------------------------------------------------------------------------
% APPENDICES
%----------------------------------------------------------------------------
\newcommand*\appendixmore{%
\clearpage
%\addsec{\appendixname}% <- remove this
\renewcommand{\thesubsection}{\Alph{subsection}}%
}
%----------------------------------------------------------------------------
% FIGURES
%----------------------------------------------------------------------------
\usepackage[final]{pdfpages}% loads also graphicx
%\usepackage{graphicx}%loaded by pdfpages
\graphicspath{ {./figures/} }
\usepackage{pdflscape}% maybe better than lscape
%\usepackage{booktabs}
%\usepackage{chngcntr}% only needed with older TeX Distributions
\renewcaptionname{ngerman}{\listfigurename}{Abbildungsverzeichnis}
\renewcaptionname{ngerman}{\figurename}{Abb.}
\counterwithout{figure}{section}
\renewcaptionname{ngerman}{\listtablename}{Tabellenverzeichnis}
\renewcaptionname{ngerman}{\tablename}{Tab.}
\counterwithout{table}{section}
\begin{document}
\appendix
\includepdf[pages=1,scale=0.75,
pagecommand=\thispagestyle{plain}%
\addsec{\appendixname}% <- add this
\subsection{Auszug aus dem Tosa Nikki}
{\footnotesize\textsc{Ki} (1957): \textit{Tosa Nikki} [Das Tagebuch von Tosa].\endgraf}% \footnotesize is a switch
]{example-image-a4.pdf}
\includepdf[pages=1,scale=0.75,pagecommand=\thispagestyle{plain}]{example-image-a4.pdf}
\end{document}
补充说明:
- 如果你想改变
\listfigurename
等使用\providecaptionname
按照上述示例使用。 chngcntr
如果您不使用旧版 TeX 发行版,则不需要此包。pdfpages
负载graphicx
。