├── .gitignore ├── Chapters ├── 00.tex ├── 01.tex ├── 010.tex ├── 02.tex ├── 03.tex ├── 04.tex ├── 05.tex ├── 06.tex └── 07.tex ├── Fonts ├── SourceHanSansSC-Regular.otf ├── SourceHanSerifSC-Bold.otf └── SourceHanSerifSC-Regular.otf ├── Images ├── Backmatter.jpg ├── Frontmatter.jpg └── Title.png ├── Layouts ├── Preamble_A4.tex └── Preamble_Kindle.tex ├── README.md ├── 明朝那些事儿 · 当年明月 (A4).pdf ├── 明朝那些事儿 · 当年明月 (A4).tex ├── 明朝那些事儿 · 当年明月 (Kindle).pdf └── 明朝那些事儿 · 当年明月 (Kindle).tex /.gitignore: -------------------------------------------------------------------------------- 1 | ## Core latex/pdflatex auxiliary files: 2 | *.aux 3 | *.lof 4 | *.log 5 | *.lot 6 | *.fls 7 | *.out 8 | *.toc 9 | *.fmt 10 | *.fot 11 | *.cb 12 | *.cb2 13 | 14 | ## Intermediate documents: 15 | *.dvi 16 | *-converted-to.* 17 | # these rules might exclude image files for figures etc. 18 | # *.ps 19 | # *.eps 20 | # *.pdf 21 | 22 | ## Generated if empty string is given at "Please type another file name for output:" 23 | .pdf 24 | 25 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 26 | *.bbl 27 | *.bcf 28 | *.blg 29 | *-blx.aux 30 | *-blx.bib 31 | *.run.xml 32 | 33 | ## Build tool auxiliary files: 34 | *.fdb_latexmk 35 | *.synctex 36 | *.synctex(busy) 37 | *.synctex.gz 38 | *.synctex.gz(busy) 39 | *.pdfsync 40 | 41 | ## Auxiliary and intermediate files from other packages: 42 | # algorithms 43 | *.alg 44 | *.loa 45 | 46 | # achemso 47 | acs-*.bib 48 | 49 | # amsthm 50 | *.thm 51 | 52 | # beamer 53 | *.nav 54 | *.pre 55 | *.snm 56 | *.vrb 57 | 58 | # changes 59 | *.soc 60 | 61 | # cprotect 62 | *.cpt 63 | 64 | # elsarticle (documentclass of Elsevier journals) 65 | *.spl 66 | 67 | # endnotes 68 | *.ent 69 | 70 | # fixme 71 | *.lox 72 | 73 | # feynmf/feynmp 74 | *.mf 75 | *.mp 76 | *.t[1-9] 77 | *.t[1-9][0-9] 78 | *.tfm 79 | 80 | #(r)(e)ledmac/(r)(e)ledpar 81 | *.end 82 | *.?end 83 | *.[1-9] 84 | *.[1-9][0-9] 85 | *.[1-9][0-9][0-9] 86 | *.[1-9]R 87 | *.[1-9][0-9]R 88 | *.[1-9][0-9][0-9]R 89 | *.eledsec[1-9] 90 | *.eledsec[1-9]R 91 | *.eledsec[1-9][0-9] 92 | *.eledsec[1-9][0-9]R 93 | *.eledsec[1-9][0-9][0-9] 94 | *.eledsec[1-9][0-9][0-9]R 95 | 96 | # glossaries 97 | *.acn 98 | *.acr 99 | *.glg 100 | *.glo 101 | *.gls 102 | *.glsdefs 103 | 104 | # gnuplottex 105 | *-gnuplottex-* 106 | 107 | # gregoriotex 108 | *.gaux 109 | *.gtex 110 | 111 | # hyperref 112 | *.brf 113 | 114 | # knitr 115 | *-concordance.tex 116 | # TODO Comment the next line if you want to keep your tikz graphics files 117 | *.tikz 118 | *-tikzDictionary 119 | 120 | # listings 121 | *.lol 122 | 123 | # makeidx 124 | *.idx 125 | *.ilg 126 | *.ind 127 | *.ist 128 | 129 | # minitoc 130 | *.maf 131 | *.mlf 132 | *.mlt 133 | *.mtc[0-9]* 134 | *.slf[0-9]* 135 | *.slt[0-9]* 136 | *.stc[0-9]* 137 | 138 | # minted 139 | _minted* 140 | *.pyg 141 | 142 | # morewrites 143 | *.mw 144 | 145 | # nomencl 146 | *.nlo 147 | 148 | # pax 149 | *.pax 150 | 151 | # pdfpcnotes 152 | *.pdfpc 153 | 154 | # sagetex 155 | *.sagetex.sage 156 | *.sagetex.py 157 | *.sagetex.scmd 158 | 159 | # scrwfile 160 | *.wrt 161 | 162 | # sympy 163 | *.sout 164 | *.sympy 165 | sympy-plots-for-*.tex/ 166 | 167 | # pdfcomment 168 | *.upa 169 | *.upb 170 | 171 | # pythontex 172 | *.pytxcode 173 | pythontex-files-*/ 174 | 175 | # thmtools 176 | *.loe 177 | 178 | # TikZ & PGF 179 | *.dpth 180 | *.md5 181 | *.auxlock 182 | 183 | # todonotes 184 | *.tdo 185 | 186 | # easy-todo 187 | *.lod 188 | 189 | # xindy 190 | *.xdy 191 | 192 | # xypic precompiled matrices 193 | *.xyc 194 | 195 | # endfloat 196 | *.ttt 197 | *.fff 198 | 199 | # Latexian 200 | TSWLatexianTemp* 201 | 202 | ## Editors: 203 | # WinEdt 204 | *.bak 205 | *.sav 206 | 207 | # Texpad 208 | .texpadtmp 209 | 210 | # Kile 211 | *.backup 212 | 213 | # KBibTeX 214 | *~[0-9]* 215 | 216 | # auto folder when using emacs and auctex 217 | /auto/* 218 | 219 | # expex forward references with \gathertags 220 | *-tags.tex 221 | -------------------------------------------------------------------------------- /Chapters/00.tex: -------------------------------------------------------------------------------- 1 | \fancyhead[LO]{{\scriptsize \faBookmark\ 明朝那些事儿 \faAngleRight\ \textbf{\rightmark}}}%奇數頁眉的左邊 2 | \fancyhead[RO]{{\tiny{\textcolor{Gray}{\faQuoteRight\ }}}\thepage} 3 | \fancyhead[LE]{{\tiny{\textcolor{Gray}{\faQuoteRight\ }}}\thepage} 4 | \fancyhead[RE]{{\scriptsize \faBookmark\ 明朝那些事儿 \faAngleRight\ \textbf{\rightmark}}}%偶數頁眉的右邊 5 | \fancyfoot[LE,RO]{} 6 | \fancyfoot[LO,CE]{} 7 | \fancyfoot[CO,RE]{} 8 | \chapter*{前言} 9 | \addcontentsline{toc}{chapter}{前言} 10 | %\vspace{5mm} 11 | \ifnum\theparacolNo=2 12 | \begin{multicols}{\theparacolNo} 13 | \fi 14 | 好了,今天晚上开始工作吧! 15 | 16 | 说起来,我也写了不少东西了,主要是心理和历史方面的,偶尔也写点经济,本来只是娱乐下自己,没有想到发表后居然还有人捧场,于是便轻飘飘起来,客观来说,我的写作态度很不认真,每次都是想到哪里写到哪里,有些历史史料记录也凑合着用,记得多少写多少,直到有一天,终于因为我这不严谨的写作态度与人发生了矛盾。 17 | 18 | 也是这件事,让我反思了自己的行为和态度,明白了自己其实还差得远。所以我希望能重新开始,下面的这篇文章我构思了六个月左右,主要讲述的是从1344年到1644年这三百年间关于明的一些事情,以史料为基础,以年代和具体人物为主线,并加入了小说的笔法和对人物的心理分析,以及对当时政治经济制度的一些评价。 19 | 20 | 我写文章有个习惯,由于早年读了太多学究书,所以很痛恨那些故作高深的文章,其实历史本身很精彩,所有的历史都可以写得很好看,我希望自己也能做到。望大家能给予评价。 21 | 22 | 其实我也不知道自己写的算什么,不是小说,不是史书,就姑且叫《明札记》吧,从我们的第一位主人公写起,要写三百多年,希望我能写完。 23 | 24 | \begin{flushright} 25 | 2006-3-10 26 | 首记于天涯煮酒 27 | \end{flushright} 28 | \ifnum\theparacolNo=2 29 | \end{multicols} 30 | \fi 31 | -------------------------------------------------------------------------------- /Chapters/010.tex: -------------------------------------------------------------------------------- 1 | \fancyhf{} % 清空當前設置 2 | \phantom {placeholder} 3 | \XeTeXinputencoding "byte" 4 | \ifnum\theparacolNo=1 5 | \begin{flushright} 6 | \vspace{70mm} 7 | \qrcode[height=15mm]{https://m-mono.github.io} 8 | \end{flushright} 9 | \fi 10 | \ifnum\theparacolNo=2 11 | \begin{flushright} 12 | \vspace{170mm} 13 | \qrcode[height=30mm]{https://m-mono.github.io} 14 | \end{flushright} 15 | \fi -------------------------------------------------------------------------------- /Fonts/SourceHanSansSC-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Mono/Stories-about-Ming-Dynasty/8854ce535fa214d06b005d587ba49fc3133e5d68/Fonts/SourceHanSansSC-Regular.otf -------------------------------------------------------------------------------- /Fonts/SourceHanSerifSC-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Mono/Stories-about-Ming-Dynasty/8854ce535fa214d06b005d587ba49fc3133e5d68/Fonts/SourceHanSerifSC-Bold.otf -------------------------------------------------------------------------------- /Fonts/SourceHanSerifSC-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Mono/Stories-about-Ming-Dynasty/8854ce535fa214d06b005d587ba49fc3133e5d68/Fonts/SourceHanSerifSC-Regular.otf -------------------------------------------------------------------------------- /Images/Backmatter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Mono/Stories-about-Ming-Dynasty/8854ce535fa214d06b005d587ba49fc3133e5d68/Images/Backmatter.jpg -------------------------------------------------------------------------------- /Images/Frontmatter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Mono/Stories-about-Ming-Dynasty/8854ce535fa214d06b005d587ba49fc3133e5d68/Images/Frontmatter.jpg -------------------------------------------------------------------------------- /Images/Title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Mono/Stories-about-Ming-Dynasty/8854ce535fa214d06b005d587ba49fc3133e5d68/Images/Title.png -------------------------------------------------------------------------------- /Layouts/Preamble_A4.tex: -------------------------------------------------------------------------------- 1 | \documentclass[oneside,open=right,headings=optiontohead]{book} 2 | \renewcommand{\baselinestretch}{1.0} %行間距倍率 3 | \columnsep 7mm 4 | \usepackage{setspace} 5 | 6 | \usepackage[ 7 | a4paper=true, 8 | unicode=true, 9 | bookmarksnumbered, 10 | bookmarksopen, 11 | hyperfigures=true, 12 | hyperindex=true, 13 | pdfpagelayout = SinglePage, 14 | pdfpagelabels = true, 15 | pdfstartview = Fit, 16 | colorlinks, 17 | pdfborder=001, 18 | linkcolor=black, 19 | anchorcolor=black, 20 | citecolor=black, 21 | pdftitle={明朝那些事儿}, 22 | pdfauthor={当年明月}, 23 | pdfsubject={明朝那些事儿(全七卷)}, 24 | pdfkeywords={本书主要讲述的是从1344年到1644年这三百年间关于明朝的一些事情,以史料为基础,以年代和具体人物为主线,并加入了小说的笔法,对明朝十七帝和其他王公权贵和小人物的命运进行全景展示,尤其对官场政治、战争、帝王心术着墨最多,并加入对当时政治经济制度、人伦道德的演义。}, 25 | pdfcreator={https://m-mono.github.io} 26 | ]{hyperref} 27 | 28 | \hypersetup{pdfduplex=DuplexFlipLongEdge}% Set print default as duplex 29 | \usepackage{parskip}% replace \\ at end of line to avoid underfull \hbox error 30 | 31 | \usepackage{graphics,graphicx,pdfpages} 32 | \usepackage{caption} %用于取消标题编号 \caption*{abc} 33 | 34 | %自动加注拼音 35 | \usepackage{xpinyin} 36 | \xpinyinsetup{format={\color{PinYinColor}}} 37 | %手动加注外语及日语振假名 38 | \usepackage{ruby} 39 | \renewcommand\rubysize{0.4} %匹配 xpinyin 默认标注字体大小 40 | \renewcommand\rubysep{-0.3em} %匹配 xpinyin 默认标注高度 41 | 42 | \usepackage{xeCJK} 43 | \usepackage{indentfirst} 44 | \setlength{\parindent}{2.0em} 45 | 46 | %正文字体 47 | \usepackage{fontspec} 48 | \defaultfontfeatures{Extension = .otf}% adds .otf to end of path when font loaded without ext parameter e.g. 49 | \setCJKmainfont[Path=Fonts/, 50 | BoldFont={SourceHanSerifSC-Bold.otf}, 51 | ItalicFont={SourceHanSerifSC-Regular.otf}, 52 | BoldItalicFont={SourceHanSerifSC-Bold.otf}, 53 | SlantedFont={SourceHanSerifSC-Regular.otf}, 54 | BoldSlantedFont={SourceHanSerifSC-Bold.otf}, 55 | SmallCapsFont={SourceHanSerifSC-Regular.otf} 56 | ]{SourceHanSerifSC-Regular.otf} 57 | \setCJKsansfont[Path=Fonts/]{SourceHanSansSC-Regular.otf} 58 | \setCJKmonofont[Path=Fonts/]{SourceHanSansSC-Regular.otf} 59 | \setmainfont[Path=Fonts/]{SourceHanSerifSC-Regular.otf} 60 | \setsansfont[Path=Fonts/]{SourceHanSansSC-Regular.otf} 61 | \setmonofont[Path=Fonts/]{SourceHanSansSC-Regular.otf} 62 | % Icon 字体 63 | \usepackage{fontawesome5} 64 | 65 | % 頁面及文字顏色 66 | \usepackage{xcolor} 67 | \definecolor{TEXTColor}{RGB}{50,50,50} % TEXT Color 68 | \definecolor{PinYinColor}{RGB}{180,180,180} % TEXT Color 69 | \definecolor{NOTEXTColor}{RGB}{0,0,0} % No TEXT Color 70 | \definecolor{BGColor}{RGB}{240,240,240} % BG Color 71 | \definecolor{Gray}{RGB}{246,246,246} 72 | 73 | \usepackage{qrcode} 74 | \usepackage{multicol} 75 | 76 | \makeindex 77 | \renewcommand{\contentsname}{{明朝那些事儿}} 78 | \usepackage{fancyhdr} % 設置頁眉頁腳 79 | \pagestyle{fancy} 80 | %\addtolength{\headwidth}{\marginparsep} 81 | \addtolength{\headwidth}{\marginparwidth} 82 | \fancyhf{} % 清空當前設置 83 | \renewcommand{\headrulewidth}{0pt} %頁眉線寬,設為0可以去頁眉線 84 | \renewcommand{\footrulewidth}{0pt} %頁眉線寬,設為0可以去頁眉線 85 | -------------------------------------------------------------------------------- /Layouts/Preamble_Kindle.tex: -------------------------------------------------------------------------------- 1 | \documentclass[oneside,open=right,headings=optiontohead]{book} 2 | \renewcommand{\baselinestretch}{1.0} %行間距倍率 3 | \columnsep 7mm 4 | %\renewcommand\thepage{} 5 | \usepackage{setspace} 6 | 7 | 8 | \usepackage[ 9 | unicode=true, 10 | bookmarksnumbered, 11 | bookmarksopen, 12 | hyperfigures=true, 13 | hyperindex=true, 14 | pdfpagelayout = SinglePage, 15 | pdfpagelabels = true, 16 | pdfstartview = Fit, 17 | colorlinks, 18 | pdfborder=001, 19 | linkcolor=black, 20 | anchorcolor=black, 21 | citecolor=black, 22 | pdftitle={明朝那些事儿}, 23 | pdfauthor={当年明月}, 24 | pdfsubject={明朝那些事儿(全七卷)}, 25 | pdfkeywords={本书主要讲述的是从1344年到1644年这三百年间关于明朝的一些事情,以史料为基础,以年代和具体人物为主线,并加入了小说的笔法,对明朝十七帝和其他王公权贵和小人物的命运进行全景展示,尤其对官场政治、战争、帝王心术着墨最多,并加入对当时政治经济制度、人伦道德的演义。}, 26 | pdfcreator={https://m-mono.github.io} 27 | ]{hyperref} 28 | 29 | 30 | \hypersetup{pdfduplex=DuplexFlipLongEdge}% Set print default as duplex 31 | \usepackage{parskip}% replace \\ at end of line to avoid underfull \hbox error 32 | 33 | \usepackage{graphics,graphicx,pdfpages} 34 | \usepackage{caption} %用于取消标题编号 \caption*{abc} 35 | 36 | %自动加注拼音 37 | \usepackage{xpinyin} 38 | \xpinyinsetup{format={\color{PinYinColor}}} 39 | %手动加注外语及日语振假名 40 | \usepackage{ruby} 41 | \renewcommand\rubysize{0.4} %匹配 xpinyin 默认标注字体大小 42 | \renewcommand\rubysep{-0.3em} %匹配 xpinyin 默认标注高度 43 | 44 | \usepackage{xeCJK} 45 | \usepackage{indentfirst} 46 | \setlength{\parindent}{2.0em} 47 | 48 | %正文字体 49 | \usepackage{fontspec} 50 | \defaultfontfeatures{Extension = .otf}% adds .otf to end of path when font loaded without ext parameter e.g. 51 | \setCJKmainfont[Path=Fonts/, 52 | BoldFont={SourceHanSerifSC-Bold.otf}, 53 | ItalicFont={SourceHanSerifSC-Regular.otf}, 54 | BoldItalicFont={SourceHanSerifSC-Bold.otf}, 55 | SlantedFont={SourceHanSerifSC-Regular.otf}, 56 | BoldSlantedFont={SourceHanSerifSC-Bold.otf}, 57 | SmallCapsFont={SourceHanSerifSC-Regular.otf} 58 | ]{SourceHanSerifSC-Regular.otf} 59 | \setCJKsansfont[Path=Fonts/]{SourceHanSansSC-Regular.otf} 60 | \setCJKmonofont[Path=Fonts/]{SourceHanSansSC-Regular.otf} 61 | \setmainfont[Path=Fonts/]{SourceHanSerifSC-Regular.otf} 62 | \setsansfont[Path=Fonts/]{SourceHanSansSC-Regular.otf} 63 | \setmonofont[Path=Fonts/]{SourceHanSansSC-Regular.otf} 64 | % Icon 字体 65 | \usepackage{fontawesome5} 66 | 67 | % 頁面及文字顏色 68 | \usepackage{xcolor} 69 | \definecolor{TEXTColor}{RGB}{50,50,50} % TEXT Color 70 | \definecolor{PinYinColor}{RGB}{180,180,180} % TEXT Color 71 | \definecolor{NOTEXTColor}{RGB}{0,0,0} % No TEXT Color 72 | \definecolor{BGColor}{RGB}{240,240,240} % BG Color 73 | \definecolor{Gray}{RGB}{246,246,246} 74 | 75 | \usepackage{qrcode} 76 | \usepackage{multicol} 77 | 78 | \makeindex 79 | \renewcommand{\contentsname}{{明朝那些事儿}} 80 | \usepackage{fancyhdr} % 設置頁眉頁腳 81 | \pagestyle{fancy} 82 | \addtolength{\headwidth}{\marginparsep} 83 | \addtolength{\headwidth}{\marginparwidth} 84 | \fancyhf{} % 清空當前設置 85 | \renewcommand{\headrulewidth}{0pt} %頁眉線寬,設為0可以去頁眉線 86 | \renewcommand{\footrulewidth}{0pt} %頁眉線寬,設為0可以去頁眉線 87 | 88 | \usepackage{tikz} %加水印用 89 | \usepackage{eso-pic} %加水印用 90 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 《明朝那些事儿》· 当年明月著 2 | 3 | 《明朝那些事儿》是一套在网络上连载的关于中国明朝历史小说,作者为当年明月。于2006年3月10日在天涯社区首次发表,其内容始于明太祖朱元璋的诞生,终于崇祯帝朱由检。《明朝那些事儿》在网络连载期间,每月点击率逾百万人次。截至2008年3月,当年明月发表至万历朝的国本之争,4月发表至李成梁经略辽东与努尔哈赤的崛起,7月写魏忠贤事。2008年底发表至崇祯初年,袁崇焕伏诛事。2009年1月初发表卢象昇、孙传庭等人剿寇。当年明月每天以发表文章一小篇,字数不足一千字,周末时大多休息不发表,有时会连休数天,并公布于网络上。2009年3月21日,《明朝那些事儿》连载完毕。后来,《明朝那些事儿》集结成书籍刊行,在台湾发行了繁体中文版本。之后被翻译为日文、韩文及英文等多国语言。销量超过五百万册,为中国大陆改革开放以来最畅销史学读本(也有一种说法为“1949年解放以来最畅销的通俗历史读本”),全国十大畅销书之一,2007-2008年度畅销书第一名。多次获得“新浪图书风云榜”最佳图书、当当网“终身五星级最佳图书”、“卓越亚马逊畅销书大奖”等荣誉。 4 | 5 | + 联想集团创始人柳传志说:“我觉得喜欢看的人都是有思想、愿意想事情的人,这是本好书,除了把史实摆出来,还要评论、挖掘,用现代的语言去说,他有他的角度。” 6 | + 明史专家毛佩琦说:“历史是千百万人的历史,是大家的历史。每个人都有解读历史的权利。《明朝那些事儿》的确是别开生面的,是一种创造。我热情地支持这种探索和创造!”。 7 | + 中国青年学者欧发伟认为,当年明月用自己的灵魂还原了历史,而人类在他的历史里还原了灵魂。 8 | 9 | 10 | ![明朝那些事儿 · 当年明月](./Images/Frontmatter.jpg) 11 | 12 | --- 13 | 编译环境: 14 | 15 | + **TeX Distribution** 16 | + [MacTeX 2020](https://www.tug.org/mactex/) (for Apple macOS) 17 | 18 | + [TeX Live 2020](https://www.tug.org/texlive/) (for GNU/Linux & Microsoft Windows) 19 | 20 | + **Fonts** 21 | + [Adobe Source Han Sans 2.001](https://github.com/adobe-fonts/source-han-sans) 22 | + [Adobe Source Han Serif 1.001](https://github.com/adobe-fonts/source-han-serif) 23 | + [Font Awesome Free 5.13.0](https://github.com/FortAwesome/Font-Awesome) 24 | 25 | + **Editor** 26 | + [Visual Studio Code 1.44.0](https://code.visualstudio.com/) with extension [LaTeX Workshop 8.8.0](https://github.com/James-Yu/LaTeX-Workshop) 27 | + Configuration for LaTeX Workshop extension to complie XeTeX source code into PDF Version 1.7 (Acrobat 8.x) 28 | + ```Visual Studio Code``` ⇢ ```File``` ⇢ ```Preferences``` ⇢ ```Settings``` ⇢ ```Extensions``` ⇢ ```LaTeX``` ⇢ ```Recipes``` 29 | 30 | ```JSON 31 | { 32 | "latex-workshop.view.pdf.viewer": "tab", 33 | "latex-workshop.latex.tools": [ 34 | { 35 | "name": "latexmk", 36 | "command": "latexmk", 37 | "args": [ 38 | "-synctex=1", 39 | "-interaction=nonstopmode", 40 | "-file-line-error", 41 | "-pdf", 42 | "%DOC%" 43 | ] 44 | }, 45 | { 46 | "name": "xelatex", 47 | "command": "xelatex", 48 | "args": [ 49 | "-synctex=1", 50 | "-interaction=nonstopmode", 51 | "-file-line-error", 52 | "--output-driver=xdvipdfmx -q -E -V 7", 53 | "%DOC%" 54 | ] 55 | } 56 | ], 57 | "latex-workshop.latex.recipes": [ 58 | { 59 | "name": "XeLaTeX / XeTeX", 60 | "tools": [ 61 | "xelatex" 62 | ] 63 | }, 64 | { 65 | "name": "latexmk", 66 | "tools": [ 67 | "latexmk" 68 | ] 69 | } 70 | ], 71 | "workbench.startupEditor": "newUntitledFile", 72 | "window.zoomLevel": 0, 73 | "editor.minimap.enabled": false 74 | } 75 | ``` 76 | -------------------------------------------------------------------------------- /明朝那些事儿 · 当年明月 (A4).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Mono/Stories-about-Ming-Dynasty/8854ce535fa214d06b005d587ba49fc3133e5d68/明朝那些事儿 · 当年明月 (A4).pdf -------------------------------------------------------------------------------- /明朝那些事儿 · 当年明月 (A4).tex: -------------------------------------------------------------------------------- 1 | % !TeX root 2 | % !TEX encoding = UTF-8 Unicode 3 | % !TeX program = xelatex -synctex=1 -interaction=nonstopmode --output-driver="xdvipdfmx -q -E -V 7" %.tex 4 | 5 | \input{./Layouts/Preamble_A4} 6 | 7 | \special{pdf:encrypt ownerpw (Ming) userpw () length 128 perm 2048} % 2052 for print, 2048 for all disabled 8 | % -S: Enable PDF encryption. 9 | % -K number :Set encryption key length. The default value is 40. 10 | % -P number: Set permission flags for PDF encryption. The numbers a 32-bit unsigned integer representing permission flags. MSB 11 | % Bit Position: Meaning 12 | % 3: (Revision 2) Print the document. / (Revision 3 or greater) Print the document. Print quality depending on bit 12. 13 | % 4: Modify the contents of the document by operations other than those controlled by bits 6, 9, and 11. 14 | % 5: Copy or extract text and graphics from the document. 15 | % 6: Add or modify text annotations, fill in interactive form fields. Creation and modification of interactive form field is also allowed if bit 4 is set. 16 | % 9: (Revision 3 or greater) Fill in existing interactive form fields (including signature fields), even if bit 6 is clear. 17 | % 10: Deprecated in PDF 2.0 (Revision 3 or greater) Extract text and graphics (in support of accessibility to users with disabilities or for other purposes). 18 | % 11: (Revision 3 or greater) Assemble the document (insert, rotate, or delete pages and create document outline items or thumbnail images), even if bit 4 is clear. 19 | % 12: (Revision 3 or greater) High-quality printing. When this bit is clear (and bit 3 is set), printing shall be limited to a low-level, possibly of degraded quality 20 | 21 | \usepackage{geometry} 22 | \geometry{left=3cm,right=3cm,top=4cm,bottom=3cm,foot=4cm} 23 | 24 | \newcounter{paracolNo} 25 | \newcounter{kindle} 26 | \setcounter{paracolNo}{2} 27 | \setcounter{kindle}{0} 28 | 29 | \begin{document} 30 | \frontmatter 31 | \begin{figure}[ht] 32 | \centering 33 | \includepdf[width=\paperwidth, height=\paperheight]{./Images/Frontmatter.jpg} 34 | \end{figure} 35 | \phantom {placeholder} 36 | \vspace{160mm} 37 | \begin{figure}[!h] 38 | \centering 39 | \includegraphics[width=12cm]{./Images/Title.png} 40 | \end{figure} 41 | \newpage 42 | 43 | {\color{TEXTColor} 44 | \ifnum\theparacolNo=2 45 | \begin{multicols}{\theparacolNo} 46 | \fi 47 | \tableofcontents 48 | \ifnum\theparacolNo=2 49 | \end{multicols} 50 | \fi 51 | \newpage 52 | 53 | \mainmatter 54 | \include{./Chapters/00} 55 | \include{./Chapters/01} 56 | \include{./Chapters/02} 57 | \include{./Chapters/03} 58 | \include{./Chapters/04} 59 | \include{./Chapters/05} 60 | \include{./Chapters/06} 61 | \include{./Chapters/07} 62 | \include{./Chapters/010} 63 | \backmatter 64 | {\color{TEXTColor} 65 | \begin{figure}[ht] 66 | \begin{center} 67 | \includepdf[height=\paperheight]{./Images/Backmatter.jpg} 68 | \end{center} 69 | \end{figure} 70 | \end{document} 71 | -------------------------------------------------------------------------------- /明朝那些事儿 · 当年明月 (Kindle).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/M-Mono/Stories-about-Ming-Dynasty/8854ce535fa214d06b005d587ba49fc3133e5d68/明朝那些事儿 · 当年明月 (Kindle).pdf -------------------------------------------------------------------------------- /明朝那些事儿 · 当年明月 (Kindle).tex: -------------------------------------------------------------------------------- 1 | % !TeX root 2 | % !TEX encoding = UTF-8 Unicode 3 | % !TeX program = xelatex -synctex=1 -interaction=nonstopmode --output-driver="xdvipdfmx -q -E -V 7" %.tex 4 | 5 | \input{./Layouts/Preamble_Kindle} 6 | 7 | \special{pdf:encrypt ownerpw (Ming) userpw () length 128 perm 2048} % 2052 for print, 2048 for all disabled 8 | % -S: Enable PDF encryption. 9 | % -K number :Set encryption key length. The default value is 40. 10 | % -P number: Set permission flags for PDF encryption. The numbers a 32-bit unsigned integer representing permission flags. MSB 11 | % Bit Position: Meaning 12 | % 3: (Revision 2) Print the document. / (Revision 3 or greater) Print the document. Print quality depending on bit 12. 13 | % 4: Modify the contents of the document by operations other than those controlled by bits 6, 9, and 11. 14 | % 5: Copy or extract text and graphics from the document. 15 | % 6: Add or modify text annotations, fill in interactive form fields. Creation and modification of interactive form field is also allowed if bit 4 is set. 16 | % 9: (Revision 3 or greater) Fill in existing interactive form fields (including signature fields), even if bit 6 is clear. 17 | % 10: Deprecated in PDF 2.0 (Revision 3 or greater) Extract text and graphics (in support of accessibility to users with disabilities or for other purposes). 18 | % 11: (Revision 3 or greater) Assemble the document (insert, rotate, or delete pages and create document outline items or thumbnail images), even if bit 4 is clear. 19 | % 12: (Revision 3 or greater) High-quality printing. When this bit is clear (and bit 3 is set), printing shall be limited to a low-level, possibly of degraded quality 20 | 21 | %\usepackage{showframe} 22 | \usepackage[paperwidth=136.4mm, paperheight=168.0mm]{geometry} % Kindle Oasis 3 (2019) 23 | \geometry{left=10mm,right=10mm,top=20mm,bottom=10mm,foot=20mm} 24 | %\setlength{\textwidth}{63.2mm} 25 | %\setlength{\textheight}{84.0mm} 26 | 27 | 28 | \newcounter{paracolNo} 29 | \newcounter{kindle} 30 | \setcounter{paracolNo}{1} 31 | \setcounter{kindle}{1} 32 | 33 | \begin{document} 34 | \frontmatter 35 | \begin{figure}[ht] 36 | \centering 37 | \includepdf[width=\paperwidth, height=\paperheight]{./Images/Frontmatter.jpg} 38 | \end{figure} 39 | \phantom {placeholder} 40 | \vspace{90mm} 41 | \begin{figure}[!h] 42 | \centering 43 | \includegraphics[width=8cm]{./Images/Title.png} 44 | \end{figure} 45 | 46 | \newpage 47 | {\color{TEXTColor} 48 | \ifnum\theparacolNo=2 49 | \begin{multicols}{\theparacolNo} 50 | \fi 51 | \tableofcontents 52 | \ifnum\theparacolNo=2 53 | \end{multicols} 54 | \fi 55 | \newpage 56 | \mainmatter 57 | \include{./Chapters/00} 58 | \include{./Chapters/01} 59 | \include{./Chapters/02} 60 | \include{./Chapters/03} 61 | \include{./Chapters/04} 62 | \include{./Chapters/05} 63 | \include{./Chapters/06} 64 | \include{./Chapters/07} 65 | \include{./Chapters/010} 66 | \backmatter 67 | {\color{TEXTColor} 68 | \begin{figure}[ht] 69 | \begin{center} 70 | \includepdf[height=\paperheight]{./Images/Backmatter.jpg} 71 | \end{center} 72 | \end{figure} 73 | \end{document} 74 | --------------------------------------------------------------------------------