sou novo no LaTeX e tenho um problema. A imagem diz tudo... Quando meu número de capítulos ultrapassa 9, o segundo dígito sai da margem....
Copiei o seguinte layout, para os capítulos da web para o meu preâmbulo:
\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}
Alguém tem uma solução ou sugestão sobre o que devo fazer? Se sim, ficaria grato!
Responder1
Este é apenas um comentário mais longo. Este MWE não aparece como na imagem, então copie e adicione para mostrar o seu problema
\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}
Observe como esta imagem usando o código postado faznãoacabar como na imagem original. Então, algo mais está acontecendo.
Que tal esse desenho
\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}