避免附录中的分页符

避免附录中的分页符

我试图将标题放在同一页上,并已尝试使用/nopagebreaksamepage,但它仍然会破坏页面。据我了解,pdf 大小应该足够小,以便标题可以显示在一页中。

所以应该是

Anhang
A Gesetzesauszüge
A.1 Gesetzesauszug Zivilrecht: Art. 3, Abs. 1
Sōzoku no kōryoku. Sōsoku [Auswirkungen der Vererbung. Vererbung] (1947): Art. 3, Abs. 1.

在一个页面中: 二手 pdf

% arara: lualatex: { shell: true, synctex: true }

\documentclass[
  12pt,
  a4paper,
  headings=standardclasses,
  listof=totoc,
  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,% positive value, if afterindent=false is set
  afterindent=false,
  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}

\usepackage[
  backend=biber,
  style=ext-authoryear,
  sorting=nyvt,
  datamodel=customstyles,
  maxnames=25,
  innamebeforetitle=true,
  usetranslator=true,
  alldates=terse,
  labeldate=year,
  dashed=false,
  isbn=false
]{biblatex}
\addbibresource{library.bib}
\usepackage[hidelinks, pdfencoding=auto]{hyperref}

\newcommand*\appendixmore{
  \clearpage
  \renewcommand{\thesubsection}{\Alph{subsection}}%
}

\usepackage{graphicx}
\graphicspath{ {./figures/} }
\usepackage[final]{pdfpages}
\usepackage{chngcntr}
\renewcommand{\listfigurename}{Abbildungsverzeichnis}
\renewcommand{\figurename}{Abb.}
\counterwithout{figure}{section}
\renewcommand{\listtablename}{Tabellenverzeichnis}
\renewcommand{\tablename}{Tab.}
\counterwithout{table}{section}

\usepackage{array}
\newcolumntype{P}[1]{>{\raggedleft\arraybackslash}p{#1}}

\begin{document}
\clearpage
\appendix
\addsec{\appendixname}
\subsection{Gesetzesauszüge}
\includepdf[pages=1,scale=0.7,pagecommand=\thispagestyle{plain}\subsubsection{Gesetzesauszug Zivilrecht: Art. 3, Abs. 1}\label{ssec:heir3} \normalsize{Sōzoku no kōryoku. Sōsoku [Auswirkungen der Vererbung. Vererbung] (1947): Art. 3, Abs. 1.}]{heir.pdf}
\includepdf[pages=2,scale=0.7,pagecommand=\thispagestyle{plain}\subsubsection{Gesetzesauszug Zivilrecht: Art. 7, Abs. 3.}\label{ssec:heir7} \normalsize{Iden no kōryoku. Hōkatsu juisha no kenri gimu [Willenswirkung. Umfassende Rechte und Pflichten der Begünstigten] (1947): Art. 7, Abs. 3}]{heir.pdf}
\end{document}

答案1

\addsec\subsection命令移至pagecommand第一页的选项:

\documentclass[12pt,headings=Standardklasse,listof=totoc,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}

\renewcommand\sectionformat{\mbox{\thesection.\enskip$|$\enskip}}% 
\RedeclareSectionCommand[
  beforeskip=2\baselineskip,% positive value, if afterindent=false is set
  afterindent=false,
  afterskip=.5\baselineskip,
  tocentrynumberformat=\def\autodot{.} % replace \autodot by a fixed dot for section entries
   ]{section}
\RedeclareSectionCommands[
  beforeskip=-1\baselineskip,
  afterskip=.5\baselineskip]{subsection,subsubsection}
\newcommand*\appendixmore{
  \clearpage
  \renewcommand{\thesubsection}{\Alph{subsection}}%
}

\usepackage[final]{pdfpages}% loads also graphicx

\begin{document}
\appendix
\includepdf[pages=1,scale=0.7,
  pagecommand=\thispagestyle{plain}%
              \addsec{\appendixname}\subsection{Gesetzesauszüge}% <- moved
              \subsubsection{Gesetzesauszug Zivilrecht: Art. 3, Abs. 1}\label{ssec:heir3}%
              %\normalsize
              {Sōzoku no kōryoku. Sōsoku [Auswirkungen der Vererbung. Vererbung] (1947): Art. 3, Abs. 1.}%
]{heir.pdf}
\includepdf[
  pages=2,scale=0.7,
  pagecommand=\thispagestyle{plain}%
              \subsubsection{Gesetzesauszug Zivilrecht: Art. 7, Abs. 3.}\label{ssec:heir7}%
              %\normalsize
              {Iden no kōryoku. Hōkatsu juisha no kenri gimu [Willenswirkung. Umfassende Rechte und Pflichten der Begünstigten] (1947): Art. 7, Abs. 3}%
]{heir.pdf}
\end{document}

在此处输入图片描述

相关内容