
나는 memoir
문서 클래스와 veelo
장 스타일을 사용하고 있습니다. 섹션 이름과 동일한 오른쪽 여백을 갖도록 장 번호를 오른쪽에 정렬하는 데 문제가 있습니다. 페이지 여백으로 인해 장 번호 오른쪽에 있는 검은색 직사각형이 표시되지 않습니다. 내가 사용하고 있는 코드의 일부:
\documentclass[a4paper,12pt,twoside]{memoir}
\chapterstyle{veelo}
\settypeblocksize{252mm}{165mm}{*}
\setlrmarginsandblock{25mm}{20mm}{*}
\setulmarginsandblock{20mm}{25mm}{*}
...
\chapter{Introduction}
컴파일할 때 아래 이미지의 왼쪽에 있는 것을 얻고 오른쪽에 있는 것을 얻고 싶습니다.
감사합니다.
답변1
안타깝게도 텍스트와 관련하여 제목의 가로 위치에 대한 정보를 제공하지 않았습니다. 원하는 것을 달성하는 새로운 스타일에 대한 가능한 정의는 다음과 같습니다.
\documentclass[a4paper,12pt,twoside]{memoir}
\usepackage{graphicx}
\usepackage{lipsum}
\settypeblocksize{252mm}{165mm}{*}
\setlrmarginsandblock{25mm}{20mm}{*}
\setulmarginsandblock{20mm}{25mm}{*}
\makeatletter
\newlength{\numberheight}
\setlength{\numberheight}{\beforechapskip}
\newlength{\barlength}
\makechapterstyle{myveelo}{%
\setlength{\afterchapskip}{40pt}
\renewcommand*{\chapterheadstart}{\vspace*{40pt}}
\renewcommand*{\afterchapternum}{\par\nobreak\vskip 25pt}
\renewcommand*{\chapnamefont}{\normalfont\LARGE\flushright}
\renewcommand*{\chapnumfont}{\normalfont\HUGE}
\renewcommand*{\chaptitlefont}{\normalfont\HUGE\bfseries\flushright}
\renewcommand*{\printchaptername}{%
\chapnamefont\MakeUppercase{\@chapapp}\hspace*{\midchapskip}}
\renewcommand*{\chapternamenum}{}
\setlength{\beforechapskip}{18mm}
\setlength{\midchapskip}{\paperwidth}
\addtolength{\midchapskip}{-\textwidth}
\addtolength{\midchapskip}{-\spinemargin}
\addtolength{\midchapskip}{-2.5em}
\renewcommand*{\printchapternum}{%
\makebox[0pt][l]{\hspace{-\midchapskip}%
\resizebox{!}{\numberheight}{\chapnumfont \thechapter}%
\hspace{.8em}%
\rule{\midchapskip}{\beforechapskip}%
}}%
\makeoddfoot{plain}{}{}{\thepage}}
\makeatother
\chapterstyle{myveelo}
\begin{document}
\chapter{Introduction}
\lipsum[2]
\end{document}