zoukankan      html  css  js  c++  java
  • LaTeX技巧003:实现一个章标题

    代码如下:

     1 documentclass[11pt]{book}
     2 usepackage{graphicx}
     3 usepackage{CJKfntef}
     4 usepackage{color}
     5 makeatletter
     6 def@chapter[#1]#2{%
     7                     ifnum c@secnumdepth >m@ne
     8                        if@mainmatter
     9                          
    efstepcounter{chapter}%
    10                          %	ypeout{@chapapp space 	hechapter.}%
    11                          addcontentsline{toc}{chapter}%
    12 %org                               {protect
    umberline{	hechapter}#1}%
    13                                    {protect
    umberline{chaptername}#1}%  !!!
    14                        else
    15                          addcontentsline{toc}{chapter}{#1}%
    16                        fi
    17                     else
    18                       addcontentsline{toc}{chapter}{#1}%
    19                     fi
    20                     chaptermark{#1}%
    21                     addtocontents{lof}{protectaddvspace{10p@}}%
    22                     addtocontents{lot}{protectaddvspace{10p@}}%
    23                     if@twocolumn
    24                       @topnewpage[@makechapterhead{egin{tabular}{ll}
    25   scalebox{7}{fcolor{blue}	hechapter} &
    26   parbox[b]{6cm}{CJKunderline{#2}}
    27 end{tabular}}]%
    28                     else
    29                       @makechapterhead{egin{tabular}{ll}
    30   scalebox{7}{fcolor{blue}	hechapter} &
    31   parbox[b]{6cm}{CJKunderline{#2}}
    32 end{tabular}}%
    33                       @afterheading
    34                     fi}
    35 def@makechapterhead#1{%
    36   vspace*{50p@}%
    37   {parindent z@ 
    aggedright 
    ormalfont
    38     ifnum c@secnumdepth >m@ne
    39       if@mainmatter
    40         %hugefseries @chapappspace 	hechapter
    41         par
    obreak
    42         vskip 20p@
    43       fi
    44     fi
    45     interlinepenalty@M
    46     Huge fseries #1par
    obreak
    47     vskip 40p@
    48   }}
    49 makeatother
    50 egin{document}
    51 chapter{The last gene-ral update of packages and programs}
    52 This is a test. This is a test. This is a test. This is a test. This
    53 is a test. This is a test. This is a test. This is a test. This is a
    54 test. This is a test. This is a test. This is a test.
    55 
    56 end{document}
    View Code

    效果图:

  • 相关阅读:
    基于Tire树和最大概率法的中文分词功能的Java实现
    通过 Spring RestTemplate 调用带请求体的 Delete 方法(Delete With Request Body)
    《高效能程序员的修炼》之译者序(本书将于7月初上市,人民邮电出版社)
    JVM类加载过程学习总结
    Web安全之Cookie劫持
    2016第40周五
    年轻By塞缪尔·厄尔曼
    2016第40周三
    2016第40周二
    果断歌
  • 原文地址:https://www.cnblogs.com/Eufisky/p/3801292.html
Copyright © 2011-2022 走看看