修改参考书目中的花式标题无大写

修改参考书目中的花式标题无大写
\documentclass[a4paper,12pt,towside]{book} 
\usepackage{setspace}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern,textcomp}
\usepackage[square,numbers]{natbib}
\usepackage[english,french]{babel}
\usepackage{textgreek}
\usepackage[explicit]{titlesec}
\newlength\chapnumb
\setlength\chapnumb{3cm}
 
\titleformat{\chapter}[block] {
    \normalfont\sffamily}{}{0pt} {
    \parbox[b]{\chapnumb}{
      \fontsize{120}{110}\selectfont\thechapter}
      \parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{
        \raggedleft
        \hfill{\LARGE#1}\\
        \rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}
  }
}

\titleformat{name=\chapnumb,numberless}[block]
{\normalfont\Huge\sffamily}{}{0pt}
{\parbox[b]{\chapter}{%
   \mbox{}}%
  \parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{%
    \raggedleft%
    \hfill{\LARGE#1}\\
    \rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}}}



\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\headheight}{14pt} % regler l'espace entete/paragraph
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}


\fancyhf{}
\fancyhead[RO]{\makebox[0pt][l]{
        \colorbox{teal}{\makebox[\textwidth][l]{\bfseries\textcolor{white}{\thepage}\enskip}}\hspace*{0em}}} % numéro de page dans l'en-tête alterné, \textbf : gras,
\fancyhead[LE]{\makebox[0pt][r]{
        \colorbox{teal}{\makebox[\textwidth][r]{\bfseries\textcolor{white}{\thepage}}}\hspace*{0em}}} 
\fancyhead[LO]{%
    %\textcolor{teal}
    {%
        \textbf{\chaptername~\thechapter{}. \leftmark }}}
\fancyhead[RE]{%
    %\textcolor{teal}
    {%
        \textbf{\chaptername~\thechapter{}. \leftmark}}}
\renewcommand{\headrulewidth}{0.5pt}


\usepackage[sectionbib]{chapterbib}
\addto{\captionsfrench}{\renewcommand{\bibname}{Références}}

\begin{document}

\clearpage
\bibliographystyle{unsrt}
\bibliography{bibchap3}
\end{document}

在此处输入图片描述

答案1

\MakeUppercase定义标记时使用的书籍类别 。

使用

\fancyhead[LO]{ \textbf{\chaptername~\thechapter{}. \nouppercase{\leftmark}}}
\fancyhead[RE]{ \textbf{\chaptername~\thechapter{}. \nouppercase{\leftmark}}}

\nouppercase是包提供的命令,fancyhdr用于防止页眉或页脚文本以大写形式排版。

A

还添加了\usepackage[nottoc,numbib]{tocbibind}为参考文献创建的编号章节。

\documentclass[a4paper,12pt,towside]{book} 

\begin{filecontents*}{references.bib}
    @BOOK{bib1,
        author = {Donald Ervin Knuth},
        title = {The TeXbook},
        year = {1984},
        publisher = {Addison-Wesley},
        address = {London},
    }
\end{filecontents*}

\usepackage{setspace}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern,textcomp}
\usepackage[square,numbers]{natbib}
\usepackage[english,french]{babel}
\usepackage{textgreek}
\usepackage[explicit]{titlesec}

\usepackage{xcolor}

\usepackage{kantlipsum}% only dummy text <<<
\newlength\chapnumb
\setlength\chapnumb{3cm}

\titleformat{\chapter}[block] {
    \normalfont\sffamily}{}{0pt} {
    \parbox[b]{\chapnumb}{
        \fontsize{120}{110}\selectfont\thechapter}
    \parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{
        \raggedleft
        \hfill{\LARGE#1}\\
        \rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}
    }
}

\titleformat{name=\chapnumb,numberless}[block]
{\normalfont\Huge\sffamily}{}{0pt}
{\parbox[b]{\chapter}{%
        \mbox{}}%
    \parbox[b]{\dimexpr\textwidth-\chapnumb\relax}{%
        \raggedleft%
        \hfill{\LARGE#1}\\
        \rule{\dimexpr\textwidth-\chapnumb\relax}{0.4pt}}}
    
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\headheight}{14pt} % regler l'espace entete/paragraph
\renewcommand{\chaptermark}[1]{\markboth{#1}{}}
\renewcommand{\sectionmark}[1]{\markright{#1}}

\fancyhf{}
\fancyhead[RO]{\makebox[0pt][l]{
        \colorbox{teal}{\makebox[\textwidth][l]{\bfseries\textcolor{white}{\thepage}\enskip}}\hspace*{0em}}} % numéro de page dans l'en-tête alterné, \textbf : gras,
\fancyhead[LE]{\makebox[0pt][r]{\colorbox{teal}{\makebox[\textwidth][r]{\bfseries\textcolor{white}{\thepage}}}\hspace*{0em}}} 
\fancyhead[LO]{ \textbf{\chaptername~\thechapter{}. \nouppercase{\leftmark}}} % changed <<<<<<<<<<
\fancyhead[RE]{ \textbf{\chaptername~\thechapter{}. \nouppercase{\leftmark}}} % changed <<<<<<<<<<

\renewcommand{\headrulewidth}{0.5pt}        

\addto{\captionsfrench}{\renewcommand{\bibname}{Références}}

\usepackage[nottoc,numbib]{tocbibind} % added <<<<<<<<<<<<<

\begin{document}        

\chapter{One}

\kant[1-3]  
    
\chapter{Two}
    
A referenced text \cite{bib1}.
    
\bibliographystyle{unsrt}
\bibliography{references}

\kant[1-10]
\end{document}

相关内容