风雨过后,是彩虹~
呵呵,终于可以休息了!
改天把其中的一些心得写一下

lyx 是否与 tex 的本意违背了呢~sunzhaoyu2000 写了:看楼主这么辛苦,基本上是没有使用lyx而是采用vim + latex 之类的
建议尝试下lyx写latex
我只用了半天就爽了
完全放弃了vim latexsuit:)
《latex 入门与提高》 第二版 高教出版ldlywlx 写了:希望有较全面的资料,我也想学习。
代码: 全选
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% CJK环境定义
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{CJK}
\usepackage{indentfirst}
\usepackage[top=1in,bottom=0.8in,left=1.2in,right=0.8in]{geometry}
%\usepackage{CJKpunct}
\usepackage[bf,small,indentafter,pagestyles]{titlesec}
\usepackage{CJKnumb}
% 使本格式文件中的中文得以正确显示,特别是 \newcommmand 里面的中文
\begin{CJK*}{GBK}{song}
\end{CJK*}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 重定义字体名和字号命令
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\song}{\CJKfamily{song}}
\newcommand{\hei}{\CJKfamily{hei}}
\newcommand{\kai}{\CJKfamily{kai}}
\newcommand{\fs}{\CJKfamily{fs}}
\newcommand{\liti}{\CJKfamily{li}}
\newcommand{\you}{\CJKfamily{you}}
% WORD 中的字号对应该关系如下:
% 初号 = 42bp = 14.82mm = 42.1575pt
% 小初 = 36bp = 12.70mm = 36.135 pt
% 一号 = 26bp = 9.17mm = 26.0975pt
% 小一 = 24bp = 8.47mm = 24.09pt
% 二号 = 22bp = 7.76mm = 22.0825pt
% 小二 = 18bp = 6.35mm = 18.0675pt
% 三号 = 16bp = 5.64mm = 16.06pt
% 小三 = 15bp = 5.29mm = 15.05625pt
% 四号 = 14bp = 4.94mm = 14.0525pt
% 小四 = 12bp = 4.23mm = 12.045pt
% 五号 = 10.5bp = 3.70mm = 10.59375pt
% 小五 = 9bp = 3.18mm = 9.03375pt
% 六号 = 7.5bp = 2.56mm
% 小六 = 6.5bp = 2.29mm
% 七号 = 5.5bp = 1.94mm
% 八号 = 5bp = 1.76mm
%
% 1bp = 72.27/72 pt
\newcommand{\xiaochu}{\fontsize{30pt}{40pt}\selectfont} % 小初, 1.5倍行距
\newcommand{\yihao}{\fontsize{26pt}{36pt}\selectfont} % 一号, 1.4倍行距
\newcommand{\erhao}{\fontsize{22pt}{28pt}\selectfont} % 二号, 1.25倍行距
\newcommand{\xiaoer}{\fontsize{18pt}{18pt}\selectfont} % 小二, 单倍行距
\newcommand{\sanhao}{\fontsize{16pt}{24pt}\selectfont} % 三号, 1.5倍行距
\newcommand{\xiaosan}{\fontsize{15pt}{22pt}\selectfont} % 小三, 1.5倍行距
\newcommand{\sihao}{\fontsize{14pt}{21pt}\selectfont} % 四号, 1.5倍行距
\newcommand{\banxiaosi}{\fontsize{13pt}{19.5pt}\selectfont} % 半小四, 1.5倍行距
\newcommand{\xiaosi}{\fontsize{12pt}{18pt}\selectfont} % 小四, 1.5倍行距
\newcommand{\dawuhao}{\fontsize{11pt}{11pt}\selectfont} % 大五号, 单倍行距
\newcommand{\wuhao}{\fontsize{10.5pt}{10.5pt}\selectfont} % 五号, 单倍行距
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 数学环境定义
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{amsmath,amssymb}
\usepackage[amsmath,thmmarks]{ntheorem}
\usepackage{latexsym,bm}
% 英文和数学使用Times字体
\usepackage[T1]{fontenc}
\usepackage{mathptmx}
% 定理环境
% 标题使用黑体,正文使用直立楷体
\theoremstyle{plain}
%\theoremheaderfont{\CJKfamily{hei}}
%\theorembodyfont{\unshape\CJKfamily{kai}}
\theoremheaderfont{\normalfont\rmfamily\CJKfamily{hei}}
\theorembodyfont{\normalfont\rm\small\CJKfamily{kai}}
\theoremindent0em
\theoremseparator{\hspace{1em}} \theoremnumbering{arabic}
\theoremsymbol{}
\newtheorem{dingyi}{定义}[chapter]
\newtheorem{gongli}{公理}[chapter]
\newtheorem{dingli}{定理}[chapter]
\newtheorem{mingti}{命题}[chapter]
\newtheorem{yinli}{引理}[chapter]
\newtheorem{tuilun}{推论}[chapter]
\newtheorem{jiashe}{假设}[chapter]
\newtheorem{caixiang}{猜想}[chapter]
\newtheorem{wenti}{问题}[chapter]
\newtheorem{lianxi}{练习}[chapter]
\newtheorem{lizi}{例}[chapter]
\newtheorem{zhushi}{注释}[chapter]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 代码和伪代码支持
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{verbatim}
\usepackage{clrscode}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 图形支持
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{graphicx,xcolor}
%\renewcommand\thefigure{\arabic{chapter}.\arabic{figure}}
% 定义图像相关设置
\setlength{\floatsep}{10pt plus 3pt minus 2pt} %图形之间或图形与正文之间的距离
\setlength{\abovecaptionskip}{2pt plus1pt minus1pt} %图形中的图与标题之间的距离
\setlength{\belowcaptionskip}{3pt plus1pt minus2pt} %表格中的表与标题之间的距离
\graphicspath{{figures/}}
\renewcommand\figurename{\wuhao 图}
\renewcommand\tablename{\wuhao 表}
\renewcommand\listfigurename{插图目录}
\renewcommand\listtablename{表格目录}
\renewcommand\thefigure{\arabic{chapter}-\arabic{figure}}
%\renewcommand\captionlabeldelim{~} %图表标题后面去掉":"号
% 无需使用caption2宏包去除表格和图形标题中缺省的冒号
\makeatletter
\long\def\@makecaption#1#2{%
\vskip\abovecaptionskip
\sbox\@tempboxa{#1\quad #2}%
\ifdim \wd\@tempboxa >\hsize
#1\quad #2\par
\else
\global \@minipagefalse
\hb@xt@\hsize{\hfil\box\@tempboxa\hfil}%
\fi
\vskip\belowcaptionskip}
\makeatother
%\DeclareGraphicsRule{.png}{eps}{.png.bb}{`convert #1 'eps:-' }
%\DeclareGraphicsRule{.jpg}{eps}{.jpg.bb}{`convert #1 'eps:-' }
%\DeclareGraphicsRule{.gif}{eps}{.gif.bb}{`convert #1 'eps:-' }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 重定义页面版式
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\titleformat{\chapter}[hang]{\centering\erhao\hei}{\chaptername}{1em}{}
\titleformat{\section}[hang]{\sanhao\hei}{\thesection}{1em}{}
\titleformat{\subsection}[hang]{\sihao\hei}{\thesubsection}{1em}{}
\titleformat{\subsubsection}[hang]{\xiaosi\hei}{\thesubsubsection}{1em}{}
\renewcommand{\chaptername}{第\CJKnumber{\thechapter}章}
\titlespacing{\chapter}{0pt}{*0}{*4}
\newpagestyle{main}{
\sethead[][\song\wuhao\chaptername\quad\chaptertitle][]{}{\song\wuhao XXXXXX}{}
\setfoot{}{\thepage}{}\headrule
}
\newpagestyle{special}{
\sethead[][\song\wuhao\chaptertitle][]{}{\song\wuhao XXXXXX}{}
\setfoot{}{\thepage}{}\headrule
}
\renewpagestyle{plain}{
\sethead[][][]{}{}{}
\setfoot[][\thepage][]{}{\thepage}{}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 重定义目录和参考文献
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\renewcommand{\contentsname}{目\quad 录}
\renewcommand{\bibname}{参考文献}
%将文献引用作为上标出现,增加括号
\makeatletter
\def\@cite#1#2{\textsuperscript{[{#1\if@tempswa , #2\fi}]}}
\makeatother
% 1.5倍行距
\renewcommand{\baselinestretch}{1.24}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 常用环境定义
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{enumitem}
% 术语表环境
\newenvironment{myglossary}[1][2.5cm]{
\noindent\begin{list}{}%
{\vskip-30bp\xiaosi
\renewcommand\makelabel[1]{##1\hfil}
\setlength{\labelwidth}{#1} % 标签盒子宽度
\setlength{\labelsep}{1em} % 标签与列表文本距离
\setlength{\itemindent}{0em} % 标签缩进量
\setlength{\leftmargin}{8em} % 左边界
\setlength{\rightmargin}{0em}
\setlength{\parsep}{0em} % 段落间距
\setlength{\itemsep}{0em} % 标签间距
\setlength{\listparindent}{0em} % 段落缩进量
\setlength{\topsep}{0em} % 标签与上文的间距
}}{\end{list}}