标题和参考书目

标题和参考书目

我找到了一个代码,可以更改文档中每个章节的标题显示方式。但是,这会更改参考书目的标题位置。有没有方法可以提高参考书目的标题?请参阅程序的图表。

任何帮助都将不胜感激:)

在此处输入图片描述

在此处输入图片描述

\documentclass[twoside,10pt,oldfontcommands]{memoir}   %oldfontcommands \sc memoir
\usepackage[T1]{fontenc}
\usepackage{standalone}

\usepackage[explicit]{titlesec}

\newcommand{\chaptercolor}{black}

%\usepackage[font=small,labelfont=bf]{caption}  %Control the caption size e.g.
\makeatletter
\newcommand\HUGEr{\@setfontsize\Huge{50}{60}} %used to set the number in chapter section
\makeatother    

\usepackage[detect-all]{siunitx} %detect-all for making italic in caption
\usepackage{tikz}

\bibliographystyle{unsrt} %make the citation appear in right sequnce 1 2 3 4


\titleformat{\chapter}[display]
{\normalfont\filcenter}
{\tikz[remember picture,overlay]
    {\node[fill=\chaptercolor,%<--- Not hardcoded color
        font=\sffamily\fontsize{50}{40}\bf\selectfont\color{white},anchor=north east, 
        minimum width=3cm, 
        minimum height=3cm] 
        at (7,0) 
        (numb) {\thechapter};
        \node[rotate=90,
        anchor=south,
        inner sep=0pt,
        font=\Huge\sffamily]
        at (numb.west) {\SPREAD\chaptertitlename};%<-- Not hardcoded "CHAPTER"
}}
{3.5cm}
{\Huge\bfseries\color{\chaptercolor}#1\vspace*{-3cm}}%< Not hardcoded color


%Spread the word out in chapter
\ExplSyntaxOn
\NewDocumentCommand{\SPREAD}{m}
{% full expand the argument
    \vincent_spread:f { #1 }
}
\cs_new_protected:Npn \vincent_spread:n #1
{% with \tl_map_inline:nn we insert \hfil between letters; a final \unskip kills the last \hfil
    \makebox[3cm][s]{\tl_map_inline:nn { #1 } { ##1 \hfil } \unskip}
}
\cs_generate_variant:Nn \vincent_spread:n { f }
\ExplSyntaxOff

答案1

在你的序言中使用类似这样的内容:

\titleformat{name=\chapter, numberless}[block]{\normalfont\filcenter\Huge\bfseries}{}{0pt}{#1}

所有未编号的章节都将使用此代码进行格式化。

当我在序言中使用此代码时,出现了以下错误消息:

在此处输入图片描述

相关内容