章节封面,包含图片和章节编号

章节封面,包含图片和章节编号

我目前正在写论文,想编辑我正在使用的模板MastersDoctoralThesis。确切地说,我想让每章都用 4 页来介绍(#1:显示大号章节的页面;#2:整页图像;#3:与章节相关的摘要或引文;#4:章节标题和章节号,底部有作者的简短说明)。尽管我在各种平台上搜索了几天,但似乎很难实现。因此,我将非常感激能得到帮助,因为这绝对超出了我的个人能力。

如下请见:

  • main.tex平均能量损失
  • chapter.tex平均能量损失
  • .cls文件中的章节定义
  • 示例章节封面图片
  • 链接到我使用的模板

1. 主要 MWE

\usepackage[utf8]{inputenc} 字符
\usepackage[T1]{fontenc}
\usepackage{awesomebox}
\usepackage{lmodern}
\usepackage{框架}
\definecolor{阴影颜色}{命名}{雪2}
\usepackage{babel}  
\usepackage{csquotes}
\使用包[
  后端=biber,
  风格=apa​​,
  排序=nty,
  延迟数字=真,
  giveninits=true,
  refsection=章节,
]{biblatex}
\addbibresource{书目.bib}
\几何学{
    纸张=a4纸,
    内径=2.5厘米,
    外径=3.8厘米,
    装订偏移=.5厘米,
    顶部=1.5厘米,
    底部=1.5厘米,
    显示框,}
\开始{文档}
\frontmatter
\pagestyle{普通}
\begin{标题页}
\开始{中心}
\结束{中心}
\end{标题页}
\pagestyle{论文}
\include{章节/第 1 章}
\printbibliography[heading=bibintoc]
\结束{文档}

2. 第 MWE 章:

    \chapter{Chapter1} 
\label{Chapter1} 
\newcommand{\keyword}[1]{\textbf{#1}}
\newcommand{\tabhead}[1]{\textbf{#1}}
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\file}[1]{\texttt{\bfseries#1}}
\newcommand{\option}[1]{\texttt{\itshape#1}}
\begin{multicols}{2}
\printbibliography[heading=subbibintoc]
\end{multicols}

3. 章节定义(.cls

    \ProvideDocumentCommand{\abovechapterskip}{}{\vspace*{20pt}}
\ProvideDocumentCommand{\chapterbelowskip}{}{\vspace*{40pt}}
\ProvideDocumentCommand{\chapterinbetweenskip}{}{\vspace*{20pt}}
\ProvideDocumentCommand{\autodot}{}{}
\ProvideDocumentCommand{\mdtChapapp}{}{}
\ProvideDocumentCommand{\chapteralign}{}{\raggedright}
\ProvideDocumentCommand{\chapterfont}{}{\Huge\bfseries}
\ProvideDocumentCommand{\chapterprefixfont}{}{\LARGE\bfseries}
\DeclareDocumentCommand{\@makechapterhead}{ m }{%
    \abovechapterskip
    {\parindent \z@ \chapteralign \normalfont
        \ifnum \c@secnumdepth >\m@ne
        \if@mainmatter
        \ifbool{chapteroneline}{%
            \chapterfont \mdtChapapp\thechapter\autodot\enspace
        }{%
            \chapterprefixfont \@chapapp\space \thechapter
            \par\nobreak
            \chapterinbetweenskip
        }%
        \fi
        \fi
        \interlinepenalty\@M%
        \chapterfont #1\par\nobreak
        \chapterbelowskip
    }
    \thispagestyle{\chapter@p@gestyle}
}
\def\@makeschapterhead#1{%
    \abovechapterskip
    {\parindent \z@ \chapteralign
        \normalfont
        \interlinepenalty\@M
        \chapterfont  #1\par\nobreak
        \chapterbelowskip
    }
    \thispagestyle{\chapter@p@gestyle}
}



\ProvideDocumentCommand{\addchap}{ s o m }{%
    \chapter*{#3}%
    \markboth{}{}%
    \IfBooleanTF{#1}{%
    }{%
        \IfNoValueTF{#2}{%
            \addchaptertocentry{#3}%
            \markboth{\MakeMarkcase{#3}}{\MakeMarkcase{#3}}%
        }{%
            \addchaptertocentry{#2}%
            \markboth{\MakeMarkcase{#2}}{\MakeMarkcase{#2}}%
        }%
    }%
}%

\ProvideDocumentCommand{\addsec}{ s o m }{%
    \section*{#3}%
    \markright{}%
    \IfBooleanTF{#1}{%
    }{%
        \IfNoValueTF{#2}{%
            \addcontentsline{toc}{section}{#3}%
            \markright{\MakeMarkcase{#3}}%%
        }{%
            \addcontentsline{toc}{section}{#2}%
            \markright{\MakeMarkcase{#2}}%
        }%
    }%
}%

4.模板链接: https://www.latextemplates.com/template/masters-doctoral-thesis

5. 示例章节封面的图片(如上所述) 在此处输入图片描述

答案1

这实际上不是一个答案,但我认为对于评论来说它太长了。

首先感谢您提供大量代码,但我还没准备好去追寻您的MastersDoctoralThesis模板。我也不想用大量辅助文件(例如您的章节 MWE 和章节定义 ( .cls) 文件)弄乱我的操作系统,因此将它们合并到一个\documentclass{book}文件中,并进行适当的调整以注释掉仅受您使用的类支持的代码。

% chapter4pageprob.tex  SE 550596

\documentclass{book}
\usepackage{comment} %%%%%%%%% for my convenience
\usepackage{lipsum}  %%%%%%%%% for my convenience
\usepackage{multicol} % not in book class
\usepackage[utf8]{inputenc} % characters % why is this in the main MWE?
\usepackage[T1]{fontenc} 
\usepackage{awesomebox}
\usepackage{lmodern} 
\usepackage{framed}
% \definecolor{shadecolor}{named}{Snow2}
\usepackage{babel}  
\usepackage{csquotes} 
\usepackage[
  backend=biber,
  style=apa,
  sorting=nty,
  defernumbers=true,
  giveninits=true,
  refsection=chapter,
]{biblatex}
\addbibresource{Bibliography.bib} 
\begin{comment} % geometry macro undefined
\geometry{
    paper=a4paper,
    inner=2.5cm, 
    outer=3.8cm, 
    bindingoffset=.5cm,
    top=1.5cm, 
    bottom=1.5cm, 
    showframe,}
\end{comment}
%%%%%%%%%%%%  the .cls Chapter definition
    \ProvideDocumentCommand{\abovechapterskip}{}{\vspace*{20pt}}
\ProvideDocumentCommand{\chapterbelowskip}{}{\vspace*{40pt}}
\ProvideDocumentCommand{\chapterinbetweenskip}{}{\vspace*{20pt}}
\ProvideDocumentCommand{\autodot}{}{}
\ProvideDocumentCommand{\mdtChapapp}{}{}
\ProvideDocumentCommand{\chapteralign}{}{\raggedright}
\ProvideDocumentCommand{\chapterfont}{}{\Huge\bfseries}
\ProvideDocumentCommand{\chapterprefixfont}{}{\LARGE\bfseries}
\makeatletter     %%% this is not in a .cls file
\DeclareDocumentCommand{\@makechapterhead}{ m }{%
    \abovechapterskip
    {\parindent \z@ \chapteralign \normalfont
        \ifnum \c@secnumdepth >\m@ne
        \if@mainmatter
        \ifbool{chapteroneline}{%
            \chapterfont \mdtChapapp\thechapter\autodot\enspace
        }{%
            \chapterprefixfont \@chapapp\space \thechapter
            \par\nobreak
            \chapterinbetweenskip
        }%
        \fi
        \fi
        \interlinepenalty\@M%
        \chapterfont #1\par\nobreak
        \chapterbelowskip
    }
%    \thispagestyle{\chapter@p@gestyle}
   \thispagestyle{plain}
}
\def\@makeschapterhead#1{%
    \abovechapterskip
    {\parindent \z@ \chapteralign
        \normalfont
        \interlinepenalty\@M
        \chapterfont  #1\par\nobreak
        \chapterbelowskip
    }
%    \thispagestyle{\chapter@p@gestyle}
   \thispagestyle{plain}
}



\ProvideDocumentCommand{\addchap}{ s o m }{%
    \chapter*{#3}%
    \markboth{}{}%
    \IfBooleanTF{#1}{%
    }{%
        \IfNoValueTF{#2}{%
            \addchaptertocentry{#3}%
            \markboth{\MakeMarkcase{#3}}{\MakeMarkcase{#3}}%
        }{%
            \addchaptertocentry{#2}%
            \markboth{\MakeMarkcase{#2}}{\MakeMarkcase{#2}}%
        }%
    }%
}%

\ProvideDocumentCommand{\addsec}{ s o m }{%
    \section*{#3}%
    \markright{}%
    \IfBooleanTF{#1}{%
    }{%
        \IfNoValueTF{#2}{%
            \addcontentsline{toc}{section}{#3}%
            \markright{\MakeMarkcase{#3}}%%
        }{%
            \addcontentsline{toc}{section}{#2}%
            \markright{\MakeMarkcase{#2}}%
        }%
    }%
}%

\makeatother

%%%%%%%%%%%%
\begin{document}
\frontmatter 
\pagestyle{plain} 
\begin{titlepage}
\begin{center}
\end{center}
\end{titlepage}
% \pagestyle{thesis} % undefined in book class
% \include{Chapters/Chapter1} insert Chapter1 code here
    \chapter{Chapter1} 
\label{Chapter1} 
\newcommand{\keyword}[1]{\textbf{#1}}
\newcommand{\tabhead}[1]{\textbf{#1}}
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\file}[1]{\texttt{\bfseries#1}}
\newcommand{\option}[1]{\texttt{\itshape#1}}
\lipsum[1]
\begin{multicols}{2}
\printbibliography[heading=subbibintoc]
\end{multicols}
% above is Chapter1 code
\printbibliography[heading=bibintoc]
\end{document}

最终结果是章节标题看起来像默认的。我必须承认我不懂你的\@makechapterhead代码,但我太老了,跟不上所有新的编码风格。

\chapter宏采用两个参数\chapter[<toc entry>]{<document title>}。我认为您可能想要一个宏\mychapter[<toc entry>]{<document title>}{<graphic>}{<abstract>}{<authors>},其中章节号打印在第一页上,然后打印一个\clearpage<graphic>,接着打印一个\clearpage<abstract>接着打印\clearpage一个典型的chapter数字和标题,然后在页面底部打印一个<authors>

祝你好运。

相关内容