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

    效果图:

  • 相关阅读:
    过河问题 (Standard IO)
    单词分类 (Standard IO)
    C#综合揭秘——细说多线程(上)
    使用NPOI导入导出标准Excel
    C# 转义字符 ''反斜杠
    ref和out的区别
    抽象类接口的区别
    方法签名
    SQL Server的通用分页存储过程 未使用游标,速度更快!
    SQL Server存储过程Return、output参数及使用技巧
  • 原文地址:https://www.cnblogs.com/Eufisky/p/3801292.html
Copyright © 2011-2022 走看看