
나는 글꼴 크기를 정의했으며 귀하의 답변 질문 도움을 받아도 다음과 같은 방식으로 상황을 해결했습니다.
\usepackage{titlesec}
\titleformat{\chapter}
{\normalfont\fontfamily{phv}\fontsize{16}{19}\bfseries}{\thechapter}{1em}{}
\titleformat{\section}
{\normalfont\fontfamily{phv}\fontsize{12}{17}\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\fontfamily{phv}\fontsize{12}{17}\bfseries}{\thesubsection}{1em}{}
이제 하위 섹션에만 이탤릭체 스타일을 추가해야 합니다. 어떻게 해야 합니까?? 많은 관심과 소중한 도움 부탁드립니다!
답변1
\usepackage{titlesec}
\titleformat{\chapter}
{\normalfont\fontfamily{phv}\fontsize{16}{19}\bfseries}{\thechapter}{1em}{}
\titleformat{\section}
{\normalfont\fontfamily{phv}\fontsize{12}{17}\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\fontfamily{phv}\fontsize{12}{17}\bfseries\itshape}{\thesubsection}{1em}{}
예를 들어:
\documentclass{book}
\usepackage{titlesec}
\titleformat{\chapter}
{\normalfont\fontfamily{phv}\fontsize{16}{19}\bfseries}{\thechapter}{1em}{}
\titleformat{\section}
{\normalfont\fontfamily{phv}\fontsize{12}{17}\bfseries}{\thesection}{1em}{}
\titleformat{\subsection}
{\normalfont\fontfamily{phv}\fontsize{12}{17}\bfseries\itshape}{\thesubsection}{1em}{}
\begin{document}
\chapter{Chapter}
\section{Section}
\subsection{Subsection}
\end{document}
이 계열에는 기울임꼴 모양을 사용할 수 없으므로 기울임꼴 글꼴이 기울임꼴로 대체됩니다.
답변2
\fontfamily
가능한 한 명시적인 지시를 피해야 합니다 . 산세리프 글꼴을 선언한 다음 \sffamily
; 기울어 진 유형의 경우 를 추가하십시오 \slshape
. 제목에 Helvetica를 사용하는 경우 문서에서 산세리프 글꼴이 요청되는 모든 경우에 이를 사용해야 합니다.
\documentclass{book}
\usepackage{helvet}
\usepackage{titlesec}
\titleformat{\chapter}
{\normalfont\fontsize{16}{19}\sffamily\bfseries}
{\thechapter}
{1em}
{}
\titleformat{\section}
{\normalfont\fontsize{12}{17}\sffamily\bfseries}
{\thesection}
{1em}
{}
\titleformat{\subsection}
{\normalfont\fontsize{12}{17}\sffamily\bfseries\slshape}
{\thesubsection}
{1em}
{}
\begin{document}
\chapter{Something}
\section{Title}
\subsection{Again}
\end{document}
형식을 지정한 대로 코드는 컴파일되지 않습니다. 나는 \titleformat
다양한 인수를 명확하게 보여주는 명령 레이아웃을 선호합니다 .