나는 이것이 기술적으로 잘못되었다는 것을 알고 있으며 그렇게 하려고 시도해서는 안 됩니다... 그럼에도 불구하고 섹션 헤더 크기가 다음과 같이 설정되어 있고 Large
모든 곳에서 잘 작동하는 문서가 있습니다.제외하고한 섹션의 내용이 너무 깁니다. 글꼴 크기를 변경하고 싶습니다.해당 섹션 제목만더 예쁘게 보이도록 하기 위해(다른 섹션 제목의 크기와 일치하지 않더라도)
내가 크기를 변경할 수 있었던 유일한 방법장소 상에서을 해왔다
\section{\large{My very long section title}}
그러나 글꼴도 변경되므로 머리글과 목차가 엉망이 됩니다.
minipage
섹션 명령을 로 사용하거나 래핑해 보았 \begin{small}--\end{small}
으나 섹션 제목 크기가 다른 곳에 정의되어 있어서 아무것도 바뀌지 않습니다...
다음은 mwe입니다.
\documentclass[12pt,twoside,a4paper]{report}
\usepackage{lipsum}
\usepackage{fancyhdr} % To change header and footers
\pagestyle{fancy} % Turn on the style
\fancyhf{} % Clears everything in the header and footer
\fancyfoot[CE,CO]{\thepage} %Page number centered in all pages
\fancyhead[LE]{\slshape\nouppercase{\leftmark}} %Chapter title in the outer margin of even pages
\fancyhead[RO]{\slshape\nouppercase{\rightmark}} %Section title in the outer margin of odd pages
\begin{document}
\tableofcontents
\chapter{My chapter}
\lipsum[3-6]
\section{This title is great}
\lipsum[3-10]
\section{This title is veryvery veryveryvery increadibly and mindblowingly very very superlong}
The title is 3 lines long! It would look much better if I could just very slightly reduce the font size, so that it fits in two lines.
\bigskip
\lipsum[3-2]
\section{Some other nice title}
\lipsum[3-8]
\section{\large{This title is veryvery veryveryvery increadibly and mindblowingly very very superlong}}
Great! it is now 2 lines... but the header is huge! and look at the table of contents!!
\bigskip
\lipsum[3-2]
\end{document}
답변1
다음을 사용할 수 있습니다.\chapter[short title in header & TOC]{long title in document}
\documentclass[12pt,twoside,a4paper]{report}
\usepackage{lipsum}
\usepackage{fancyhdr} % To change header and footers
\pagestyle{fancy} % Turn on the style
\fancyhf{} % Clears everything in the header and footer
\fancyfoot[CE,CO]{\thepage} %Page number centered in all pages
\fancyhead[LE]{\slshape\nouppercase{\leftmark}} %Chapter title in the outer margin of even pages
\fancyhead[RO]{\slshape\nouppercase{\rightmark}} %Section title in the outer margin of odd pages
\begin{document}
\tableofcontents
\chapter{My chapter}
\lipsum[3-6]
\section{This title is great}
\lipsum[3-10]
\section[This title is a bit shorter]{This title is veryvery veryveryvery increadibly and mindblowingly very very superlong}
The title is 3 lines long! It would look much better if I could just very slightly reduce the font size, so that it fits in two lines.
\bigskip
\lipsum[3-2]
\section{Some other nice title}
\lipsum[3-8]
\chapter[This title is short]{\large This title is veryvery veryveryvery increadibly and mindblowingly very very superlong}
Great! it is now 2 lines... but the header is huge! and look at the table of contents!!
\bigskip
\lipsum[3-2]
\end{document}
답변2
다음과 같이 그룹 내부 \titleformat*
에서 명령을 사용합니다 .titlesec
\documentclass[12pt,twoside,a4paper]{report}
\usepackage{lipsum}
\usepackage{titlesec}
\usepackage{fancyhdr} % To change header and footers
\pagestyle{fancy} % Turn on the style
\fancyhf{} % Clears everything in the header and footer
\fancyfoot[CE,CO]{\thepage} %Page number centered in all pages
\fancyhead[LE]{\slshape\nouppercase{\leftmark}} %Chapter title in the outer margin of even pages
\fancyhead[RO]{\slshape\nouppercase{\rightmark}} %Section title in the outer margin of odd pages
\begin{document}
\tableofcontents
\chapter{My chapter}
\lipsum[3-6]
\section{This title is great}
\lipsum[3-10]
\section{This title is veryvery veryveryvery increadibly and mindblowingly very very superlong}
The title is 3 lines long! It would look much better if I could just very slightly reduce the font size, so that it fits in two lines.
\bigskip
\lipsum[3-2]
\section{Some other nice title}
\lipsum[3-8]
{
\titleformat*{\section}{\Large\bfseries\itshape}
\section{This title is veryvery veryveryvery increadibly and mindblowingly very very superlong}}
Great! it is now 2 lines... but the header is huge! and look at the table of contents!!
\bigskip
\lipsum[3-2]
\section{Some other nice title}
\end{document}