섹션 번호와 섹션 이름의 방향을 어떻게 조정할 수 있나요?

섹션 번호와 섹션 이름의 방향을 어떻게 조정할 수 있나요?

기본 설정에서 LaTeX다음과 같이 섹션 이름과 섹션 번호가 모두 아래쪽 정렬되도록 합니다. 여기에 이미지 설명을 입력하세요

이제 다음과 같이 "중앙 정렬"을 사용하고 싶습니다.

여기에 이미지 설명을 입력하세요

패키지를 사용하여 사용자 정의하려고 시도했지만 titlesec도움이 되지 않았습니다.

내 영어가 서툴러서 미안해요. :*>

답변1

다음은 @touhami가 지적한 간단한 titlesec와 섹션 번호를 완전히 중심으로 조정한 솔루션입니다 .\raisebox

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx, calc}
\usepackage[x11names]{xcolor}
\usepackage{titlesec}
\usepackage{lipsum}

\titleformat{\section}{\sffamily\bfseries\LARGE}{\raisebox{-0.5\height + 0.5ex}{\scalebox{2.5}[3]{\color{IndianRed3}\thesection}}}{0pt}{}

\begin{document}

\section{example}

\lipsum[3]

\end{document} 

여기에 이미지 설명을 입력하세요

관련 정보