我正在尝试在 overleaf 中获取如图所示的章节样式。但是,我尝试了以下操作:
\documentclass[11pt]{report}
\usepackage{titlesec}
\makeatletter
\newcommand\HUGEE{\@setfontsize\Huge{50}{60}}
\makeatother
\newcommand*{\justifyheading}{\raggedleft}
\titleformat{\chapter}[display]
{\normalfont\HUGEE\bfseries\justifyheading}{\thechapter}
{20pt}{\Huge}
\titleformat{\section}
{\normalfont\Large\bfseries\justifyheading}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\large\bfseries\justifyheading}{\thesubsection}{1em}{}
\begin{document}
\chapter{Introduction}
text here
\end{document}
但是我没有得到足够大的 1...有人可以帮忙吗?
答案1
您可以使用该包type1cm
来获取任意大的文本:
\documentclass[11pt]{report}
\usepackage{type1cm}
\usepackage{titlesec}
\newcommand\HUGEE{\fontsize{5cm}{6cm}\selectfont}
\newcommand*{\justifyheading}{\raggedleft}
\titleformat{\chapter}[display]
{\normalfont\HUGEE\bfseries\justifyheading}{\thechapter}
{20pt}{\Huge}
\titleformat{\section}
{\normalfont\Large\bfseries\justifyheading}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\large\bfseries\justifyheading}{\thesubsection}{1em}{}
\begin{document}
\chapter{Introduction}
text here
\end{document}