从右向左移动文本的问题

从右向左移动文本的问题

我有一个乳胶模板,我需要按照图中说明从右向左更改章节方块编号和章节名称 + 我需要一个乳胶命令在页面左上角添加徽标

在此处输入图片描述

答案1

尝试此代码(第一个问题)。

A

\documentclass[12pt,a4paper]{memoir}

\usepackage{xcolor,calc,graphicx,soul,fourier}

\usepackage{showframe}% only to show the margins  <<<<<<

\makeatletter
\newlength\dlf@normtxtw
\setlength\dlf@normtxtw{\textwidth} 
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
    \sbox\feline@chapter{%
        \resizebox{!}{#1}{\fboxsep=1pt%
            \colorbox{black}{\color{white}\sffamily\thechapter}%
    }}%
    \rotatebox{90}{%
        \resizebox{%
            \heightof{\usebox{\feline@chapter}}+\depthof{\usebox{\feline@chapter}}}%
        {!}{\scshape\so\@chapapp}}\quad%
    \raisebox{\depthof{\usebox{\feline@chapter}}}{\usebox{\feline@chapter}}%
}
\newcommand\feline@chm[1][4cm]{%
    \sbox\feline@chapter{\feline@chapter@marker[#1]}%
    \makebox[0pt][l]{% aka \rlap
        \makebox[1cm][l]{\usebox\feline@chapter}% changed <<<<
}}
\makechapterstyle{daleifmodif}{%
    \renewcommand\chapnamefont{\normalfont\Large\scshape\raggedleft\so}
    \renewcommand\chaptitlefont{\normalfont\Large\bfseries\scshape\color{black}}
    \renewcommand\chapternamenum{}
    \renewcommand\printchaptername{}
    \renewcommand\printchapternum{\feline@chm[2.5cm]\hfill\par} % changed <<<<
    \renewcommand\afterchapternum{\par\vskip\midchapskip}
    \renewcommand\printchaptertitle[1]{\chaptitlefont\raggedright ##1\par}% changed <<<<
}
\makeatother
\chapterstyle{daleifmodif}
\begin{document}
    
\setcounter{chapter}{3}
\chapter{Materials and Methods}         
    
\end{document}

相关内容