博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
LaTeX技巧003:实现一个章标题
阅读量:4482 次
发布时间:2019-06-08

本文共 2234 字,大约阅读时间需要 7 分钟。

代码如下:

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                          \refstepcounter{chapter}%10                          %\typeout{\@chapapp \space \thechapter.}%11                          \addcontentsline{toc}{chapter}%12 %org                               {\protect\numberline{\thechapter}#1}%13                                    {\protect\numberline{\chaptername}#1}%  !!!14                        \else15                          \addcontentsline{toc}{chapter}{#1}%16                        \fi17                     \else18                       \addcontentsline{toc}{chapter}{#1}%19                     \fi20                     \chaptermark{#1}%21                     \addtocontents{lof}{\protect\addvspace{
10\p@}}%22 \addtocontents{lot}{\protect\addvspace{
10\p@}}%23 \if@twocolumn24 \@topnewpage[\@makechapterhead{\begin{tabular}{ll}25 \scalebox{
7}{\bf\color{blue}\thechapter} &26 \parbox[b]{6cm}{\CJKunderline{#2}}27 \end{tabular}}]%28 \else29 \@makechapterhead{\begin{tabular}{ll}30 \scalebox{
7}{\bf\color{blue}\thechapter} &31 \parbox[b]{6cm}{\CJKunderline{#2}}32 \end{tabular}}%33 \@afterheading34 \fi}35 \def\@makechapterhead#1{%36 \vspace*{
50\p@}%37 {\parindent \z@ \raggedright \normalfont38 \ifnum \c@secnumdepth >\m@ne39 \if@mainmatter40 %\huge\bfseries \@chapapp\space \thechapter41 \par\nobreak42 \vskip 20\p@43 \fi44 \fi45 \interlinepenalty\@M46 \Huge \bfseries #1\par\nobreak47 \vskip 40\p@48 }}49 \makeatother50 \begin{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. This53 is a test. This is a test. This is a test. This is a test. This is a54 test. This is a test. This is a test. This is a test.55 56 \end{document}
View Code

效果图:

 

转载于:https://www.cnblogs.com/Eufisky/p/3801292.html

你可能感兴趣的文章
在Winform开发框架中使用DevExpress的内置图标资源
查看>>
机器算法中的数据预处理
查看>>
selenium+python实现自动化登录
查看>>
从一列数中筛除尽可能少的数使得从左往右看,这些数是从小到大再从大到小的(网易)。...
查看>>
Python基础-文件操作
查看>>
Java ConcurrentModificationException异常原因和解决方法
查看>>
获取本机ip地址
查看>>
虚函数与纯虚函数的代码解读——2
查看>>
SQL Server 安装程序失败 不能在控件上调用 Invoke 或 BeginInvoke
查看>>
bzoj3283: 运算器
查看>>
jsp的标签
查看>>
HTML中的SVG
查看>>
HDU 5492 Find a path
查看>>
常用ping服务列表
查看>>
AspnetPager表格标题排序功能
查看>>
学习JNA,Jnative
查看>>
MyBatis框架中Mapper映射配置的使用及原理
查看>>
OpenLayers3基础教程——OL3基本概念
查看>>
password、文件MD5加密,passwordsha256、sha384、sha512Hex等加密
查看>>
蓝的成长记——追逐DBA(10):飞刀防身,熟络而非专长:摆弄中间件Websphere...
查看>>