├── .gitignore ├── License ├── README.md ├── elegantbook-cn.tex ├── elegantbook-en.tex ├── elegantbook.cls ├── figure ├── cover.jpg └── logo-blue.png ├── image ├── founder.png └── scatter.jpg └── reference.bib /.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 | .*.lb 14 | .DS_Store 15 | clean.bat 16 | elegant*-cn.pdf 17 | elegant*-en.pdf 18 | *.dates 19 | 20 | ## Intermediate documents: 21 | *.dvi 22 | *.xdv 23 | *-converted-to.* 24 | # these rules might exclude image files for figures etc. 25 | # *.ps 26 | # *.eps 27 | # *.pdf 28 | 29 | ## Generated if empty string is given at "Please type another file name for output:" 30 | .pdf 31 | 32 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 33 | *.bbl 34 | *.bcf 35 | *.blg 36 | *-blx.aux 37 | *-blx.bib 38 | *.run.xml 39 | 40 | ## Build tool auxiliary files: 41 | *.fdb_latexmk 42 | *.synctex 43 | *.synctex(busy) 44 | *.synctex.gz 45 | *.synctex.gz(busy) 46 | *.pdfsync 47 | 48 | ## Auxiliary and intermediate files from other packages: 49 | # algorithms 50 | *.alg 51 | *.loa 52 | 53 | # achemso 54 | acs-*.bib 55 | 56 | # amsthm 57 | *.thm 58 | 59 | # beamer 60 | *.nav 61 | *.pre 62 | *.snm 63 | *.vrb 64 | 65 | # changes 66 | *.soc 67 | 68 | # cprotect 69 | *.cpt 70 | 71 | # elsarticle (documentclass of Elsevier journals) 72 | *.spl 73 | 74 | # endnotes 75 | *.ent 76 | 77 | # fixme 78 | *.lox 79 | 80 | # feynmf/feynmp 81 | *.mf 82 | *.mp 83 | *.t[1-9] 84 | *.t[1-9][0-9] 85 | *.tfm 86 | 87 | #(r)(e)ledmac/(r)(e)ledpar 88 | *.end 89 | *.?end 90 | *.[1-9] 91 | *.[1-9][0-9] 92 | *.[1-9][0-9][0-9] 93 | *.[1-9]R 94 | *.[1-9][0-9]R 95 | *.[1-9][0-9][0-9]R 96 | *.eledsec[1-9] 97 | *.eledsec[1-9]R 98 | *.eledsec[1-9][0-9] 99 | *.eledsec[1-9][0-9]R 100 | *.eledsec[1-9][0-9][0-9] 101 | *.eledsec[1-9][0-9][0-9]R 102 | 103 | # glossaries 104 | *.acn 105 | *.acr 106 | *.glg 107 | *.glo 108 | *.gls 109 | *.glsdefs 110 | 111 | # gnuplottex 112 | *-gnuplottex-* 113 | 114 | # gregoriotex 115 | *.gaux 116 | *.gtex 117 | 118 | # htlatex 119 | *.4ct 120 | *.4tc 121 | *.idv 122 | *.lg 123 | *.trc 124 | *.xref 125 | 126 | # hyperref 127 | *.brf 128 | 129 | # knitr 130 | *-concordance.tex 131 | # TODO Comment the next line if you want to keep your tikz graphics files 132 | *.tikz 133 | *-tikzDictionary 134 | 135 | # listings 136 | *.lol 137 | 138 | # makeidx 139 | *.idx 140 | *.ilg 141 | *.ind 142 | *.ist 143 | 144 | # minitoc 145 | *.maf 146 | *.mlf 147 | *.mlt 148 | *.mtc[0-9]* 149 | *.slf[0-9]* 150 | *.slt[0-9]* 151 | *.stc[0-9]* 152 | 153 | # minted 154 | _minted* 155 | *.pyg 156 | 157 | # morewrites 158 | *.mw 159 | 160 | # nomencl 161 | *.nlg 162 | *.nlo 163 | *.nls 164 | 165 | # pax 166 | *.pax 167 | 168 | # pdfpcnotes 169 | *.pdfpc 170 | 171 | # sagetex 172 | *.sagetex.sage 173 | *.sagetex.py 174 | *.sagetex.scmd 175 | 176 | # scrwfile 177 | *.wrt 178 | 179 | # sympy 180 | *.sout 181 | *.sympy 182 | sympy-plots-for-*.tex/ 183 | 184 | # pdfcomment 185 | *.upa 186 | *.upb 187 | 188 | # pythontex 189 | *.pytxcode 190 | pythontex-files-*/ 191 | 192 | # thmtools 193 | *.loe 194 | 195 | # TikZ & PGF 196 | *.dpth 197 | *.md5 198 | *.auxlock 199 | 200 | # todonotes 201 | *.tdo 202 | 203 | # easy-todo 204 | *.lod 205 | 206 | # xmpincl 207 | *.xmpi 208 | 209 | # xindy 210 | *.xdy 211 | 212 | # xypic precompiled matrices 213 | *.xyc 214 | 215 | # endfloat 216 | *.ttt 217 | *.fff 218 | 219 | # Latexian 220 | TSWLatexianTemp* 221 | 222 | ## Editors: 223 | # WinEdt 224 | *.bak 225 | *.sav 226 | 227 | # Texpad 228 | .texpadtmp 229 | 230 | # Kile 231 | *.backup 232 | 233 | # KBibTeX 234 | *~[0-9]* 235 | 236 | # auto folder when using emacs and auctex 237 | ./auto/* 238 | *.el 239 | 240 | # expex forward references with \gathertags 241 | *-tags.tex 242 | 243 | # standalone packages 244 | *.sta 245 | 246 | # generated if using elsarticle.cls 247 | *.spl 248 | -------------------------------------------------------------------------------- /License: -------------------------------------------------------------------------------- 1 | The LaTeX Project Public License 2 | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- 3 | 4 | LPPL Version 1.3c 2008-05-04 5 | 6 | Copyright 1999 2002-2008 LaTeX3 Project 7 | Everyone is allowed to distribute verbatim copies of this 8 | license document, but modification of it is not allowed. 9 | 10 | 11 | PREAMBLE 12 | ======== 13 | 14 | The LaTeX Project Public License (LPPL) is the primary license under 15 | which the LaTeX kernel and the base LaTeX packages are distributed. 16 | 17 | You may use this license for any work of which you hold the copyright 18 | and which you wish to distribute. This license may be particularly 19 | suitable if your work is TeX-related (such as a LaTeX package), but 20 | it is written in such a way that you can use it even if your work is 21 | unrelated to TeX. 22 | 23 | The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', 24 | below, gives instructions, examples, and recommendations for authors 25 | who are considering distributing their works under this license. 26 | 27 | This license gives conditions under which a work may be distributed 28 | and modified, as well as conditions under which modified versions of 29 | that work may be distributed. 30 | 31 | We, the LaTeX3 Project, believe that the conditions below give you 32 | the freedom to make and distribute modified versions of your work 33 | that conform with whatever technical specifications you wish while 34 | maintaining the availability, integrity, and reliability of 35 | that work. If you do not see how to achieve your goal while 36 | meeting these conditions, then read the document `cfgguide.tex' 37 | and `modguide.tex' in the base LaTeX distribution for suggestions. 38 | 39 | 40 | DEFINITIONS 41 | =========== 42 | 43 | In this license document the following terms are used: 44 | 45 | `Work' 46 | Any work being distributed under this License. 47 | 48 | `Derived Work' 49 | Any work that under any applicable law is derived from the Work. 50 | 51 | `Modification' 52 | Any procedure that produces a Derived Work under any applicable 53 | law -- for example, the production of a file containing an 54 | original file associated with the Work or a significant portion of 55 | such a file, either verbatim or with modifications and/or 56 | translated into another language. 57 | 58 | `Modify' 59 | To apply any procedure that produces a Derived Work under any 60 | applicable law. 61 | 62 | `Distribution' 63 | Making copies of the Work available from one person to another, in 64 | whole or in part. Distribution includes (but is not limited to) 65 | making any electronic components of the Work accessible by 66 | file transfer protocols such as FTP or HTTP or by shared file 67 | systems such as Sun's Network File System (NFS). 68 | 69 | `Compiled Work' 70 | A version of the Work that has been processed into a form where it 71 | is directly usable on a computer system. This processing may 72 | include using installation facilities provided by the Work, 73 | transformations of the Work, copying of components of the Work, or 74 | other activities. Note that modification of any installation 75 | facilities provided by the Work constitutes modification of the Work. 76 | 77 | `Current Maintainer' 78 | A person or persons nominated as such within the Work. If there is 79 | no such explicit nomination then it is the `Copyright Holder' under 80 | any applicable law. 81 | 82 | `Base Interpreter' 83 | A program or process that is normally needed for running or 84 | interpreting a part or the whole of the Work. 85 | 86 | A Base Interpreter may depend on external components but these 87 | are not considered part of the Base Interpreter provided that each 88 | external component clearly identifies itself whenever it is used 89 | interactively. Unless explicitly specified when applying the 90 | license to the Work, the only applicable Base Interpreter is a 91 | `LaTeX-Format' or in the case of files belonging to the 92 | `LaTeX-format' a program implementing the `TeX language'. 93 | 94 | 95 | 96 | CONDITIONS ON DISTRIBUTION AND MODIFICATION 97 | =========================================== 98 | 99 | 1. Activities other than distribution and/or modification of the Work 100 | are not covered by this license; they are outside its scope. In 101 | particular, the act of running the Work is not restricted and no 102 | requirements are made concerning any offers of support for the Work. 103 | 104 | 2. You may distribute a complete, unmodified copy of the Work as you 105 | received it. Distribution of only part of the Work is considered 106 | modification of the Work, and no right to distribute such a Derived 107 | Work may be assumed under the terms of this clause. 108 | 109 | 3. You may distribute a Compiled Work that has been generated from a 110 | complete, unmodified copy of the Work as distributed under Clause 2 111 | above, as long as that Compiled Work is distributed in such a way that 112 | the recipients may install the Compiled Work on their system exactly 113 | as it would have been installed if they generated a Compiled Work 114 | directly from the Work. 115 | 116 | 4. If you are the Current Maintainer of the Work, you may, without 117 | restriction, modify the Work, thus creating a Derived Work. You may 118 | also distribute the Derived Work without restriction, including 119 | Compiled Works generated from the Derived Work. Derived Works 120 | distributed in this manner by the Current Maintainer are considered to 121 | be updated versions of the Work. 122 | 123 | 5. If you are not the Current Maintainer of the Work, you may modify 124 | your copy of the Work, thus creating a Derived Work based on the Work, 125 | and compile this Derived Work, thus creating a Compiled Work based on 126 | the Derived Work. 127 | 128 | 6. If you are not the Current Maintainer of the Work, you may 129 | distribute a Derived Work provided the following conditions are met 130 | for every component of the Work unless that component clearly states 131 | in the copyright notice that it is exempt from that condition. Only 132 | the Current Maintainer is allowed to add such statements of exemption 133 | to a component of the Work. 134 | 135 | a. If a component of this Derived Work can be a direct replacement 136 | for a component of the Work when that component is used with the 137 | Base Interpreter, then, wherever this component of the Work 138 | identifies itself to the user when used interactively with that 139 | Base Interpreter, the replacement component of this Derived Work 140 | clearly and unambiguously identifies itself as a modified version 141 | of this component to the user when used interactively with that 142 | Base Interpreter. 143 | 144 | b. Every component of the Derived Work contains prominent notices 145 | detailing the nature of the changes to that component, or a 146 | prominent reference to another file that is distributed as part 147 | of the Derived Work and that contains a complete and accurate log 148 | of the changes. 149 | 150 | c. No information in the Derived Work implies that any persons, 151 | including (but not limited to) the authors of the original version 152 | of the Work, provide any support, including (but not limited to) 153 | the reporting and handling of errors, to recipients of the 154 | Derived Work unless those persons have stated explicitly that 155 | they do provide such support for the Derived Work. 156 | 157 | d. You distribute at least one of the following with the Derived Work: 158 | 159 | 1. A complete, unmodified copy of the Work; 160 | if your distribution of a modified component is made by 161 | offering access to copy the modified component from a 162 | designated place, then offering equivalent access to copy 163 | the Work from the same or some similar place meets this 164 | condition, even though third parties are not compelled to 165 | copy the Work along with the modified component; 166 | 167 | 2. Information that is sufficient to obtain a complete, 168 | unmodified copy of the Work. 169 | 170 | 7. If you are not the Current Maintainer of the Work, you may 171 | distribute a Compiled Work generated from a Derived Work, as long as 172 | the Derived Work is distributed to all recipients of the Compiled 173 | Work, and as long as the conditions of Clause 6, above, are met with 174 | regard to the Derived Work. 175 | 176 | 8. The conditions above are not intended to prohibit, and hence do not 177 | apply to, the modification, by any method, of any component so that it 178 | becomes identical to an updated version of that component of the Work as 179 | it is distributed by the Current Maintainer under Clause 4, above. 180 | 181 | 9. Distribution of the Work or any Derived Work in an alternative 182 | format, where the Work or that Derived Work (in whole or in part) is 183 | then produced by applying some process to that format, does not relax or 184 | nullify any sections of this license as they pertain to the results of 185 | applying that process. 186 | 187 | 10. a. A Derived Work may be distributed under a different license 188 | provided that license itself honors the conditions listed in 189 | Clause 6 above, in regard to the Work, though it does not have 190 | to honor the rest of the conditions in this license. 191 | 192 | b. If a Derived Work is distributed under a different license, that 193 | Derived Work must provide sufficient documentation as part of 194 | itself to allow each recipient of that Derived Work to honor the 195 | restrictions in Clause 6 above, concerning changes from the Work. 196 | 197 | 11. This license places no restrictions on works that are unrelated to 198 | the Work, nor does this license place any restrictions on aggregating 199 | such works with the Work by any means. 200 | 201 | 12. Nothing in this license is intended to, or may be used to, prevent 202 | complete compliance by all parties with all applicable laws. 203 | 204 | 205 | NO WARRANTY 206 | =========== 207 | 208 | There is no warranty for the Work. Except when otherwise stated in 209 | writing, the Copyright Holder provides the Work `as is', without 210 | warranty of any kind, either expressed or implied, including, but not 211 | limited to, the implied warranties of merchantability and fitness for a 212 | particular purpose. The entire risk as to the quality and performance 213 | of the Work is with you. Should the Work prove defective, you assume 214 | the cost of all necessary servicing, repair, or correction. 215 | 216 | In no event unless required by applicable law or agreed to in writing 217 | will The Copyright Holder, or any author named in the components of the 218 | Work, or any other party who may distribute and/or modify the Work as 219 | permitted above, be liable to you for damages, including any general, 220 | special, incidental or consequential damages arising out of any use of 221 | the Work or out of inability to use the Work (including, but not limited 222 | to, loss of data, data being rendered inaccurate, or losses sustained by 223 | anyone as a result of any failure of the Work to operate with any other 224 | programs), even if the Copyright Holder or said author or said other 225 | party has been advised of the possibility of such damages. 226 | 227 | 228 | MAINTENANCE OF THE WORK 229 | ======================= 230 | 231 | The Work has the status `author-maintained' if the Copyright Holder 232 | explicitly and prominently states near the primary copyright notice in 233 | the Work that the Work can only be maintained by the Copyright Holder 234 | or simply that it is `author-maintained'. 235 | 236 | The Work has the status `maintained' if there is a Current Maintainer 237 | who has indicated in the Work that they are willing to receive error 238 | reports for the Work (for example, by supplying a valid e-mail 239 | address). It is not required for the Current Maintainer to acknowledge 240 | or act upon these error reports. 241 | 242 | The Work changes from status `maintained' to `unmaintained' if there 243 | is no Current Maintainer, or the person stated to be Current 244 | Maintainer of the work cannot be reached through the indicated means 245 | of communication for a period of six months, and there are no other 246 | significant signs of active maintenance. 247 | 248 | You can become the Current Maintainer of the Work by agreement with 249 | any existing Current Maintainer to take over this role. 250 | 251 | If the Work is unmaintained, you can become the Current Maintainer of 252 | the Work through the following steps: 253 | 254 | 1. Make a reasonable attempt to trace the Current Maintainer (and 255 | the Copyright Holder, if the two differ) through the means of 256 | an Internet or similar search. 257 | 258 | 2. If this search is successful, then enquire whether the Work 259 | is still maintained. 260 | 261 | a. If it is being maintained, then ask the Current Maintainer 262 | to update their communication data within one month. 263 | 264 | b. If the search is unsuccessful or no action to resume active 265 | maintenance is taken by the Current Maintainer, then announce 266 | within the pertinent community your intention to take over 267 | maintenance. (If the Work is a LaTeX work, this could be 268 | done, for example, by posting to comp.text.tex.) 269 | 270 | 3a. If the Current Maintainer is reachable and agrees to pass 271 | maintenance of the Work to you, then this takes effect 272 | immediately upon announcement. 273 | 274 | b. If the Current Maintainer is not reachable and the Copyright 275 | Holder agrees that maintenance of the Work be passed to you, 276 | then this takes effect immediately upon announcement. 277 | 278 | 4. If you make an `intention announcement' as described in 2b. above 279 | and after three months your intention is challenged neither by 280 | the Current Maintainer nor by the Copyright Holder nor by other 281 | people, then you may arrange for the Work to be changed so as 282 | to name you as the (new) Current Maintainer. 283 | 284 | 5. If the previously unreachable Current Maintainer becomes 285 | reachable once more within three months of a change completed 286 | under the terms of 3b) or 4), then that Current Maintainer must 287 | become or remain the Current Maintainer upon request provided 288 | they then update their communication data within one month. 289 | 290 | A change in the Current Maintainer does not, of itself, alter the fact 291 | that the Work is distributed under the LPPL license. 292 | 293 | If you become the Current Maintainer of the Work, you should 294 | immediately provide, within the Work, a prominent and unambiguous 295 | statement of your status as Current Maintainer. You should also 296 | announce your new status to the same pertinent community as 297 | in 2b) above. 298 | 299 | 300 | WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE 301 | ====================================================== 302 | 303 | This section contains important instructions, examples, and 304 | recommendations for authors who are considering distributing their 305 | works under this license. These authors are addressed as `you' in 306 | this section. 307 | 308 | Choosing This License or Another License 309 | ---------------------------------------- 310 | 311 | If for any part of your work you want or need to use *distribution* 312 | conditions that differ significantly from those in this license, then 313 | do not refer to this license anywhere in your work but, instead, 314 | distribute your work under a different license. You may use the text 315 | of this license as a model for your own license, but your license 316 | should not refer to the LPPL or otherwise give the impression that 317 | your work is distributed under the LPPL. 318 | 319 | The document `modguide.tex' in the base LaTeX distribution explains 320 | the motivation behind the conditions of this license. It explains, 321 | for example, why distributing LaTeX under the GNU General Public 322 | License (GPL) was considered inappropriate. Even if your work is 323 | unrelated to LaTeX, the discussion in `modguide.tex' may still be 324 | relevant, and authors intending to distribute their works under any 325 | license are encouraged to read it. 326 | 327 | A Recommendation on Modification Without Distribution 328 | ----------------------------------------------------- 329 | 330 | It is wise never to modify a component of the Work, even for your own 331 | personal use, without also meeting the above conditions for 332 | distributing the modified component. While you might intend that such 333 | modifications will never be distributed, often this will happen by 334 | accident -- you may forget that you have modified that component; or 335 | it may not occur to you when allowing others to access the modified 336 | version that you are thus distributing it and violating the conditions 337 | of this license in ways that could have legal implications and, worse, 338 | cause problems for the community. It is therefore usually in your 339 | best interest to keep your copy of the Work identical with the public 340 | one. Many works provide ways to control the behavior of that work 341 | without altering any of its licensed components. 342 | 343 | How to Use This License 344 | ----------------------- 345 | 346 | To use this license, place in each of the components of your work both 347 | an explicit copyright notice including your name and the year the work 348 | was authored and/or last substantially modified. Include also a 349 | statement that the distribution and/or modification of that 350 | component is constrained by the conditions in this license. 351 | 352 | Here is an example of such a notice and statement: 353 | 354 | %% pig.dtx 355 | %% Copyright 2005 M. Y. Name 356 | % 357 | % This work may be distributed and/or modified under the 358 | % conditions of the LaTeX Project Public License, either version 1.3 359 | % of this license or (at your option) any later version. 360 | % The latest version of this license is in 361 | % http://www.latex-project.org/lppl.txt 362 | % and version 1.3 or later is part of all distributions of LaTeX 363 | % version 2005/12/01 or later. 364 | % 365 | % This work has the LPPL maintenance status `maintained'. 366 | % 367 | % The Current Maintainer of this work is M. Y. Name. 368 | % 369 | % This work consists of the files pig.dtx and pig.ins 370 | % and the derived file pig.sty. 371 | 372 | Given such a notice and statement in a file, the conditions 373 | given in this license document would apply, with the `Work' referring 374 | to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being 375 | generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' 376 | referring to any `LaTeX-Format', and both `Copyright Holder' and 377 | `Current Maintainer' referring to the person `M. Y. Name'. 378 | 379 | If you do not want the Maintenance section of LPPL to apply to your 380 | Work, change `maintained' above into `author-maintained'. 381 | However, we recommend that you use `maintained', as the Maintenance 382 | section was added in order to ensure that your Work remains useful to 383 | the community even when you can no longer maintain and support it 384 | yourself. 385 | 386 | Derived Works That Are Not Replacements 387 | --------------------------------------- 388 | 389 | Several clauses of the LPPL specify means to provide reliability and 390 | stability for the user community. They therefore concern themselves 391 | with the case that a Derived Work is intended to be used as a 392 | (compatible or incompatible) replacement of the original Work. If 393 | this is not the case (e.g., if a few lines of code are reused for a 394 | completely different task), then clauses 6b and 6d shall not apply. 395 | 396 | 397 | Important Recommendations 398 | ------------------------- 399 | 400 | Defining What Constitutes the Work 401 | 402 | The LPPL requires that distributions of the Work contain all the 403 | files of the Work. It is therefore important that you provide a 404 | way for the licensee to determine which files constitute the Work. 405 | This could, for example, be achieved by explicitly listing all the 406 | files of the Work near the copyright notice of each file or by 407 | using a line such as: 408 | 409 | % This work consists of all files listed in manifest.txt. 410 | 411 | in that place. In the absence of an unequivocal list it might be 412 | impossible for the licensee to determine what is considered by you 413 | to comprise the Work and, in such a case, the licensee would be 414 | entitled to make reasonable conjectures as to which files comprise 415 | the Work. 416 | 417 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | [Homepage](https://elegantlatex.org/) | [Github](https://github.com/ElegantLaTeX/ElegantBook) | [CTAN](https://ctan.org/pkg/elegantbook) | [Download](https://github.com/ElegantLaTeX/ElegantBook/releases) | 5 | 6 | ![License](https://img.shields.io/ctan/l/elegantbook.svg) ![CTAN Version](https://img.shields.io/ctan/v/elegantbook.svg) ![Github Version](https://img.shields.io/github/release/ElegantLaTeX/ElegantBook.svg) ![Repo Size](https://img.shields.io/github/repo-size/ElegantLaTeX/ElegantBook.svg) 7 | 8 | ------- 9 | 10 | # ElegantBook: 优美的 LaTeX 书籍模板 An Elegant LaTeX Template for Books 11 | 12 | ElegantBook 是为 LaTeX 书籍写作而设计的模板,由 [Ethan Deng](https://github.com/EthanDeng) 和 [Liam Huang](https://github.com/Liam0205) 创立,现在主要由 [Ethan Deng](https://github.com/EthanDeng)、[乙醇](https://github.com/syvshc)和[死抠](https://github.com/sikouhjw)维护。如果你有其他问题、建议或者报告 bug,可以提交 issues 或者加入我们的 QQ 用户交流群:692108391。 13 | 14 | ElegantBook is designed for writing books, created by [Ethan Deng](https://github.com/EthanDeng) and [Liam Huang](https://github.com/Liam0205), and maintained by [Ethan Deng](https://github.com/EthanDeng), [syvshc](https://github.com/syvshc) and [sikouhjw](https://github.com/sikouhjw). Just enjoy it! If you have any questions, suggestions or bug reports, you can create issues or contact us at elegantlatex2e@gmail.com. 15 | 16 | 17 | **本模板自 2023 年 1 月 1 日开始,不再维护,不建议使用本系列模板!为了保证之前版本的用户仍然能查到说明文档,本说明文档仍然保留过去的信息。** 18 | 19 | **Caution: This template will no longer be maintained since January 1st, 2023.** 20 | 21 | ## 致谢 Acknowledgement 22 | 23 | 24 | 特别感谢 [sikouhjw](https://github.com/sikouhjw) 和 [syvshc](https://github.com/syvshc) 长期以来对于 Github 上 issue 的快速回应,以及各个社区论坛对于 ElegantLaTeX 相关问题的回复。特别感谢 ChinaTeX 以及 [LaTeX 工作室](http://www.latexstudio.net/)对于本系列模板的大力宣传与推广。 25 | 26 | Thank [sikouhjw](https://github.com/sikouhjw) and [syvshc](https://github.com/syvshc) for their quick response to Github issues and continuously support work for ElegantLaTeX community. Thank ChinaTeX and [LaTeX Studio](http://www.latexstudio.net/) for their promotion. 27 | 28 | 29 | ## 协议 License 30 | 31 | 本模板发布遵循 LaTeX 项目公共许可证 1.3 c 或更高版本。 32 | 如果是衍生作品,请务必加入协议声明和模板信息(github、CTAN 地址)。 33 | 34 | This work is released under the LaTeX Project Public License, v1.3c or later. 35 | 36 | 37 | ## 衍生品 Derivative Works 38 | 39 | + [ElegantBookdown](https://github.com/XiangyunHuang/ElegantBookdown):[XiangyunHuang](https://github.com/XiangyunHuang) 开发并维护的基于 ElegantBook 的 Bookdown 模板。 40 | + [bookdownplus](https://github.com/pzhaonet/bookdownplus):应网友要求,[pzhaonet](https://github.com/pzhaonet) 在 bookdownplus 收录了 ElegantPaper 模板,并为 Mac 做了字体适配。 41 | + [PanBook](https://github.com/annProg/PanBook):[annProg](https://github.com/annProg) 开发并维护的基于 Markdown 写作的工作流,收录了 ElegantBook 和 ElegantPaper 模板。 42 | -------------------------------------------------------------------------------- /elegantbook-cn.tex: -------------------------------------------------------------------------------- 1 | \documentclass[lang=cn,newtx,10pt,scheme=chinese]{elegantbook} 2 | 3 | \title{ElegantBook:优美的 \LaTeX{} 书籍模板} 4 | \subtitle{Elegant\LaTeX{} 经典之作} 5 | 6 | \author{Ethan Deng \& Liam Huang \& syvshc \& sikouhjw \& Osbert Wang} 7 | \institute{Elegant\LaTeX{} Program} 8 | \date{2022/12/31} 9 | \version{4.5} 10 | \bioinfo{自定义}{信息} 11 | 12 | \extrainfo{注意:本模板自 2023 年 1 月 1 日开始,不再更新和维护!} 13 | 14 | \setcounter{tocdepth}{3} 15 | 16 | \logo{logo-blue.png} 17 | \cover{cover.jpg} 18 | 19 | % 本文档命令 20 | \usepackage{array} 21 | \newcommand{\ccr}[1]{\makecell{{\color{#1}\rule{1cm}{1cm}}}} 22 | 23 | % 修改标题页的橙色带 24 | \definecolor{customcolor}{RGB}{32,178,170} 25 | \colorlet{coverlinecolor}{customcolor} 26 | \usepackage{cprotect} 27 | 28 | \addbibresource[location=local]{reference.bib} % 参考文献,不要删除 29 | 30 | \begin{document} 31 | 32 | \maketitle 33 | \frontmatter 34 | 35 | \tableofcontents 36 | 37 | \mainmatter 38 | 39 | \chapter{Elegant\LaTeX{} 系列模板介绍} 40 | 41 | \begin{quotation} 42 | \textbf{\textcolor{red}{本模板自 2023 年 1 月 1 日开始,不再维护,不建议使用本系列模板!为了保证之前版本的用户仍然能查到说明文档,本说明文档仍然保留过去的信息。}} 43 | \end{quotation} 44 | 45 | Elegant\LaTeX{} 项目组致力于打造一系列美观、优雅、简便的模板方便用户使用。目前由 \href{https://github.com/ElegantLaTeX/ElegantNote}{ElegantNote},\href{https://github.com/ElegantLaTeX/ElegantBook}{ElegantBook},\href{https://github.com/ElegantLaTeX/ElegantPaper}{ElegantPaper} 组成,分别用于排版笔记,书籍和工作论文。大版本改动较大,请关注版本信息,在未开始使用模板前,建议直接选择最新正式版本! 46 | 47 | 48 | 本文将介绍本模板的一些设置内容以及基本使用方法。如果您有其他问题,建议或者意见,欢迎在 GitHub 上给我们提交 \href{https://github.com/ElegantLaTeX/ElegantBook/issues}{issues} 或者邮件联系我们。我们的联系方式如下,建议加入用户 QQ 群提问,这样能更快获得准确的反馈,加群时请备注 \LaTeX{} 或者 Elegant\LaTeX{} 相关内容。 49 | \begin{itemize} 50 | \item 官网:\href{https://elegantlatex.org/}{https://elegantlatex.org/} 51 | \item GitHub 地址:\href{https://github.com/ElegantLaTeX/}{https://github.com/ElegantLaTeX/} 52 | \item CTAN 地址:\href{https://ctan.org/pkg/elegantbook}{https://ctan.org/pkg/elegantbook} 53 | \item 下载地址:\href{https://github.com/ElegantLaTeX/ElegantBook/releases}{正式发行版},\href{https://github.com/ElegantLaTeX/ElegantBook/archive/master.zip}{最新版} 54 | \item Bilibili:\href{https://space.bilibili.com/516479629}{ElegantLaTeX} 55 | \item 用户 QQ 群:692108391 56 | \end{itemize} 57 | 58 | 59 | \section{模板安装与更新} 60 | 61 | 你可以通过免安装的方式使用本模板,包括在线使用和本地(文件夹内)使用两种方式,也可以通过 \TeX{} 发行版安装使用。 62 | 63 | \subsection{在线使用模板} 64 | 65 | 我们把三套模板全部上传到 \href{https://www.overleaf.com/}{Overleaf} 上了,网络便利的用户可以直接通过 Overleaf 在线使用我们的模板。使用 Overleaf 的好处是无需安装 \TeX{} Live,可以随时随地访问自己的文件。查找模板,请在 Overleaf 模板库里面搜索 \lstinline{elegantlatex} 即可,你也可以直接访问\href{https://www.overleaf.com/latex/templates?addsearch=elegantlatex}{搜索结果}。选择适当的模板之后,将其 \lstinline{Open as Template},即可把模板存到自己账户下,然后可以自由编辑以及与别人一起协作。更多关于 Overleaf 的介绍和使用,请参考 Overleaf 的\href{https://www.overleaf.com/learn}{官方文档}。 66 | 67 | \subsection{本地免安装使用} 68 | 69 | \textbf{免安装}使用方法如下:从 GitHub 或者 CTAN 下载最新版,严格意义上只需要类文件 \lstinline{elegantbook.cls}。然后将模板文件放在你的工作目录下即可使用。这样使用的好处是,无需安装,简便;缺点是,当模板更新之后,你需要手动替换 \lstinline{cls} 文件。 70 | 71 | \subsection{发行版安装与更新} 72 | 73 | 本模板测试环境为 74 | \begin{enumerate} 75 | \item Win10 + \TeX{} Live 2022; 76 | \item Ubuntu 20.04 + \TeX{} Live 2022; 77 | \item macOS Monterey + Mac\TeX{} 2022。 78 | \end{enumerate} 79 | 80 | \TeX Live/Mac\TeX{} 的安装请参考啸行的\href{https://github.com/OsbertWang/install-latex-guide-zh-cn/releases/}{一份简短的关于安装 \LaTeX{} 安装的介绍}。 81 | 82 | 安装 \TeX{} Live 之后,安装后建议升级全部宏包,升级方法:使用 cmd 或 terminal 运行 \lstinline{tlmgr update --all},如果 tlmgr 需要更新,请使用 cmd 运行 \lstinline{tlmgr update --self},如果更新过程中出现了中断,请改用 \lstinline{tlmgr update --self --all --reinstall-forcibly-removed} 更新,也即 83 | 84 | \begin{lstlisting} 85 | tlmgr update --self 86 | tlmgr update --all 87 | tlmgr update --self --all --reinstall-forcibly-removed 88 | \end{lstlisting} 89 | 90 | 更多的内容请参考 \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \TeX{} distribution?} 91 | 92 | \subsection{其他发行版本} 93 | 94 | 由于宏包版本问题,本模板不支持 C\TeX{} 套装,请务必安装 TeX Live/Mac\TeX{}。更多关于 \TeX{} Live 的安装使用以及 C\TeX{} 与 \TeX{} Live 的兼容、系统路径问题,请参考官方文档以及啸行的\href{https://github.com/OsbertWang/install-latex-guide-zh-cn/releases/}{一份简短的关于安装 \LaTeX{} 安装的介绍}。 95 | 96 | 97 | 98 | \chapter{ElegantBook 设置说明} 99 | 100 | 本模板基于基础的 book 文类,所以 book 的选项对于本模板也是有效的(纸张无效,因为模板有设备选项)。默认编码为 UTF-8,推荐使用 \TeX{} Live 编译。 101 | 102 | \section{语言模式} 103 | 本模板内含两套基础语言环境 \lstinline{lang=cn}、\lstinline{lang=en}。改变语言环境会改变图表标题的引导词(图,表),文章结构词(比如目录,参考文献等),以及定理环境中的引导词(比如定理,引理等)。不同语言模式的启用如下: 104 | \begin{lstlisting} 105 | \documentclass[cn]{elegantbook} 106 | \documentclass[lang=cn]{elegantbook} 107 | \end{lstlisting} 108 | 109 | 除模板自带的两套语言设定之外,由\textbf{网友}提供的其他语言环境设置如下: 110 | \begin{itemize} 111 | \item 由 \href{https://github.com/VincentMVV}{VincentMVV} 提供的意大利语翻译 \lstinline{lang=it},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/85}{Italian translation}; 112 | \item 由 \href{https://github.com/abfek66}{abfek66} 提供的法语翻译 \lstinline{lang=fr},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/85}{Italian translation}; 113 | % \item 由 \href{https://github.com/stultus}{stultus} 提供的马拉雅拉姆语翻译 \lstinline{lang=},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/90}{Malayalam translation}; 114 | \item 由 \href{https://github.com/inktvis75}{inktvis75} 提供的荷兰语翻译 \lstinline{lang=nl},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/108}{Dutch Translation}; 115 | \item 由 \href{https://github.com/palkotamas}{palkotamas} 提供的匈牙利语翻译 \lstinline{lang=hu},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/111}{Hungarian translation}; 116 | \item 由 Lisa 提供的德语翻译 \lstinline{lang=de},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/113}{Deutsch translation}; 117 | \item 由 Gustavo A. Corradi 提供的西班牙语的翻译 \lstinline{lang=es},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/133}{Spanish translation}; 118 | \item 由 \href{https://github.com/Altantsooj}{Altantsooj} 提供的蒙古语的翻译 \lstinline{lang=mn},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/137}{Mongolian translation}; 119 | \item 由 \href{https://github.com/inusturbo}{inusturbo} 提供的日本语的翻译 \lstinline{lang=jp},相关讨论见 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/172}{Japanese Translation}。 120 | \end{itemize} 121 | 122 | 123 | 124 | \begin{remark} 125 | 以上各个语言的设定均为网友设定,我们未对上述翻译进行过校对,如果有问题,请在对应的 issue 下评论。并且,只有中文环境(\lstinline{lang=cn})才可以输入中文。 126 | \end{remark} 127 | 128 | \section{设备选项} 129 | 最早我们在 ElegantNote 模板中加入了设备选项(\lstinline{device}),后来,我们觉得这个设备选项的设置可以应用到 ElegantBook 中\footnote{不过因为 ElegantBook 模板封面图片的存在,在修改页面设计时,需要对图片进行裁剪。},而且 Book 一般内容比较多,如果在 iPad 上看无需切边,放大,那用户的阅读体验将会得到巨大提升。你可以使用下面的选项将版面设置为 iPad 设备模式\footnote{默认为 normal 模式,也即 A4 纸张大小。} 130 | \begin{lstlisting} 131 | \documentclass[pad]{elegantbook} %or 132 | \documentclass[device=pad]{elegantbook} 133 | \end{lstlisting} 134 | 135 | \section{颜色主题} 136 | 137 | 本模板内置 5 组颜色主题,分别为 \textcolor{structure1}{\lstinline{green}}\footnote{为原先默认主题。}、\textcolor{structure2}{\lstinline{cyan}}、\textcolor{structure3}{\lstinline{blue}}(默认)、\textcolor{structure4}{\lstinline{gray}}、\textcolor{structure5}{\lstinline{black}}。另外还有一个自定义的选项 \lstinline{nocolor}。调用颜色主题 \lstinline{green} 的方法为 138 | \begin{lstlisting} 139 | \documentclass[green]{elegantbook} %or 140 | \documentclass[color=green]{elegantbook} 141 | \end{lstlisting} 142 | 143 | 144 | \begin{table}[htbp] 145 | \caption{ElegantBook 模板中的颜色主题\label{tab:color thm}} 146 | \centering 147 | \begin{tabular}{ccccccc} 148 | \toprule 149 | & \textcolor{structure1}{green} 150 | & \textcolor{structure2}{cyan} 151 | & \textcolor{structure3}{blue} 152 | & \textcolor{structure4}{gray} 153 | & \textcolor{structure5}{black} 154 | & 主要使用的环境\\ 155 | \midrule 156 | structure & \ccr{structure1} 157 | & \ccr{structure2} 158 | & \ccr{structure3} 159 | & \ccr{structure4} 160 | & \ccr{structure5} 161 | & chapter \ section \ subsection \\ 162 | main & \ccr{main1} 163 | & \ccr{main2} 164 | & \ccr{main3} 165 | & \ccr{main4} 166 | & \ccr{main5} 167 | & definition \ exercise \ problem \\ 168 | second & \ccr{second1} 169 | & \ccr{second2} 170 | & \ccr{second3} 171 | & \ccr{second4} 172 | & \ccr{second5} 173 | & theorem \ lemma \ corollary\\ 174 | third & \ccr{third1} 175 | & \ccr{third2} 176 | & \ccr{third3} 177 | & \ccr{third4} 178 | & \ccr{third5} 179 | & proposition\\ 180 | \bottomrule 181 | \end{tabular} 182 | \end{table} 183 | 184 | 如果需要自定义颜色的话请选择 \lstinline{nocolor} 选项或者使用 \lstinline{color=none},然后在导言区定义 structurecolor、main、second、third 颜色,具体方法如下: 185 | \begin{lstlisting}[tabsize=4] 186 | \definecolor{structurecolor}{RGB}{0,0,0} 187 | \definecolor{main}{RGB}{70,70,70} 188 | \definecolor{second}{RGB}{115,45,2} 189 | \definecolor{third}{RGB}{0,80,80} 190 | \end{lstlisting} 191 | 192 | \section{封面} 193 | 194 | \subsection{封面个性化} 195 | 196 | 从 3.10 版本开始,封面更加弹性化,用户可以自行选择输出的内容,包括 \lstinline{\title} 在内的所有封面元素都可为空。目前封面的元素有 197 | 198 | \begin{table}[htbp] 199 | \centering 200 | \caption{封面元素信息} 201 | \begin{tabular}{p{0.07\textwidth}p{0.15\textwidth}|p{0.07\textwidth}p{0.15\textwidth}|p{0.07\textwidth}p{0.15\textwidth}} 202 | \hline 203 | 信息 & 命令 & 信息 & 命令 & 信息 & 命令 \\ 204 | \hline 205 | 标题 & \lstinline|\title| & 副标题 & \lstinline|\subtitle| & 作者 & \lstinline|\author| \\ 206 | 机构 & \lstinline|\institute| & 日期 & \lstinline|\date| & 版本 & \lstinline|\version| \\ 207 | 箴言 & \lstinline|\extrainfo| & 封面图 & \lstinline|\cover| & 徽标 & \lstinline|\logo| \\ 208 | \hline 209 | \end{tabular} 210 | \end{table} 211 | 212 | 另外,额外增加一个 \lstinline{\bioinfo} 命令,有两个选项,分别是信息标题以及信息内容。比如需要显示{\kaishu User Name:111520},则可以使用 213 | \begin{lstlisting} 214 | \bioinfo{User Name}{115520} 215 | \end{lstlisting} 216 | 217 | 封面中间位置的色块的颜色可以使用下面命令进行修改: 218 | \begin{lstlisting} 219 | \definecolor{customcolor}{RGB}{32,178,170} 220 | \colorlet{coverlinecolor}{customcolor} 221 | \end{lstlisting} 222 | 223 | \subsection{封面图} 224 | 225 | 本模板使用的封面图片来源于 \href{https://pixabay.com/en/tea-time-poetry-coffee-reading-3240766/}{pixabay.com}\footnote{感谢 China\TeX{} 提供免费图源网站,另外还推荐 \href{https://www.pexels.com/}{pexels.com}。},图片完全免费,可用于任何场景。封面图片的尺寸为 $1280 \times 1024$, 更换图片的时候请\textbf{严格}按照封面图片尺寸进行裁剪。推荐一个免费的在线图片裁剪网站 \href{https://www.fotor.com/cn}{fotor.com}。用户 QQ 群内有一些合适尺寸的封面,欢迎取用。 226 | 227 | \subsection{徽标} 228 | 229 | 本文用到的 Logo 比例为 1:1,也即正方形图片,在更换图片的时候请选择合适的图片进行替换。 230 | 231 | \subsection{自定义封面} 232 | 233 | 另外,如果使用自定义的封面,比如 Adobe illustrator 或者其他软件制作的 A4 PDF 文档,请把 \lstinline{\maketitle} 注释掉,然后借助 \lstinline{pdfpages} 宏包将自制封面插入即可。如果使用 \lstinline{titlepage} 环境,也是类似。如果需要 2.x 版本的封面,请参考 \href{https://github.com/EthanDeng/etitlepage}{etitlepage}。 234 | 235 | \section{章标标题} 236 | 237 | 本模板内置 2 套\textit{章标题显示风格},包含 \lstinline{hang}(默认)与 \lstinline{display} 两种风格,区别在于章标题单行显示(\lstinline{hang})与双行显示(\lstinline{display}),本说明使用了 \lstinline{hang}。调用方式为 238 | \begin{lstlisting} 239 | \documentclass[hang]{elegantbook} %or 240 | \documentclass[titlestyle=hang]{elegantbook} 241 | \end{lstlisting} 242 | 243 | 在章标题内,章节编号默认是以数字显示,也即{\kaishu 第 1 章},{\kaishu 第 2 章}等等,如果想要把数字改为中文,可以使用 244 | \begin{lstlisting} 245 | \documentclass[chinese]{elegantbook} %or 246 | \documentclass[scheme=chinese]{elegantbook} 247 | \end{lstlisting} 248 | 249 | \section{数学环境简介} 250 | 251 | 在我们这个模板中,我们定义了两种不同的定理模式 \lstinline{mode},包括简单模式(\lstinline{simple})和炫彩模式(\lstinline{fancy}),默认为 \lstinline{fancy} 模式,不同模式的选择为 252 | \begin{lstlisting} 253 | \documentclass[simple]{elegantbook} %or 254 | \documentclass[mode=simple]{elegantbook} 255 | \end{lstlisting} 256 | 257 | 本模板定义了四大类环境 258 | 259 | \begin{itemize} 260 | \item \textit{定理类环境},包含标题和内容两部分,全部定理类环境的编号均以章节编号。根据格式的不同分为 3 种 261 | \begin{itemize} 262 | \item \textcolor{main}{\textbf{definition}} 环境,颜色为 \textcolor{main}{main}; 263 | \item \textcolor{second}{\textbf{theorem、lemma、corollary、axiom、postulate}} 环境,颜色为 \textcolor{second} {second}; 264 | \item \textcolor{third}{\textbf{proposition}} 环境,颜色为 \textcolor{third}{third}。 265 | \end{itemize} 266 | \item \textit{示例类环境},有 \textbf{example、problem、exercise} 环境(对应于例、例题、练习),自动编号,编号以章节为单位,其中 \textbf{exercise} 有提示符。 267 | \item \textit{提示类环境},有 \textbf{note} 环境,特点是:无编号,有引导符。 268 | \item \textit{结论类环境},有 \textbf{conclusion、assumption、property、remark、solution} 环境\footnote{本模板还添加了一个 \lstinline|result| 选项,用于隐藏 \lstinline{solution} 和 \lstinline{proof} 环境,默认为显示(\lstinline{result=answer}),隐藏使用 \lstinline{result=noanswer}。},三者均以粗体的引导词为开头,和普通段落格式一致。 269 | \end{itemize} 270 | 271 | 其中,定理类环境均有带星号的版本:\textcolor{main}{\textbf{definition*}}、\textcolor{second}{\textbf{theorem*}}、\textcolor{second}{\textbf{lemma*}}、\textcolor{second}{\textbf{corollary*}}、\textcolor{second}{\textbf{axiom*}}、\textcolor{second}{\textbf{postulate*}}、\textcolor{third}{\textbf{proposition*}},带星号的定理类环境不会编号。 272 | 273 | \subsection{定理类环境的使用} 274 | 275 | \subsubsection{\texttt{fancy} 模式} 276 | 277 | 在 \lstinline{fancy} 模式下使用了 \lstinline{tcolorbox} 宏包来定制定理类环境,所以和普通的定理环境的使用有些许区别,有编号定理的使用方法如下: 278 | 279 | \begin{lstlisting} 280 | % 有名字,有标签 281 | \begin{theorem}{theorem name}{label} 282 | 这是一个有名字和标签的定理。 283 | 用 \ref{thm:label} 来引用这个定理。 284 | \end{theorem} 285 | % 无名字,有标签 286 | \begin{theorem}{}{label no name} 287 | 这是一个没有名字但是有标签的定理。 288 | 用 \ref{thm:label no name} 来引用这个定理。 289 | \end{theorem} 290 | % 有名字,无标签 291 | \begin{theorem}{theorem name}{} 292 | 这是一个有名字但是没有标签的定理。 293 | 这个定理不能被引用。 294 | 最后的 {} 可以省略不写。 295 | \end{theorem} 296 | % 无名字,无标签 297 | \begin{theorem}{}{} 298 | 这是一个没有名字也没有标签的定理。 299 | 这个定理不能被引用。 300 | 两个 {} 均可以省略不写。 301 | \end{theorem} 302 | \end{lstlisting} 303 | 304 | 第一个选项 \lstinline{theorem name} 是定理的名字,如果定理没有名字请使用 \lstinline|{}|\cprotect\footnote{除非这个定理也没有标签,否则不能省略。}。第二个选项 \lstinline{label} 是交叉引用时所用到的标签,如果定理没有标签,可以不写 \lstinline|{label}| 或使用 \lstinline|{}|。交叉引用的方法为 \lstinline|\ref{thm:label}|。请注意,交叉引用时必须加上前缀 \lstinline{thm:}。其他相同用法的定理类环境见表 \ref{tab:theorem-class}。 305 | 306 | 不编号的定理使用方法如下: 307 | 308 | \begin{lstlisting} 309 | % 有名字 310 | \begin{theorem*}{theorem name} 311 | 这是一个不编号的有名字的定理。 312 | 这个定理不能被引用。 313 | \end{theorem*} 314 | % 无名字 315 | \begin{theorem*}{} 316 | 这是一个不编号且没有名字的定理。 317 | 最后的 {} 可以省略不写。 318 | 这个定理不能被引用。 319 | \end{theorem*} 320 | \end{lstlisting} 321 | 其中的选项 \lstinline{theorem name} 是定理的名字,如果没有名字可以不写 \lstinline|{theorem name}| 或使用 \lstinline|{}| 322 | 323 | \begin{table}[htbp] 324 | \centering 325 | \caption{定理类环境} 326 | \begin{tabular}{llll} 327 | \toprule 328 | 环境名 & 标签名 & 前缀 & 交叉引用 \\ 329 | \midrule 330 | definition & label & def & \lstinline|\ref{def:label}| \\ 331 | theorem & label & thm & \lstinline|\ref{thm:label}| \\ 332 | postulate & label & pos & \lstinline|\ref{pos:label}| \\ 333 | axiom & label & axi & \lstinline|\ref{axi:label}|\\ 334 | lemma & label & lem & \lstinline|\ref{lem:label}| \\ 335 | corollary & label & cor & \lstinline|\ref{cor:label}| \\ 336 | proposition & label & pro & \lstinline|\ref{pro:label}| \\ 337 | \bottomrule 338 | \end{tabular}% 339 | \label{tab:theorem-class}% 340 | \end{table}% 341 | 342 | 在用户多次反馈下,在 4.1 版本引入了原生定理的支持方式,使用方法如下: 343 | 344 | \begin{lstlisting} 345 | % 有名字,有标签 346 | \begin{theorem}[theorem name]\label{thm:label} 347 | 这是一个有名字和标签的定理。 348 | 用 \ref{thm:label} 来引用这个定理。 349 | \end{theorem} 350 | % 无名字,有标签 351 | \begin{theorem}\label{thm:label no name} 352 | 这是一个没有名字但是有标签的定理。 353 | 用 \ref{thm:label no name} 来引用这个定理。 354 | \end{theorem} 355 | % 有名字,无标签 356 | \begin{theorem}[theorem name] 357 | 这是一个有名字但是没有标签的定理。 358 | 这个定理不能被引用。 359 | \end{theorem} 360 | % 无名字,无标签 361 | \begin{theorem} 362 | 这是一个没有名字也没有标签的定理。 363 | 这个定理不能被引用。 364 | \end{theorem} 365 | \end{lstlisting} 366 | 这时引用不需要加前缀,\lstinline{\ref} 中的内容与 \lstinline{\label} 中的内容相同,换句话说,这时的使用方法与使用原生定理环境的时候几乎相同。 367 | 368 | \subsubsection{\texttt{simple} 模式} 369 | 370 | 在 \lstinline{simple} 模式下使用了 \lstinline{amsthm} 宏包,定理类环境使用方法与原生一致,定理的使用方法如下: 371 | 372 | \begin{lstlisting} 373 | % 有名字,有标签 374 | \begin{theorem}[theorem name]\label{thm:label} 375 | 这是一个有名字和标签的定理。 376 | 用 \ref{thm:label} 来引用这个定理。 377 | \end{theorem} 378 | % 无名字,有标签 379 | \begin{theorem}\label{thm:label no name} 380 | 这是一个没有名字但是有标签的定理。 381 | 用 \ref{thm:label no name} 来引用这个定理。 382 | \end{theorem} 383 | % 有名字,无标签 384 | \begin{theorem}[theorem name] 385 | 这是一个有名字但是没有标签的定理。 386 | 这个定理不能被引用。 387 | \end{theorem} 388 | % 无名字,无标签 389 | \begin{theorem} 390 | 这是一个没有名字也没有标签的定理。 391 | 这个定理不能被引用。 392 | \end{theorem} 393 | \end{lstlisting} 394 | 395 | % \subsection{算法环境} 396 | 397 | % \begin{algorithm}\label{alg:test} 398 | % \Input{A bitmap $I$ of size $w \times l$} 399 | % \Output{A partition of the bitmap} 400 | % \BlankLine 401 | % \emph{special treatment of the first line}\; 402 | % \For{$i \leftarrow 2$ \KwTo $l$}{ 403 | % \emph{special treatment of the first element of line $i$}\; 404 | % \For{$j \leftarrow 2$ \KwTo $w$}{\label{forins} 405 | % $\Left \leftarrow \FindCompress{$I[i,j-1]$}$\; 406 | % $\Up \leftarrow \FindCompress{$I[i-1,]$}$\; 407 | % $\This \leftarrow \FindCompress{$I[i,j]$}$\; 408 | % \If(\tcp*[h]{O(\Left,\This)==1}){\Left compatible with \This}{\label{lt} 409 | % \lIf{$\Left < \This$}{$\Union{\Left,\This}$} 410 | % \lElse{$\Union{\This,\Left}$} 411 | % } 412 | % \If(\tcp*[f]{O(\Up,\This)==1}){\Up compatible with \This}{\label{ut} 413 | % \lIf{$\Up < \This$}{$\Union{\Up,\This}$} 414 | % \tcp{\This is put under \Up to keep tree as flat as possible}\label{cmt} 415 | % \lElse{$\Union{\This,\Up}$}\tcp*[r]{\This{} linked to \Up}\label{lelse} 416 | % } 417 | % } 418 | % \lForEach{element $e$ of the line $i$}{\FindCompress{p}} 419 | % } 420 | % \caption{disjoint decomposition}\label{algo_disjdecomp} 421 | % \end{algorithm} 422 | 423 | 424 | \subsection{修改计数器} 425 | 426 | 当前定理等环境计数器按章计数,如果想修改定理类环境按节计数,可以修改计数器选项 \lstinline{thmcnt},可用选项为 \lstinline{chapter} (默认)与 \lstinline{section}: 427 | 428 | \begin{lstlisting} 429 | \documentclass[section]{elegantbook} %or 430 | \documentclass[thmcnt=section]{elegantbook} 431 | \end{lstlisting} 432 | 433 | 如果希望全局的定理类环境使用同一个计数器,可以使用文档类选项 \lstinline{usesamecnt}: 434 | 435 | \begin{lstlisting} 436 | \documentclass[usesamecnt]{elegantbook} 437 | \end{lstlisting} 438 | 439 | \subsection{自定义定理类环境} 440 | 441 | 4.4 版本新增了一个自定义定理类环境的命令:\lstinline|\elegantnewtheorem|,它的参数含义如下: 442 | 443 | \begin{lstlisting} 444 | % fancy 模式(默认) 445 | \elegantnewtheorem{env}{title}{style}{prefix}[numbered-like] 446 | % simple 模式 447 | \elegantnewtheorem{env}{title}{style}[numbered-like] 448 | \end{lstlisting} 449 | 该命令可以同时定义编号环境 \lstinline|env| 和不编号环境 \lstinline|env*|。 450 | 451 | 其中 \lstinline|style| 支持的参数有:\lstinline|defstyle|,\lstinline|thmstyle|,\lstinline|prostyle|,分别对应“定义”,“定理”,“命题”三种样式。 452 | 453 | 如果添加了可选参数 \lstinline{numbered-like},将会使该定理类环境与名为 \lstinline{numbered-like} 的定理类环境使用同一计数器。\textbf{注意}:该参数在使用 \lstinline{usesamecnt} 选项时不起作用,并且会在终端以及 \lstinline{.log} 文件中输出一个警告,来提示用户该选项不起作用: 454 | 455 | \begin{lstlisting} 456 | [numbered-like] won't make sence with option 457 | `usesamecnt'. 458 | \end{lstlisting} 459 | 460 | \begin{itemize} 461 | \item 在炫彩模式(\lstinline{fancy})下,需要 5 个参数来定义一个新的定理类环境,分别是: 462 | 定理类环境名,定理类环境的标题,定理类环境的样式,该定理类环境的前缀,(可选)该定理类环境继承的定理类环境: 463 | 464 | \begin{lstlisting} 465 | % 导言区 466 | \elegantnewtheorem{examplefancy}{自定义定理类环境}{thmstyle}{exfancy} 467 | % 正文 468 | \begin{examplefancy}{定理名}{label} 469 | 这里是自定义定理类环境 \ref{exfancy:label} 470 | \end{examplefancy} 471 | \begin{examplefancy*}{定理名} 472 | 这里是无编号自定义定理类环境 473 | \end{examplefancy*} 474 | \end{lstlisting} 475 | 476 | 如果不给出第四个参数,或第四个参数置空的话,将会用定理类环境名来作为默认前缀,即 477 | \begin{lstlisting} 478 | % 导言区 479 | \elegantnewtheorem{test}{TEST}{thmstyle} 480 | % 或 481 | \elegantnewtheorem{test}{TEST}{thmstyle}{} 482 | % 正文 483 | \begin{test}{name}{label} 484 | 默认前缀为 test。 485 | 使用 \ref{test:label} 来引用这个定理类环境。 486 | \end{test} 487 | \end{lstlisting} 488 | 489 | 这时会在终端以及 \verb|.log| 文件中输出一个警告信息来提示用户没有定义前缀: 490 | 491 | \begin{lstlisting}[language=bash] 492 | Class elegantbook Warning: Because you didn't provide a prefix. 493 | (elegantbook) We use test as the default prefix. 494 | (elegantbook) You have to use 495 | (elegantbook) \ref {test:label} to refer a 496 | (elegantbook) \begin {test}{name}{label} environment. 497 | (elegantbook) on input line 3. 498 | \end{lstlisting} 499 | 500 | \item 在简单模式(\lstinline{simple})下,需要 4 个参数来定义一个新的定理类环境,分别是: 501 | 定理类环境名,定理类环境的标题,定理类环境的样式,该定理类环境的前缀,(可选)该定理类环境继承的定理类环境: 502 | \begin{lstlisting} 503 | % 导言区 504 | \elegantnewtheorem{examplesimple}{自定义定理类环境}{thmstyle} 505 | % 正文 506 | \begin{examplesimple}[定理名]\label{exsimple:label} 507 | 这里是自定义定理类环境 \ref{exsimple:label} 508 | \end{examplesimple} 509 | \begin{examplesimple*}[定理名] 510 | 这里是无编号自定义定理类环境 511 | \end{examplesimple*} 512 | \end{lstlisting} 513 | 514 | 如果此时错误地给出了第四个参数,那么将会在终端以及 \verb|.log| 文件中输出一个错误信息: 515 | \begin{lstlisting} 516 | % elegantbook-cn.tex 517 | \elegantnewtheorem{test}{TEST}{thmstyle}{} 518 | % .log file 519 | ./elegantbook-cn.tex:3: Class elegantbook Error: You can't set a prefix in mode ``simple''. 520 | (elegantbook) Just use 521 | (elegantbook) \elegantnewtheorem {test}{TEST}{thmstyle} . 522 | \end{lstlisting} 523 | 524 | \end{itemize} 525 | 526 | \subsection{其他环境的使用} 527 | 528 | 其他三种环境没有选项,可以直接使用,比如 \lstinline{example} 环境的使用方法与效果: 529 | \begin{lstlisting} 530 | \begin{example} 531 | This is the content of example environment. 532 | \end{example} 533 | \end{lstlisting} 534 | 535 | 这几个都是同一类环境,区别在于 536 | 537 | \begin{itemize} 538 | \item 示例环境(example)、练习(exercise)与例题(problem)章节自动编号; 539 | \item 注意(note),练习(exercise)环境有提醒引导符; 540 | \item 结论(conclusion)等环境都是普通段落环境,引导词加粗。 541 | \end{itemize} 542 | 543 | \section{列表环境} 544 | 本模板借助于 \lstinline{tikz} 定制了 \lstinline{itemize} 和 \lstinline{enumerate} 环境,其中 \lstinline{itemize} 环境修改了 3 层嵌套,而 \lstinline{enumerate} 环境修改了 4 层嵌套(仅改变颜色)。示例如下\\[2ex] 545 | \begin{minipage}[b]{0.49\textwidth} 546 | \begin{itemize} 547 | \item first item of nesti; 548 | \item second item of nesti; 549 | \begin{itemize} 550 | \item first item of nestii; 551 | \item second item of nestii; 552 | \begin{itemize} 553 | \item first item of nestiii; 554 | \item second item of nestiii. 555 | \end{itemize} 556 | \end{itemize} 557 | \end{itemize} 558 | \end{minipage} 559 | \begin{minipage}[b]{0.49\textwidth} 560 | \begin{enumerate} 561 | \item first item of nesti; 562 | \item second item of nesti; 563 | \begin{enumerate} 564 | \item first item of nestii; 565 | \item second item of nestii; 566 | \begin{enumerate} 567 | \item first item of nestiii; 568 | \item second item of nestiii. 569 | \end{enumerate} 570 | \end{enumerate} 571 | \end{enumerate} 572 | \end{minipage} 573 | 574 | \section{参考文献} 575 | 576 | \subsection{打印文献} 577 | 578 | 之前我们将文献调用的命令放在模板里面,然后用户反馈 \lstinline{\cite} 命令无法自动补全,因此我们新版本将其拿到外面来,新版本打印参考文献的命令的方法是,在导言区(也即 \lstinline|\begin{document}| 之前),加入: 579 | 580 | \begin{lstlisting} 581 | \addbibresource[location=local]{reference.bib} 582 | \end{lstlisting} 583 | 584 | 然后再需要打印文献的地方使用: 585 | \begin{lstlisting} 586 | \printbibliography[heading=bibintoc, title=\ebibname] 587 | \end{lstlisting} 588 | 589 | 其中 \lstinline{reference.bib} 为参考文献存放的文件,需要放在项目文件夹下。 590 | 591 | \subsection{修改文献格式} 592 | 593 | 此外,本模板调用了 biblatex 宏包,并提供了 biber(默认) 和 bibtex 两个后端选项,可以使用 \lstinline{bibend} 进行修改: 594 | 595 | \begin{lstlisting} 596 | \documentclass[bibtex]{elegantbook} 597 | \documentclass[bibend=bibtex]{elegantbook} 598 | \end{lstlisting} 599 | 600 | 关于文献条目(bib item),你可以在谷歌学术,Mendeley,Endnote 中取,然后把它们添加到 \lstinline{reference.bib} 中。在文中引用的时候,引用它们的键值(bib key)即可。 601 | 602 | 为了方便文献样式修改,模板引入了 \lstinline{bibstyle} 和 \lstinline{citestyle} 选项,默认均为数字格式(numeric),参考文献示例:\cite{cn1,en2,en3} 使用了中国一个大型的 P2P 平台(人人贷)的数据来检验男性投资者和女性投资者在投资表现上是否有显著差异。 603 | 604 | 如果需要设置为国标 GB7714-2015,需要使用: 605 | \begin{lstlisting} 606 | \documentclass[citestyle=gb7714-2015, bibstyle=gb7714-2015]{elegantbook} 607 | \end{lstlisting} 608 | 609 | 在使用 610 | \begin{lstlisting} 611 | \documentclass[citestyle=gb7714-2015, bibstyle=gb7714-2015]{elegantbook} 612 | \end{lstlisting} 613 | 后,排序方式为按引用先后排序。如果不使用国标 GB7714-2015 并且需要添加排序方式,可以在导言区加入下面命令: 614 | \begin{lstlisting} 615 | \ExecuteBibliographyOptions{sorting=} 616 | \end{lstlisting} 617 | 其中 \lstinline{} 可以是 nty, nyt, nyvt, anyt, anyvt, ynt, ydnt, none, count, debug 的其中之一,更多排序相关请参考 biblatex 宏包手册的 3.1.2.1 节。 618 | 619 | 620 | \section{添加序章} 621 | 622 | 如果你想在第一章前面添序章,不改变原本章节序号,可以在第一章内容前面使用 623 | \begin{lstlisting} 624 | \chapter*{Introduction} 625 | \markboth{Introduction}{Introduction} 626 | The content of introduction. 627 | \end{lstlisting} 628 | 629 | \section{目录选项与深度} 630 | 本模板添加了一个目录选项 \lstinline{toc},可以设置目录为单栏(\lstinline{onecol})和双栏(\lstinline{twocol})显示,比如双栏显示可以使用 631 | \begin{lstlisting} 632 | \documentclass[twocol]{elegantbook} 633 | \documentclass[toc=twocol]{elegantbook} 634 | \end{lstlisting} 635 | 636 | 默认本模板目录深度为 1,你可以在导言区使用 637 | \begin{lstlisting} 638 | \setcounter{tocdepth}{2} 639 | \end{lstlisting} 640 | 将其修改为 2 级目录(章与节)显示。 641 | 642 | 643 | \section{章节摘要} 644 | 模板新增了一个章节摘要环境(introduction),使用示例 645 | \begin{lstlisting} 646 | \begin{introduction} 647 | \item Definition of Theorem 648 | \item Ask for help 649 | \item Optimization Problem 650 | \item Property of Cauchy Series 651 | \item Angle of Corner 652 | \end{introduction} 653 | \end{lstlisting} 654 | 效果如下: 655 | \begin{introduction} 656 | \item Definition of Theorem 657 | \item Ask for help 658 | \item Optimization Problem 659 | \item Property of Cauchy Series 660 | \item Angle of Corner 661 | \end{introduction} 662 | 663 | 环境的标题文字可以通过这个环境的可选参数进行修改,修改方法为: 664 | \begin{lstlisting} 665 | \begin{introduction}[Brief Introduction] 666 | ... 667 | \end{introduction} 668 | \end{lstlisting} 669 | 670 | \section{章后习题} 671 | 前面我们介绍了例题和练习两个环境,这里我们再加一个,章后习题(\lstinline{problemset})环境,用于在每一章结尾,显示本章的练习。使用方法如下 672 | 673 | \begin{lstlisting} 674 | \begin{problemset} 675 | \item exercise 1 676 | \item exercise 2 677 | \item exercise 3 678 | \end{problemset} 679 | \end{lstlisting} 680 | 681 | 682 | 效果如下: 683 | \begin{problemset}[我的题目] 684 | \item exercise 1 685 | \item exercise 2 686 | \item exercise 3 687 | \item 测试数学公式 688 | \begin{equation} 689 | a^2+b^2=c_{2_{i}} (1,2) [1,23] 690 | \end{equation} 691 | \end{problemset} 692 | 693 | \begin{remark} 694 | 如果你想把 \lstinline{problemset} 环境的标题改为其他文字,你可以类似于 introduction 环境修改 problemset 的可选参数。另外,目前这个环境会自动出现在目录中,但是不会出现在页眉页脚信息中(待解决)。 695 | \end{remark} 696 | 697 | \begin{solution} 698 | 如果你想把 \lstinline{problemset} 环境的标题改为其他文字,你可以类似于 introduction 环境修改 problemset 的可选参数。另外,目前这个环境会自动出现在目录中,但是不会出现在页眉页脚信息中(待解决)。 699 | \end{solution} 700 | 701 | \section{旁注} 702 | 703 | 在 3.08 版本中,我们引入了 旁注设置选项 \lstinline{marginpar=margintrue} 以及测试命令 \lstinline{\elegantpar} ,但是由此带来一堆问题。我们决定在 3.09 版本中将其删除,并且,在旁注命令得到大幅度优化之前,不会将此命令再次引入书籍模板中。对此造成各位用户的不方便,非常抱歉!不过我们保留了 \lstinline{marginpar} 这个选项,你可以使用 \lstinline{marginpar=margintrue} 获得保留右侧旁注的版面设计。然后使用系统自带的 \lstinline{\marginpar} 或者 \lstinline{marginnote} 宏包的 \lstinline{\marginnote} 命令。 704 | 705 | \begin{remark} 706 | 在使用旁注的时候,需要注意的是,文本和公式可以直接在旁注中使用。 707 | 708 | \begin{lstlisting} 709 | % text 710 | \marginpar{margin paragraph text} 711 | 712 | % equation 713 | \marginpar{ 714 | \begin{equation} 715 | a^2 + b^2 = c^2 716 | \end{equation} 717 | } 718 | \end{lstlisting} 719 | 720 | 但是浮动体(表格、图片)需要注意,不能用浮动体环境,需要使用直接插图命令或者表格命令环境。然后使用 \lstinline{\captionof} 为其设置标题。为了得到居中的图表,可以使用 \lstinline{\centerline} 命令或者 \lstinline{center} 环境。更多详情请参考:\href{https://tex.stackexchange.com/questions/5583/caption-of-figure-in-marginpar-and-caption-of-wrapfigure-in-margin}{Caption of Figure in Marginpar}。 721 | 722 | \begin{lstlisting} 723 | % graph with centerline command 724 | \marginpar{ 725 | \centerline{ 726 | \includegraphics[width=0.2\textwidth]{logo.png} 727 | } 728 | \captionof{figure}{your figure caption} 729 | } 730 | 731 | % graph with center environment 732 | \marginpar{ 733 | \begin{center} 734 | \includegraphics[width=0.2\textwidth]{logo.png} 735 | \captionof{figure}{your figure caption} 736 | \end{center} 737 | } 738 | \end{lstlisting} 739 | 740 | \end{remark} 741 | 742 | \chapter{字体选项} 743 | 字体选项独立成章的原因是,我们希望本模板的用户关心模板使用的字体,知晓自己使用的字体以及遇到字体相关的问题能更加便捷地找到答案。 744 | 745 | \textcolor{red}{\bfseries 重要提示}:从 3.10 版本更新之后,沿用至今的 newtx 系列字体被重新更改为 cm 字体。并且新增中文字体(\lstinline{chinesefont})选项。 746 | 747 | \section{数学字体选项} 748 | 749 | 本模板定义了一个数学字体选项(\lstinline{math}),可选项有三个: 750 | \begin{enumerate} 751 | \item \lstinline{math=cm}(默认),使用 \LaTeX{} 默认数学字体(推荐,无需声明); 752 | \item \lstinline{math=newtx},使用 \lstinline{newtxmath} 设置数学字体(潜在问题比较多)。 753 | \item \lstinline{math=mtpro2},使用 \lstinline{mtpro2} 宏包设置数学字体,要求用户已经成功安装此宏包。 754 | \end{enumerate} 755 | 756 | \section{使用 newtx 系列字体} 757 | 758 | 如果需要使用原先版本的 \lstinline{newtx} 系列字体,可以通过显示声明数学字体: 759 | 760 | \begin{lstlisting} 761 | \documentclass[math=newtx]{elegantbook} 762 | \end{lstlisting} 763 | 764 | \subsection{连字符} 765 | 766 | 如果使用 \lstinline{newtx} 系列字体宏包,需要注意下连字符的问题。 767 | \begin{equation} 768 | \int_{R^q} f(x,y) dy.\emph{of\kern0pt f} \sin x 769 | \end{equation} 770 | 的代码为 771 | \begin{lstlisting} 772 | \begin{equation} 773 | \int_{R^q} f(x,y) dy.\emph{of\kern0pt f} \sin x 774 | \end{equation} 775 | \end{lstlisting} 776 | 777 | \subsection{宏包冲突} 778 | 779 | 另外在 3.08 版本中,有用户反馈模板在和 \lstinline{yhmath} 以及 \lstinline{esvect} 等宏包搭配使用的时候会出现报错: 780 | \begin{lstlisting} 781 | LaTeX Error: 782 | Too many symbol fonts declared. 783 | \end{lstlisting} 784 | 785 | 原因是在使用 \lstinline{newtxmath} 宏包时,重新定义了数学字体用于大型操作符,达到了 {\heiti 最多 16 个数学字体} 的上限,在调用其他宏包的时候,无法新增数学字体。为了减少调用非常用宏包,在此给出如何调用 \lstinline{yhmath} 以及 \lstinline{esvect} 宏包的方法。 786 | 787 | 请在 \lstinline{elegantbook.cls} 内搜索 \lstinline{yhmath} 或者 \lstinline{esvect},将你所需要的宏包加载语句\textit{取消注释}即可。 788 | \begin{lstlisting} 789 | %%% use yhmath pkg, uncomment following code 790 | % \let\oldwidering\widering 791 | % \let\widering\undefined 792 | % \RequirePackage{yhmath} 793 | % \let\widering\oldwidering 794 | 795 | %%% use esvect pkg, uncomment following code 796 | % \RequirePackage{esvect} 797 | \end{lstlisting} 798 | 799 | \section{中文字体选项} 800 | 模板从 3.10 版本提供中文字体选项 \lstinline{chinesefont},可选项有 801 | \begin{enumerate} 802 | \item \lstinline{ctexfont}:默认选项,使用 \lstinline{ctex} 宏包根据系统自行选择字体,可能存在字体缺失的问题,更多内容参考 \lstinline{ctex} 宏包\href{https://ctan.org/pkg/ctex}{官方文档}\footnote{可以使用命令提示符,输入 \lstinline{texdoc ctex} 调出本地 \lstinline{ctex} 宏包文档}。 803 | \item \lstinline{founder}:方正字体选项(\textbf{需要安装方正字体}),后台调用 \lstinline{ctex} 宏包并且使用 \lstinline{fontset=none} 选项,然后设置字体为方正四款免费字体,方正字体下载注意事项见后文,用户只需要安装方正字体即可使用该选项。 804 | \item \lstinline{nofont}:后台会调用 \lstinline{ctex} 宏包并且使用 \lstinline{fontset=none} 选项,不设定中文字体,用户可以自行设置中文字体,具体见后文。 805 | \end{enumerate} 806 | 807 | \subsection{方正字体选项} 808 | 由于使用 \lstinline{ctex} 宏包默认调用系统已有的字体,部分系统字体缺失严重,因此,用户希望能够使用其它字体,我们推荐使用方正字体。方正的{\songti 方正书宋}、{\heiti 方正黑体}、{\kaishu 方正楷体}、{\fangsong 方正仿宋}四款字体均可免费试用,且可用于商业用途。用户可以自行从\href{http://www.foundertype.com/}{方正字体官网}下载此四款字体,在下载的时候请\textbf{务必}注意选择 GBK 字符集,也可以使用 \href{https://www.latexstudio.net/}{\LaTeX{} 工作室}提供的\href{https://pan.baidu.com/s/1BgbQM7LoinY7m8yeP25Y7Q}{方正字体,提取码为:njy9} 进行安装。安装时,{\kaishu Win 10 用户请右键选择为全部用户安装,否则会找不到字体。} 809 | 810 | \begin{figure}[!htb] 811 | \centering 812 | \includegraphics[width=0.9\textwidth]{founder.png} 813 | \end{figure} 814 | 815 | \subsection{其他中文字体} 816 | 如果你想完全自定义字体\footnote{这里仍然以方正字体为例。},你可以选择 \lstinline{chinesefont=nofont},然后在导言区设置 817 | \begin{lstlisting} 818 | \setCJKmainfont[BoldFont={FZHei-B01},ItalicFont={FZKai-Z03}]{FZShuSong-Z01} 819 | \setCJKsansfont[BoldFont={FZHei-B01}]{FZKai-Z03} 820 | \setCJKmonofont[BoldFont={FZHei-B01}]{FZFangSong-Z02} 821 | \setCJKfamilyfont{zhsong}{FZShuSong-Z01} 822 | \setCJKfamilyfont{zhhei}{FZHei-B01} 823 | \setCJKfamilyfont{zhkai}[BoldFont={FZHei-B01}]{FZKai-Z03} 824 | \setCJKfamilyfont{zhfs}[BoldFont={FZHei-B01}]{FZFangSong-Z02} 825 | \newcommand*{\songti}{\CJKfamily{zhsong}} 826 | \newcommand*{\heiti}{\CJKfamily{zhhei}} 827 | \newcommand*{\kaishu}{\CJKfamily{zhkai}} 828 | \newcommand*{\fangsong}{\CJKfamily{zhfs}} 829 | \end{lstlisting} 830 | 831 | \chapter{ElegantBook 写作示例} 832 | 833 | \begin{introduction} 834 | \item 积分定义~\ref{def:int} 835 | \item Fubini 定理~\ref{thm:fubi} 836 | \item 最优性原理~\ref{pro:max} 837 | \item 柯西列性质~\ref{property:cauchy} 838 | \item 韦达定理 839 | \end{introduction} 840 | 841 | \section{Lebesgue 积分} 842 | 在前面各章做了必要的准备后,本章开始介绍新的积分。在 Lebesgue 测度理论的基础上建立了 Lebesgue 积分,其被积函数和积分域更一般,可以对有界函数和无界函数统一处理。正是由于 Lebesgue 积分的这些特点,使得 Lebesgue 积分比 Riemann 积分具有在更一般条件下的极限定理和累次积分交换积分顺序的定理,这使得 Lebesgue 积分不仅在理论上更完善,而且在计算上更灵活有效。 843 | 844 | Lebesgue 积分有几种不同的定义方式。我们将采用逐步定义非负简单函数,非负可测函数和一般可测函数积分的方式。 845 | 846 | 由于现代数学的许多分支如概率论、泛函分析、调和分析等常常用到一般空间上的测度与积分理论,在本章最后一节将介绍一般的测度空间上的积分。 847 | 848 | \subsection{积分的定义} 849 | 850 | 我们将通过三个步骤定义可测函数的积分。首先定义非负简单函数的积分。以下设 $E$ 是 $\mathcal{R}^n$ 中的可测集。 851 | 852 | \begin{definition}[可积性] \label{def:int} 853 | 设 $ f(x)=\sum\limits_{i=1}^{k} a_i \chi_{A_i}(x)$ 是 $E$ 上的\textbf{非负简单函数},中文其中 $\{A_1,A_2,\ldots,A_k\}$ 是 $E$ 上的一个可测分割,$a_1,a_2,\ldots,a_k$ 是非负实数。定义 $f$ 在 $E$ 上的积分为 $\int_{a}^b f(x)$ 854 | \begin{equation} 855 | \label{inter} 856 | \int_{E} f dx = \sum_{i=1}^k a_i m(A_i) \pi \alpha\beta\sigma\gamma\nu\xi\epsilon\varepsilon. \oint_{a}^b\ointop_{a}^b\prod_{i=1}^n 857 | \end{equation} 858 | 一般情况下 $0 \leq \int_{E} f dx \leq \infty$。若 $\int_{E} f dx < \infty$,则称 $f$ 在 $E$ 上可积。 859 | \end{definition} 860 | 861 | 一个自然的问题是,Lebesgue 积分与我们所熟悉的 Riemann 积分有什么联系和区别?在 4.4 在我们将详细讨论 Riemann 积分与 Lebesgue 积分的关系。这里只看一个简单的例子。设 $D(x)$ 是区间 $[0,1]$ 上的 Dirichlet 函数。即 $D(x)=\chi_{Q_0}(x)$,其中 $Q_0$ 表示 $[0,1]$ 中的有理数的全体。根据非负简单函数积分的定义,$D(x)$ 在 $[0,1]$ 上的 Lebesgue 积分为 862 | \begin{equation} 863 | \label{inter2} 864 | \int_0^1 D(x)dx = \int_0^1 \chi_{Q_0} (x) dx = m(Q_0) = 0 865 | \end{equation} 866 | 即 $D(x)$ 在 $[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$ 在 $[0,1]$ 上不是 Riemann 可积的。 867 | 868 | 869 | 有界变差函数是与单调函数有密切联系的一类函数。有界变差函数可以表示为两个单调递增函数之差。与单调函数一样,有界变差函数几乎处处可导。与单调函数不同,有界变差函数类对线性运算是封闭的,它们构成一线空间。练习题 \ref{exer:43} 是一个性质的证明。 870 | 871 | \begin{exercise}\label{exer:43} 872 | 设 $f \notin\in L(\mathcal{R}^1)$,$g$ 是 $\mathcal{R}^1$ 上的有界可测函数。证明函数 873 | \begin{equation} 874 | \label{ex:1} 875 | I(t) = \int_{\mathcal{R}^1} f(x+t)g(x)dx \quad t \in \mathcal{R}^1 876 | \end{equation} 877 | 是 $\mathcal{R}^1$ 上的连续函数。 878 | \end{exercise} 879 | 880 | \begin{solution} 881 | 即 $D(x)$ 在 $[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$ 在 $[0,1]$ 上不是 Riemann 可积的。 882 | \end{solution} 883 | 884 | \begin{proof} 885 | 即 $D(x)$ 在 $[0,1]$ 上是 Lebesgue 可积的并且积分值为零。但 $D(x)$ 在 $[0,1]$ 上不是 Riemann 可积的。 886 | \end{proof} 887 | 888 | \begin{theorem}[Fubini 定理] \label{thm:fubi} 889 | (1)若 $f(x,y)$ 是 $\mathcal{R}^p\times\mathcal{R}^q$ 上的非负可测函数,则对几乎处处的 $x\in \mathcal{R}^p$,$f(x,y)$ 作为 $y$ 的函数是 $\mathcal{R}^q$ 上的非负可测函数,$g(x)=\int_{\mathcal{R}^q}f(x,y) dy$ 是 $\mathcal{R}^p$ 上的非负可测函数。并且 890 | \begin{equation} 891 | \label{eq:461} 892 | \int_{\mathcal{R}^p\times\mathcal{R}^q} f(x,y) dxdy=\int_{\mathcal{R}^p}\left(\int_{\mathcal{R}^q}f(x,y)dy\right)dx. 893 | \end{equation} 894 | 895 | (2)若 $f(x,y)$ 是 $\mathcal{R}^p\times\mathcal{R}^q$ 上的可积函数,则对几乎处处的 $x\in\mathcal{R}^p$,$f(x,y)$ 作为 $y$ 的函数是 $\mathcal{R}^q$ 上的可积函数,并且 $g(x)=\int_{\mathcal{R}^q}f(x,y) dy$ 是 $\mathcal{R}^p$ 上的可积函数。而且~\eqref{eq:461} 成立。 896 | \end{theorem} 897 | 898 | \begin{note} 899 | 在本模板中,引理(lemma),推论(corollary)的样式和定理~\ref{thm:fubi} 的样式一致,包括颜色,仅仅只有计数器的设置不一样。 900 | \end{note} 901 | 902 | 我们说一个实变或者复变量的实值或者复值函数是在区间上平方可积的,如果其绝对值的平方在该区间上的积分是有限的。所有在勒贝格积分意义下平方可积的可测函数构成一个希尔伯特空间,也就是所谓的 $L^2$ 空间,几乎处处相等的函数归为同一等价类。形式上,$L^2$ 是平方可积函数的空间和几乎处处为 0 的函数空间的商空间。 903 | 904 | \begin{proposition}[最优性原理] \label{pro:max} 905 | 如果 $u^*$ 在 $[s,T]$ 上为最优解,则 $u^*$ 在 $[s, T]$ 任意子区间都是最优解,假设区间为 $[t_0, t_1]$ 的最优解为 $u^*$ ,则 $u(t_0)=u^{*}(t_0)$,即初始条件必须还是在 $u^*$ 上。 906 | \end{proposition} 907 | 908 | 我们知道最小二乘法可以用来处理一组数据,可以从一组测定的数据中寻求变量之间的依赖关系,这种函数关系称为经验公式。本课题将介绍最小二乘法的精确定义及如何寻求点与点之间近似成线性关系时的经验公式。假定实验测得变量之间的 $n$ 个数据,则在平面上,可以得到 $n$ 个点,这种图形称为 “散点图”,从图中可以粗略看出这些点大致散落在某直线近旁, 我们认为其近似为一线性函数,下面介绍求解步骤。 909 | 910 | \begin{figure}[htbp] 911 | \centering 912 | \includegraphics[width=0.6\textwidth]{scatter.jpg} 913 | \caption{散点图示例 $\hat{y}=a+bx$ \label{fig:scatter}} 914 | \end{figure} 915 | 916 | 以最简单的一元线性模型来解释最小二乘法。什么是一元线性模型呢?监督学习中,如果预测的变量是离散的,我们称其为分类(如决策树,支持向量机等),如果预测的变量是连续的,我们称其为回归。回归分析中,如果只包括一个自变量和一个因变量,且二者的关系可用一条直线近似表示,这种回归分析称为一元线性回归分析。如果回归分析中包括两个或两个以上的自变量,且因变量和自变量之间是线性关系,则称为多元线性回归分析。对于二维空间线性是一条直线;对于三维空间线性是一个平面,对于多维空间线性是一个超平面。 917 | 918 | \begin{property}\label{property:cauchy} 919 | 柯西列的性质 920 | \begin{enumerate} 921 | \item $\{x_k\}$ 是柯西列,则其子列 $\{x_k^i\}$ 也是柯西列。 922 | \item $x_k\in \mathcal{R}^n$,$\rho(x,y)$ 是欧几里得空间,则柯西列收敛,$(\mathcal{R}^n,\rho)$ 空间是完备的。 923 | \end{enumerate} 924 | \end{property} 925 | 926 | \begin{conclusion} 927 | 回归分析(regression analysis) 是确定两种或两种以上变量间相互依赖的定量关系的一种统计分析方法。运用十分广泛,回归分析按照涉及的变量的多少,分为一元回归和多元回归分析;按照因变量的多少,可分为简单回归分析和多重回归分析;按照自变量和因变量之间的关系类型,可分为线性回归分析和非线性回归分析。 928 | \end{conclusion} 929 | 930 | \begin{problemset} 931 | \item 设 $A$ 为数域 $K$ 上的 $n$ 级矩阵。证明:如果 $K^n$ 中任意非零列向量都是 $A$ 的特征向量,则 $A$ 一定是数量矩阵。 932 | \item 证明:不为零矩阵的幂零矩阵不能对角化。 933 | \item 设 $A = (a_{ij})$ 是数域 $K$ 上的一个 $n$ 级上三角矩阵,证明:如果 $a_{11} = a_{22} = \cdots = a_{nn}$,并且至少有一个 $a_{kl} \not = 0 (k < l)$,则 $A$ 一定不能对角化。 934 | \end{problemset} 935 | 936 | \chapter{常见问题集} 937 | 938 | 我们根据用户社区反馈整理了下面一些常见的问题,用户在遇到问题时,应当首先查阅本手册和本部分的常见的问题。 939 | 940 | \begin{enumerate}[itemsep=1.5ex] 941 | \item \question{有没有办法章节用“第一章,第一节,(一)”这种?} 942 | 见前文介绍,可以使用 \lstinline{scheme=chinese} 设置。 943 | \item \question{大佬,我想把正文字体改为亮色,背景色改为黑灰色。} 944 | 页面颜色可以使用 \lstinline{\pagecolor} 命令设置,文本命令可以参考\href{https://tex.stackexchange.com/questions/278544/xcolor-what-is-the-equivalent-of-default-text-color}{这里}进行设置。 945 | \item \question{\lstinline{! LaTeX Error: Unknown option 'scheme=plain' for package 'ctex'.}} 946 | 你用的 C\TeX{} 套装吧?这个里面的 \lstinline{ctex} 宏包已经是已经是 10 年前的了,与本模板使用的 \lstinline{ctex} 宏集有很大区别。不建议 C\TeX{} 套装了,请卸载并安装 \TeX{} Live 2022。 947 | \item \question{我该使用什么版本?} 948 | 请务必使用\href{https://github.com/ElegantLaTeX/ElegantBook/releases}{最新正式发行版},发行版间不定期可能会有更新(修复 bug 或者改进之类),如果你在使用过程中没有遇到问题,不需要每次更新\href{https://github.com/ElegantLaTeX/ElegantBook/archive/master.zip}{最新版},但是在发行版更新之后,请尽可能使用最新版(发行版)!最新发行版可以在 GitHub 或者 \TeX{} Live 2021 内获取。 949 | \item \question{我该使用什么编辑器?} 950 | 你可以使用 \TeX{} Live 2021 自带的编辑器 \TeX{}works 或者使用 \TeX{}studio,\TeX works 的自动补全,你可以参考我们的总结 \href{https://github.com/EthanDeng/texworks-autocomplete}{\TeX works 自动补全}。推荐使用 \TeX{} Live 2021 + \TeX{}studio。我自己用 VS Code 和 Sublime Text,相关的配置说明,请参考 \href{https://github.com/EthanDeng/vscode-latex}{\LaTeX{} 编译环境配置:Visual Studio Code 配置简介} 和 \href{https://github.com/EthanDeng/sublime-text-latex}{Sublime Text 搭建 \LaTeX{} 编写环境}。 951 | \item \question{您好,我们想用您的 ElegantBook 模板写一本书。关于机器学习的教材,希望获得您的授权,谢谢您的宝贵时间。} 952 | 模板的使用修改都是自由的,你们声明模板来源以及模板地址(GitHub 地址)即可,其他未尽事宜按照开源协议 LPPL-1.3c。做好之后,如果方便的话,可以给我们一个链接,我把你们的教材放在 Elegant\LaTeX{} 用户作品集里。 953 | \item \question{请问交叉引用是什么?} 954 | 本群和本模板适合有一定 \LaTeX{} 基础的用户使用,新手请先学习 \LaTeX{} 的基础,理解各种概念,否则你将寸步难行。 955 | \item \question{代码高亮环境能用其他语言吗?} 956 | 可以的,ElegantBook 模板用的是 \lstinline{listings} 宏包,你可以在环境(\lstinline{lstlisting})之后加上语言(比如 Python 使用 \lstinline{language=Python} 选项),全局语言修改请使用 \lstinline{lstset} 命令,更多信息请参考宏包文档。 957 | \item \question{群主,什么时候出 Beamer 的模板(主题),ElegantSlide 或者 ElegantBeamer?} 958 | 由于 Beamer 中有一个很优秀的主题 \href{https://github.com/matze/mtheme}{Metropolis}。后续确定不会再出任何主题/模板,请大家根据需要修改已有主题。 959 | \end{enumerate} 960 | 961 | \chapter{版本更新历史} 962 | 963 | 根据用户的反馈,我们不断修正和完善模板。由于 3.00 之前版本与现在版本差异非常大,在此不列出 3.00 之前的更新内容。 964 | 965 | \datechange{2022/12/31}{版本 4.5} \textcolor{red}{\bfseries 停止维护!} 966 | 967 | \datechange{2022/08/17}{版本 4.5 pre} 968 | \begin{change} 969 | \item \textbf{重要改动}:提供了一个新的文档类选项 \lstinline|usesamecnt|,可以使全局的定理类环境使用同一个计数器。 970 | \item \textbf{重要改动}:修改了 \lstinline|\elegantnewtheorem| 命令,使其有第五个(可选)参数。 971 | \end{change} 972 | 973 | \datechange{2022/08/15}{版本 4.4 正式发布。} 974 | 975 | \begin{change} 976 | \item \textbf{重要改动}:提供了一个定义定理类环境的命令 \lstinline|\elegantnewtheorem|; 977 | \item \textbf{重要改动}:为所有内置定理类环境提供了带星号的版本,带星号的定理类环境不会编号,修复 \href{https://github.com/ElegantLaTeX/ElegantBook/issues/167}{issue: \#167}; 978 | \item \textbf{重要改动}:在 \lstinline{scheme=chinese} 下将目录中的“第 1 章”修改为“第一章”; 979 | \item 将 TeX Gyre Termes 改为 TeX Gyre TermesX,使英文部分字形与 newtx 系列宏包更相近; 980 | \item 重写了内置定理类环境的实现方法,修复了一些 bug,由于修改部分较大,如果引入了新的 bug,请及时在 QQ 群或 \href{https://github.com/ElegantLaTeX}{Github} 上进行反馈; 981 | \item 删除 Gitee 仓库地址,恢复 GitHub 提交(pull requests); 982 | \item 将参考文献命令添加到导言区,使编辑器能够对参考文献自动补全。 983 | \end{change} 984 | 985 | \datechange{2022/04/09}{版本 4.3 正式发布。} 986 | 987 | \begin{change} 988 | \item 放弃 newtx 系列宏包的设置,改用 TeX Gyre Termes,并设置其他字体; 989 | \item 修改定理类环境内部字体设置,修复环境内部中文无法加粗问题; 990 | \item 增加定理类环境的计数器选项 \lstinline{thmcnt},可选 \lstinline{chapter} 和 \lstinline{section}; 991 | \item 增加 \lstinline{bibend} 选项,可选 \lstinline{bibend=biber}(默认)和 \lstinline{bibend=bibtex}。 992 | \end{change} 993 | 994 | 995 | 996 | \datechange{2022/03/08}{版本 4.2 正式发布。} 997 | 998 | \begin{change} 999 | \item 对于 newtx 系列宏包更新导致的字体 bug 的修复; 1000 | \item 修缮目录格式,为了达到这个目的,重新改写 \lstinline{\chaptername} 的重定义语句; 1001 | \item 增加日语 \lstinline{lang=jp} 设定。 1002 | \item 这个版本为一个临时性版本,在 \TeX Live 2022 发布之后,将尽快发布 4.3 版本,由于对于中文的改动比较大,可能会出现预期之外的 bug,有问题可以在 QQ 群或者 Github 反馈。 1003 | \end{change} 1004 | 1005 | 1006 | \datechange{2021/05/02}{版本 4.1 正式发布。} 1007 | 1008 | \begin{change} 1009 | \item \textbf{重要改动}:由原先的 \hologo{BibTeX} 改为 biblatex 编译方式(后端为 \lstinline{biber}),请注意两者之间的差异; 1010 | \item \textbf{重要改进}:修改对于定理写法兼容方式,提高数学公式代码的兼容性; 1011 | \item 页面设置改动,默认页面更宽;方便书写和阅读; 1012 | \item 支持目录文字以及页码跳转; 1013 | \item 不再维护 \hologo{pdfLaTeX} 中文支持方式,请务必使用 \hologo{XeLaTeX} 编译中文文稿。 1014 | \item 增加多个语言选项,法语 \lstinline{lang=fr}、荷兰语 \lstinline{lang=nl}、匈牙利语 \lstinline{lang=hu}、西班牙语 \lstinline{lang=es}、蒙古语 \lstinline{lang=mn} 等。 1015 | \end{change} 1016 | 1017 | 1018 | \datechange{2020/04/12}{版本 3.11 正式发布,\textcolor{red}{此版本为 3.x 最后版本。}} 1019 | 1020 | \begin{change} 1021 | \item \textbf{重要修正}:修复因为 \lstinline{gbt7714} 宏包更新导致的 \lstinline{natbib option clash} 错误; 1022 | \item 由于 \lstinline{pgfornament} 宏包未被 \TeX{} Live 2020 收录,因此删除 base 相关的内容; 1023 | \item 修复部分环境的空格问题; 1024 | \item 增加了意大利语言选项 \lstinline{lang=it}。 1025 | \end{change} 1026 | 1027 | 1028 | \datechange{2020/02/10}{版本 3.10 正式发布} 1029 | 1030 | \begin{change} 1031 | \item 增加数学字体选项 \lstinline{math},可选项为 \lstinline{newtx} 和 \lstinline{cm}。\\ 1032 | \textbf{重要提示}:原先通过 \lstinline{newtxmath} 宏包设置的数学字体改为 \LaTeX{} 默认数学字体,如果需要保持原来的字体,需要显式声明数学字体(\lstinline{math=newtx}); 1033 | \item 新增中文字体选项 \lstinline{chinesefont},可选项为 \lstinline{ctexfont}、\lstinline{founder} 和 \lstinline{nofont}。 1034 | \item 将封面作者信息设置为可选,并且增加自定义信息命令 \lstinline{\bioinfo}; 1035 | \item 在说明文档中增加版本历史,新增 \lstinline{\datechange} 命令和 \lstinline{change} 环境; 1036 | \item 增加汉化章节选项 \lstinline{scheme},可选项为汉化 \lstinline{chinese}; 1037 | \item 由于 \lstinline{\lvert} 问题已经修复,重新调整 \lstinline{ctex} 宏包和 \lstinline{amsmath} 宏包位置。 1038 | \item 修改页眉设置,去除了 \lstinline{\lastpage} 以避免 page anchor 问题,加入 \lstinline{\frontmatter}。 1039 | \item 修改参考文献选项 \lstinline{cite},可选项为数字 \lstinline{numbers}、 作者-年份 \lstinline{authoryear} 以及上标 \lstinline{super}。 1040 | \item 新增参考文献样式选项 \lstinline{bibstyle},并将英文模式下参考文献样式 \lstinline{apalike} 设置为默认值,中文仍然使用 \lstinline{gbt7714} 宏包设置。 1041 | \end{change} 1042 | 1043 | \datechange{2019/08/18}{版本 3.09 正式发布} 1044 | 1045 | \begin{change} 1046 | \item \lstinline{\elegantpar} 存在 bug,删除 \lstinline{\elegantpar} 命令,建议用户改用 \lstinline{\marginnote} 和 \lstinline{\marginpar} 旁注命令。 1047 | \item 积分操作符统一更改为 \lstinline{esint} 宏包设置; 1048 | \item 新增目录选项 \lstinline{toc},可选项为单栏 \lstinline{onecol} 和双栏 \lstinline{twocol}; 1049 | \item 手动增加参考文献选项 \lstinline{cite},可选项为上标形式 \lstinline{super}; 1050 | \item 修正章节习题(\lstinline{problemset})环境。 1051 | \end{change} 1052 | 1053 | \datechange{2019/05/28}{版本 3.08 正式发布} 1054 | 1055 | \begin{change} 1056 | \item 修复 \lstinline{\part} 命令。 1057 | \item 引入 Note 模板中的 \lstinline{pad} 选项 \lstinline{device=pad}。 1058 | \item 数学字体加入 \lstinline{mtpro2} 可选项 \lstinline{math=mtpro2},使用免费的 \lstinline{lite} 子集。 1059 | \item 将参考文献默认显示方式 \lstinline{authoyear} 改为 \lstinline{numbers}。 1060 | \item 引入旁注命令 \lstinline{\marginpar}(测试)。 1061 | \item 新增章节摘要环境 \lstinline{introduction}。 1062 | \item 新增章节习题环境 \lstinline{problemset}。 1063 | \item 将 \lstinline{\equote} 重命名为 \lstinline{\extrainfo}。 1064 | \item 完善说明文档,增加致谢部分。 1065 | \end{change} 1066 | 1067 | \datechange{2019/04/15}{版本 3.07 正式发布} 1068 | 1069 | \begin{change} 1070 | \item 删除中英文自定义字体总设置。 1071 | \item 新增颜色主题,并将原绿色默认主题设置为蓝色 \lstinline{color=blue}。 1072 | \item 引入隐藏装饰图案选项 \lstinline{base},可选项有显示 \lstinline{show} 和隐藏 \lstinline{hide}。 1073 | \item 新增定理模式 \lstinline{mode},可选项有简单模式 \lstinline{simple} 和炫彩模式 \lstinline{fancy}。 1074 | \item 新增隐藏证明、答案等环境的选项 \lstinline{result=noanswer}。 1075 | \end{change} 1076 | 1077 | \datechange{2019/02/25}{版本 3.06 正式发布} 1078 | 1079 | \begin{change} 1080 | \item 删除水印。 1081 | \item 新封面,新装饰图案。 1082 | \item 添加引言使用说明。 1083 | \item 修复双面 \lstinline{twoside}。 1084 | \item 美化列表环境。 1085 | \item 增加 \lstinline{\subsubsection} 的设置。 1086 | \item 将模板拆分成中英文语言模式。 1087 | \item 使用 \lstinline{lstlisting} 添加代码高亮。 1088 | \item 增加定理类环境使用说明。 1089 | \end{change} 1090 | 1091 | \datechange{2019/01/22}{版本 3.05 正式发布} 1092 | 1093 | \begin{change} 1094 | \item 添加 \lstinline{xeCJK} 宏包中文支持方案。 1095 | \item 修复模板之前对 Ti\textit{k}Z 单位的改动。 1096 | \item 更新 logo 图。 1097 | \end{change} 1098 | 1099 | \datechange{2019/01/15}{版本 3.04 正式发布} 1100 | 1101 | \begin{change} 1102 | \item 格式化模板代码。 1103 | \item 增加 \lstinline{\equote} 命令。 1104 | \item 修改 \lstinline{\date}。 1105 | \end{change} 1106 | 1107 | \datechange{2019/01/08}{版本 3.03 正式发布} 1108 | 1109 | \begin{change} 1110 | \item 修复附录章节显示问题。 1111 | \item 小幅优化封面代码。 1112 | \end{change} 1113 | 1114 | \datechange{2018/12/31}{版本 3.02 正式发布} 1115 | 1116 | \begin{change} 1117 | \item 修复名字系列命令自定义格式时出现的空格问题,比如 \lstinline{\listfigurename}。 1118 | \item 英文定理类名字改为中文名。 1119 | \item 英文结构名改为中文。 1120 | \end{change} 1121 | 1122 | \datechange{2018/12/16}{版本 3.01 正式发布} 1123 | 1124 | \begin{change} 1125 | \item 调整 \lstinline{ctex} 宏包。 1126 | \item 说明文档增加更新内容。 1127 | \end{change} 1128 | 1129 | \datechange{2018/12/06}{版本 3.00 正式发布} 1130 | 1131 | \begin{change} 1132 | \item 删除 \lstinline{mathpazo} 数学字体选项。 1133 | \item 添加邮箱命令 \lstinline{\mailto}。 1134 | \item 修改英文字体为 \lstinline{newtx} 系列,另外大型操作符号维持 cm 字体。 1135 | \item 中文字体改用 \lstinline{ctex} 宏包自动设置。 1136 | \item 删除 \lstinline{xeCJK} 字体设置,原因是不同系统字体不方便统一。 1137 | \item 定理换用 \lstinline{tcolorbox} 宏包定义,并基本维持原有的定理样式,优化显示效果,支持跨页;定理类名字重命名,如 etheorem 改为 theorem 等等。 1138 | \item 删去自定义的缩进命令 \lstinline{\Eindent}。 1139 | \item 添加参考文献宏包 \lstinline{natbib}。 1140 | \item 颜色名字重命名。 1141 | \end{change} 1142 | 1143 | \nocite{*} 1144 | 1145 | \printbibliography[heading=bibintoc, title=\ebibname] 1146 | \appendix 1147 | 1148 | \chapter{基本数学工具} 1149 | 1150 | 1151 | 本附录包括了计量经济学中用到的一些基本数学,我们扼要论述了求和算子的各种性质,研究了线性和某些非线性方程的性质,并复习了比例和百分数。我们还介绍了一些在应用计量经济学中常见的特殊函数,包括二次函数和自然对数,前 4 节只要求基本的代数技巧,第 5 节则对微分学进行了简要回顾;虽然要理解本书的大部分内容,微积分并非必需,但在一些章末附录和第 3 篇某些高深专题中,我们还是用到了微积分。 1152 | 1153 | \section{求和算子与描述统计量} 1154 | 1155 | \textbf{求和算子} 是用以表达多个数求和运算的一个缩略符号,它在统计学和计量经济学分析中扮演着重要作用。如果 $\{x_i: i=1, 2, \ldots, n\}$ 表示 $n$ 个数的一个序列,那么我们就把这 $n$ 个数的和写为: 1156 | 1157 | \begin{equation} 1158 | \sum_{i=1}^n x_i \equiv x_1 + x_2 +\cdots + x_n 1159 | \end{equation} 1160 | 1161 | 1162 | 1163 | \end{document} 1164 | -------------------------------------------------------------------------------- /elegantbook-en.tex: -------------------------------------------------------------------------------- 1 | \documentclass[11pt]{elegantbook} 2 | 3 | \title{An Elegant \LaTeX{} Template for Books} 4 | \subtitle{Classic Elegant\LaTeX{} Template} 5 | 6 | \author{Ethan Deng, Liam Huang, syvshc, sikouhjw \& Osbert Wang} 7 | \institute{Elegant\LaTeX{} Program} 8 | \date{Dec. 31, 2022} 9 | \version{4.5} 10 | \bioinfo{Bio}{Information} 11 | 12 | \extrainfo{\textcolor{red}{\bfseries Caution: This template will no longer be maintained since January 1st, 2023.}} 13 | 14 | \logo{logo-blue.png} 15 | \cover{cover.jpg} 16 | 17 | % modify the color in the middle of titlepage 18 | \definecolor{customcolor}{RGB}{32,178,170} 19 | \colorlet{coverlinecolor}{customcolor} 20 | \usepackage{cprotect} 21 | 22 | \addbibresource[location=local]{reference.bib} % bib 23 | 24 | \begin{document} 25 | 26 | \maketitle 27 | 28 | \frontmatter 29 | \tableofcontents 30 | 31 | \mainmatter 32 | 33 | \chapter{Elegant\LaTeX{} Templates} 34 | Elegant\LaTeX{} Program developers are intended to provide you beautiful, elegant, user-friendly templates. Currently, the Elegant\LaTeX{} is composed of \href{https://github.com/ElegantLaTeX/ElegantNote}{ElegantNote}, \href{https://github.com/ElegantLaTeX/ElegantBook}{ElegantBook}, \href{https://github.com/ElegantLaTeX/ElegantPaper}{ElegantPaper}, designed for typesetting notes, books, and working papers respectively. Latest releases are strongly recommended! This guide is aimed at briefly introducing the 101 of this template. For any other question, suggestion or comment, feel free to contact us on GitHub \href{https://github.com/ElegantLaTeX/ElegantBook/issues}{issues} or email us at \email{elegantlatex2e@gmail.com}. 35 | 36 | Contact Infos: 37 | \begin{itemize} 38 | \item GitHub: \href{https://github.com/ElegantLaTeX/}{https://github.com/ElegantLaTeX/} 39 | \item CTAN: \href{https://ctan.org/pkg/elegantbook}{https://ctan.org/pkg/elegantbook} 40 | \item Download: \href{https://github.com/ElegantLaTeX/ElegantBook/releases}{release}, \href{https://github.com/ElegantLaTeX/ElegantBook/archive/master.zip}{latest version} 41 | \end{itemize} 42 | 43 | 44 | \section{Online Usage} 45 | You can visit \href{https://www.overleaf.com/}{Overleaf} to use our template online anywhere and anytime without local installation. To find our template, search \lstinline{elegantlatex} in the \lstinline{templates} or simply visit \href{https://www.overleaf.com/latex/templates?addsearch=elegantlatex}{search result}, choose the template you prefer and \lstinline{Open as Template} to own a copy yourself to edit freely. To learn more about Overleaf, please refer to \href{https://www.overleaf.com/learn}{Documentation}. 46 | 47 | 48 | \section{Portable Version} 49 | For portable version, simply download lastest ElegantBook-master from GitHub or CTAN (to be more accurate, download \lstinline{elegantbook.cls}) and save the file(s) under your working directory. This way of installation is simple and convenient, but you have to manually update \lstinline{cls} now and then. 50 | 51 | 52 | \section{Update Templates} 53 | You can use cmd/terminal to update the tlmgr itself and all the packages, the commands are: 54 | \begin{lstlisting} 55 | tlmgr update --self 56 | tlmgr update --all 57 | \end{lstlisting} 58 | 59 | To learn more, please refer to \href{https://tex.stackexchange.com/questions/55437/how-do-i-update-my-tex-distribution}{How do I update my \TeX{} distribution?} 60 | 61 | \section{Other Release Versions} 62 | If you are a \TeX{} Live 2018/2019/2020/2021 user and would like to update, the official solution is to uninstall the previous version. If you want to save the bother of uninstallation and re-installation, please copy \lstinline{elegantbook.cls} to the installation directory of \TeX{} Live 2022 (default: \lstinline|C:\texlive\2022\texmf-dist\tex\latex\elegantbook| ), run \lstinline{texhash} in cmd. 63 | 64 | \chapter{ElegantBook Settings} 65 | This template is based on the Standard \LaTeX{} book class, so the options of book class work as well (Note that the option of papersize has no effect due to \lstinline{device} option). The default encoding is UTF-8 while \TeX{} Live is recommended. The test environments are Win10/Ubuntu 20.04/macOS + \TeX{} Live 2022/ Mac\TeX{} 2022, either \hologo{pdfLaTeX} or \hologo{XeLaTeX} works fine for \lstinline{lang=en}. 66 | 67 | \section{Languages} 68 | We defined one option named \lstinline{lang} which has two basic values, \lstinline{lang=en} (default) , \lstinline{lang=cn}. Different values will alter the captions of figure/table, abstract name, refname, etc. You can use this option as 69 | 70 | \begin{lstlisting} 71 | \documentclass[en]{elegantbook} 72 | \documentclass[lang=en]{elegantbook} 73 | \end{lstlisting} 74 | 75 | Besides the two basic language translation, our user provide more options, here is a short brief introduction to these translation. Since I am not familiar with these languages, I can't guarantee that the translations are correct, please comment on GitHub if you have some questions. 76 | 77 | \begin{itemize} 78 | \item Italian translation \lstinline{lang=it}, provided by \href{https://github.com/VincentMVV}{VincentMVV} , please refer to \href{https://github.com/ElegantLaTeX/ElegantBook/issues/85}{Italian translation}; 79 | \item French translation \lstinline{lang=fr}, provided by \href{https://github.com/abfek66}{abfek66} , please refer to \href{https://github.com/ElegantLaTeX/ElegantBook/issues/85}{Italian translation}; 80 | \item Dutch Translation \lstinline{lang=nl}, provided by \href{https://github.com/inktvis75}{inktvis75} , please refer to \href{https://github.com/ElegantLaTeX/ElegantBook/issues/108}{Dutch Translation}; 81 | \item Hungarian translation \lstinline{lang=hu}, provided by \href{https://github.com/palkotamas}{palkotamas}, please refer to \href{https://github.com/ElegantLaTeX/ElegantBook/issues/111}{Hungarian translation}; 82 | \item Deutsch translation \lstinline{lang=de}, provided by Lisa, please refer to \href{https://github.com/ElegantLaTeX/ElegantBook/issues/113}{Deutsch translation}; 83 | \item Spanish translation \lstinline{lang=es}, provided by Gustavo A. Corradi, please refer to \href{https://github.com/ElegantLaTeX/ElegantBook/issues/133}{Spanish translation}; 84 | \item Mongolian translation \lstinline{lang=mn}, provided by \href{https://github.com/Altantsooj}{Altantsooj}, please refer to \href{https://github.com/ElegantLaTeX/ElegantBook/issues/137}{Mongolian translation}; 85 | \item Japanese translation \lstinline{lang=jp}, provided by \href{https://github.com/inusturbo}{inusturbo}, please refer to \href{https://github.com/ElegantLaTeX/ElegantBook/issues/172}{Japanese translation}. 86 | \end{itemize} 87 | 88 | \begin{remark} 89 | Chinese Characters are acceptable \textbf{ONLY} in \lstinline{lang=cn}. 90 | \end{remark} 91 | 92 | \section{Device Mode Option} 93 | The option for device (\lstinline{device}) was originally used in ElegantNote, now we include this option in ElegantBook\footnote{Pictures have to be modified accordingly.} as well. Activate iPad mode in the following way\footnote{Default size: normal, A4 paper.}: 94 | \begin{lstlisting} 95 | \documentclass[pad]{elegantbook} %or 96 | \documentclass[device=pad]{elegantbook} 97 | \end{lstlisting} 98 | 99 | \section{Color Themes} 100 | This template contains 5 color themes, i.e., \textcolor{structure1}{\lstinline{green}}\footnote{Original default theme.}, \textcolor{structure2}{\lstinline{cyan}}, \textcolor{structure3}{\lstinline{blue}}(default), \textcolor{structure4}{\lstinline{gray}}, \textcolor{structure5}{\lstinline{black}}. You can choose \lstinline{green} with 101 | \begin{lstlisting} 102 | \documentclass[green]{elegantbook} %or 103 | \documentclass[color=green]{elegantbook} 104 | \end{lstlisting} 105 | 106 | 107 | \begin{table}[htbp] 108 | \caption{ElegantBook Themes\label{tab:color thm}} 109 | \centering 110 | \begin{tabular}{ccccccc} 111 | \toprule 112 | & \textcolor{structure1}{green} 113 | & \textcolor{structure2}{cyan} 114 | & \textcolor{structure3}{blue} 115 | & \textcolor{structure4}{gray} 116 | & \textcolor{structure5}{black} 117 | & Main Environments\\ 118 | \midrule 119 | structure & \makecell{{\color{structure1}\rule{1cm}{1cm}}} 120 | & \makecell{{\color{structure2}\rule{1cm}{1cm}}} 121 | & \makecell{{\color{structure3}\rule{1cm}{1cm}}} 122 | & \makecell{{\color{structure4}\rule{1cm}{1cm}}} 123 | & \makecell{{\color{structure5}\rule{1cm}{1cm}}} 124 | & chapter section subsection \\ 125 | main & \makecell{{\color{main1}\rule{1cm}{1cm}}} 126 | & \makecell{{\color{main2}\rule{1cm}{1cm}}} 127 | & \makecell{{\color{main3}\rule{1cm}{1cm}}} 128 | & \makecell{{\color{main4}\rule{1cm}{1cm}}} 129 | & \makecell{{\color{main5}\rule{1cm}{1cm}}} 130 | & definition exercise problem \\ 131 | second & \makecell{{\color{second1}\rule{1cm}{1cm}}} 132 | & \makecell{{\color{second2}\rule{1cm}{1cm}}} 133 | & \makecell{{\color{second3}\rule{1cm}{1cm}}} 134 | & \makecell{{\color{second4}\rule{1cm}{1cm}}} 135 | & \makecell{{\color{second5}\rule{1cm}{1cm}}} 136 | & theorem lemma corollary\\ 137 | third & \makecell{{\color{third1}\rule{1cm}{1cm}}} 138 | & \makecell{{\color{third2}\rule{1cm}{1cm}}} 139 | & \makecell{{\color{third3}\rule{1cm}{1cm}}} 140 | & \makecell{{\color{third4}\rule{1cm}{1cm}}} 141 | & \makecell{{\color{third5}\rule{1cm}{1cm}}} 142 | & proposition\\ 143 | \bottomrule 144 | \end{tabular} 145 | \end{table} 146 | 147 | If you want to customize the colors, please select \lstinline{nocolor} or use \lstinline{color=none} and declare the main, second, and third colors in the preamble section as follows: 148 | \begin{lstlisting}[frame=single] 149 | \definecolor{structurecolor}{RGB}{60,113,183} 150 | \definecolor{main}{RGB}{0,166,82}% 151 | \definecolor{second}{RGB}{255,134,24}% 152 | \definecolor{third}{RGB}{0,174,247}% 153 | \end{lstlisting} 154 | 155 | \section{Cover} 156 | \subsection{Customized Cover} 157 | From v3.10, customized cover is allowed, you can choose or hide any element as you prefer. Current optional elements are: 158 | \begin{itemize} 159 | \item title: \lstinline{\title} 160 | \item subtitle: \lstinline{\subtitle} 161 | \item author: \lstinline{\author} 162 | \item institute: \lstinline{\institute} 163 | \item date: \lstinline{\date} 164 | \item version: \lstinline{\version} 165 | \item extra information: \lstinline{\extrainfo} 166 | \item cover image: \lstinline{\cover} 167 | \item logo: \lstinline{\logo} 168 | \end{itemize} 169 | 170 | Besides, an extra command \lstinline{\bioinfo} is provided with two options--caption and content. For instance, if you want to display \lstinline{Username: 111520}, just type in 171 | 172 | \begin{lstlisting} 173 | \bioinfo{Username}{115520} 174 | \end{lstlisting} 175 | 176 | You can change the color of the horizontal bar of the cover by 177 | \begin{lstlisting} 178 | \definecolor{customcolor}{RGB}{32,178,170} 179 | \colorlet{coverlinecolor}{customcolor} 180 | \end{lstlisting} 181 | 182 | \subsection{Cover Image} 183 | The cover image used in this template is from \href{https://pixabay.com/en/tea-time-poetry-coffee-reading-3240766/}{pixabay.com}. The image is completely free and can be used under any circumstance. The cover image size is $1280 \times 1024$. If you would like to change the cover, please crop it according to the size of the cover picture strictly. One free online image clipping site: \href{https://www.fotor.com/cn}{fotor.com}. Feel free to join our QQ Group to get more elegant covers. 184 | 185 | \subsection{Logo} 186 | Aspect ratio of the logo is 1:1 in this guide, i.e. a square picture. To replace the logo, do remember to choose the appropriate picture. 187 | 188 | \subsection{Stylized Cover} 189 | Want to use stylized cover?(For instance, A4-sized PDF designed by Adobe Illustrator) Please comment out \lstinline{\maketitle} and use \lstinline{pdfpages} to insert the cover. Similar for using \lstinline{titlepage}. If you would like to use the cover in version 2.x, please refer to \href{https://github.com/EthanDeng/etitlepage}{etitlepage}. 190 | 191 | \section{Chapter Title Display Styles} 192 | 193 | This template contains 2 sets of \textit{title display styles},\lstinline{hang}(default) and \lstinline{display} style. For the former, chapter title is displayed on a single line (\lstinline{hang}). For the latter, chapter title is displayed on a double line (\lstinline{display}).In this guide, we use \lstinline{hang} . To change display style, use: 194 | \begin{lstlisting} 195 | \documentclass[hang]{elegantbook} %or 196 | \documentclass[titlestyle=hang]{elegantbook} 197 | \end{lstlisting} 198 | 199 | 200 | \section{Introduction of Math Environments} 201 | We defined two sets of theorem modes, \lstinline{simple} style and \lstinline{fancy} style (default). You may change to \lstinline{simple} mode by 202 | 203 | \begin{lstlisting} 204 | \documentclass[simple]{elegantbook} %or 205 | \documentclass[mode=simple]{elegantbook} 206 | \end{lstlisting} 207 | 208 | In this template, we defined four different theorem class environments 209 | 210 | \begin{itemize} 211 | \item \textit{Theorem Environments}, including title and content, numbering corresponding to chapter. Three types depending on the format: 212 | \begin{itemize} 213 | \item \textcolor{main}{\textbf{definition}} environment, the color is \textcolor{main}{main}; 214 | \item \textcolor{second}{\textbf{theorem, lemma, corollary, axiom, postulate}} environment, the color is \textcolor{second} {second}; 215 | \item \textcolor{third}{\textbf{proposition}} environment, the color is \textcolor{third}{third}. 216 | \end{itemize} 217 | \item \textit{Example Environment}, including \textbf{example, exercise, problem} environment, auto numbering according to chapter. 218 | \item \textit{Proof Environment}, including \textbf{proof, note} environment containing introductory symbol (\textbf{note} environment) or ending symbol (\textbf{proof} environment). 219 | \item \textit{Conclusion Environment}, including \textbf{conclusion, assumption, property, remark and solution}\footnote{We also define an option \lstinline{result}, which can hide the \lstinline{solution} and \lstinline{proof} environments. You can switch between \lstinline{result=answer} and \lstinline{result=noanswer}.} environments, all of which begin with boldfaced words, with format consistent with normal paragraphs. 220 | \end{itemize} 221 | 222 | All of theorem environments have star versions: \textcolor{main}{\textbf{definition*}}, \textcolor{second}{\textbf{theorem*}}, \textcolor{second}{\textbf{lemma*}}, \textcolor{second}{\textbf{corollary*}}, \textcolor{second}{\textbf{axiom*}}, \textcolor{second}{\textbf{postulate*}}, \textcolor{third}{\textbf{proposition*}}. Environments with an asterisk are not numbered. 223 | 224 | \subsection{Theorem Class Environments} 225 | 226 | \subsubsection{\lstinline{fancy} mode} 227 | 228 | In \lstinline{fancy} mode, the template uses the \lstinline{tcolorbox} package to customize the theorem class environments, it is slightly different from the normal theorem environments. The usage is as follows: 229 | \begin{lstlisting} 230 | % name + label 231 | \begin{theorem}{theorem name}{label} 232 | The content of a theorem with name and label. 233 | Use \ref{thm:label} to refer this theorem. 234 | \end{theorem} 235 | % no name + label 236 | \begin{theorem}{}{label no name} 237 | The content of a theorem without name. 238 | Use \ref{thm:label no name} to refer this theorem. 239 | \end{theorem} 240 | % name + no label 241 | \begin{theorem}{theorem name}{} 242 | The content of a theorem without label. 243 | Can't refer this theorem. 244 | The last {} can be removed. 245 | \end{theorem} 246 | % no name + no label 247 | \begin{theorem}{}{} 248 | The content of a theorem without name and label. 249 | Can't refer this theorem. 250 | Both of {} can be removed. 251 | \end{theorem} 252 | \end{lstlisting} 253 | 254 | The first parameter \lstinline{theorem name} represents the name of the theorem. If the current theorem has no name, please use \lstinline|{}|\cprotect\footnote{Unless this theorem has neither no label, you should not omit this \verb|{}|.}, and the second parameter \lstinline{label} represents the label used in cross-reference with \verb|\ref{thm:label}|. Note that cross-references must be prefixed with \lstinline{thm:}. 255 | 256 | Other theorem class environments with the same usage includes: 257 | 258 | \begin{table}[htbp] 259 | \centering 260 | \caption{Theorem Class Environments} 261 | \begin{tabular}{llll} 262 | \toprule 263 | Environment & Label text & Prefix & Cross-reference \\ 264 | \midrule 265 | definition & label & def & \lstinline|\ref{def:label}| \\ 266 | theorem & label & thm & \lstinline|\ref{thm:label}| \\ 267 | postulate & label & pos & \lstinline|\ref{pos:label}| \\ 268 | axiom & label & axi & \lstinline|\ref{axi:label}|\\ 269 | lemma & label & lem & \lstinline|\ref{lem:label}| \\ 270 | corrlary & label & cor & \lstinline|\ref{cor:label}| \\ 271 | proposition & label & pro & \lstinline|\ref{pro:label}| \\ 272 | \bottomrule 273 | \end{tabular}% 274 | \label{tab:theorem-class}% 275 | \end{table}% 276 | 277 | From version 4.1, you can write your theorem environments as follows: 278 | \begin{lstlisting} 279 | \begin{theorem}[theorem name]\label{thm:theorem-label} 280 | The content of theorem. 281 | \end{theorem} 282 | % or 283 | \begin{theorem}\label{thm:theorem-without-name} 284 | The content of theorem. 285 | \end{theorem} 286 | \end{lstlisting} 287 | 288 | In this case, cross-reference don't have to be prefixed, i.e. the parameter of \lstinline{\ref} is the same as that of \lstinline{\label}. 289 | 290 | \subsubsection{\lstinline{simple} mode} 291 | 292 | In \lstinline{simple} mode, the template uses the \lstinline{amsthm} package to customize the theorem class environments. The usage is as follows: 293 | 294 | \begin{lstlisting} 295 | \begin{theorem}[theorem name]\label{thm:theorem-label} 296 | The content of theorem. 297 | \end{theorem} 298 | % or 299 | \begin{theorem}\label{thm:theorem-without-name} 300 | The content of theorem without name. 301 | \end{theorem} 302 | \end{lstlisting} 303 | 304 | \subsection{Counter for Theorem Environments} 305 | 306 | You can use \lstinline{thmcnt} option to control the theorem counter/number display style for the theorem environments, the acceptable options are \lstinline{chapter} (default) and \lstinline{section}: 307 | 308 | \begin{lstlisting} 309 | \documentclass[section]{elegantbook} % turn the Theorem 4.1 to Theorem 4.1.1 310 | \documentclass[thmcnt=section]{elegantbook} 311 | \end{lstlisting} 312 | 313 | 314 | \subsection{Other Customized Environments} 315 | The other three math environments can be called directly since there are no additional option for them, e.g. \lstinline{example}: 316 | \begin{lstlisting} 317 | \begin{example} 318 | This is the content of example environment. 319 | \end{example} 320 | \end{lstlisting} 321 | 322 | The effect is as follows: 323 | 324 | \begin{example} 325 | This is the content of example environment. 326 | \end{example} 327 | 328 | These are all similar environments with slight differences lies in: 329 | 330 | \begin{itemize} 331 | \item Example, exercise, problem environments number within chapter; 332 | \item Note begins with introductory symbol and proof ends with ending symbol; 333 | \item Conclusion and other environments are normal paragraph environments with boldfaced introductory words. 334 | \end{itemize} 335 | 336 | 337 | \section{List Environments} 338 | This template uses \lstinline{tikz} to customize the list environments, with \lstinline{itemize} environment customized to the third depth and \lstinline{enumerate} environment customized to fourth depth. The effect is as follows\\[2ex] 339 | \begin{minipage}[b]{0.49\textwidth} 340 | \begin{itemize} 341 | \item first item of nesti; 342 | \item second item of nesti; 343 | \begin{itemize} 344 | \item first item of nestii; 345 | \item second item of nestii; 346 | \begin{itemize} 347 | \item first item of nestiii; 348 | \item second item of nestiii. 349 | \end{itemize} 350 | \end{itemize} 351 | \end{itemize} 352 | \end{minipage} 353 | \begin{minipage}[b]{0.49\textwidth} 354 | \begin{enumerate} 355 | \item first item of nesti; 356 | \item second item of nesti; 357 | \begin{enumerate} 358 | \item first item of nestii; 359 | \item second item of nestii; 360 | \begin{enumerate} 361 | \item first item of nestiii; 362 | \item second item of nestiii. 363 | \end{enumerate} 364 | \end{enumerate} 365 | \end{enumerate} 366 | \end{minipage} 367 | 368 | 369 | \section{Fonts} 370 | \textcolor{red}{\bfseries Alert} After v3.10, newtx is reset to cm, together with other two options, the \lstinline{math} font option offers: 371 | \begin{enumerate} 372 | \item \lstinline{math=cm}(default), use \LaTeX{} default math font (recommended). 373 | \item \lstinline{math=newtx}, use \lstinline{newtxmath} math font (may bring about bugs). 374 | \item \lstinline{math=mtpro2}, use \lstinline{mtpro2} package to set math font. 375 | \end{enumerate} 376 | 377 | If you use \lstinline{newtx} fonts, type in: 378 | \begin{lstlisting} 379 | \documentclass[math=newtx]{elegantbook} 380 | \end{lstlisting} 381 | 382 | When you are using \lstinline{newtx}, please pay attention to the hyphens. For instance, 383 | \begin{equation} 384 | \int_{R^q} f(x,y) dy.\emph{of\kern0pt f} \sin x 385 | \end{equation} 386 | 387 | The corresponding code is: 388 | \begin{lstlisting} 389 | \begin{equation} 390 | \int_{R^q} f(x,y) dy.\emph{of \kern0pt f} \sin x 391 | \end{equation} 392 | \end{lstlisting} 393 | 394 | \subsection{Symbol Fonts} 395 | Feedback from some 3.08 users claims that error occurs when using our templates with \lstinline{yhmath}, \lstinline{esvect} and other packages. 396 | \begin{lstlisting} 397 | LaTeX Error: 398 | Too many symbol fonts declared. 399 | \end{lstlisting} 400 | 401 | The reason is that the template redefines font for math so that no new math font is allowed to be added. To use \lstinline{yhmath} and/or \lstinline{esvect}, please locate \lstinline{yhmath} or \lstinline{esvect} in \lstinline{elegantbook.cls}, uncomment corresponding related code. 402 | 403 | \begin{lstlisting} 404 | %%% use yhmath pkg, uncomment following code 405 | % \let\oldwidering\widering 406 | % \let\widering\undefined 407 | % \RequirePackage{yhmath} 408 | % \let\widering\oldwidering 409 | 410 | %%% use esvect pkg, uncomment following code 411 | % \RequirePackage{esvect} 412 | \end{lstlisting} 413 | 414 | \section{Bibliography} 415 | 416 | This template uses biblatex to generate the bibliography, the default citestyle and bibliography style are both \lstinline{numeric}. Let's take a glance at the citation effect. ~\cite{en1} use data from a major peer-to-peer lending \cite{en3} marketplace in China to study whether female and male investors evaluate loan performance differently \parencite{en2}. 417 | 418 | If you want to use biblatex, you must create a file named \lstinline{reference.bib}, add bib items (from Google Scholar, Mendeley, EndNote, and etc.) to \lstinline{reference.bib} file, then cite the bibkey in the \lstinline{tex} file. The biber will automatically generate the bibliography for the reference you cited. 419 | 420 | In order to get the editors' auto-completion working, you need to add following code in your preamble: 421 | 422 | \begin{lstlisting} 423 | \addbibresource[location=local]{reference.bib} 424 | \end{lstlisting} 425 | 426 | Then include the print commands where you want to print the bibliography: 427 | \begin{lstlisting} 428 | \printbibliography[heading=bibintoc, title=\ebibname] 429 | \end{lstlisting} 430 | 431 | 432 | 433 | 434 | To change the bibliography style, this version introduces two options: \lstinline{citestyle} and \lstinline{bibstyle}, please refer to \href{https://ctan.org/pkg/biblatex}{CTAN:biblatex} for more detail about these options. You can change your bibliography style as 435 | 436 | \begin{lstlisting} 437 | \documentclass[citestyle=numeric-comp, bibstyle=authoryear]{elegantbook} 438 | \end{lstlisting} 439 | 440 | We also add the \lstinline{bibend} option to this template, you can choose \lstinline{biber} (default) or \lstinline{bibtex} as you like, \lstinline{biber} is recommended. 441 | 442 | \begin{lstlisting} 443 | \documentclass[bibtex]{elegantbook} % or 444 | \documentclass[bibend=bibtex]{elegantbook} 445 | \end{lstlisting} 446 | 447 | \section{Preface} 448 | 449 | If you want to add a preface before the first chapter with the number of chapter unchanged, please add the preface in the following way: 450 | \begin{lstlisting} 451 | \chapter*{Introduction} 452 | \markboth{Introduction}{Introduction} 453 | The content of introduction. 454 | \end{lstlisting} 455 | 456 | \section{Content Option and Depth} 457 | Option for content \lstinline{toc}, you can choose either one column(\lstinline{onecol}) or two columns(\lstinline{twocol}). For two columns: 458 | \begin{lstlisting} 459 | \documentclass[twocol]{elegantbook} 460 | \documentclass[toc=twocol]{elegantbook} 461 | \end{lstlisting} 462 | 463 | Default content depth is 1, use to use \lstinline|\setcounter{tocdepth}{2}|. 464 | 465 | \section{Introduction Environment} 466 | We create a introduction environment to display the structure of chapter. The basic useage is as follows: 467 | \begin{lstlisting} 468 | \begin{introduction} 469 | \item Definition of Theorem 470 | \item Ask for help 471 | \item Optimization Problem 472 | \item Property of Cauchy Series 473 | \item Angle of Corner 474 | \end{introduction} 475 | \end{lstlisting} 476 | And you will get: 477 | \begin{introduction} 478 | \item Definition of Theorem 479 | \item Ask for help 480 | \item Optimization Problem 481 | \item Property of Cauchy Series 482 | \item Angle of Corner 483 | \end{introduction} 484 | 485 | You can change the title of this environment by modifying the optional argument of this environment: 486 | \begin{lstlisting} 487 | \begin{introduction}[Brief Introduction] 488 | ... 489 | \end{introduction} 490 | \end{lstlisting} 491 | 492 | %\section{Problem Set} 493 | The environment \lstinline{problemset} is used at the end of each chapter to display corresponding exercises. Just type in the following sentences: 494 | \begin{lstlisting} 495 | \begin{problemset} 496 | \item exercise 1 497 | \item exercise 2 498 | \item exercise 3 499 | \end{problemset} 500 | \end{lstlisting} 501 | And you will get: 502 | \begin{problemset} 503 | \item exercise 1 504 | \item exercise 2 505 | \item exercise 3 506 | \item math equation test: 507 | \begin{equation} 508 | a^2+b^2=c_{2_{i}} (1,2) [1,23] 509 | \end{equation} 510 | \end{problemset} 511 | \begin{remark} 512 | If you want to customize the title of \lstinline{problemset}, please change the optional argument like in introduction environment. In this version the \lstinline{problemset} environment automatically appears in the table of contents but not in the header or footer(to be fixed). 513 | \end{remark} 514 | 515 | \begin{solution} 516 | If you want to customize the title of \lstinline{problemset}, please change the optional argument like in introduction environment. In this version the \lstinline{problemset} environment automatically appears in the table of contents but not in the header or footer(to be fixed). 517 | \end{solution} 518 | 519 | \section{Margin Notes} 520 | In 3.08, we introduced \lstinline{marginpar=margintrue} and \lstinline{\elegantpar} (Beta) with piles of bugs. Hence we decide to remove them in 3.09 and will suspend the options till revolutionary optimization. Sorry for all the bugs! However, we retain the option \lstinline{marginpar} for users to get margin motes by activating \lstinline{marginpar=margintrue} and using \lstinline{\marginpar} or \lstinline{marginnote} packages. 521 | 522 | \begin{remark} 523 | Note that text and equation are both available in the margin notes. 524 | \begin{lstlisting} 525 | % text 526 | \marginpar{margin paragraph text} 527 | 528 | % equation 529 | \marginpar{ 530 | \begin{equation} 531 | a^2 + b^2 = c^2 532 | \end{equation} 533 | } 534 | \end{lstlisting} 535 | 536 | For tables and figures, note that floating environment is not allowed. You have to use \lstinline{includegraphics} or \lstinline{table} and use \lstinline{\captionof} to name it. To get centralized figures or tables, use \lstinline{\centerline} or \lstinline{center}. To learn more, please refer to \href{https://tex.stackexchange.com/questions/5583/caption-of-figure-in-marginpar-and-caption-of-wrapfigure-in-margin}{Caption of Figure in Marginpar}. 537 | 538 | \begin{lstlisting} 539 | % graph with centerline command 540 | \marginpar{ 541 | \centerline{ 542 | \includegraphics[width=0.2\textwidth]{logo.png} 543 | } 544 | \captionof{figure}{your figure caption} 545 | } 546 | 547 | % graph with center environment 548 | \marginpar{ 549 | \begin{center} 550 | \includegraphics[width=0.2\textwidth]{logo.png} 551 | \captionof{figure}{your figure caption} 552 | \end{center} 553 | } 554 | \end{lstlisting} 555 | 556 | \end{remark} 557 | 558 | 559 | 560 | \chapter{ElegantBook Writing Sample} 561 | 562 | \begin{introduction} 563 | \item Theorem Class Envrionments 564 | \item Cross Reference 565 | \item Math Environments 566 | \item List Environments 567 | \item Logo and Base 568 | \item $a^2+b^2=c^2$ 569 | \end{introduction} 570 | 571 | 572 | \lipsum[1] 573 | % source: https://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/Theorems.html 574 | 575 | \section{Writing Sample} 576 | 577 | We will define the integral of a measurable function in three steps. First, we define the integral of a nonnegative simple function. Let $E$ be the measurable set in $\mathcal{R}^N$. 578 | 579 | \begin{definition}[Left Coset] 580 | Let $H$ be a subgroup of a group~$G$. A \emph{left coset} of $H$ in $G$ is a subset of $G$ that is of the form $xH$, where $x \in G$ and $xH = \{ xh : h \in H \}$. Similarly a \emph{right coset} of $H$ in $G$ is a subset of $G$ that is of the form $Hx$, where $Hx = \{ hx : h \in H \} \hbar$ 581 | \end{definition} 582 | 583 | \begin{note} 584 | Note that a subgroup~$H$ of a group $G$ is itself a left coset of $H$ in $G$. 585 | \end{note} 586 | 587 | \lipsum[2] 588 | 589 | \begin{theorem}[Lagrange's Theorem] \label{thm:lg} 590 | Let $G$ be a finite group, and let $H$ be a subgroup of $G$. Then the order of $H$ divides the order of $G$. 591 | \end{theorem} 592 | 593 | As theorem \ref{thm:lg} refered. 594 | 595 | \lipsum[3] 596 | 597 | 598 | \begin{theorem}{theorem name}{label text} 599 | The content of theorem. 600 | \end{theorem} 601 | 602 | we can refer this theorem as \ref{thm:label text}. 603 | 604 | 605 | \begin{proposition}[Size of Left Coset] 606 | Let $H$ be a finite subgroup of a group $G$. Then each left coset of $H$ in $G$ has the same number of elements as $H$. 607 | \end{proposition} 608 | 609 | \begin{proof} 610 | Let $z$ be some element of $xH \cap yH$. Then $z = xa$ for some $a \in H$, and $z = yb$ for some $b \in H$. If $h$ is any element of $H$ then $ah \in H$ and $a^{-1}h \in H$, since $H$ is a subgroup of $G$. But $zh = x(ah)$ and $xh = z(a^{-1}h)$ for all $h \in H$. Therefore $zH \subset xH$ and $xH \subset zH$, and thus $xH = zH$. Similarly $yH = zH$, and thus $xH = yH$, as required. 611 | \end{proof} 612 | 613 | \begin{figure}[htbp] 614 | \centering 615 | \includegraphics[width=0.6\textwidth]{scatter.jpg} 616 | \caption{Matplotlib: Scatter Plot Example\label{fig:scatter}} 617 | \end{figure} 618 | 619 | Regression analysis is a powerful statistical method that allows you to examine the relationship between two or more variables of interest. While there are many types of regression analysis, at their core they all examine the influence of one or more independent variables on a dependent variable. The process of performing a regression allows you to confidently determine which factors matter most, which factors can be ignored, and how these factors influence each other. 620 | 621 | Let's continue using our application training example. In this case, we'd want to measure the historical levels of satisfaction with the events from the past three years or so, as well as any information possible in regards to the independent variables. 622 | 623 | \section{Second section} 624 | This second section\index{S!section} may include some special word, 625 | and expand the ones already used\index{keywords!used}. 626 | 627 | 628 | \begin{table}[htbp] 629 | \small 630 | \centering 631 | \caption{Auto MPG and Price \label{tab:reg}} 632 | \begin{tabular}{lcc} 633 | \toprule 634 | & (1) & (2) \\ 635 | \midrule 636 | mpg & -238.90*** & -49.51 \\ 637 | & (53.08) & (86.16) \\ 638 | weight & & 1.75*** \\ 639 | & & (0.641) \\ 640 | constant & 11,253*** & 1,946 \\ 641 | & (1,171) & (3,597) \\ 642 | obs & 74 & 74 \\ 643 | $R^2$ & 0.220 & 0.293 \\ 644 | \bottomrule 645 | \multicolumn{3}{l}{\scriptsize Standard errors in parentheses} \\ 646 | \multicolumn{3}{l}{\scriptsize *** $p < 0.01$, ** $p<0.05$, * $p<0.1$} \\ 647 | \end{tabular}% 648 | \end{table}% 649 | 650 | \lipsum[1-2] 651 | 652 | \begin{itemize} 653 | \item Routing and resource discovery; 654 | \begin{itemize} 655 | \item Language Models 656 | \item Vector Space Models 657 | \end{itemize} 658 | \item Resilient and scalable computer networks; 659 | \item Distributed storage and search. 660 | \end{itemize} 661 | 662 | %\problemset 663 | \begin{problemset} 664 | \item Solve the equation $5(- 3x - 2) - (x - 3) = -4(4x + 5) + 13$. 665 | \item Find the distance between the points $(-4 , -5)$ and $(-1 , -1)$. 666 | \item Find the slope of the line $5x - 5y = 7$. 667 | \end{problemset} 668 | 669 | 670 | \chapter{FAQ} 671 | We list some FAQs for users to refer to: 672 | \begin{enumerate} 673 | \item \question{Why option numbers for natbib fail to take effect in v3.07?} 674 | In v3.07, when \lstinline{gbt7714} is introduced, option \lstinline{authoryear} is incompatible with \lstinline{natbib}. In v3.08 and 3.09, \lstinline{numbers}, \lstinline{numbers}, \lstinline{super} and \lstinline{authoryear} are introduced. 675 | \item \question{I want to customize font and background color.} 676 | Please use \lstinline{pagecolor} to change background color, refer to \href{https://tex.stackexchange.com/questions/278544/xcolor-what-is-the-equivalent-of-default-text-color}{this} to customize font. 677 | \item \question{Which version should I choose?} 678 | Please use \href{https://github.com/ElegantLaTeX/ElegantBook/releases}{Latest Release} via GitHub or \TeX{} Live 2022. 679 | \item \question{Which editor should I choose?} 680 | You can use \TeX{} Live 2022 built-in \TeX works or \TeX Studio. You may refer to \href{https://github.com/EthanDeng/texworks-autocomplete}{\TeX{}works autocomplete}. \TeX{} Live 2022 + \TeX{}studio is strongly recommended. Related configurations can be found at \href{https://github.com/EthanDeng/vscode-latex}{vscode-latex} and \href{https://github.com/EthanDeng/sublime-text-latex}{sublime-text-latex}. 681 | \item \question{Hello, we want to use ElegantBook to write a book about machine learning and would like your authorization.} 682 | Feel free to use our templates by pointing out our copyright. For other issues, please refer to LPPL-1.3c. If you want to show us your work, you can share the URL with us afterwards. 683 | \item \question{What is cross reference?} 684 | This template is aimed at who are not a complete beginner for \LaTeX{}. Please learn more about \LaTeX{} before using this template. 685 | \item \question{Is the language for code highlighting optional?} 686 | Yes, \lstinline{listings} package is used in ElegantBook, hence language is optional(e.g. \lstinline{language=Python}). For global setting, use \lstinline{lstset}. For more information, please refer to package documentations. 687 | \item \question{When will Beamer template (ElegantSlide or ElegantBeamer) forthcoming?} 688 | Since there is an excellent theme \href{https://github.com/matze/mtheme}{Metropolis}, no plan for Beamer theme. 689 | \end{enumerate} 690 | 691 | \chapter{Version History} 692 | We revised our templates now and then. This section shows the version story of ElegantBook. 693 | 694 | 695 | \datechange{2022/12/31}{release of v4.5.} \textcolor{red}{\bfseries Stop Maintenance} 696 | 697 | \begin{change} 698 | \item Add new document option \lstinline|usesamecnt| for same thm counter for all theme environments; 699 | \item Add 5-th optional parameter for \lstinline|elegantnewtheorem|. 700 | \end{change} 701 | 702 | 703 | \datechange{2022/08/15}{release of v4.4.} 704 | 705 | \begin{change} 706 | \item Add custome theorem definition command \lstinline{\elegantnewtheorem}; 707 | \item Fix star environment(*) for inner environments (\href{https://github.com/ElegantLaTeX/ElegantBook/issues/167}{issue \#167}); 708 | \item Change English fonts from TeX Gyre Termes to TeX Gyre TermesX; 709 | \item Re-construct some theorem environments to enchance compatibility; 710 | \item Remove Gitee repo due the privacy policy; 711 | \item Re-open Github pull requests. 712 | \end{change} 713 | 714 | 715 | 716 | 717 | \datechange{2022/04/09}{release of v4.3.} 718 | 719 | \begin{change} 720 | \item Remove part newtx settings, set TeX Gyre Termes/Heros fonts under \hologo{XeLaTeX}. 721 | \item Fix Chinese fonts in the theorem environments. 722 | \item Add theorem counter option, \lstinline{thmcnt=section}. 723 | \item Add bib option \lstinline{bibend}, which can take value of biber and bibtex. 724 | \item \textbf{! Warnings}: The multilingual option may cause some unexpected errors, you can report in this \href{https://github.com/ElegantLaTeX/ElegantBook/issues/170}{issue}. 725 | \end{change} 726 | 727 | 728 | 729 | \datechange{2022/03/08}{release of v4.2.} 730 | 731 | \begin{change} 732 | \item Bug fix due to the update of newtx fonts; 733 | \item Add `Chapter' in TOC, and redefine \lstinline{\chaptername} to unify the logic under different languages; 734 | \item Add language option for Japanese, \lstinline{lang=jp}. 735 | \end{change} 736 | 737 | 738 | \datechange{2021/05/02}{release of v4.1.} 739 | 740 | \begin{change} 741 | \item \textbf{! Big Change}: Change the bibliography method from \hologo{BibTeX} to biblatex(with backend \lstinline{biber}); 742 | \item \textbf{! Big Change}: Add support for the default theorem writing method (with optional name and label); 743 | \item Add left and right space; 744 | \item Support hyperlink from the text of TOC; 745 | \item Remove the \hologo{pdfLaTeX} compatiblity check for Chinese. 746 | \item Add multilingual support, for french \lstinline{lang=fr}, dutch \lstinline{lang=nl}, Hungarian \lstinline{lang=hu}, Spanish \lstinline{lang=es}, Mongolian \lstinline{lang=mn} etc. 747 | \end{change} 748 | 749 | \datechange{2020/04/12}{release of v3.11, \textcolor{red}{\textbf{LAST} version of 3.x}.} 750 | 751 | 752 | \begin{change} 753 | \item \textbf{! Fix}: Fix \lstinline{natbib option clash} problems caused by \lstinline{gbt7714} updates. 754 | \item Remove \lstinline{base} decorations and its options since \lstinline{pgfornament} package is not included in \TeX{} Live 2020. 755 | \item Fix spacing problem in some environments. 756 | \item Introduce language option for Italian, \lstinline{lang=it}. 757 | \end{change} 758 | 759 | 760 | \datechange{2020/02/10}{release of v3.10} 761 | 762 | \begin{change} 763 | \item Introduce \lstinline{math} for math font, optional styles are \lstinline{newtx} and \lstinline{cm}.\\ 764 | \textbf{Notice}: The math font \lstinline{newtxmath} in previous versions is reset to default \LaTeX{} math font, to keep previous math font, please declare \lstinline{math=newtx}. 765 | \item Introduce \lstinline{chinesefont} option, with \lstinline{founder}, \lstinline{ctexfont} and \lstinline{nofont} available. 766 | \item Turn author information on the cover optional and add customized command \lstinline{\bioinfo}. 767 | \item Add version history with command \lstinline{\datechange} and environment \lstinline{change}. 768 | \item Add Chinese chapter style \lstinline{scheme} with option \lstinline{chinese}. 769 | \item Since the bug raised by \lstinline{\lvert} is fixed, exchange package positions of \lstinline{ctex} and \lstinline{amsmath}. 770 | \item Drop \lstinline{\lastpage} from header to avoid page anchor bug and adding \lstinline{\frontmatter}. 771 | \item Revise bibliography option \lstinline{cite} with optional styles \lstinline{numbers},\lstinline{authoryear} and \lstinline{super}. 772 | \item Introduce bibliography style option \lstinline{bibstyle}, with default bib style \lstinline{apalike} for English mode and \lstinline{gbt7714} package for Chinese mode. 773 | \end{change} 774 | 775 | \datechange{2019/08/18}{release of v3.09} 776 | 777 | \begin{change} 778 | \item Remove \lstinline{\elegantpar} temporary and remind users to use \lstinline{\marginnote} and \lstinline{\marginpar} instead. 779 | \item Use \lstinline{esint} to display integral operator. 780 | \item Add new command \lstinline{toc}, with options \lstinline{onecol} and \lstinline{twocol}. 781 | \item Add new option \lstinline{cite} \lstinline{super} for superscript-displayed citation. 782 | \item Revise \lstinline{problemset}. 783 | \end{change} 784 | 785 | 786 | \nocite{en2,en3} 787 | 788 | \printbibliography[heading=bibintoc, title=\ebibname] 789 | \appendix 790 | 791 | 792 | \chapter{Mathematical Tools} 793 | 794 | This appendix covers some of the basic mathematics used in econometrics. We briefly discuss the properties of summation operators, study the properties of linear and some nonlinear equations, and review the ratios and percentages. We also introduce some special functions that are common in econometrics applications, including quadratic functions and natural logarithms. The first four sections require only basic algebraic techniques. The fifth section briefly reviews differential Calculus Although Calculus is not necessary to understand much of this book, it is used in some of the end-of-chapter appendices and in some of the more advanced topics in part 3. 795 | 796 | \section{Summation Operator and Description Statistics} 797 | 798 | \textbf{Summation Operator} is an abbreviation used to express the summation of numbers, it plays an important role in statistics and econometrics analysis. If $\{x_i: i=1, 2, \ldots, n\}$ is a sequence of $n$ numbers, the summation of the $n$ numbers is: 799 | 800 | \begin{equation} 801 | \sum_{i=1}^n x_i \equiv x_1 + x_2 +\cdots + x_n 802 | \end{equation} 803 | 804 | 805 | \end{document} -------------------------------------------------------------------------------- /elegantbook.cls: -------------------------------------------------------------------------------- 1 | %%%%%%%%%%%%%%%%%%%%%% 2 | %% start of file `elegantbook.cls'. 3 | %% Copyright 2013-2022 ElegantLaTeX (elegantlatex2e@gmail.com) 4 | %% 5 | %% This work may be distributed and/or modified freely 6 | %% available at https://github.com/ElegantLaTeX/ElegantBook 7 | % 8 | %%%%%%%%%%%%%%%%%%%%% 9 | % % !Mode:: "TeX:UTF-8" 10 | \NeedsTeXFormat{LaTeX2e} 11 | \ProvidesClass{elegantbook}[2022/12/31 v4.5 ElegantBook document class] 12 | 13 | 14 | %%% 15 | \RequirePackage{kvoptions} 16 | \RequirePackage{etoolbox} 17 | \SetupKeyvalOptions{family=ELEGANT, prefix=ELEGANT@, setkeys=\kvsetkeys} 18 | \newcommand{\ekv}[1]{\kvsetkeys{ELEGANT}{#1}} 19 | % ----- Colors ----- 20 | \DeclareStringOption[blue]{color} 21 | \DeclareStringOption[en]{lang} 22 | \DeclareStringOption[answer]{result} 23 | \DeclareStringOption[fancy]{mode} 24 | \DeclareStringOption[normal]{device} 25 | \DeclareStringOption[cm]{math} 26 | \DeclareStringOption[marginfalse]{marginpar} 27 | \DeclareStringOption[onecol]{toc} 28 | \DeclareStringOption{scheme} 29 | 30 | % ----- backward compatibility 31 | \DeclareVoidOption{green}{\ekv{color=green}} 32 | \DeclareVoidOption{cyan}{\ekv{color=cyan}} 33 | \DeclareVoidOption{blue}{\ekv{color=blue}} 34 | \DeclareVoidOption{gray}{\ekv{color=gray}} 35 | \DeclareVoidOption{black}{\ekv{color=black}} 36 | \DeclareVoidOption{nocolor}{\ekv{color=none}} 37 | 38 | \DeclareVoidOption{chinese}{\ekv{scheme=chinese}} 39 | 40 | \DeclareStringOption[ctexfont]{chinesefont} 41 | \DeclareVoidOption{ctexfont}{\ekv{chinesefont=ctexfont}} 42 | \DeclareVoidOption{founder}{\ekv{chinesefont=founder}} 43 | \DeclareVoidOption{nofont}{\ekv{chinesefont=nofont}} 44 | 45 | \DeclareVoidOption{en}{\ekv{lang=en}} 46 | \DeclareVoidOption{cn}{\ekv{lang=cn}} 47 | \DeclareVoidOption{it}{\ekv{lang=it}} 48 | \DeclareVoidOption{fr}{\ekv{lang=fr}} 49 | \DeclareVoidOption{nl}{\ekv{lang=nl}} 50 | \DeclareVoidOption{hu}{\ekv{lang=hu}} 51 | \DeclareVoidOption{de}{\ekv{lang=de}} 52 | \DeclareVoidOption{mn}{\ekv{lang=mn}} 53 | \DeclareVoidOption{pt}{\ekv{lang=pt}} 54 | \DeclareVoidOption{jp}{\ekv{lang=jp}} 55 | 56 | \DeclareVoidOption{fancy}{\ekv{mode=fancy}} 57 | \DeclareVoidOption{simple}{\ekv{mode=simple}} 58 | \DeclareBoolOption[false]{usesamecnt} 59 | 60 | \DeclareVoidOption{answer}{\ekv{result=answer}} 61 | \DeclareVoidOption{noanswer}{\ekv{result=noanswer}} 62 | 63 | \DeclareVoidOption{normal}{\ekv{device=normal}} 64 | \DeclareVoidOption{pad}{\ekv{device=pad}} 65 | 66 | \DeclareStringOption[numeric-comp]{citestyle} 67 | \DeclareStringOption[numeric]{bibstyle} 68 | 69 | \DeclareVoidOption{newtx}{\ekv{math=newtx}} 70 | \DeclareVoidOption{mtpro2}{\ekv{math=mtpro2}} 71 | \DeclareVoidOption{cm}{\ekv{math=cm}} 72 | 73 | \DeclareVoidOption{margintrue}{\ekv{marginpar=margintrue}} 74 | \DeclareVoidOption{marginfalse}{\ekv{marginpar=marginfalse}} 75 | 76 | 77 | \DeclareVoidOption{onecol}{\ekv{toc=onecol}} 78 | \DeclareVoidOption{twocol}{\ekv{toc=twocol}} 79 | 80 | \DeclareStringOption[chapter]{thmcnt} 81 | \DeclareVoidOption{chapter}{\ekv{thmcnt=chapter}} 82 | \DeclareVoidOption{section}{\ekv{thmcnt=section}} 83 | 84 | \DeclareStringOption[biber]{bibend} 85 | \DeclareVoidOption{biber}{\ekv{bibend=biber}} 86 | \DeclareVoidOption{bibtex}{\ekv{bibend=bibtex}} 87 | 88 | 89 | % ----- Math option ----- 90 | \newcommand\mailto[1]{\href{mailto:#1}{\nolinkurl{#1}}} 91 | 92 | % ----- Title Style ----- 93 | \DeclareStringOption[hang]{titlestyle}[hang] 94 | % ----- backward compatibility 95 | \DeclareVoidOption{hang}{\ekv{titlestyle=hang}} 96 | \DeclareVoidOption{display}{\ekv{titlestyle=display}} 97 | % ----- Default Options ----- 98 | \DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{book}} 99 | 100 | \ProcessKeyvalOptions*\relax 101 | % \ProcessOptions*\relax 102 | \LoadClass[a4paper,oneside]{book} 103 | 104 | \RequirePackage{setspace} 105 | 106 | \RequirePackage{csquotes} 107 | 108 | 109 | \RequirePackage{hyperref} 110 | \hypersetup{ 111 | breaklinks, 112 | unicode, 113 | linktoc=all, 114 | bookmarksnumbered=true, 115 | bookmarksopen=true, 116 | pdfkeywords={ElegantBook}, 117 | colorlinks, 118 | linkcolor=winered, 119 | citecolor=winered, 120 | urlcolor=winered, 121 | plainpages=false, 122 | pdfstartview=FitH, 123 | pdfborder={0 0 0}, 124 | linktocpage 125 | } 126 | \newif\ifELEGANT@Hy@later 127 | \@ifpackagelater{hyperref}{2022/05/16} 128 | {\ELEGANT@Hy@latertrue} 129 | {\ELEGANT@Hy@laterfalse} 130 | 131 | %% device settings 132 | \RequirePackage{geometry} 133 | \ifdefstring{\ELEGANT@device}{normal}{ 134 | \geometry{ 135 | a4paper, 136 | top=25.4mm, bottom=25.4mm, 137 | left=20mm, right=20mm, 138 | headheight=2.17cm, 139 | headsep=4mm, 140 | footskip=12mm 141 | } 142 | \ifdefstring{\ELEGANT@marginpar}{margintrue}{ 143 | \geometry{ 144 | marginparwidth=5cm, marginparsep=5mm, 145 | left=2cm,right=7cm}}{\relax}}{ 146 | \relax} 147 | 148 | \ifdefstring{\ELEGANT@device}{pad}{ 149 | \geometry{ 150 | paperwidth=7.5in, 151 | paperheight=10in, 152 | margin=16mm, 153 | headheight=2.17cm, 154 | footskip=4mm 155 | }}{\relax} 156 | 157 | 158 | \RequirePackage{indentfirst,comment} 159 | % fontsetting 160 | \ifdefstring{\ELEGANT@math}{mtpro2}{ 161 | \let\Bbbk\relax 162 | \RequirePackage[lite]{mtpro2} 163 | }{\relax} 164 | 165 | \setcounter{tocdepth}{1} 166 | \renewcommand{\baselinestretch}{1.2} 167 | 168 | \PassOptionsToPackage{no-math}{fontspec} 169 | \PassOptionsToPackage{quiet}{fontspec} 170 | \RequirePackage{iftex} 171 | 172 | \ifpdftex 173 | \RequirePackage{newtxtext} 174 | \RequirePackage[scaled=.90]{helvet} 175 | \else 176 | \RequirePackage[no-math]{fontspec} 177 | \setmainfont{TeXGyreTermesX}[ 178 | UprightFont = *-Regular , 179 | BoldFont = *-Bold , 180 | ItalicFont = *-Italic , 181 | BoldItalicFont = *-BoldItalic , 182 | Extension = .otf , 183 | Scale = 1.0] 184 | 185 | \setsansfont{texgyreheros}[ 186 | UprightFont = *-regular , 187 | BoldFont = *-bold , 188 | ItalicFont = *-italic , 189 | BoldItalicFont = *-bolditalic , 190 | Extension = .otf , 191 | Scale = 0.9] 192 | \fi 193 | 194 | \ifdefstring{\ELEGANT@lang}{cn}{ 195 | \ifdefstring{\ELEGANT@chinesefont}{founder}{ 196 | \RequirePackage[UTF8, scheme=plain, fontset=none]{ctex} 197 | \setCJKmainfont[BoldFont={FZHei-B01},ItalicFont={FZKai-Z03}]{FZShuSong-Z01} 198 | \setCJKsansfont[BoldFont={FZHei-B01}]{FZKai-Z03} 199 | \setCJKmonofont[BoldFont={FZHei-B01}]{FZFangSong-Z02} 200 | \setCJKfamilyfont{zhsong}{FZShuSong-Z01} 201 | \setCJKfamilyfont{zhhei}{FZHei-B01} 202 | \setCJKfamilyfont{zhkai}[BoldFont={FZHei-B01}]{FZKai-Z03} 203 | \setCJKfamilyfont{zhfs}[BoldFont={FZHei-B01}]{FZFangSong-Z02} 204 | \newcommand*{\songti}{\CJKfamily{zhsong}} 205 | \newcommand*{\heiti}{\CJKfamily{zhhei}} 206 | \newcommand*{\kaishu}{\CJKfamily{zhkai}} 207 | \newcommand*{\fangsong}{\CJKfamily{zhfs}}}{\relax} 208 | 209 | \ifdefstring{\ELEGANT@chinesefont}{nofont}{ 210 | \RequirePackage[UTF8,scheme=plain,fontset=none]{ctex} 211 | \xeCJKsetup{AutoFakeBold=true} 212 | }{\relax} 213 | 214 | \ifdefstring{\ELEGANT@chinesefont}{ctexfont}{ 215 | \RequirePackage[UTF8,scheme=plain]{ctex} 216 | \xeCJKsetup{AutoFakeBold=true} 217 | }{\relax} 218 | 219 | \AfterEndPreamble{ 220 | \setlength\parindent{2\ccwd}} 221 | }{\relax} 222 | 223 | \ifcsname heiti\endcsname 224 | \newcommand{\cbfseries}{\heiti} 225 | \else 226 | \newcommand{\cbfseries}{\bfseries} 227 | \fi 228 | 229 | 230 | \ifcsname kaishu\endcsname 231 | \newcommand{\citshape}{\kaishu} 232 | \else 233 | \newcommand{\citshape}{\itshape} 234 | \fi 235 | \ifcsname kaishu\endcsname 236 | \newcommand{\cnormal}{\kaishu} 237 | \else 238 | \newcommand{\cnormal}{\normalfont} 239 | \fi 240 | 241 | \ifcsname fangsong\endcsname 242 | \newcommand{\cfs}{\fangsong} 243 | \else 244 | \newcommand{\cfs}{\normalfont} 245 | \fi 246 | 247 | \RequirePackage{anyfontsize} 248 | \ifdefstring{\ELEGANT@math}{newtx}{ 249 | \let\oldencodingdefault\encodingdefault 250 | \let\oldrmdefault\rmdefault 251 | \let\oldsfdefault\sfdefault 252 | \let\oldttdefault\ttdefault 253 | \def\encodingdefault{T1} 254 | \renewcommand{\rmdefault}{ntxtlf} 255 | \renewcommand{\sfdefault}{qhv} 256 | \renewcommand{\ttdefault}{ntxtt} 257 | \RequirePackage{newtxmath} 258 | \let\encodingdefault\oldencodingdefault 259 | \let\rmdefault\oldrmdefault 260 | \let\sfdefault\oldsfdefault 261 | \let\ttdefault\oldttdefault 262 | \let\Bbbk\relax 263 | \RequirePackage{esint} 264 | %%% use yhmath pkg, uncomment following code 265 | % \let\oldwidering\widering 266 | % \let\widering\undefined 267 | % \RequirePackage{yhmath} 268 | % \let\widering\oldwidering 269 | 270 | %%% use esvect pkg, uncomment following code 271 | % \RequirePackage{esvect} 272 | 273 | \DeclareSymbolFont{CMlargesymbols}{OMX}{cmex}{m}{n} 274 | \let\sumop\relax\let\prodop\relax 275 | \DeclareMathSymbol{\sumop}{\mathop}{CMlargesymbols}{"50} 276 | \DeclareMathSymbol{\prodop}{\mathop}{CMlargesymbols}{"51} 277 | }{\relax} 278 | 279 | 280 | % ----- Handle Colors ----- 281 | %% 章节以及页脚图形 282 | 283 | \RequirePackage[table]{xcolor} 284 | \ifdefstring{\ELEGANT@color}{green}{ 285 | \definecolor{structurecolor}{RGB}{0,120,2}% 286 | \definecolor{main}{RGB}{0,120,2}% 287 | \definecolor{second}{RGB}{230,90,7}% 288 | \definecolor{third}{RGB}{0,160,152}% 289 | }{\relax} 290 | \ifdefstring{\ELEGANT@color}{cyan}{ 291 | \definecolor{structurecolor}{RGB}{31,186,190}% 292 | \definecolor{main}{RGB}{59,180,5}% 293 | \definecolor{second}{RGB}{175,153,8}% 294 | \definecolor{third}{RGB}{244,105,102}% 295 | }{\relax} 296 | \ifdefstring{\ELEGANT@color}{blue}{ 297 | \definecolor{structurecolor}{RGB}{60,113,183} 298 | \definecolor{main}{RGB}{0,166,82}% 299 | \definecolor{second}{RGB}{255,134,24}% 300 | \definecolor{third}{RGB}{0,174,247}% 301 | }{\relax} 302 | \ifdefstring{\ELEGANT@color}{gray}{ 303 | \definecolor{structurecolor}{RGB}{150,150,150} 304 | \definecolor{main}{RGB}{150,150,150}% 305 | \definecolor{second}{RGB}{150,150,150}% 306 | \definecolor{third}{RGB}{150,150,150}% 307 | }{\relax} 308 | \ifdefstring{\ELEGANT@color}{black}{ 309 | \definecolor{structurecolor}{RGB}{0,0,0} 310 | \definecolor{main}{RGB}{0,0,0}% 311 | \definecolor{second}{RGB}{0,0,0}% 312 | \definecolor{third}{RGB}{0,0,0}% 313 | }{\relax} 314 | 315 | %green color 316 | \definecolor{structure1}{RGB}{0,120,2}% 317 | \definecolor{main1}{RGB}{0,120,2}% 318 | \definecolor{second1}{RGB}{230,90,7}% 319 | \definecolor{third1}{RGB}{0,160,152}% 320 | %cyan color 321 | \definecolor{structure2}{RGB}{31,186,190}% 322 | \definecolor{main2}{RGB}{59,180,5}% 323 | \definecolor{second2}{RGB}{175,153,8}% 324 | \definecolor{third2}{RGB}{244,105,102}% 325 | %blue color 326 | \definecolor{structure3}{RGB}{60,113,183} 327 | \definecolor{main3}{RGB}{0,166,82}% 328 | \definecolor{second3}{RGB}{255,134,24}% 329 | \definecolor{third3}{RGB}{0,174,247}% 330 | % gray color 331 | \definecolor{structure4}{RGB}{150,150,150} 332 | \definecolor{main4}{RGB}{150,150,150}% 333 | \definecolor{second4}{RGB}{150,150,150}% 334 | \definecolor{third4}{RGB}{150,150,150}% 335 | % black color 336 | \definecolor{structure5}{RGB}{0,0,0} 337 | \definecolor{main5}{RGB}{0,0,0}% 338 | \definecolor{second5}{RGB}{0,0,0}% 339 | \definecolor{third5}{RGB}{0,0,0}% 340 | 341 | % corlor definition 342 | \definecolor{winered}{rgb}{0.5,0,0} 343 | \definecolor{bule}{RGB}{18,29,57} 344 | \colorlet{coverlinecolor}{second} 345 | 346 | 347 | % ----- Title Style ----- 348 | \ifdefstring{\ELEGANT@titlestyle}{hang}{\def\style{hang}}{\relax} 349 | \ifdefstring{\ELEGANT@titlestyle}{display}{\def\style{display}}{\relax} 350 | 351 | % reference: 352 | % https://tex.stackexchange.com/questions/58506/how-to-make-a-new-command-similar-to-author 353 | % https://pastebin.com/C8W4axzV 354 | \newcommand\email[1]{\href{mailto:#1}{\nolinkurl{#1}}} 355 | 356 | \global\let\@title\@empty 357 | \global\let\@author\@empty 358 | \global\let\@date\@empty 359 | \newcommand{\subtitle}[1]{\gdef\@subtitle{#1}} 360 | \newcommand{\institute}[1]{\gdef\@institute{#1}} 361 | \newcommand{\version}[1]{\gdef\@version{#1}} 362 | \newcommand{\extrainfo}[1]{\gdef\@extrainfo{#1}} 363 | 364 | \RequirePackage{mwe} 365 | \newcommand{\logo}[1]{\gdef\@logo{#1}} 366 | \newcommand{\cover}[1]{\gdef\@cover{#1}} 367 | 368 | \newcommand{\question}[1]{{\par\citshape #1}\\[0.2ex]} 369 | 370 | \RequirePackage{enumerate} 371 | % list/itemize/enumerate setting 372 | \RequirePackage[shortlabels,inline]{enumitem} 373 | \setlist{nolistsep} 374 | 375 | \RequirePackage[labelfont={bf,color=structurecolor}]{caption} 376 | \captionsetup[table]{skip=3pt} 377 | \captionsetup[figure]{skip=3pt} 378 | 379 | \AtBeginDocument{ 380 | \setlength{\abovedisplayskip}{3pt} 381 | \setlength{\belowdisplayskip}{3pt} 382 | \RequirePackage[flushmargin,stable]{footmisc} 383 | \setlength{\footnotesep}{12pt} 384 | } 385 | 386 | 387 | 388 | \RequirePackage{graphicx} 389 | %\RequirePackage{enumerate} 390 | \RequirePackage{amsmath,mathrsfs,amsfonts,amssymb} 391 | % \providecommand\qed{} 392 | % \renewcommand{\qed}{\hfill\ensuremath{\square}} 393 | \RequirePackage{booktabs} 394 | \RequirePackage{multicol,multirow} 395 | 396 | \RequirePackage{fancyvrb} 397 | \RequirePackage{makecell,lipsum,hologo} 398 | %%中文结构名字 399 | 400 | 401 | %% 章节设置 402 | \RequirePackage[center,pagestyles]{titlesec} 403 | \RequirePackage[title,titletoc,header]{appendix} 404 | 405 | 406 | \RequirePackage[ 407 | backend=\ELEGANT@bibend, 408 | citestyle=\ELEGANT@citestyle, 409 | bibstyle=\ELEGANT@bibstyle]{biblatex} 410 | 411 | \ifdefstring{\ELEGANT@lang}{cn}{ 412 | \renewcommand{\baselinestretch}{1.3} 413 | \renewcommand{\contentsname}{目录} 414 | \renewcommand{\figurename}{图} 415 | \renewcommand{\tablename}{表} 416 | \renewcommand{\partname}{\color{structurecolor}} 417 | \renewcommand{\thepart}{第\zhnumber{\arabic{part}}部分} 418 | \renewcommand{\listfigurename}{插图目录} 419 | \renewcommand{\listtablename}{表格目录} 420 | \renewcommand{\bibname}{参考文献} 421 | \newcommand{\ebibname}{参考文献} 422 | \renewcommand{\appendixname}{附录} 423 | \renewcommand{\appendixtocname}{附录} 424 | \renewcommand{\indexname}{索\hspace{2em}引} 425 | \newcommand\figref[1]{\textbf{图}~\ref{#1}} 426 | \newcommand\tabref[1]{\textbf{表}~\ref{#1}} 427 | \newcommand{\authorname}{\citshape 作者:} 428 | \newcommand{\institutename}{\citshape 组织:} 429 | \newcommand{\datename}{\citshape 时间:} 430 | \newcommand{\versionname}{\citshape 版本:} 431 | \newcommand{\notename}{笔记} 432 | \renewcommand*{\proofname}{证明} 433 | \newcommand{\definitionname}{定义} 434 | \newcommand{\theoremname}{定理} 435 | \newcommand{\axiomname}{公理} 436 | \newcommand{\postulatename}{公设} 437 | \newcommand{\lemmaname}{引理} 438 | \newcommand{\propositionname}{命题} 439 | \newcommand{\corollaryname}{推论} 440 | \newcommand{\examplename}{例题} % 441 | \newcommand{\instancename}{示例} % 442 | \newcommand{\problemname}{问题} % 问题 443 | \newcommand{\exercisename}{练习} % 练习=习题 444 | \newcommand{\remarkname}{注} 445 | \newcommand{\assumptionname}{假设} 446 | \newcommand{\conclusionname}{结论} 447 | \newcommand{\solutionname}{解} 448 | \newcommand{\propertyname}{性质} 449 | \newcommand{\introductionname}{内容提要} 450 | \newcommand\bioinfo[2]{\gdef\@bioinfo{{\citshape #1}:#2}} 451 | \newcommand{\updatename}{更新:} 452 | \newcommand{\historyname}{版本更新历史} 453 | \newcommand{\beforechap}{第} 454 | \newcommand{\afterchap}{章} 455 | }{\relax} 456 | 457 | 458 | \ifdefstring{\ELEGANT@lang}{en}{ 459 | \setlength\parindent{2em} 460 | \newcommand\figref[1]{\textbf{Figure}~\ref{#1}} 461 | \newcommand\tabref[1]{\textbf{Table}~\ref{#1}} 462 | \renewcommand{\chaptername}{Chapter} 463 | \renewcommand{\partname}{\color{structurecolor} Part} 464 | \newcommand{\authorname}{\textbf{Author: }} 465 | \newcommand{\institutename}{\textbf{Institute: }} 466 | \newcommand{\datename}{\textbf{Date: }} 467 | \newcommand{\versionname}{\textbf{Version: }} 468 | \newcommand{\notename}{Note} 469 | \newcommand{\proofname}{Proof} 470 | \newcommand{\problemname}{Problem} 471 | \newcommand{\definitionname}{Definition} 472 | \newcommand{\theoremname}{Theorem} 473 | \newcommand{\axiomname}{Axiom} 474 | \newcommand{\postulatename}{Postulate} 475 | \newcommand{\lemmaname}{Lemma} 476 | \newcommand{\propositionname}{Proposition} 477 | \newcommand{\corollaryname}{Corollary} 478 | \newcommand{\examplename}{Example} 479 | \newcommand{\exercisename}{Exercise} 480 | \newcommand{\remarkname}{Remark} 481 | \newcommand{\assumptionname}{Assumption} 482 | \newcommand{\conclusionname}{Conclusion} 483 | \newcommand{\solutionname}{Solution} 484 | \newcommand{\propertyname}{Property} 485 | \newcommand{\introductionname}{Introduction} 486 | \renewcommand{\appendixname}{Appendix} 487 | \newcommand{\ebibname}{Bibliography} 488 | % \newcommand{\problemsetname}{Exercise} 489 | \newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}} 490 | \newcommand{\updatename}{Updates:} 491 | \newcommand{\historyname}{Version History} 492 | }{\relax} 493 | 494 | \ifdefstring{\ELEGANT@lang}{it}{ 495 | % \RequirePackage[utf8]{inputenc} 496 | \RequirePackage[italian]{babel} 497 | % \RequirePackage[T1]{fontenc} 498 | \setlength\parindent{2em} 499 | \newcommand\figref[1]{\textbf{Figura}~\ref{#1}} 500 | \newcommand\tabref[1]{\textbf{Tabella}~\ref{#1}} 501 | \renewcommand{\chaptername}{Chapter} 502 | \newcommand{\authorname}{\textbf{Autore: }} 503 | \newcommand{\institutename}{\textbf{Istituto: }} 504 | \newcommand{\datename}{\textbf{Data: }} 505 | \newcommand{\versionname}{\textbf{Versione: }} 506 | \newcommand{\notename}{Nota} 507 | \newcommand{\proofname}{Dimostrazione} 508 | \newcommand{\problemname}{Problema} 509 | \newcommand{\definitionname}{Definizione} 510 | \newcommand{\theoremname}{Teorema} 511 | \newcommand{\axiomname}{Assioma} 512 | \newcommand{\postulatename}{Postulato} 513 | \newcommand{\lemmaname}{Lemma} 514 | \newcommand{\propositionname}{Proposizione} 515 | \newcommand{\corollaryname}{Corollario} 516 | \newcommand{\examplename}{Esempio} 517 | \newcommand{\exercisename}{Esercizio} 518 | \newcommand{\remarkname}{Commento} 519 | \newcommand{\assumptionname}{Assunto} 520 | \newcommand{\conclusionname}{Conclusione} 521 | \newcommand{\solutionname}{Soluzione} 522 | \newcommand{\propertyname}{Proprietà} 523 | \newcommand{\introductionname}{Introduzione} 524 | \newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}} 525 | \newcommand{\updatename}{Aggiornamenti:} 526 | \newcommand{\ebibname}{Bibliografia} 527 | \newcommand{\historyname}{Cronologia delle versioni} 528 | }{\relax} 529 | 530 | \ifdefstring{\ELEGANT@lang}{fr}{ 531 | \RequirePackage[utf8]{inputenc} 532 | \RequirePackage[T1]{fontenc} 533 | \RequirePackage[french]{babel} 534 | \setlength\parindent{2em} 535 | \renewcommand\figref[1]{\textbf{Figure}\ref{#1}} 536 | \renewcommand\tabref[1]{\textbf{Tableau}\ref{#1}} 537 | \renewcommand{\chaptername}{Chapitre} 538 | \renewcommand{\authorname}{\textbf{Auteur: }} 539 | \renewcommand{\institutename}{\textbf{Institut: }} 540 | \renewcommand{\datename}{\textbf{Date: }} 541 | \renewcommand{\versionname}{\textbf{Version: }} 542 | \renewcommand{\notename}{Note} 543 | \renewcommand{\proofname}{Démonstration} 544 | \renewcommand{\problemname}{Problème} 545 | \renewcommand{\definitionname}{Définition} 546 | \renewcommand{\theoremname}{Théorème} 547 | \renewcommand{\axiomname}{Axiôme} 548 | \renewcommand{\postulatename}{Postulat} 549 | \renewcommand{\lemmaname}{Lemme} 550 | \renewcommand{\propositionname}{Proposition} 551 | \renewcommand{\corollaryname}{Corollaire} 552 | \renewcommand{\examplename}{Exemple} 553 | \renewcommand{\exercisename}{Exercice} 554 | \renewcommand{\remarkname}{Remarque} 555 | \renewcommand{\assumptionname}{Supposition} 556 | \renewcommand{\conclusionname}{Conclusion} 557 | \renewcommand{\solutionname}{Solution} 558 | \renewcommand{\propertyname}{Propriété} 559 | \renewcommand{\introductionname}{Introduction} 560 | \renewcommand{\problemsetname}{Exercice} 561 | \renewcommand{\updatename}{Mises à jour:} 562 | \newcommand{\ebibname}{Bibliographie} 563 | \renewcommand{\historyname}{Historique des versions} 564 | }{\relax} 565 | 566 | 567 | \ifdefstring{\ELEGANT@lang}{nl}{ 568 | \RequirePackage[dutch]{babel} 569 | \setlength\parindent{2em} 570 | \newcommand\figref[1]{\textbf{Figuur}~\ref{#1}} 571 | \newcommand\tabref[1]{\textbf{Tabel}~\ref{#1}} 572 | \renewcommand{\chaptername}{Hoofdstuk} 573 | \newcommand{\authorname}{\textbf{Auteur: }} 574 | \newcommand{\institutename}{\textbf{Instituut: }} 575 | \newcommand{\datename}{\textbf{Datum: }} 576 | \newcommand{\versionname}{\textbf{Versie: }} 577 | \newcommand{\notename}{Opmerking} 578 | \newcommand{\proofname}{Bewijs} 579 | \newcommand{\problemname}{Probleem} 580 | \newcommand{\definitionname}{Definitie} 581 | \newcommand{\theoremname}{Stelling} 582 | \newcommand{\axiomname}{Uitgangspunt} 583 | \newcommand{\postulatename}{Hypothese} 584 | \newcommand{\lemmaname}{Lemma} 585 | \newcommand{\propositionname}{Voorstel} 586 | \newcommand{\corollaryname}{Gevolgtrekking} 587 | \newcommand{\examplename}{Voorbeeld} 588 | \newcommand{\exercisename}{Oefening} 589 | \newcommand{\remarkname}{Commentaar} 590 | \newcommand{\assumptionname}{Veronderstelling} 591 | \newcommand{\conclusionname}{Besluit} 592 | \newcommand{\solutionname}{Oplossing} 593 | \newcommand{\propertyname}{Eigenschap} 594 | \newcommand{\introductionname}{Introductie} 595 | \newcommand{\problemsetname}{Probleemcomplex} 596 | \newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}} 597 | \newcommand{\updatename}{Update:} 598 | \newcommand{\ebibname}{Bibliographie} 599 | \newcommand{\historyname}{Versie Geschiedenis} 600 | }{\relax} 601 | 602 | 603 | \ifdefstring{\ELEGANT@lang}{hu}{ 604 | \RequirePackage[magyar]{babel} 605 | \setlength\parindent{2em} 606 | \newcommand\figref[1]{\ref{#1}~\textbf{Ábra}} 607 | \newcommand\tabref[1]{\ref{#1}~\textbf{Táblázat}} 608 | \renewcommand{\chaptername}{Fejezet} 609 | \newcommand{\authorname}{\textbf{Szerző: }} 610 | \newcommand{\institutename}{\textbf{Intézmény: }} 611 | \newcommand{\datename}{\textbf{Dátum: }} 612 | \newcommand{\versionname}{\textbf{Verziószám: }} 613 | \newcommand{\notename}{Jegyzet} 614 | \newcommand{\proofname}{Bizonyítás} 615 | \newcommand{\problemname}{Probléma} 616 | \newcommand{\definitionname}{Definíció} 617 | \newcommand{\theoremname}{Tétel} 618 | \newcommand{\axiomname}{Axióma} 619 | \newcommand{\postulatename}{Követelmény} 620 | \newcommand{\lemmaname}{Lemma} 621 | \newcommand{\propositionname}{Előzmény} 622 | \newcommand{\corollaryname}{Következmény} 623 | \newcommand{\examplename}{Példa} 624 | \newcommand{\exercisename}{Feladat} 625 | \newcommand{\remarkname}{Megjegyzés} 626 | \newcommand{\assumptionname}{Sejtés} 627 | \newcommand{\conclusionname}{Összefoglalás} 628 | \newcommand{\solutionname}{Megoldás} 629 | \newcommand{\propertyname}{Tulajdonság} 630 | \newcommand{\introductionname}{Bevezetés} 631 | \newcommand{\problemsetname}{Feladatok} 632 | \newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}} 633 | \newcommand{\updatename}{Frissítve:} 634 | \newcommand{\ebibname}{Bibliográfia} 635 | \newcommand{\historyname}{Korábbi verziók} 636 | }{\relax} 637 | 638 | \ifdefstring{\ELEGANT@lang}{de}{ 639 | \setlength\parindent{2em} 640 | \renewcommand{\contentsname}{Inhaltsverzeichnis} 641 | \newcommand\figref[1]{\textbf{Figur}~\ref{#1}} 642 | \newcommand\tabref[1]{\textbf{Tabelle}~\ref{#1}} 643 | \renewcommand{\partname}{\color{structurecolor} Teil} 644 | \renewcommand{\listfigurename}{Abbildungsverzeichnis} 645 | \renewcommand{\listtablename}{Tabellenverzeichnis} 646 | \renewcommand{\bibname}{Bibliographie} 647 | \renewcommand{\appendixname}{Anhang} 648 | \renewcommand{\chaptername}{Kapitel} 649 | \newcommand{\authorname}{\textbf{Autor: }} 650 | \newcommand{\institutename}{\textbf{Institut: }} 651 | \newcommand{\datename}{\textbf{Datum: }} 652 | \newcommand{\versionname}{\textbf{Version: }} 653 | \newcommand{\notename}{Notiz} 654 | \newcommand{\proofname}{Beweis} 655 | \newcommand{\problemname}{Problem} 656 | \newcommand{\definitionname}{Definition} 657 | \newcommand{\theoremname}{Theorem} 658 | \newcommand{\axiomname}{Axiom} 659 | \newcommand{\postulatename}{Postulat} 660 | \newcommand{\lemmaname}{Lemma} 661 | \newcommand{\propositionname}{Behauptung} 662 | \newcommand{\corollaryname}{Corollary} 663 | \newcommand{\examplename}{Beispiel} 664 | \newcommand{\instancename}{Beispiel} % 665 | \newcommand{\exercisename}{\"{U}bung} 666 | \newcommand{\remarkname}{Anmerkung} 667 | \newcommand{\assumptionname}{Annahme} 668 | \newcommand{\conclusionname}{Abschluss} 669 | \newcommand{\solutionname}{Aufl\"{o}sung} 670 | \newcommand{\propertyname}{Property} 671 | \newcommand{\introductionname}{Einleitung} 672 | \newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}} 673 | \newcommand{\updatename}{Updates:} 674 | \renewcommand{\ebibname}{Bibliographie} 675 | \newcommand{\historyname}{Version der Geschichte} 676 | }{\relax} 677 | 678 | \ifdefstring{\ELEGANT@lang}{es}{ 679 | \RequirePackage[spanish]{babel} 680 | \setlength\parindent{2em} 681 | \newcommand\figref[1]{\textbf{Figura}~\ref{#1}} 682 | \newcommand\tabref[1]{\textbf{Tabla}~\ref{#1}} 683 | \renewcommand{\spanishchaptername}{Capítulo} 684 | \newcommand{\authorname}{\textbf{Autor: }} 685 | \newcommand{\institutename}{\textbf{Instituto: }} 686 | \newcommand{\datename}{\textbf{Fecha: }} 687 | \newcommand{\versionname}{\textbf{Versión: }} 688 | \newcommand{\notename}{Nota} 689 | \newcommand{\proofname}{Demostración} 690 | \newcommand{\problemname}{Problema} 691 | \newcommand{\definitionname}{Definición} 692 | \newcommand{\theoremname}{Teorema} 693 | \newcommand{\axiomname}{Axioma} 694 | \newcommand{\postulatename}{Postulado} 695 | \newcommand{\lemmaname}{Lema} 696 | \newcommand{\propositionname}{Proposición} 697 | \newcommand{\corollaryname}{Corolario} 698 | \newcommand{\examplename}{Ejemplo} 699 | \newcommand{\exercisename}{Ejercicio} 700 | \newcommand{\remarkname}{Comentario} 701 | \newcommand{\assumptionname}{Asunto} 702 | \newcommand{\conclusionname}{Conclusión} 703 | \newcommand{\solutionname}{Solución} 704 | \newcommand{\propertyname}{Propiedad} 705 | \newcommand{\introductionname}{Introducción} 706 | \newcommand{\problemsetname}{Ejercicio} 707 | \newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}} 708 | \newcommand{\updatename}{Actualización:} 709 | \newcommand{\ebibname}{Bibliografía} 710 | \newcommand{\historyname}{Historial de versiones} 711 | }{\relax} 712 | 713 | \ifdefstring{\ELEGANT@lang}{mn}{ 714 | \RequirePackage[mongolian]{babel} 715 | \RequirePackage[utf8]{inputenc} 716 | \RequirePackage[T2A]{fontenc} 717 | \setlength\parindent{2em} 718 | \newcommand\figref[1]{\textbf{Зураг}\ref{#1}} 719 | \newcommand\tabref[1]{\textbf{Хүснэгт}\ref{#1}} 720 | \renewcommand{\chaptername}{Бүлэг} 721 | \newcommand{\authorname}{\textbf{Зохиогч: }} 722 | \newcommand{\institutename}{\textbf{Сургууль: }} 723 | \newcommand{\datename}{\textbf{Огноо: }} 724 | \newcommand{\versionname}{\textbf{Хувилбар: }} 725 | \newcommand{\notename}{Тэмдэглэл} 726 | \newcommand{\proofname}{Баталгаа} 727 | \newcommand{\problemname}{Бодлого} 728 | \newcommand{\definitionname}{Тодорхойлолт} 729 | \newcommand{\theoremname}{Томьёо} 730 | \newcommand{\axiomname}{Аксиом} 731 | \newcommand{\postulatename}{Постулат} 732 | \newcommand{\lemmaname}{Лемма} 733 | \newcommand{\propositionname}{Таамаглал} 734 | \newcommand{\corollaryname}{Үр дүн} 735 | \newcommand{\examplename}{Жишээ} 736 | \newcommand{\exercisename}{Дасгал} 737 | \newcommand{\remarkname}{Тайлбар} 738 | \newcommand{\assumptionname}{Урьдчилсан нөхцөл} 739 | \newcommand{\conclusionname}{Дүгнэлт} 740 | \newcommand{\solutionname}{Хариулт} 741 | \newcommand{\propertyname}{Шинж чанар} 742 | \newcommand{\introductionname}{Удиртгал} 743 | \newcommand{\problemsetname}{Бодлогууд} 744 | \newcommand\bioinfo[2]{\gdef@bioinfo{\textbf{#1}: #2}} 745 | \newcommand{\updatename}{Шинэчлэлтүүд:} 746 | \newcommand{\ebibname}{Ном зүй} 747 | \newcommand{\historyname}{Хувилбарын түүх} 748 | }{\relax} 749 | 750 | 751 | \ifdefstring{\ELEGANT@lang}{pt}{ 752 | \RequirePackage[portuguese]{babel} 753 | \setlength\parindent{2em} 754 | \newcommand\figref[1]{\textbf{Figura}~\ref{#1}} 755 | \newcommand\tabref[1]{\textbf{Tabela}~\ref{#1}} 756 | \renewcommand{\chaptername}{Capítulo} 757 | \newcommand{\authorname}{\textbf{Autor: }} 758 | \newcommand{\institutename}{\textbf{Instituição: }} 759 | \newcommand{\datename}{\textbf{Data: }} 760 | \newcommand{\versionname}{\textbf{Versão: }} 761 | \newcommand{\notename}{Observação} 762 | \newcommand{\proofname}{Demostração} 763 | \newcommand{\problemname}{Problema} 764 | \newcommand{\definitionname}{Definição} 765 | \newcommand{\theoremname}{Teorema} 766 | \newcommand{\axiomname}{Axioma} 767 | \newcommand{\postulatename}{Postulado} 768 | \newcommand{\lemmaname}{Lema} 769 | \newcommand{\propositionname}{Proposição} 770 | \newcommand{\corollaryname}{Corolário} 771 | \newcommand{\examplename}{Exemplo} 772 | \newcommand{\exercisename}{Exercício} 773 | \newcommand{\remarkname}{Comentário} 774 | \newcommand{\assumptionname}{Assunto} 775 | \newcommand{\conclusionname}{Conclusão} 776 | \newcommand{\solutionname}{Soluções} 777 | \newcommand{\propertyname}{Propiedade} 778 | \newcommand{\introductionname}{Introdução} 779 | \newcommand{\problemsetname}{Questão} 780 | \newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}} 781 | \newcommand{\updatename}{Atualização: } 782 | \newcommand{\ebibname}{Bibliografia} 783 | \newcommand{\historyname}{Histórico de versões} 784 | }{\relax} 785 | 786 | 787 | \ifdefstring{\ELEGANT@lang}{jp}{ 788 | \RequirePackage{luatexja} 789 | \setlength\parindent{2em} 790 | \renewcommand{\contentsname}{目次} 791 | \newcommand\figref[1]{\textbf{図}~\ref{#1}} 792 | \newcommand\tabref[1]{\textbf{表}~\ref{#1}} 793 | \renewcommand{\partname}{\color{structurecolor}} 794 | \renewcommand{\listfigurename}{イラストカタログ} 795 | \renewcommand{\listtablename}{表カタログ} 796 | \renewcommand{\bibname}{参考文献} 797 | \renewcommand{\appendixname}{付録} 798 | \renewcommand{\chaptername}{第 \thechapter 章} 799 | \newcommand{\authorname}{\textbf{著者:}} 800 | \newcommand{\institutename}{\textbf{組織団体:}} 801 | \newcommand{\datename}{\textbf{日付:}} 802 | \newcommand{\versionname}{\textbf{\citshape バージョン:}} 803 | \newcommand{\notename}{ノート} 804 | \newcommand{\proofname}{証明} 805 | \newcommand{\problemname}{問題} 806 | \newcommand{\definitionname}{定義} 807 | \newcommand{\theoremname}{定理} 808 | \newcommand{\axiomname}{公理} 809 | \newcommand{\postulatename}{公準} 810 | \newcommand{\lemmaname}{補題} 811 | \newcommand{\propositionname}{命題} 812 | \newcommand{\corollaryname}{系} 813 | \newcommand{\examplename}{例題} 814 | \newcommand{\instancename}{例} 815 | \newcommand{\exercisename}{練習} 816 | \newcommand{\remarkname}{注} 817 | \newcommand{\assumptionname}{仮設} 818 | \newcommand{\conclusionname}{結論} 819 | \newcommand{\solutionname}{解答} 820 | \newcommand{\propertyname}{性質} 821 | \newcommand{\introductionname}{内容概要} 822 | \newcommand\bioinfo[2]{\gdef\@bioinfo{\textbf{#1}: #2}} 823 | \newcommand{\updatename}{更新:} 824 | \newcommand{\ebibname}{参考文献} 825 | \newcommand{\historyname}{バージョン更新履歴} 826 | }{\relax} 827 | 828 | 829 | \graphicspath{{./figure/}{./figures/}{./image/}{./images/}{./graphics/}{./graphic/}{./pictures/}{./picture/}} 830 | 831 | \RequirePackage{tikz} %% load tikz without tikz 832 | \usetikzlibrary{backgrounds,calc,shadows,positioning,fit} 833 | \newcommand*\circled[1]{\tikz[baseline=(char.base)]{ 834 | \node[shape=circle,draw,inner sep=1pt] (char) {#1};}} 835 | % https://tex.stackexchange.com/questions/7032/good-way-to-make-textcircled-numbers 836 | 837 | \newcommand*{\eitemi}{\tikz \draw [baseline, ball color=structurecolor,draw=none] circle (2pt);} 838 | \newcommand*{\eitemii}{\tikz \draw [baseline, fill=structurecolor,draw=none,circular drop shadow] circle (2pt);} 839 | \newcommand*{\eitemiii}{\tikz \draw [baseline, fill=structurecolor,draw=none] circle (2pt);} 840 | \setlist[enumerate,1]{label=\color{structurecolor}\arabic*.} 841 | \setlist[enumerate,2]{label=\color{structurecolor}(\alph*).} 842 | \setlist[enumerate,3]{label=\color{structurecolor}\Roman*.} 843 | \setlist[enumerate,4]{label=\color{structurecolor}\Alph*.} 844 | \setlist[itemize,1]{label={\eitemi}} 845 | \setlist[itemize,2]{label={\eitemii}} 846 | \setlist[itemize,3]{label={\eitemiii}} 847 | 848 | \RequirePackage{apptools} 849 | 850 | % appendix chapter: 851 | 852 | \ifdefstring{\ELEGANT@lang}{cn}{ 853 | \ifdefstring{\ELEGANT@scheme}{chinese}{ 854 | \newcommand{\xchaptertitle}{第\zhnumber{\arabic{chapter}}章} }{ 855 | \newcommand{\xchaptertitle}{第 \thechapter{} 章}} 856 | % Hyperref 2022/05/16's changelog.txt said 857 | % * nameref is loaded always and earlier (issue#235) 858 | \AtBeginDocument{ 859 | \ifELEGANT@Hy@later 860 | \patchcmd{\NR@chapter}% 861 | {\numberline{\thechapter}}{\numberline{\xchaptertitle}}% 862 | {}{\fail} 863 | \else 864 | \patchcmd{\Hy@org@chapter}% 865 | {\numberline{\thechapter}}{\numberline{\xchaptertitle}}% 866 | {}{\fail} 867 | \fi 868 | } 869 | } 870 | {\newcommand{\xchaptertitle}{\chaptername~\thechapter~}} 871 | 872 | \setcounter{secnumdepth}{5} 873 | \titleformat{\chapter}[\style]{\bfseries}{ 874 | \filcenter\LARGE\enspace\bfseries{\color{structurecolor} \IfAppendix{\appendixname\;\thechapter\;}{\xchaptertitle\;}}}{1pt}{ 875 | \LARGE\bfseries\color{structurecolor}\filcenter}[] 876 | \titleformat{\section}[hang]{\bfseries}{ 877 | \Large\bfseries{\color{structurecolor}\thesection}\enspace}{1pt}{% 878 | \color{structurecolor}\Large\bfseries\filright} 879 | \titleformat{\subsection}[hang]{\bfseries}{ 880 | \large\bfseries\color{structurecolor}\thesubsection\enspace}{1pt}{% 881 | \color{structurecolor}\large\bfseries\filright} 882 | \titleformat{\subsubsection}[hang]{\bfseries}{ 883 | \large\bfseries\color{structurecolor}\thesubsubsection\enspace}{1pt}{% 884 | \color{structurecolor}\large\bfseries\filright} 885 | 886 | \titlespacing{\chapter}{0pt}{-20pt}{1.3\baselineskip} 887 | %\titlespacing{\subsection}{0pt}{0.5\baselineskip}{-\baselineskip} 888 | 889 | 890 | 891 | %%define the 892 | %%definition theorem postulate axiom corollary lemma proposition 893 | %%and proof environment 894 | \RequirePackage{pifont,manfnt,bbding} 895 | \RequirePackage[many]{tcolorbox} 896 | % \newlength{\normalparindent} 897 | % \setlength{\normalparindent}{\parindent} 898 | \newcommand{\ELEGANT@tmp@tl}{} 899 | \ifELEGANT@usesamecnt 900 | \newcounter{ELEGANT@samecnt} 901 | \counterwithin{ELEGANT@samecnt}{\ELEGANT@thmcnt} 902 | \tcbset{ 903 | new/usesamecnt/.style = {use counter = ELEGANT@samecnt} 904 | } 905 | \else 906 | \tcbset{ 907 | new/usesamecnt/.style = {} 908 | } 909 | \fi 910 | 911 | \ifdefstring{\ELEGANT@mode}{fancy}{ 912 | \tcbset{ 913 | common/.style={ 914 | fontupper=\citshape, 915 | lower separated=false, 916 | % before upper={\setlength{\parindent}{\normalparindent}}, 917 | coltitle=white, 918 | colback=gray!5, 919 | boxrule=0.5pt, 920 | fonttitle=\bfseries, 921 | enhanced, 922 | breakable, 923 | top=8pt, 924 | before skip=8pt, 925 | attach boxed title to top left={ 926 | yshift=-0.11in, 927 | xshift=0.15in}, 928 | boxed title style={ 929 | boxrule=0pt, 930 | colframe=white, 931 | arc=0pt, 932 | outer arc=0pt}, 933 | separator sign={.},}, 934 | defstyle/.style={ 935 | common, 936 | colframe=main, 937 | colback=main!5, 938 | colbacktitle=main, 939 | overlay unbroken and last={ 940 | \node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) { 941 | \textcolor{main}{$\clubsuit$}};}}, 942 | thmstyle/.style={ 943 | common, 944 | colframe=second, 945 | colback=second!5, 946 | colbacktitle=second, 947 | overlay unbroken and last={ 948 | \node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) { 949 | \textcolor{second}{$\heartsuit$}};}}, 950 | prostyle/.style={ 951 | common, 952 | colframe=third, 953 | colback=third!5, 954 | colbacktitle=third, 955 | overlay unbroken and last={ 956 | \node[anchor=south east, outer sep=0pt] at (\linewidth-width,0) { 957 | \textcolor{third}{$\spadesuit$}};}}, 958 | ELEGANT@title/.code n args={2} 959 | { 960 | 961 | \tcbset 962 | { 963 | title= 964 | { 965 | \csname #1name\endcsname~% 966 | \ifdef{\thetcbcounter}{\thetcbcounter}{}% 967 | \ifblank{#2}{}{\ (#2)} 968 | } 969 | } 970 | }, 971 | ELEGANT@label/.code n args={2} 972 | { 973 | \ifblank{#2} 974 | {}{\tcbset{label={#1:#2}}} 975 | } 976 | } 977 | 978 | % define an internal control sequence \ELEGANT@newtheorem for fancy mode's newtheorem 979 | % #1 is the environment name, #2 is the prefix of label, #3 is the style 980 | % style: thmstyle, defstyle, prostyle 981 | % e.g. \ELEGANT@newtheorem{theorem}{thm}{thmstyle} 982 | % will define two environments: numbered ``theorem'' and no-numbered ``theorem*'' 983 | % WARNING FOR MULTILINGUAL: this cs will automatically find \theoremname's definition, 984 | % WARNING FOR MULTILINGUAL: it should be defined in language settings. 985 | \NewDocumentCommand \ELEGANT@newtheorem { m m m O{} }{ 986 | \ifcsundef{#1name}{% 987 | \ClassError{elegantbook}{% 988 | \ #1name undefined, \MessageBreak 989 | Please check in language setting 990 | }{} 991 | }{\relax} 992 | \expandafter\ifblank\expandafter{#4}{ 993 | \tcbset{ 994 | new/usecnt/.style={} 995 | } 996 | }{ 997 | \tcbset{ 998 | new/usecnt/.style= {use counter from = #4} 999 | } 1000 | } 1001 | \DeclareTColorBox[auto counter,number within=\ELEGANT@thmcnt,usesamecnt,usecnt]{#1}{ g o t\label g }{ 1002 | common,#3, 1003 | IfValueTF={##1} 1004 | {ELEGANT@title={#1}{##1}} 1005 | { 1006 | IfValueTF={##2} 1007 | {ELEGANT@title={#1}{##2}} 1008 | {ELEGANT@title={#1}{}} 1009 | }, 1010 | IfValueT={##4} 1011 | { 1012 | IfBooleanTF={##3} 1013 | {label={##4}} 1014 | {ELEGANT@label={#2}{##4}} 1015 | } 1016 | } 1017 | \DeclareTColorBox{#1*}{ g o }{ 1018 | common,#3, 1019 | IfValueTF={##1} 1020 | {ELEGANT@title={#1}{##1}} 1021 | { 1022 | IfValueTF={##2} 1023 | {ELEGANT@title={#1}{##2}} 1024 | {ELEGANT@title={#1}{}} 1025 | }, 1026 | } 1027 | } 1028 | % define several environment 1029 | % we define headers like \definitionname before 1030 | \ELEGANT@newtheorem{theorem}{thm}{thmstyle} 1031 | \ELEGANT@newtheorem{definition}{def}{defstyle} 1032 | \ELEGANT@newtheorem{postulate}{pos}{thmstyle} 1033 | \ELEGANT@newtheorem{axiom}{axi}{thmstyle} 1034 | \ELEGANT@newtheorem{corollary}{cor}{thmstyle} 1035 | \ELEGANT@newtheorem{lemma}{lem}{thmstyle} 1036 | \ELEGANT@newtheorem{proposition}{pro}{prostyle} 1037 | }{\relax} 1038 | 1039 | 1040 | \ifdefstring{\ELEGANT@mode}{simple}{ 1041 | \let\openbox\relax 1042 | \RequirePackage{amsthm} 1043 | \let\proof\relax 1044 | % \let\proofname\relax 1045 | \let\endproof\relax 1046 | 1047 | % declare new theorem styles: defstyle, thmstyle, prostyle 1048 | \newtheoremstyle{defstyle}{3pt}{3pt}{\citshape}{-3pt}{ 1049 | \bfseries\color{main}}{}{0.5em}{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}} 1050 | \newtheoremstyle{thmstyle}{3pt}{3pt}{\citshape}{-3pt}{ 1051 | \bfseries\color{second}}{}{0.5em}{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}} 1052 | \newtheoremstyle{prostyle}{3pt}{3pt}{\citshape}{-3pt}{ 1053 | \bfseries\color{third}}{}{0.5em}{\thmname{#1} \thmnumber{#2} \thmnote{(#3)}} 1054 | 1055 | % define an internal control sequence \ELEGANT@newtheorem for simple mode's newtheorem 1056 | % #1 is the environment name, #2 is the style 1057 | % style: thmstyle, defstyle, prostyle 1058 | % e.g. \ELEGANT@newtheorem{theorem}{thmstyle} 1059 | % will define two environments: numbered ``theorem'' and no-numbered ``theorem*'' 1060 | % WARNING FOR MULTILINGUAL: this cs will automatically find \theoremname's definition, 1061 | % WARNING FOR MULTILINGUAL: it should be defined in language settings. 1062 | \NewDocumentCommand \ELEGANT@newtheorem { m m O{} } { 1063 | \theoremstyle{#2} 1064 | \ifELEGANT@usesamecnt 1065 | \newtheorem{#1}[ELEGANT@samecnt]{\csname #1name\endcsname} 1066 | \else 1067 | \ifblank{#3}{ 1068 | \newtheorem{#1}{\csname #1name\endcsname}[\ELEGANT@thmcnt] 1069 | }{ 1070 | \newtheorem{#1}[#3]{\csname #1name\endcsname} 1071 | } 1072 | \fi 1073 | \newtheorem*{#1*}{\csname #1name\endcsname} 1074 | } 1075 | 1076 | % define several environment 1077 | % we define headers like \definitionname before 1078 | \ELEGANT@newtheorem{theorem}{thmstyle} 1079 | \ELEGANT@newtheorem{definition}{defstyle} 1080 | \ELEGANT@newtheorem{postulate}{thmstyle} 1081 | \ELEGANT@newtheorem{axiom}{thmstyle} 1082 | \ELEGANT@newtheorem{corollary}{thmstyle} 1083 | \ELEGANT@newtheorem{lemma}{thmstyle} 1084 | \ELEGANT@newtheorem{proposition}{prostyle} 1085 | }{\relax} 1086 | 1087 | % define an user control sequence \elegantnewtheorem 1088 | % #1 is the evironment, #2 is the theorem header 1089 | % #3 is the style #4 is the prefix for fancy mode 1090 | % style: thmstyle, defstyle, prostyle 1091 | % if #4 is given in simple mode, an error will be raised 1092 | % if #4 isn't given in fancy mode, the prefix will be set equal to #1, 1093 | % and a warning will be raised 1094 | \newcommand{\ELEGANT@newtheorem@warning}{} 1095 | \newcommand{\ELEGANT@newtheorem@error}{} 1096 | \newcommand{\ELEGANT@usesamecnt@warning}{} 1097 | \NewDocumentCommand\elegantnewtheorem{ m m m g O{} } 1098 | { 1099 | \renewcommand{\ELEGANT@usesamecnt@warning}{ 1100 | \ClassWarning{elegantbook}{% 1101 | [#5] won't make sence with option \MessageBreak 1102 | `usesamecnt'. 1103 | } 1104 | } 1105 | \renewcommand{\ELEGANT@newtheorem@warning}{ 1106 | \ClassWarning{elegantbook}{% 1107 | Because you didn't provide a prefix, \MessageBreak 1108 | we use #1 as the default prefix. \MessageBreak 1109 | You have to use \MessageBreak 1110 | \ref{#1:label} to refer a \MessageBreak 1111 | \begin{#1}{name}{label} environment. \MessageBreak 1112 | } 1113 | } 1114 | \renewcommand{\ELEGANT@newtheorem@error}{ 1115 | \ClassError{elegantbook}{% 1116 | You can't set a prefix in mode ``simple''.\MessageBreak 1117 | Just use \MessageBreak 1118 | \elegantnewtheorem{#1}{#2}{#3} 1119 | }{% 1120 | We are using ``amsthm'' package to \MessageBreak 1121 | generate theorem-like theorem. \MessageBreak 1122 | The 4th parameter ``prefix'' isn't allowed. 1123 | } 1124 | } 1125 | \ifELEGANT@usesamecnt 1126 | \ifblank{#5}{}{\ELEGANT@usesamecnt@warning} 1127 | \else 1128 | \renewcommand{\ELEGANT@tmp@tl}{#5} 1129 | \fi 1130 | \expandafter\def\csname #1name\endcsname{#2} 1131 | \ifdefstring{\ELEGANT@mode}{simple}{% 1132 | \IfValueTF{#4} 1133 | {\ELEGANT@newtheorem@error} 1134 | {\ELEGANT@newtheorem{#1}{#3}[\ELEGANT@tmp@tl]} 1135 | }{\relax} 1136 | \ifdefstring{\ELEGANT@mode}{fancy}{% 1137 | \IfValueTF{#4} 1138 | { 1139 | \def\ELEGANT@temp@prefix{#4} 1140 | \ifdefempty{\ELEGANT@temp@prefix} 1141 | { 1142 | \ELEGANT@newtheorem{#1}{#1}{#3}[\ELEGANT@tmp@tl] 1143 | \ELEGANT@newtheorem@warning 1144 | } 1145 | {\ELEGANT@newtheorem{#1}{#4}{#3}[\ELEGANT@tmp@tl]} 1146 | } 1147 | { 1148 | \ELEGANT@newtheorem{#1}{#1}{#3}[\ELEGANT@tmp@tl] 1149 | \ELEGANT@newtheorem@warning 1150 | } 1151 | }{\relax} 1152 | } 1153 | 1154 | % main(green-def): example exercise problem solution 1155 | % second(orange-thm): proof note remark 1156 | % third(blue-prop): assumptions property conclusion custom 1157 | 1158 | %% Example with counter 1159 | \newcounter{exam}[chapter] 1160 | \setcounter{exam}{0} 1161 | \renewcommand{\theexam}{\thechapter.\arabic{exam}} 1162 | \newenvironment{example}[1][]{ 1163 | \refstepcounter{exam} 1164 | \par\noindent\textbf{\color{main}{\examplename} \theexam #1 }\rmfamily}{ 1165 | \par\ignorespacesafterend} 1166 | 1167 | %% Exercise with counter 1168 | \newcounter{exer}[chapter] 1169 | \setcounter{exer}{0} 1170 | \renewcommand{\theexer}{\thechapter.\arabic{exer}} 1171 | \newenvironment{exercise}[1][]{ 1172 | \refstepcounter{exer} 1173 | \par\noindent\makebox[-3pt][r]{ 1174 | \scriptsize\color{red!90}\HandPencilLeft\quad} 1175 | \textbf{\color{main}{\exercisename} \theexer #1 }\rmfamily}{ 1176 | \par\ignorespacesafterend} 1177 | 1178 | %% Problem with counter 1179 | \newcounter{prob}[chapter] 1180 | \setcounter{prob}{0} 1181 | \renewcommand{\theprob}{\thechapter.\arabic{prob}} 1182 | \newenvironment{problem}[1][]{ 1183 | \refstepcounter{prob} 1184 | \par\noindent\textbf{\color{main}{\problemname} \theprob #1 }\rmfamily}{ 1185 | \par\ignorespacesafterend} 1186 | 1187 | \newenvironment{note}{ 1188 | \par\noindent\makebox[-3pt][r]{ 1189 | \scriptsize\color{red!90}\textdbend\quad} 1190 | \textbf{\color{second}\notename} \citshape}{\par} 1191 | 1192 | \newenvironment{proof}{ 1193 | \par\noindent\textbf{\color{second}\proofname\;} 1194 | \color{black!90}\cfs}{ 1195 | % \hfill$\Box$\quad 1196 | \par} 1197 | 1198 | \newenvironment{solution}{\par\noindent\textbf{\color{main}\solutionname} \citshape}{\par} 1199 | \newenvironment{remark}{\noindent\textbf{\color{second}\remarkname}}{\par} 1200 | \newenvironment{assumption}{\par\noindent\textbf{\color{third}\assumptionname} \citshape}{\par} 1201 | \newenvironment{conclusion}{\par\noindent\textbf{\color{third}\conclusionname} \citshape}{\par} 1202 | \newenvironment{property}{\par\noindent\textbf{\color{third}\propertyname} \citshape}{\par} 1203 | \newenvironment{custom}[1]{\par\noindent\textbf{\color{third} #1} \citshape}{\par} 1204 | 1205 | \RequirePackage{multicol} 1206 | \tcbset{ 1207 | introductionsty/.style={ 1208 | enhanced, 1209 | breakable, 1210 | colback=structurecolor!10, 1211 | colframe=structurecolor, 1212 | fonttitle=\bfseries, 1213 | colbacktitle=structurecolor, 1214 | fontupper=\citshape, 1215 | attach boxed title to top center={yshift=-3mm,yshifttext=-1mm}, 1216 | boxrule=0pt, 1217 | toprule=0.5pt, 1218 | bottomrule=0.5pt, 1219 | top=8pt, 1220 | before skip=8pt, 1221 | sharp corners 1222 | }, 1223 | } 1224 | 1225 | 1226 | \newenvironment{introduction}[1][\introductionname]{ 1227 | \begin{tcolorbox}[introductionsty,title={#1}] 1228 | \begin{multicols}{2} 1229 | \begin{itemize}[label=\textcolor{structurecolor}{\upshape\scriptsize\SquareShadowBottomRight}]}{ 1230 | \end{itemize} 1231 | \end{multicols} 1232 | \end{tcolorbox}} 1233 | 1234 | \RequirePackage{adforn} 1235 | 1236 | \newenvironment{problemset}[1][\xchaptertitle~\exercisename]{ 1237 | \vspace*{10pt} 1238 | \begin{center} 1239 | \phantomsection\addcontentsline{toc}{section}{\texorpdfstring{\xchaptertitle~\exercisename}{\exercisename}} 1240 | % \markboth{#1}{\rightmark} 1241 | \markright{#1} 1242 | \textcolor{structurecolor}{\Large\bfseries\adftripleflourishleft~#1~\adftripleflourishright} 1243 | \end{center} 1244 | \begin{enumerate}}{ 1245 | \end{enumerate}} 1246 | 1247 | \def\relsec{\endgroup start} 1248 | \def\endrelsec{end\begingroup\def \@currenvir {relsec}} 1249 | 1250 | \ifdefstring{\ELEGANT@result}{noanswer}{ 1251 | \AtBeginDocument{ 1252 | \excludecomment{solution} 1253 | \excludecomment{proof} 1254 | \excludecomment{inline} 1255 | } 1256 | }{\relax} 1257 | 1258 | 1259 | %页眉页脚 1260 | \RequirePackage{fancyhdr} 1261 | \fancyhf{} 1262 | 1263 | 1264 | \fancyfoot[c]{\color{structurecolor}\small\thepage} 1265 | \if@twoside 1266 | \fancyhead[EL]{\color{structurecolor}\cnormal\leftmark} 1267 | \fancyhead[OR]{\color{structurecolor}\cnormal\rightmark} 1268 | \else 1269 | \fancyhead[R]{\color{structurecolor}\cnormal\rightmark} 1270 | \fi 1271 | 1272 | \renewcommand{\headrule}{\color{structurecolor}\hrule width\textwidth} 1273 | \pagestyle{fancy} 1274 | \renewcommand{\headrulewidth}{1pt} 1275 | % \renewcommand{\headrule}{} 1276 | \fancypagestyle{plain}{\renewcommand{\headrulewidth}{0pt}\fancyhf{}\renewcommand{\headrule}{}} 1277 | \renewcommand{\sectionmark}[1]{\markright{\thesection\, #1}{}} 1278 | \renewcommand{\chaptermark}[1]{\markboth{\xchaptertitle\, #1}{}} 1279 | 1280 | 1281 | \renewcommand*{\maketitle}{% 1282 | \hypersetup{pageanchor=false} 1283 | \pagenumbering{Alph} 1284 | \begin{titlepage} 1285 | \newgeometry{margin = 0in} 1286 | \parindent=0pt 1287 | \ifdefstring{\ELEGANT@device}{normal}{ 1288 | \ifcsname @cover\endcsname 1289 | \includegraphics[width=\linewidth]{\@cover} 1290 | \else 1291 | \includegraphics[width=\linewidth]{example-image} 1292 | \fi 1293 | }{\relax} 1294 | \ifdefstring{\ELEGANT@device}{pad}{ 1295 | \ifcsname @cover\endcsname 1296 | \includegraphics[trim=0 26bp 0 26bp,clip=true, width=\linewidth]{\@cover} 1297 | \else 1298 | \includegraphics[trim=0 26bp 0 26bp,clip=true, width=\linewidth]{example-image} 1299 | \fi 1300 | }{\relax} 1301 | \setlength{\fboxsep}{0pt} 1302 | \colorbox{coverlinecolor}{\makebox[\linewidth][c]{\shortstack[c]{\vspace{0.5in}}}} 1303 | \vfill 1304 | \vskip-2ex 1305 | \hspace{2em} 1306 | \parbox{0.8\textwidth}{ 1307 | \bfseries\Huge 1308 | \ifcsname @title\endcsname \@title \fi 1309 | \par} 1310 | \vfill 1311 | \vspace{-1.0cm} 1312 | \setstretch{2.5} 1313 | \hspace{2.5em} 1314 | \begin{minipage}[c]{0.67\linewidth} 1315 | {\color{darkgray}\bfseries\Large 1316 | \ifcsname @subtitle\endcsname\@subtitle\\[2ex]\fi} 1317 | \color{gray}\normalsize 1318 | {\renewcommand{\arraystretch}{0.618} 1319 | \begin{tabular}{l} 1320 | % \ifcsname @author\endcsname \authorname \@author\\\fi 1321 | \ifx\@author\empty\else\authorname\cnormal\@author\\ \fi 1322 | \ifcsname @institute\endcsname \institutename \cnormal\@institute\\ \fi 1323 | % \ifcsname @date\endcsname \@date\\\fi 1324 | \ifx\@date\empty\else\datename\cnormal\@date \\ \fi 1325 | \ifcsname @version\endcsname \cnormal\versionname\@version\\ \fi 1326 | \ifcsname @bioinfo\endcsname \cnormal\@bioinfo\\ \fi 1327 | \end{tabular}} 1328 | \end{minipage} 1329 | \begin{minipage}[c]{0.27\linewidth} 1330 | \begin{tikzpicture}[remember picture,overlay] 1331 | \begin{pgfonlayer}{background} 1332 | \node[opacity=0.8, 1333 | anchor=south east, 1334 | outer sep=0pt, 1335 | inner sep=0pt] at ($(current page.south east) +(-0.8in,1.5in)$) { 1336 | \ifcsname @logo\endcsname\includegraphics[width=4.2cm]{\@logo}\fi}; 1337 | \end{pgfonlayer} 1338 | \end{tikzpicture} 1339 | \end{minipage} 1340 | \vfill 1341 | \begin{center} 1342 | \setstretch{1.3} 1343 | \parbox[t]{0.7\textwidth}{\centering \citshape 1344 | \ifcsname @extrainfo\endcsname\@extrainfo\fi} 1345 | \end{center} 1346 | \vfill 1347 | \end{titlepage} 1348 | \restoregeometry 1349 | \thispagestyle{empty}} 1350 | 1351 | 1352 | \newcommand{\dollar}{\mbox{\textdollar}} 1353 | 1354 | \RequirePackage{listings} 1355 | \renewcommand{\ttdefault}{cmtt} 1356 | \lstdefinestyle{mystyle}{ 1357 | basicstyle=% 1358 | \ttfamily 1359 | \lst@ifdisplaystyle\small\fi 1360 | } 1361 | 1362 | \lstset{basicstyle=\ttfamily,style=mystyle,breaklines=true} 1363 | 1364 | \definecolor{lightgrey}{rgb}{0.9,0.9,0.9} 1365 | \definecolor{frenchplum}{RGB}{190,20,83} 1366 | \lstset{language=[LaTeX]TeX, 1367 | texcsstyle=*\color{winered}, 1368 | numbers=none, 1369 | mathescape=false, 1370 | breaklines=true, 1371 | keywordstyle=\color{winered}, 1372 | commentstyle=\color{gray}, 1373 | emph={elegantpaper,fontenc,fontspec,xeCJK,citestyle,FiraMono,xunicode,figure,fig,image,img,table,itemize,enumerate,ctex,microtype,description,times,booktabs,tabular,PDFLaTeX,XeLaTeX,type1cm,BibTeX,device,color,mode,lang,amsthm,tcolorbox,titlestyle,cite,ctex,listings,base,math,scheme,toc,esint,chinesefont,amsmath,bibstyle,natbib,pgfornament,addbibresource,printbibliography}, 1374 | emphstyle={\color{frenchplum}}, 1375 | morekeywords={DeclareSymbolFont,SetSymbolFont,toprule,midrule,bottomrule,institute,version,includegraphics,setmainfont,setsansfont,setmonofont ,setCJKmainfont,setCJKsansfont,setCJKmonofont,RequirePackage,figref,tabref,email,maketitle,keywords,definecolor,extrainfo,logo,cover,subtitle,appendix,chapter,section,hypersetup,mainmatter,frontmatter,tableofcontents,elegantpar,heiti,kaishu,lstset,pagecolor,zhnumber,marginpar,part,equote,marginnote,bioinfo,datechange,listofchange,lvert,lastpage,songti,heiti,fangsong,setCJKfamilyfont,textbf,elegantnewtheorem,thmcnt,colorlet,usesamecnt}, 1376 | frame=single, 1377 | tabsize=2, 1378 | rulecolor=\color{structurecolor}, 1379 | framerule=0.2pt, 1380 | columns=flexible, 1381 | % backgroundcolor=\color{lightgrey} 1382 | } 1383 | 1384 | \newcommand\bmmax{0} 1385 | \RequirePackage{bm} 1386 | 1387 | % add the list of change history 1388 | \newcommand{\dateinfoline}[2]{ 1389 | \noindent\makebox[0pt][r]{% 1390 | \makebox[-3em][r]{% 1391 | \small 1392 | \textbf{\textcolor{structurecolor}{#1}}}\;\;}% 1393 | {\citshape\updatename\ignorespaces#2}} 1394 | 1395 | \newcommand{\datechange}[2]{% 1396 | \noindent{\makebox[\textwidth][r]{\color{structurecolor}\rule{1.15\textwidth}{.4pt}}} 1397 | \dateinfoline{#1}{#2} 1398 | \addcontentsline{dates}{section}{#1 -- #2}} 1399 | 1400 | \newcommand{\listofchanges}{% 1401 | \begingroup 1402 | \renewcommand{\contentsname}{\historyname} 1403 | \let\old@starttoc\@starttoc 1404 | \def\@starttoc##1{ 1405 | \old@starttoc{dates}} 1406 | \tableofcontents% 1407 | \endgroup} 1408 | % https://tex.stackexchange.com/questions/472931/list-of-all-dates-in-a-document 1409 | 1410 | \newenvironment{change}{ 1411 | \begin{enumerate}[label=\small\protect\circled{\arabic*}]}{ 1412 | \end{enumerate}} 1413 | 1414 | 1415 | 1416 | \renewcommand\tableofcontents{% 1417 | \hypersetup{linktoc=all, linkcolor=black} 1418 | \if@twocolumn 1419 | \@restonecoltrue\onecolumn 1420 | \else 1421 | \@restonecolfalse 1422 | \fi 1423 | \chapter*{\contentsname 1424 | \@mkboth{% 1425 | \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% 1426 | \ifdefstring{\ELEGANT@toc}{twocol}{ 1427 | \setlength{\columnsep}{2em} 1428 | \begin{multicols}{2}% 1429 | \@starttoc{toc} 1430 | \end{multicols}}{ 1431 | \@starttoc{toc}} 1432 | \if@restonecol\twocolumn\fi 1433 | \hypersetup{linkcolor=winered}} 1434 | 1435 | 1436 | \renewcommand*{\cleardoublepage}{\clearpage\if@twoside \ifodd\c@page\else 1437 | \hbox{}% 1438 | \thispagestyle{empty}% 1439 | \newpage% 1440 | \if@twocolumn\hbox{}\newpage\fi\fi\fi} 1441 | 1442 | 1443 | % https://tex.stackexchange.com/questions/56839/chaptername-is-used-even-for-appendix-chapters-in-toc 1444 | \RequirePackage{calc} 1445 | \RequirePackage[titles]{tocloft} 1446 | \ifdefstring{\ELEGANT@lang}{cn}{ 1447 | % \renewcommand{\cftchappresnum}{\beforechap\space} 1448 | % \renewcommand{\cftchapaftersnum}{\space\afterchap} 1449 | % \setlength{\cftchapnumwidth}{\widthof{\textbf{附录~十一}}} 1450 | \renewcommand{\numberline}[1]{% 1451 | \@cftbsnum #1\@cftasnum~\@cftasnumb ~% 1452 | } 1453 | \g@addto@macro\appendix{% 1454 | % recover \thechapter in the \NR@chapter's \numberline 1455 | \ifELEGANT@Hy@later 1456 | \patchcmd{\NR@chapter}% 1457 | {\numberline{\xchaptertitle}}{\numberline{\thechapter}}% 1458 | {}{\fail} 1459 | \else 1460 | \patchcmd{\Hy@org@chapter}% 1461 | {\numberline{\xchaptertitle}}{\numberline{\thechapter}}% 1462 | {}{\fail} 1463 | \fi 1464 | \addtocontents{toc}{% 1465 | \protect\renewcommand{\protect\cftchappresnum}{\appendixname\space}% 1466 | \protect\renewcommand{\protect\cftchapaftersnum}{}% 1467 | }% 1468 | } 1469 | }{ 1470 | \renewcommand{\cftchappresnum}{\chaptername\space} 1471 | \renewcommand{\cftchapaftersnum}{\space} 1472 | \setlength{\cftchapnumwidth}{\widthof{\textbf{Appendix~9}}} 1473 | \g@addto@macro\appendix{% 1474 | \addtocontents{toc}{% 1475 | \protect\renewcommand{\protect\cftchappresnum}{\appendixname\space}% 1476 | \protect\renewcommand{\protect\cftchapaftersnum}{}% 1477 | \setlength{\cftchapnumwidth}{\widthof{\textbf{Appendix~999}}} 1478 | }% 1479 | } 1480 | } 1481 | 1482 | % restore the tt default family to lmodern tt family 1483 | \renewcommand\ttdefault{lmtt} -------------------------------------------------------------------------------- /figure/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElegantLaTeX/ElegantBook/f9f002a586eb7432c17076071743451611b7f858/figure/cover.jpg -------------------------------------------------------------------------------- /figure/logo-blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElegantLaTeX/ElegantBook/f9f002a586eb7432c17076071743451611b7f858/figure/logo-blue.png -------------------------------------------------------------------------------- /image/founder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElegantLaTeX/ElegantBook/f9f002a586eb7432c17076071743451611b7f858/image/founder.png -------------------------------------------------------------------------------- /image/scatter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElegantLaTeX/ElegantBook/f9f002a586eb7432c17076071743451611b7f858/image/scatter.jpg -------------------------------------------------------------------------------- /reference.bib: -------------------------------------------------------------------------------- 1 | 2 | @article{en3, 3 | title={{The Mechanism and Effectiveness of Credit Scoring of P2P Lending Platform: Evidence from Renrendai.com}}, 4 | author={Li, Qiang and Chen, Liwen and Zeng, Yong}, 5 | journal={China Finance Review International}, 6 | volume={8}, 7 | number={3}, 8 | pages={256--274}, 9 | year={2018}, 10 | publisher={Emerald Publishing Limited} 11 | } 12 | 13 | 14 | @article{en2, 15 | author = {Carlstrom, Charles T and Fuerst, Timothy S}, 16 | title = {{Agency Costs, Net Worth, and Business Fluctuations: A Computable General Equilibrium Analysis}}, 17 | journal = {The American Economic Review}, 18 | pages = {893-910}, 19 | ISSN = {0002-8282}, 20 | year = {1997}, 21 | type = {Journal Article} 22 | } 23 | 24 | @article{en1, 25 | author = {Quadrini, Vincenzo}, 26 | title = {{Financial Frictions in Macroeconomic Fluctuations}}, 27 | journal = {FRB Richmond Economic Quarterly}, 28 | volume = {97}, 29 | number = {3}, 30 | pages = {209-254}, 31 | year = {2011}, 32 | type = {Journal Article} 33 | } 34 | 35 | @article{cn1, 36 | author = {方军雄}, 37 | key = {fang1 jun1 xiong2}, 38 | title = {{所有制、制度环境与信贷资金配置}}, 39 | journal = {经济研究}, 40 | number = {12}, 41 | pages = {82-92}, 42 | ISSN = {0577-9154}, 43 | year = {2007}, 44 | type = {Journal Article} 45 | } 46 | 47 | @article{cn2, 48 | author = {刘凤良 and 章潇萌 and 于泽}, 49 | key = {liu2 feng4 liang2 zhang1 xiao1 meng2 yu2 ze2}, 50 | title = {{高投资、结构失衡与价格指数二元分化}}, 51 | journal = {金融研究}, 52 | number = {02}, 53 | pages = {54-69}, 54 | ISSN = {1002-7246}, 55 | year = {2017}, 56 | type = {Journal Article} 57 | } 58 | 59 | @article{cn3, 60 | author = {吕捷 and 王高望}, 61 | key = {lv3 jie2 wang2 gao1 wang4}, 62 | title = {{CPI 与 PPI “背离”的结构性解释}}, 63 | journal = {经济研究}, 64 | volume = {50}, 65 | number = {04}, 66 | pages = {136-149}, 67 | ISSN = {0577-9154}, 68 | year = {2015}, 69 | type = {Journal Article} 70 | } 71 | 72 | --------------------------------------------------------------------------------