elsarticle-num
我为我的论文选择了参考书目样式,它采用了report
文档类别和主文档字体大小11pt
。
但有一个要求就是标题的字体大小不能超过13pt
。
我似乎找不到可行的解决方案来改变参考书目标题的字体大小。
代码如下:
\documentclass[11pt, fleqn]{report}
\usepackage{titlesec}
%Section Heading Format:
\titleformat*{\section}{\fontsize{12}{20}\bfseries \selectfont}
%Chapter Heading Format:
\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@}
\def\@makechapterhead#1{%
{\parindent \z@ \raggedright
\reset@font
\vspace*{35\p@}%
\hrule
\vspace*{10\p@}%
\par
\fontsize{13}{15} \scshape \@chapapp{} \fontsize{13}{15}\bfseries \thechapter
\par\nobreak
\vspace*{10\p@}%
\hrule
\par
\vspace*{1\p@}%
\hrule
%\vskip 40\p@
\vspace*{15\p@}
\fontsize{13}{15} \bfseries #1\par\nobreak
\vskip 30\p@
}}
\begin{document}
\chapter{Open Text}
\section{General Info}
These pages contain information about OpenText \dots\ trademarks\cite{a1} \dots
OpenText maintains this Web site as \dots\ copyright pages.\cite{a2}
\newpage
\bibliographystyle{elsarticle-num}
\bibliography{references}
\end{document}
我希望参考书目标题与章节采用相同的格式。
该文件references.bib
包含以下条目:
@misc{a1,
author = "Denis Auroux",
title = "18.02SC Multivariable Calculus",
howpublished = " Massachusetts Institute of Technology: MIT OpenCourseWare: \url{https://ocw.mit.edu}",
year = "2010",
month = "Fall",
note = "License: Creative Commons BY-NC-SA.",
}
@phdthesis {a2,
author = "Kollmannsberger, Andreas",
title = "Heating characteristics of fixed focus laser assisted {Thermoplastic-Automated Fiber Placement} of {2D} and {3D} parts",
type = "Dissertation",
school = "Technische Universität München",
address = "München",
year = 2019,
keywords = "AFP, Thermoplastic Automated Fiber Placement, Thermal simulation, in situ consolidation, laser heating"
}
请帮忙。谢谢!
答案1
到目前为止,您已为编号章节提供了样式,但尚未为未编号章节提供样式。(书目标题采用未编号章节的样式。)
因此您需要添加以下代码:
% style of unnumbered chapter headers
\def\@makeschapterhead#1{%
{\parindent \z@ \raggedright
\reset@font
\vspace*{35\p@}%
\fontsize{13}{15}\selectfont \bfseries #1\par\nobreak
\vskip 30\p@
}}
紧接着 的代码块下方\def\@makechapterhead
。
\documentclass[11pt, fleqn]{report}
\begin{filecontents}[overwrite]{references.bib}
@misc{a1,
author = "Denis Auroux",
title = "{18.02SC Multivariable Calculus}",
howpublished = "Massachusetts Institute of Technology:
MIT OpenCourseWare: \url{https://ocw.mit.edu}",
year = "2010",
month = "Fall",
note = "{License: Creative Commons BY-NC-SA}",
}
@phdthesis{a2,
author = "Kollmannsberger, Andreas",
title = "Heating characteristics of fixed focus laser assisted
{Thermoplastic-Automated Fiber Placement} of {2D}
and {3D} parts",
type = "Doctoral Dissertation",
school = "Technische Universität München",
address = "München",
year = 2019,
keywords= "AFP, Thermoplastic Automated Fiber Placement,
Thermal simulation, in situ consolidation, laser heating"
}
\end{filecontents}
\usepackage[numbers]{natbib}
\bibliographystyle{elsarticle-num}
\usepackage{titlesec,xurl}
%Section Heading Format
\titleformat*{\section}{\fontsize{12}{14.4}\bfseries \selectfont}
\makeatletter
\def\thickhrulefill{\leavevmode \leaders \hrule height 1ex \hfill \kern \z@}
%Chapter Header Formats
%Style of numbered chapter headers
\def\@makechapterhead#1{%
{\parindent \z@ \raggedright
\reset@font
\vspace*{35\p@}%
\hrule
\vspace*{10\p@}%
\par
\fontsize{13}{15} \scshape \@chapapp{} \fontsize{13}{15}\bfseries \thechapter
\par\nobreak
\vspace*{10\p@}%
\hrule
\par
\vspace*{1\p@}%
\hrule
%\vskip 40\p@
\vspace*{15\p@}
\fontsize{13}{15} \bfseries #1\par\nobreak
\vskip 30\p@
}}
%Style of unnumbered chapter headers
\def\@makeschapterhead#1{%
{\parindent \z@ \raggedright
\reset@font
\vspace*{35\p@}%
\fontsize{13}{15}\selectfont \bfseries #1\par\nobreak
\vskip 30\p@
}}
\makeatother % <-- don't forget this instruction
\begin{document}
\chapter{Open Text}
\section{General Info}
These pages \dots\ trademarks\cite{a1} \dots\ pages.\cite{a2}
\newpage
\bibliography{references}
\end{document}