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

    效果图:

  • 相关阅读:
    python3数据库配置,远程连接mysql服务器
    Ubuntu 16.04安装JDK
    用Python从零开始创建区块链
    理解奇异值分解SVD和潜在语义索引LSI(Latent Semantic Indexing)
    gensim介绍(翻译)
    记一次浅拷贝的错误
    Heap queue algorithm
    Python
    python列表中插入字符串使用+号
    Linux(Ubuntu)使用 sudo apt-get install 命令安装软件的目录在哪?
  • 原文地址:https://www.cnblogs.com/Eufisky/p/3801292.html
Copyright © 2011-2022 走看看