장 번호가 여백을 벗어났습니다.

장 번호가 여백을 벗어났습니다.

저는 LaTeX를 처음 사용하는데 문제가 있습니다. 그림이 모든 것을 말해줍니다... 챕터 수가 9를 초과하면 두 번째 숫자가 여백 밖으로 이동합니다....

10장의 숫자 0이 여백을 벗어났습니다!!

웹의 장에 대해 다음 레이아웃을 내 서문에 복사했습니다.

\documentclass[a4paper,11pt,twoside,openright]{memoir}

\usepackage{xcolor}

\definecolor{numbercolor}{gray}{0.7}
\newif\ifchapternonum

\makechapterstyle{jenor}{
  \renewcommand\printchaptername{}
  \renewcommand\printchapternum{}
  \renewcommand\printchapternonum{\chapternonumtrue}
  \renewcommand\chaptitlefont{\fontfamily{pbk}\fontseries{db}\fontshape{n}\fontsize{25}{35}\selectfont\raggedleft}
  \renewcommand\chapnumfont{\fontfamily{pbk}\fontseries{m}\fontshape{n}\fontsize{1in}{0in}\selectfont\color{numbercolor}}
  \renewcommand\printchaptertitle[1]{%
    \noindent
    \ifchapternonum
    \begin{tabularx}{\textwidth}{X}
    {\let\\\newline\chaptitlefont ##1\par}
    \end{tabularx}
    \par\vskip-2.5mm\hrule
    \else
    \begin{tabularx}{\textwidth}{Xl}
    {\parbox[b]{\linewidth}{\chaptitlefont ##1}} & \raisebox{-15pt}{\chapnumfont \thechapter}
    \end{tabularx}
    \par\vskip2mm\hrule
    \fi
  }
}

\chapterstyle{jenor}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{pdfsync}    
\setlrmarginsandblock{5.5cm}{2.5cm}{*}  
\setulmarginsandblock{2.5cm}{3.0cm}{*}
\checkandfixthelayout 

\begin{document}


\setcounter{chapter}{9}

\chapter{diskussion}
Test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test test 
\end{document}

내가 무엇을 해야 하는지에 대한 해결책이나 제안이 있는 사람이 있나요? 그렇다면 감사하겠습니다!

답변1

이것은 단지 더 긴 설명일 뿐입니다. 이 MWE는 그림과 같이 표시되지 않으므로 이를 복사하여 추가하면 문제가 표시됩니다.

\documentclass[a4paper]{memoir}
\usepackage{xcolor}

\definecolor{numbercolor}{gray}{0.7}
\newif\ifchapternonum

\makechapterstyle{jenor}{
  \renewcommand\printchaptername{}
  \renewcommand\printchapternum{}
  \renewcommand\printchapternonum{\chapternonumtrue}
  \renewcommand\chaptitlefont{\fontfamily{pbk}\fontseries{db}\fontshape{n}\fontsize{25}{35}\selectfont\raggedleft}
  \renewcommand\chapnumfont{\fontfamily{pbk}\fontseries{m}\fontshape{n}\fontsize{1in}{0in}\selectfont\color{numbercolor}}
  \renewcommand\printchaptertitle[1]{%
    \noindent
    \ifchapternonum
    \begin{tabularx}{\textwidth}{X}
    {\let\\\newline\chaptitlefont ##1\par}
    \end{tabularx}
    \par\vskip-2.5mm\hrule
    \else
    \begin{tabularx}{\textwidth}{Xl}
    {\parbox[b]{\linewidth}{\chaptitlefont ##1}} & \raisebox{-15pt}{\chapnumfont \thechapter}
    \end{tabularx}
    \par\vskip2mm\hrule
    \fi
  }
}

\chapterstyle{jenor}

\begin{document}


\setcounter{chapter}{9}

\chapter{diskussion}

\end{document}

게시된 코드를 사용하는 이 이미지가 어떻게 작동하는지 확인하세요.~ 아니다원본 이미지처럼 마무리됩니다. 그래서 다른 일이 일어나고 있습니다.

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


이 디자인 어때요?

\documentclass[a4paper,11pt,twoside,openright]{memoir}

\usepackage{xcolor,kantlipsum}

\setlrmarginsandblock{5.5cm}{2.5cm}{*}  
\setulmarginsandblock{2.5cm}{3.0cm}{*}
\checkandfixthelayout 



\definecolor{numbercolor}{gray}{0.7}
\newif\ifchapternonum


\newlength\chapnumwidth

\makechapterstyle{jenor}{
  \renewcommand\printchaptername{}
  \renewcommand\printchapternum{}
  \renewcommand\printchapternonum{\chapternonumtrue}
  \renewcommand\chaptitlefont{\fontfamily{pbk}\fontseries{db}\fontshape{n}\fontsize{25}{35}\selectfont\raggedleft}
  \renewcommand\chapnumfont{\fontfamily{pbk}\fontseries{m}\fontshape{n}\fontsize{1in}{0in}\selectfont\color{numbercolor}}
  \settowidth\chapnumwidth{\chapnumfont 99}
  \renewcommand\printchaptertitle[1]{%
    \noindent
    % design only good for chapters in right hand pages
    \begin{adjustwidth}{0em}{-4em}
      \ifchapternonum
      % use this if the un-numbered placement should match 100%
      % \begin{tabularx}{\linewidth}{Xp{\chapnumwidth}}
      %   {\parbox[b]{\linewidth}{\chaptitlefont ##1}} &
      %   \raisebox{-15pt}{\phantom{\chapnumfont 99}}
      \begin{tabularx}{\textwidth}{@{}X@{}}
        {\parbox[b]{\linewidth}{\chaptitlefont ##1}}
        \\
        \addlinespace[0.5em]
        \cmidrule{1-1}
      \end{tabularx}
      \else
      \begin{tabularx}{\linewidth}{@{}Xp{\chapnumwidth}@{}}
        {\parbox[b]{\linewidth}{\chaptitlefont ##1}} &
        \raisebox{-15pt}{\chapnumfont \thechapter}
        \\
        \addlinespace[0.5em]
        \cmidrule{1-1}
      \end{tabularx}
      \fi
    \end{adjustwidth}
  }
}

\chapterstyle{jenor}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\begin{document}

\chapter*{diskussion}

\kant[3]

\setcounter{chapter}{8}

\chapter{diskussion}

\kant[3]


\setcounter{chapter}{9}

\chapter{diskussion}

\kant[3]


\end{document}

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

관련 정보