-
Notifications
You must be signed in to change notification settings - Fork 33
/
preamble.tex
85 lines (72 loc) · 1.91 KB
/
preamble.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
% vim: ts=4 sts=4 sw=4 et tw=75
% preamble here.
\documentclass[nofonts, oneside]{ctexbook}
\usepackage{geometry}
\usepackage{fontspec}
\usepackage{xeCJK}
\usepackage{amssymb}
\usepackage{hyperref}
% for number of footnote
\usepackage{pifont}
% 一页结束时, 脚注编号清零
\usepackage[perpage]{footmisc}
% verbatim and endverbatim
\usepackage{graphicx}
\usepackage{listings}
% 脚注编号带圈
\renewcommand\thefootnote{\ding{\numexpr171+\value{footnote}}}
% from package geometry
% 为边注加边框
\let\oldmarginpar=\marginpar
\renewcommand\marginpar[1]{%
\oldmarginpar{\framebox{#1}}%
}
\geometry{%
margin=1cm,
marginparsep = 0.5cm,
marginparwidth=1cm,
top = 2.5cm,
bottom = 2cm,
outer = 2.5cm,
inner = 2.5cm
}
% from package hyperref
\hypersetup{
bookmarksnumbered = true,
pdftitle = {Hacking Vim 7.2},
pdfcreator = {[email protected]},
pdfauthor = {Kim Schulz},
pdfsubject = {Vim},
pdfkeywords = {vim, text editing}
}
% from package fontspec and xeCJK
\setCJKmainfont{AR PL KaitiM GB}
\setCJKsansfont{WenQuanYi Zen Hei}
\setCJKmonofont[Scale=0.9]{WenQuanYi Zen Hei}
\setmainfont{Century Schoolbook L}
\setsansfont{FreeSans}
% "Mapping={}" make quote symbol straight
\setmonofont[Mapping={}]{Courier 10 Pitch}
\newcommand\vi{\texttt{vi}}
\newcommand\vim{\texttt{vim}}
\newenvironment{warning}%
{\begin{quotation}}
{\end{quotation}}
\newenvironment{tips}%
{\begin{quotation}}
{\end{quotation}}
\newcommand\file[1]{\texttt{#1}}
\newcommand\newterm[1]{\textbf{#1}}
\newcommand\email[1]{\href{mailto:#1}{#1}}
\newcommand\key[1]{\textit{#1}}
\newenvironment{vimcmdform}
{\list{}{\leftmargin=2em\rightmargin=0em}\item[]}
{\endlist}
\lstnewenvironment{vimcode}
{\lstset{basicstyle=\ttfamily,
xleftmargin=2em,
breaklines=true,
tabsize=4}}
{}
\title{深入 Vim 7.2}
\author{Kim Schulz \and \url{https://github.com/wuzhouhui/hacking_vim} }