chap20150323233434代码如下:

\documentclass[11pt, a4paper, oneside]{memoir}
\usepackage{color,calc,graphicx,soul,fourier}
\definecolor{wine}{rgb}{.5,0,0}
\makeatletter
\newlength\dlf@normtxtw
\setlength\dlf@normtxtw{\textwidth}
\def\myhelvetfont{\def\sfdefault{mdput}}
\newsavebox{\feline@chapter}
\newcommand\feline@chapter@marker[1][4cm]{%
\sbox\feline@chapter{%
\resizebox{!}{#1}{\fboxsep=1pt%
  \colorbox{wine}{\color{white}\bfseries\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]{%
\makebox[3.2cm][r]{\usebox\feline@chapter}%
}}
\makechapterstyle{daleif1}{
\renewcommand\chapnamefont{\normalfont\Large\scshape\raggedleft\so}
\renewcommand\chapternamenum{}
\renewcommand\printchaptername{}
\renewcommand\printchapternum{\null\hfill\feline@chm[2.5cm]\par}
\renewcommand\afterchapternum{\par\vskip\midchapskip}
\renewcommand\printchaptertitle[1]{\chaptitlefont ##1\par}
}
\makeatother
\chapterstyle{daleif1}

\usepackage{blindtext}

\newcommand\addtoc[1]{%
  \leavevmode\marginpar{%
    \parbox[t]{3.5cm}{\raggedright\footnotesize\sffamily%
    \vspace{-7pt}%
      \begin{enumerate}[leftmargin=.65cm, topsep=0pt, partopsep=0pt,
            label=\textcolor{blue}{\thechapter-\arabic*}, nosep]%
        #1
      \end{enumerate}%
    }%
  }%
}

\usepackage{enumitem}
\begin{document}
\chapter{First Chapter}
\addtoc{
\item Newton's Laws
\item Work, Energy, and the Conservation of Energy
\item Rotations and the Center of Mass
\item Elastic Media and Waves
\item Thermal Phenomena
\item The Atomic Structure of Matter
\item Electricity and Magnetism
\item Electromagnetic Waves and Light
}
\blindtext

\blindtext
\end{document}

选自:http://tex.stackexchange.com/questions/216102/how-to-put-section-numbers-and-titles-in-margin

点赞(1)

评论列表 共有 0 条评论

暂无评论
立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部