├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md └── workflows │ ├── install-texlive.sh │ ├── test.yml │ └── texlive.profile ├── .gitignore ├── .travis.yml ├── LICENSE ├── Makefile ├── README.md ├── cjc.bst ├── cjc.cls ├── example-fig.pdf ├── example.bib ├── example.tex └── latexmkrc /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | 5 | --- 6 | 7 | ## 编译环境 8 | - 编译的系统:macOS 10.14 | Windows 10 | Ubuntu 18.04 | Overleaf 9 | - TeX 发行版:MacTeX 2019 | TeX Live 2019 | MikTeX 2.9.6753 10 | - 相关宏包版本:ctex v2.4.14 | unicode-math v0.8l 11 | 12 | ## 描述问题 13 | 14 | 15 | 16 | 截图: 17 | 18 | 19 | 示例代码: 20 | ```TeX 21 | \documentclass{cjc} 22 | \begin{document} 23 | abc 24 | \end{document} 25 | ``` 26 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | 5 | --- 6 | 7 | **Is your feature request related to a problem? Please describe.** 8 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 9 | 10 | **Describe the solution you'd like** 11 | A clear and concise description of what you want to happen. 12 | 13 | **Describe alternatives you've considered** 14 | A clear and concise description of any alternative solutions or features you've considered. 15 | 16 | **Additional context** 17 | Add any other context or screenshots about the feature request here. 18 | -------------------------------------------------------------------------------- /.github/workflows/install-texlive.sh: -------------------------------------------------------------------------------- 1 | REMOTE="https://mirrors.rit.edu/CTAN/systems/texlive/tlnet"; 2 | INSTALL="/tmp/install-texlive"; 3 | 4 | mkdir -p "$INSTALL"; 5 | curl -sSL "$REMOTE/install-tl-unx.tar.gz" | tar -xz -C "$INSTALL" \ 6 | --strip-components=1; 7 | "$INSTALL/install-tl" -no-gui -repository $REMOTE \ 8 | -profile .github/workflows/texlive.profile; 9 | 10 | export PATH="/tmp/texlive/bin/x86_64-linux:$PATH"; 11 | 12 | XETEX_PKGS="fontname fontspec l3packages xetex"; 13 | CTEX_PKGS="cjk ctex environ ms trimspaces ulem xecjk zhnumber"; 14 | HYPERREF_PKGS="bitset letltxmacro pdfescape pdflscape"; 15 | 16 | BIN_PKGS="latexmk l3build"; 17 | REQUIRED_PKGS="$XETEX_PKGS $CTEX_PKGS caption etoolbox filehook unicode-math"; 18 | FONT_PKGS="fandol tex-gyre xits"; 19 | EXTRA_PKGS="algorithms booktabs float $HYPERREF_PKGS siunitx"; 20 | 21 | tlmgr install $BIN_PKGS $REQUIRED_PKGS $FONT_PKGS $EXTRA_PKGS $DOC_PKGS; 22 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | name: Test 2 | 3 | on: [push] 4 | 5 | jobs: 6 | test: 7 | 8 | runs-on: ubuntu-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v1 12 | - name: Install TeX Live 13 | run: bash .github/workflows/install-texlive.sh 14 | 15 | - name: Test example 16 | run: | 17 | export PATH="/tmp/texlive/bin/x86_64-linux:$PATH" 18 | make 19 | -------------------------------------------------------------------------------- /.github/workflows/texlive.profile: -------------------------------------------------------------------------------- 1 | selected_scheme scheme-basic 2 | TEXDIR /tmp/texlive 3 | TEXMFLOCAL /tmp/texlive/texmf-local 4 | TEXMFSYSCONFIG /tmp/texlive/texmf-config 5 | TEXMFSYSVAR /tmp/texlive/texmf-var 6 | tlpdbopt_autobackup 0 7 | tlpdbopt_install_docfiles 0 8 | tlpdbopt_install_srcfiles 0 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | example.pdf 2 | build/ 3 | 4 | ## Core latex/pdflatex auxiliary files: 5 | *.aux 6 | *.lof 7 | *.log 8 | *.lot 9 | *.fls 10 | *.out 11 | *.toc 12 | *.fmt 13 | *.fot 14 | *.cb 15 | *.cb2 16 | .*.lb 17 | 18 | ## Intermediate documents: 19 | *.dvi 20 | *.xdv 21 | *-converted-to.* 22 | # these rules might exclude image files for figures etc. 23 | # *.ps 24 | # *.eps 25 | # *.pdf 26 | 27 | ## Generated if empty string is given at "Please type another file name for output:" 28 | .pdf 29 | 30 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 31 | *.bbl 32 | *.bcf 33 | *.blg 34 | *-blx.aux 35 | *-blx.bib 36 | *.run.xml 37 | 38 | ## Build tool auxiliary files: 39 | *.fdb_latexmk 40 | *.synctex 41 | *.synctex(busy) 42 | *.synctex.gz 43 | *.synctex.gz(busy) 44 | *.pdfsync 45 | 46 | ## Build tool directories for auxiliary files 47 | # latexrun 48 | latex.out/ 49 | 50 | ## Auxiliary and intermediate files from other packages: 51 | # algorithms 52 | *.alg 53 | *.loa 54 | 55 | # achemso 56 | acs-*.bib 57 | 58 | # amsthm 59 | *.thm 60 | 61 | # beamer 62 | *.nav 63 | *.pre 64 | *.snm 65 | *.vrb 66 | 67 | # changes 68 | *.soc 69 | 70 | # comment 71 | *.cut 72 | 73 | # cprotect 74 | *.cpt 75 | 76 | # elsarticle (documentclass of Elsevier journals) 77 | *.spl 78 | 79 | # endnotes 80 | *.ent 81 | 82 | # fixme 83 | *.lox 84 | 85 | # feynmf/feynmp 86 | *.mf 87 | *.mp 88 | *.t[1-9] 89 | *.t[1-9][0-9] 90 | *.tfm 91 | 92 | #(r)(e)ledmac/(r)(e)ledpar 93 | *.end 94 | *.?end 95 | *.[1-9] 96 | *.[1-9][0-9] 97 | *.[1-9][0-9][0-9] 98 | *.[1-9]R 99 | *.[1-9][0-9]R 100 | *.[1-9][0-9][0-9]R 101 | *.eledsec[1-9] 102 | *.eledsec[1-9]R 103 | *.eledsec[1-9][0-9] 104 | *.eledsec[1-9][0-9]R 105 | *.eledsec[1-9][0-9][0-9] 106 | *.eledsec[1-9][0-9][0-9]R 107 | 108 | # glossaries 109 | *.acn 110 | *.acr 111 | *.glg 112 | *.glo 113 | *.gls 114 | *.glsdefs 115 | 116 | # gnuplottex 117 | *-gnuplottex-* 118 | 119 | # gregoriotex 120 | *.gaux 121 | *.gtex 122 | 123 | # htlatex 124 | *.4ct 125 | *.4tc 126 | *.idv 127 | *.lg 128 | *.trc 129 | *.xref 130 | 131 | # hyperref 132 | *.brf 133 | 134 | # knitr 135 | *-concordance.tex 136 | # TODO Comment the next line if you want to keep your tikz graphics files 137 | *.tikz 138 | *-tikzDictionary 139 | 140 | # listings 141 | *.lol 142 | 143 | # luatexja-ruby 144 | *.ltjruby 145 | 146 | # makeidx 147 | *.idx 148 | *.ilg 149 | *.ind 150 | 151 | # minitoc 152 | *.maf 153 | *.mlf 154 | *.mlt 155 | *.mtc[0-9]* 156 | *.slf[0-9]* 157 | *.slt[0-9]* 158 | *.stc[0-9]* 159 | 160 | # minted 161 | _minted* 162 | *.pyg 163 | 164 | # morewrites 165 | *.mw 166 | 167 | # nomencl 168 | *.nlg 169 | *.nlo 170 | *.nls 171 | 172 | # pax 173 | *.pax 174 | 175 | # pdfpcnotes 176 | *.pdfpc 177 | 178 | # sagetex 179 | *.sagetex.sage 180 | *.sagetex.py 181 | *.sagetex.scmd 182 | 183 | # scrwfile 184 | *.wrt 185 | 186 | # sympy 187 | *.sout 188 | *.sympy 189 | sympy-plots-for-*.tex/ 190 | 191 | # pdfcomment 192 | *.upa 193 | *.upb 194 | 195 | # pythontex 196 | *.pytxcode 197 | pythontex-files-*/ 198 | 199 | # tcolorbox 200 | *.listing 201 | 202 | # thmtools 203 | *.loe 204 | 205 | # TikZ & PGF 206 | *.dpth 207 | *.md5 208 | *.auxlock 209 | 210 | # todonotes 211 | *.tdo 212 | 213 | # vhistory 214 | *.hst 215 | *.ver 216 | 217 | # easy-todo 218 | *.lod 219 | 220 | # xcolor 221 | *.xcp 222 | 223 | # xmpincl 224 | *.xmpi 225 | 226 | # xindy 227 | *.xdy 228 | 229 | # xypic precompiled matrices 230 | *.xyc 231 | 232 | # endfloat 233 | *.ttt 234 | *.fff 235 | 236 | # Latexian 237 | TSWLatexianTemp* 238 | 239 | ## Editors: 240 | # WinEdt 241 | *.bak 242 | *.sav 243 | 244 | # Texpad 245 | .texpadtmp 246 | 247 | # LyX 248 | *.lyx~ 249 | 250 | # Kile 251 | *.backup 252 | 253 | # KBibTeX 254 | *~[0-9]* 255 | 256 | # auto folder when using emacs and auctex 257 | ./auto/* 258 | *.el 259 | 260 | # expex forward references with \gathertags 261 | *-tags.tex 262 | 263 | # standalone packages 264 | *.sta 265 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: generic 2 | 3 | cache: 4 | directories: 5 | - /tmp/texlive 6 | 7 | install: 8 | - source ./.ci/texlive.sh 9 | 10 | script: 11 | - make main 12 | - make doc 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | MAIN = example 2 | NAME = cjc 3 | CLSFILES = $(NAME).cls 4 | BSTFILES = $(NAME).bst 5 | 6 | LATEXMK = latexmk -xelatex 7 | 8 | .PHONY : main cls doc test save clean all install distclean zip FORCE_MAKE 9 | 10 | main : $(MAIN).pdf 11 | 12 | all : main doc 13 | 14 | cls : $(CLSFILES) $(BSTFILES) 15 | 16 | doc : $(NAME).pdf 17 | 18 | $(MAIN).pdf : $(MAIN).tex $(CLSFILES) $(BSTFILES) FORCE_MAKE 19 | $(LATEXMK) $< 20 | 21 | clean : 22 | $(LATEXMK) -c $(MAIN).tex 23 | 24 | cleanall : 25 | $(LATEXMK) -C $(MAIN).tex 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 中文期刊 LaTeX 模板框架 2 | 3 | [![Build](https://github.com/CTeX-org/chinesejournal/workflows/Test/badge.svg)](https://github.com/CTeX-org/chinesejournal/actions) 4 | 5 | 本项目是中文期刊 LaTeX 模板的一个编写框架, 6 | 包括模板代码、注释、文档,示例论文,以及用于维护模板的持续集成和单元测试。 7 | 该框架以[《计算机学报》](http://cjc.ict.ac.cn)的要求为基础, 8 | 针对中文期刊 LaTeX 模板的普遍需求提供了指南,并尽可能使格式与内容分离, 9 | 旨在帮助编写高质量的中文模板,也可供已有模板进行参考。 10 | 11 | 注意!该框架**不能**保证可以用于《计算机学报》的投稿。 12 | 13 | 主要特性: 14 | - 支持跨平台使用,兼容最新的 TeX Live, MacTeX 和 MikTeX 发行版, 15 | 并向后兼容到 2017 年的版本 16 | - 不支持已经过时的 CTeX 套装 17 | - 数学符号遵循国内的排版习惯 18 | - 单元测试(l3build) 19 | - 持续集成(travis-ci) 20 | 21 | 22 | ## 使用模板 23 | 24 | 编译论文 `example.pdf`: 25 | ``` 26 | latexmk -xelatex example.tex 27 | ``` 28 | 29 | 清理论文编译过程中的临时文件: 30 | ``` 31 | latexmk -c example.tex 32 | ``` 33 | 34 | 以上编译过程也可以用 `make` 工具: 35 | ``` 36 | make doc # 编译生成 cjc.pdf 37 | make # 编译生成论文 example.pdf 38 | make clean # 删除编译过程中生成的临时文件 39 | ``` 40 | -------------------------------------------------------------------------------- /cjc.bst: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `gbt7714-unsrt.bst', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% gbt7714.dtx (with options: `2015,numerical') 8 | %% ------------------------------------------------------------------- 9 | %% GB/T 7714-2015 BibTeX Style 10 | %% https://github.com/CTeX-org/gbt7714-bibtex-style 11 | %% Version: 2019/03/21 v1.1.1 12 | %% ------------------------------------------------------------------- 13 | %% Copyright (C) 2016-2019 by Zeping Lee 14 | %% ------------------------------------------------------------------- 15 | %% This file may be distributed and/or modified under the 16 | %% conditions of the LaTeX Project Public License, either version 1.3c 17 | %% of this license or (at your option) any later version. 18 | %% The latest version of this license is in 19 | %% https://www.latex-project.org/lppl.txt 20 | %% and version 1.3c or later is part of all distributions of LaTeX 21 | %% version 2005/12/01 or later. 22 | %% ------------------------------------------------------------------- 23 | INTEGERS { 24 | uppercase.name 25 | max.num.authors 26 | period.between.author.year 27 | sentence.case.title 28 | link.title 29 | show.mark 30 | slash.for.extraction 31 | in.booktitle 32 | italic.jounal 33 | bold.journal.volume 34 | show.missing.address.publisher 35 | show.url 36 | show.doi 37 | show.note 38 | } 39 | 40 | FUNCTION {load.config} 41 | { 42 | #1 'uppercase.name := 43 | #3 'max.num.authors := 44 | #1 'sentence.case.title := 45 | #0 'link.title := 46 | #1 'show.mark := 47 | #1 'slash.for.extraction := 48 | #0 'in.booktitle := 49 | #0 'italic.jounal := 50 | #0 'bold.journal.volume := 51 | #1 'show.missing.address.publisher := 52 | #1 'show.url := 53 | #1 'show.doi := 54 | #0 'show.note := 55 | } 56 | 57 | ENTRY 58 | { address 59 | author 60 | booktitle 61 | date 62 | doi 63 | edition 64 | editor 65 | howpublished 66 | institution 67 | journal 68 | key 69 | language 70 | mark 71 | medium 72 | note 73 | number 74 | organization 75 | pages 76 | publisher 77 | school 78 | series 79 | title 80 | translator 81 | url 82 | urldate 83 | volume 84 | year 85 | } 86 | { entry.lang entry.is.electronic entry.numbered } 87 | { label extra.label sort.label short.list entry.mark entry.url } 88 | 89 | INTEGERS { output.state before.all mid.sentence after.sentence after.block after.slash } 90 | 91 | INTEGERS { lang.zh lang.ja lang.en lang.ru lang.other } 92 | 93 | INTEGERS { charptr len } 94 | 95 | FUNCTION {init.state.consts} 96 | { #0 'before.all := 97 | #1 'mid.sentence := 98 | #2 'after.sentence := 99 | #3 'after.block := 100 | #4 'after.slash := 101 | #3 'lang.zh := 102 | #4 'lang.ja := 103 | #1 'lang.en := 104 | #2 'lang.ru := 105 | #0 'lang.other := 106 | } 107 | 108 | FUNCTION {bbl.anonymous} 109 | { entry.lang lang.zh = 110 | { "佚名" } 111 | { "Anon" } 112 | if$ 113 | } 114 | 115 | FUNCTION {bbl.space} 116 | { entry.lang lang.zh = 117 | { "\ " } 118 | { " " } 119 | if$ 120 | } 121 | 122 | FUNCTION {bbl.et.al} 123 | { entry.lang lang.zh = 124 | { "等" } 125 | { entry.lang lang.ja = 126 | { "他" } 127 | { entry.lang lang.ru = 128 | { "идр" } 129 | { "et~al." } 130 | if$ 131 | } 132 | if$ 133 | } 134 | if$ 135 | } 136 | 137 | FUNCTION {citation.et.al} 138 | { bbl.et.al } 139 | 140 | FUNCTION {bbl.colon} { ": " } 141 | 142 | FUNCTION {bbl.wide.space} { "\quad " } 143 | 144 | FUNCTION {bbl.slash} { "//\allowbreak " } 145 | 146 | FUNCTION {bbl.sine.loco} 147 | { entry.lang lang.zh = 148 | { "[出版地不详]" } 149 | { "[S.l.]" } 150 | if$ 151 | } 152 | 153 | FUNCTION {bbl.sine.nomine} 154 | { entry.lang lang.zh = 155 | { "[出版者不详]" } 156 | { "[s.n.]" } 157 | if$ 158 | } 159 | 160 | FUNCTION {bbl.sine.loco.sine.nomine} 161 | { entry.lang lang.zh = 162 | { "[出版地不详: 出版者不详]" } 163 | { "[S.l.: s.n.]" } 164 | if$ 165 | } 166 | 167 | FUNCTION {not} 168 | { { #0 } 169 | { #1 } 170 | if$ 171 | } 172 | 173 | FUNCTION {and} 174 | { 'skip$ 175 | { pop$ #0 } 176 | if$ 177 | } 178 | 179 | FUNCTION {or} 180 | { { pop$ #1 } 181 | 'skip$ 182 | if$ 183 | } 184 | 185 | STRINGS { s t } 186 | 187 | FUNCTION {output.nonnull} 188 | { 's := 189 | output.state mid.sentence = 190 | { ", " * write$ } 191 | { output.state after.block = 192 | { add.period$ write$ 193 | newline$ 194 | "\newblock " write$ 195 | } 196 | { output.state before.all = 197 | 'write$ 198 | { output.state after.slash = 199 | { bbl.slash * write$ 200 | newline$ 201 | } 202 | { add.period$ " " * write$ } 203 | if$ 204 | } 205 | if$ 206 | } 207 | if$ 208 | mid.sentence 'output.state := 209 | } 210 | if$ 211 | s 212 | } 213 | 214 | FUNCTION {output} 215 | { duplicate$ empty$ 216 | 'pop$ 217 | 'output.nonnull 218 | if$ 219 | } 220 | 221 | FUNCTION {output.after} 222 | { 't := 223 | duplicate$ empty$ 224 | 'pop$ 225 | { 's := 226 | output.state mid.sentence = 227 | { t * write$ } 228 | { output.state after.block = 229 | { add.period$ write$ 230 | newline$ 231 | "\newblock " write$ 232 | } 233 | { output.state before.all = 234 | 'write$ 235 | { output.state after.slash = 236 | { bbl.slash * write$ } 237 | { add.period$ " " * write$ } 238 | if$ 239 | } 240 | if$ 241 | } 242 | if$ 243 | mid.sentence 'output.state := 244 | } 245 | if$ 246 | s 247 | } 248 | if$ 249 | } 250 | 251 | FUNCTION {output.check} 252 | { 't := 253 | duplicate$ empty$ 254 | { pop$ "empty " t * " in " * cite$ * warning$ } 255 | 'output.nonnull 256 | if$ 257 | } 258 | 259 | FUNCTION {fin.entry} 260 | { add.period$ 261 | write$ 262 | newline$ 263 | } 264 | 265 | FUNCTION {new.block} 266 | { output.state before.all = 267 | 'skip$ 268 | { output.state after.slash = 269 | 'skip$ 270 | { after.block 'output.state := } 271 | if$ 272 | } 273 | if$ 274 | } 275 | 276 | FUNCTION {new.sentence} 277 | { output.state after.block = 278 | 'skip$ 279 | { output.state before.all = 280 | 'skip$ 281 | { output.state after.slash = 282 | 'skip$ 283 | { after.sentence 'output.state := } 284 | if$ 285 | } 286 | if$ 287 | } 288 | if$ 289 | } 290 | 291 | FUNCTION {new.slash} 292 | { output.state before.all = 293 | 'skip$ 294 | { slash.for.extraction 295 | { after.slash 'output.state := } 296 | { after.block 'output.state := } 297 | if$ 298 | } 299 | if$ 300 | } 301 | 302 | FUNCTION {new.block.checka} 303 | { empty$ 304 | 'skip$ 305 | 'new.block 306 | if$ 307 | } 308 | 309 | FUNCTION {new.block.checkb} 310 | { empty$ 311 | swap$ empty$ 312 | and 313 | 'skip$ 314 | 'new.block 315 | if$ 316 | } 317 | 318 | FUNCTION {new.sentence.checka} 319 | { empty$ 320 | 'skip$ 321 | 'new.sentence 322 | if$ 323 | } 324 | 325 | FUNCTION {new.sentence.checkb} 326 | { empty$ 327 | swap$ empty$ 328 | and 329 | 'skip$ 330 | 'new.sentence 331 | if$ 332 | } 333 | 334 | FUNCTION {field.or.null} 335 | { duplicate$ empty$ 336 | { pop$ "" } 337 | 'skip$ 338 | if$ 339 | } 340 | 341 | FUNCTION {italicize} 342 | { duplicate$ empty$ 343 | { pop$ "" } 344 | { "\textit{" swap$ * "}" * } 345 | if$ 346 | } 347 | 348 | INTEGERS { byte second.byte } 349 | 350 | INTEGERS { char.lang tmp.lang } 351 | 352 | STRINGS { tmp.str } 353 | 354 | FUNCTION {get.str.lang} 355 | { 'tmp.str := 356 | lang.other 'tmp.lang := 357 | #1 'charptr := 358 | tmp.str text.length$ #1 + 'len := 359 | { charptr len < } 360 | { tmp.str charptr #1 substring$ chr.to.int$ 'byte := 361 | byte #128 < 362 | { charptr #1 + 'charptr := 363 | byte #64 > byte #91 < and byte #96 > byte #123 < and or 364 | { lang.en 'char.lang := } 365 | { lang.other 'char.lang := } 366 | if$ 367 | } 368 | { tmp.str charptr #1 + #1 substring$ chr.to.int$ 'second.byte := 369 | byte #224 < 370 | { charptr #2 + 'charptr := 371 | byte #207 > byte #212 < and 372 | byte #212 = second.byte #176 < and or 373 | { lang.ru 'char.lang := } 374 | { lang.other 'char.lang := } 375 | if$ 376 | } 377 | { byte #240 < 378 | { charptr #3 + 'charptr := 379 | byte #227 > byte #234 < and 380 | { lang.zh 'char.lang := } 381 | { byte #227 = 382 | { second.byte #143 > 383 | { lang.zh 'char.lang := } 384 | { second.byte #128 > second.byte #132 < and 385 | { lang.ja 'char.lang := } 386 | { lang.other 'char.lang := } 387 | if$ 388 | } 389 | if$ 390 | } 391 | { byte #239 = 392 | second.byte #163 > second.byte #172 < and and 393 | { lang.zh 'char.lang := } 394 | { lang.other 'char.lang := } 395 | if$ 396 | } 397 | if$ 398 | } 399 | if$ 400 | } 401 | { charptr #4 + 'charptr := 402 | byte #240 = second.byte #159 > and 403 | { lang.zh 'char.lang := } 404 | { lang.other 'char.lang := } 405 | if$ 406 | } 407 | if$ 408 | } 409 | if$ 410 | } 411 | if$ 412 | char.lang tmp.lang > 413 | { char.lang 'tmp.lang := } 414 | 'skip$ 415 | if$ 416 | } 417 | while$ 418 | tmp.lang 419 | } 420 | 421 | FUNCTION {check.entry.lang} 422 | { author field.or.null 423 | title field.or.null * 424 | get.str.lang 425 | } 426 | 427 | FUNCTION {set.entry.lang} 428 | { language empty$ 429 | { check.entry.lang } 430 | { language "english" = language "american" = or language "british" = or 431 | { lang.en } 432 | { language "chinese" = 433 | { lang.zh } 434 | { language "japanese" = 435 | { lang.ja } 436 | { language "russian" = 437 | { lang.ru } 438 | { check.entry.lang } 439 | if$ 440 | } 441 | if$ 442 | } 443 | if$ 444 | } 445 | if$ 446 | } 447 | if$ 448 | 'entry.lang := 449 | } 450 | 451 | FUNCTION {set.entry.numbered} 452 | { type$ "patent" = 453 | type$ "standard" = or 454 | type$ "techreport" = or 455 | { #1 'entry.numbered := } 456 | { #0 'entry.numbered := } 457 | if$ 458 | } 459 | 460 | INTEGERS { nameptr namesleft numnames name.lang } 461 | 462 | FUNCTION {format.names} 463 | { 's := 464 | #1 'nameptr := 465 | s num.names$ 'numnames := 466 | numnames 'namesleft := 467 | { namesleft #0 > } 468 | { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := 469 | nameptr max.num.authors > 470 | { bbl.et.al 471 | #1 'namesleft := 472 | } 473 | { t "others" = 474 | { bbl.et.al } 475 | { t get.str.lang 'name.lang := 476 | name.lang lang.en = 477 | { t #1 "{vv~}{ll}{~f{~}}" format.name$ 478 | uppercase.name 479 | { "u" change.case$ } 480 | 'skip$ 481 | if$ 482 | t #1 "{, jj}" format.name$ * 483 | } 484 | { t #1 "{ll}{ff}" format.name$ } 485 | if$ 486 | } 487 | if$ 488 | } 489 | if$ 490 | nameptr #1 > 491 | { ", " swap$ * * } 492 | 'skip$ 493 | if$ 494 | nameptr #1 + 'nameptr := 495 | namesleft #1 - 'namesleft := 496 | } 497 | while$ 498 | } 499 | 500 | FUNCTION {format.key} 501 | { empty$ 502 | { key field.or.null } 503 | { "" } 504 | if$ 505 | } 506 | 507 | FUNCTION {format.authors} 508 | { author empty$ not 509 | { author format.names } 510 | { "empty author in " cite$ * warning$ 511 | "" 512 | } 513 | if$ 514 | } 515 | 516 | FUNCTION {format.editors} 517 | { editor empty$ 518 | { "" } 519 | { editor format.names } 520 | if$ 521 | } 522 | 523 | FUNCTION {format.translators} 524 | { translator empty$ 525 | { "" } 526 | { translator format.names 527 | entry.lang lang.zh = 528 | { translator num.names$ #3 > 529 | { "译" * } 530 | { ", 译" * } 531 | if$ 532 | } 533 | 'skip$ 534 | if$ 535 | } 536 | if$ 537 | } 538 | 539 | FUNCTION {format.full.names} 540 | {'s := 541 | #1 'nameptr := 542 | s num.names$ 'numnames := 543 | numnames 'namesleft := 544 | { namesleft #0 > } 545 | { s nameptr "{vv~}{ll}{, jj}{, ff}" format.name$ 't := 546 | t get.str.lang 'name.lang := 547 | name.lang lang.en = 548 | { t #1 "{vv~}{ll}" format.name$ 't := } 549 | { t #1 "{ll}{ff}" format.name$ 't := } 550 | if$ 551 | nameptr #1 > 552 | { 553 | namesleft #1 > 554 | { ", " * t * } 555 | { 556 | numnames #2 > 557 | { "," * } 558 | 'skip$ 559 | if$ 560 | t "others" = 561 | { " et~al." * } 562 | { " and " * t * } 563 | if$ 564 | } 565 | if$ 566 | } 567 | 't 568 | if$ 569 | nameptr #1 + 'nameptr := 570 | namesleft #1 - 'namesleft := 571 | } 572 | while$ 573 | } 574 | 575 | FUNCTION {author.editor.full} 576 | { author empty$ 577 | { editor empty$ 578 | { "" } 579 | { editor format.full.names } 580 | if$ 581 | } 582 | { author format.full.names } 583 | if$ 584 | } 585 | 586 | FUNCTION {author.full} 587 | { author empty$ 588 | { "" } 589 | { author format.full.names } 590 | if$ 591 | } 592 | 593 | FUNCTION {editor.full} 594 | { editor empty$ 595 | { "" } 596 | { editor format.full.names } 597 | if$ 598 | } 599 | 600 | FUNCTION {make.full.names} 601 | { type$ "book" = 602 | type$ "inbook" = 603 | or 604 | 'author.editor.full 605 | { type$ "collection" = 606 | type$ "proceedings" = 607 | or 608 | 'editor.full 609 | 'author.full 610 | if$ 611 | } 612 | if$ 613 | } 614 | 615 | FUNCTION {output.bibitem} 616 | { newline$ 617 | "\bibitem[" write$ 618 | label write$ 619 | ")" make.full.names duplicate$ short.list = 620 | { pop$ } 621 | { * } 622 | if$ 623 | 's := 624 | s text.length$ 'charptr := 625 | { charptr #0 > } 626 | { s charptr #1 substring$ "]" = 627 | { #0 'charptr := } 628 | { charptr #1 - 'charptr := } 629 | if$ 630 | } 631 | while$ 632 | charptr #0 > 633 | { "{" s * "}" * } 634 | { s } 635 | if$ 636 | "]{" * write$ 637 | cite$ write$ 638 | "}" write$ 639 | newline$ 640 | "" 641 | before.all 'output.state := 642 | } 643 | 644 | FUNCTION {change.sentence.case} 645 | { entry.lang lang.en = 646 | { "t" change.case$ } 647 | 'skip$ 648 | if$ 649 | } 650 | 651 | FUNCTION {add.link} 652 | { url empty$ not 653 | { "\href{" url * "}{" * swap$ * "}" * } 654 | { doi empty$ not 655 | { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * } 656 | 'skip$ 657 | if$ 658 | } 659 | if$ 660 | } 661 | 662 | FUNCTION {format.title} 663 | { title empty$ 664 | { "" } 665 | { title 666 | sentence.case.title 667 | 'change.sentence.case 668 | 'skip$ 669 | if$ 670 | entry.numbered number empty$ not and 671 | { bbl.colon * number * } 672 | 'skip$ 673 | if$ 674 | link.title 675 | 'add.link 676 | 'skip$ 677 | if$ 678 | } 679 | if$ 680 | } 681 | 682 | FUNCTION {tie.or.space.connect} 683 | { duplicate$ text.length$ #3 < 684 | { "~" } 685 | { " " } 686 | if$ 687 | swap$ * * 688 | } 689 | 690 | FUNCTION {either.or.check} 691 | { empty$ 692 | 'pop$ 693 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } 694 | if$ 695 | } 696 | 697 | FUNCTION {is.digit} 698 | { duplicate$ empty$ 699 | { pop$ #0 } 700 | { chr.to.int$ 701 | duplicate$ "0" chr.to.int$ < 702 | { pop$ #0 } 703 | { "9" chr.to.int$ > 704 | { #0 } 705 | { #1 } 706 | if$ 707 | } 708 | if$ 709 | } 710 | if$ 711 | } 712 | 713 | FUNCTION {is.number} 714 | { 's := 715 | s empty$ 716 | { #0 } 717 | { s text.length$ 'charptr := 718 | { charptr #0 > 719 | s charptr #1 substring$ is.digit 720 | and 721 | } 722 | { charptr #1 - 'charptr := } 723 | while$ 724 | charptr not 725 | } 726 | if$ 727 | } 728 | 729 | FUNCTION {format.volume} 730 | { volume empty$ not 731 | { volume is.number 732 | { entry.lang lang.zh = 733 | { "第 " volume * " 卷" * } 734 | { "volume" volume tie.or.space.connect } 735 | if$ 736 | } 737 | { volume } 738 | if$ 739 | } 740 | { "" } 741 | if$ 742 | } 743 | 744 | FUNCTION {format.number} 745 | { number empty$ not 746 | { number is.number 747 | { entry.lang lang.zh = 748 | { "第 " number * " 册" * } 749 | { "number" number tie.or.space.connect } 750 | if$ 751 | } 752 | { number } 753 | if$ 754 | } 755 | { "" } 756 | if$ 757 | } 758 | 759 | FUNCTION {format.volume.number} 760 | { volume empty$ not 761 | { format.volume } 762 | { format.number } 763 | if$ 764 | } 765 | 766 | FUNCTION {format.title.vol.num} 767 | { title 768 | sentence.case.title 769 | 'change.sentence.case 770 | 'skip$ 771 | if$ 772 | entry.numbered 773 | { number empty$ not 774 | { bbl.colon * number * } 775 | 'skip$ 776 | if$ 777 | } 778 | { format.volume.number 's := 779 | s empty$ not 780 | { bbl.colon * s * } 781 | 'skip$ 782 | if$ 783 | } 784 | if$ 785 | } 786 | 787 | FUNCTION {format.series.vol.num.title} 788 | { format.volume.number 's := 789 | series empty$ not 790 | { series 791 | sentence.case.title 792 | 'change.sentence.case 793 | 'skip$ 794 | if$ 795 | entry.numbered 796 | { bbl.wide.space * } 797 | { bbl.colon * 798 | s empty$ not 799 | { s * bbl.wide.space * } 800 | 'skip$ 801 | if$ 802 | } 803 | if$ 804 | title * 805 | sentence.case.title 806 | 'change.sentence.case 807 | 'skip$ 808 | if$ 809 | entry.numbered number empty$ not and 810 | { bbl.colon * number * } 811 | 'skip$ 812 | if$ 813 | } 814 | { format.title.vol.num } 815 | if$ 816 | link.title 817 | 'add.link 818 | 'skip$ 819 | if$ 820 | } 821 | 822 | FUNCTION {format.booktitle.vol.num} 823 | { booktitle 824 | entry.numbered 825 | 'skip$ 826 | { format.volume.number 's := 827 | s empty$ not 828 | { bbl.colon * s * } 829 | 'skip$ 830 | if$ 831 | } 832 | if$ 833 | } 834 | 835 | FUNCTION {format.series.vol.num.booktitle} 836 | { format.volume.number 's := 837 | series empty$ not 838 | { series bbl.colon * 839 | entry.numbered not s empty$ not and 840 | { s * bbl.wide.space * } 841 | 'skip$ 842 | if$ 843 | booktitle * 844 | } 845 | { format.booktitle.vol.num } 846 | if$ 847 | in.booktitle 848 | { duplicate$ empty$ not entry.lang lang.en = and 849 | { "In: " swap$ * } 850 | 'skip$ 851 | if$ 852 | } 853 | 'skip$ 854 | if$ 855 | } 856 | 857 | FUNCTION {format.journal} 858 | { journal 859 | italic.jounal entry.lang lang.en = and 860 | 'italicize 861 | 'skip$ 862 | if$ 863 | } 864 | 865 | FUNCTION {set.entry.mark} 866 | { entry.mark empty$ not 867 | 'pop$ 868 | { mark empty$ not 869 | { pop$ mark 'entry.mark := } 870 | { 'entry.mark := } 871 | if$ 872 | } 873 | if$ 874 | } 875 | 876 | FUNCTION {format.mark} 877 | { show.mark 878 | { medium empty$ not 879 | { entry.mark "/" * medium * 'entry.mark := } 880 | { entry.is.electronic 881 | { entry.mark "/OL" * 'entry.mark := } 882 | 'skip$ 883 | if$ 884 | } 885 | if$ 886 | "\allowbreak[" entry.mark * "]" * 887 | } 888 | { "" } 889 | if$ 890 | } 891 | 892 | FUNCTION {num.to.ordinal} 893 | { duplicate$ text.length$ 'charptr := 894 | duplicate$ charptr #1 substring$ 's := 895 | s "1" = 896 | { "st" * } 897 | { s "2" = 898 | { "nd" * } 899 | { s "3" = 900 | { "rd" * } 901 | { "th" * } 902 | if$ 903 | } 904 | if$ 905 | } 906 | if$ 907 | } 908 | 909 | FUNCTION {format.edition} 910 | { edition empty$ 911 | { "" } 912 | { edition is.number 913 | { entry.lang lang.zh = 914 | { edition " 版" * } 915 | { edition num.to.ordinal " ed." * } 916 | if$ 917 | } 918 | { entry.lang lang.en = 919 | { edition change.sentence.case 's := 920 | s "Revised" = s "Revised edition" = or 921 | { "Rev. ed." } 922 | { s " ed." *} 923 | if$ 924 | } 925 | { edition } 926 | if$ 927 | } 928 | if$ 929 | } 930 | if$ 931 | } 932 | 933 | FUNCTION {format.publisher} 934 | { publisher empty$ not 935 | { publisher } 936 | { school empty$ not 937 | { school } 938 | { organization empty$ not 939 | { organization } 940 | { institution empty$ not 941 | { institution } 942 | { "" } 943 | if$ 944 | } 945 | if$ 946 | } 947 | if$ 948 | } 949 | if$ 950 | } 951 | 952 | FUNCTION {format.address.publisher} 953 | { address empty$ not 954 | { address 955 | format.publisher empty$ not 956 | { bbl.colon * format.publisher * } 957 | { entry.is.electronic not show.missing.address.publisher and 958 | { bbl.colon * bbl.sine.nomine * } 959 | 'skip$ 960 | if$ 961 | } 962 | if$ 963 | } 964 | { entry.is.electronic not show.missing.address.publisher and 965 | { format.publisher empty$ not 966 | { bbl.sine.loco bbl.colon * format.publisher * } 967 | { bbl.sine.loco.sine.nomine } 968 | if$ 969 | } 970 | { format.publisher empty$ not 971 | { format.publisher } 972 | { "" } 973 | if$ 974 | } 975 | if$ 976 | } 977 | if$ 978 | } 979 | 980 | FUNCTION {extract.before.dash} 981 | { duplicate$ empty$ 982 | { pop$ "" } 983 | { 's := 984 | #1 'charptr := 985 | s text.length$ #1 + 'len := 986 | { charptr len < 987 | s charptr #1 substring$ "-" = not 988 | and 989 | } 990 | { charptr #1 + 'charptr := } 991 | while$ 992 | s #1 charptr #1 - substring$ 993 | } 994 | if$ 995 | } 996 | 997 | FUNCTION {extract.after.dash} 998 | { duplicate$ empty$ 999 | { pop$ "" } 1000 | { 's := 1001 | #1 'charptr := 1002 | s text.length$ #1 + 'len := 1003 | { charptr len < 1004 | s charptr #1 substring$ "-" = not 1005 | and 1006 | } 1007 | { charptr #1 + 'charptr := } 1008 | while$ 1009 | { charptr len < 1010 | s charptr #1 substring$ "-" = 1011 | and 1012 | } 1013 | { charptr #1 + 'charptr := } 1014 | while$ 1015 | s charptr global.max$ substring$ 1016 | } 1017 | if$ 1018 | } 1019 | 1020 | FUNCTION {contains.dash} 1021 | { duplicate$ empty$ 1022 | { pop$ #0 } 1023 | { 's := 1024 | { s empty$ not 1025 | s #1 #1 substring$ "-" = not 1026 | and 1027 | } 1028 | { s #2 global.max$ substring$ 's := } 1029 | while$ 1030 | s empty$ not 1031 | } 1032 | if$ 1033 | } 1034 | 1035 | FUNCTION {format.year} 1036 | { year empty$ not 1037 | { year extract.before.dash } 1038 | { date empty$ not 1039 | { date extract.before.dash } 1040 | { "empty year in " cite$ * warning$ 1041 | urldate empty$ not 1042 | { "[" urldate extract.before.dash * "]" * } 1043 | { "" } 1044 | if$ 1045 | } 1046 | if$ 1047 | } 1048 | if$ 1049 | extra.label * 1050 | } 1051 | 1052 | FUNCTION {format.date} 1053 | { type$ "patent" = type$ "newspaper" = or 1054 | date empty$ not and 1055 | { date } 1056 | { year } 1057 | if$ 1058 | } 1059 | 1060 | FUNCTION {format.editdate} 1061 | { date empty$ not 1062 | { "\allowbreak(" date * ")" * } 1063 | { "" } 1064 | if$ 1065 | } 1066 | 1067 | FUNCTION {format.urldate} 1068 | { urldate empty$ not entry.is.electronic and 1069 | { "\allowbreak[" urldate * "]" * } 1070 | { "" } 1071 | if$ 1072 | } 1073 | 1074 | FUNCTION {hyphenate} 1075 | { 't := 1076 | "" 1077 | { t empty$ not } 1078 | { t #1 #1 substring$ "-" = 1079 | { "-" * 1080 | { t #1 #1 substring$ "-" = } 1081 | { t #2 global.max$ substring$ 't := } 1082 | while$ 1083 | } 1084 | { t #1 #1 substring$ * 1085 | t #2 global.max$ substring$ 't := 1086 | } 1087 | if$ 1088 | } 1089 | while$ 1090 | } 1091 | 1092 | FUNCTION {format.pages} 1093 | { pages empty$ 1094 | { "" } 1095 | { pages hyphenate } 1096 | if$ 1097 | } 1098 | 1099 | FUNCTION {format.journal.volume} 1100 | { volume empty$ not 1101 | { bold.journal.volume 1102 | { "\textbf{" volume * "}" * } 1103 | { volume } 1104 | if$ 1105 | } 1106 | { "" } 1107 | if$ 1108 | } 1109 | 1110 | FUNCTION {format.journal.number} 1111 | { number empty$ not 1112 | { "\penalty0 (" number * ")" * } 1113 | { "" } 1114 | if$ 1115 | } 1116 | 1117 | FUNCTION {format.journal.pages} 1118 | { pages empty$ 1119 | { "" } 1120 | { ":\penalty0 " pages hyphenate * } 1121 | if$ 1122 | } 1123 | 1124 | FUNCTION {format.periodical.year.volume.number} 1125 | { year empty$ not 1126 | { year extract.before.dash } 1127 | { "empty year in periodical " cite$ * warning$ } 1128 | if$ 1129 | volume empty$ not 1130 | { ", " * volume extract.before.dash * } 1131 | 'skip$ 1132 | if$ 1133 | number empty$ not 1134 | { "\penalty0 (" * number extract.before.dash * ")" * } 1135 | 'skip$ 1136 | if$ 1137 | year contains.dash 1138 | { "--" * 1139 | year extract.after.dash empty$ 1140 | volume extract.after.dash empty$ and 1141 | number extract.after.dash empty$ and not 1142 | { year extract.after.dash empty$ not 1143 | { year extract.after.dash * } 1144 | { year extract.before.dash * } 1145 | if$ 1146 | volume empty$ not 1147 | { ", " * volume extract.after.dash * } 1148 | 'skip$ 1149 | if$ 1150 | number empty$ not 1151 | { "\penalty0 (" * number extract.after.dash * ")" * } 1152 | 'skip$ 1153 | if$ 1154 | } 1155 | 'skip$ 1156 | if$ 1157 | } 1158 | 'skip$ 1159 | if$ 1160 | } 1161 | 1162 | FUNCTION {check.url} 1163 | { url empty$ not 1164 | { "\url{" url * "}" * 'entry.url := 1165 | #1 'entry.is.electronic := 1166 | } 1167 | { howpublished empty$ not 1168 | { howpublished #1 #5 substring$ "\url{" = 1169 | { howpublished 'entry.url := 1170 | #1 'entry.is.electronic := 1171 | } 1172 | 'skip$ 1173 | if$ 1174 | } 1175 | { note empty$ not 1176 | { note #1 #5 substring$ "\url{" = 1177 | { note 'entry.url := 1178 | #1 'entry.is.electronic := 1179 | } 1180 | 'skip$ 1181 | if$ 1182 | } 1183 | 'skip$ 1184 | if$ 1185 | } 1186 | if$ 1187 | } 1188 | if$ 1189 | } 1190 | 1191 | FUNCTION {format.url} 1192 | { entry.url empty$ not 1193 | { new.block entry.url } 1194 | { "" } 1195 | if$ 1196 | } 1197 | 1198 | FUNCTION {check.doi} 1199 | { doi empty$ not 1200 | { #1 'entry.is.electronic := } 1201 | 'skip$ 1202 | if$ 1203 | } 1204 | 1205 | FUNCTION {is.in.url} 1206 | { 's := 1207 | s empty$ 1208 | { #1 } 1209 | { entry.url empty$ 1210 | { #0 } 1211 | { s text.length$ 'len := 1212 | entry.url text.length$ 'charptr := 1213 | { entry.url charptr len substring$ s = not 1214 | charptr #0 > 1215 | and 1216 | } 1217 | { charptr #1 - 'charptr := } 1218 | while$ 1219 | charptr 1220 | } 1221 | if$ 1222 | } 1223 | if$ 1224 | } 1225 | 1226 | FUNCTION {format.doi} 1227 | { "" 1228 | doi empty$ not show.doi and 1229 | { "" 's := 1230 | doi 't := 1231 | #0 'numnames := 1232 | { t empty$ not} 1233 | { t #1 #1 substring$ 'tmp.str := 1234 | tmp.str "," = tmp.str " " = or t #2 #1 substring$ empty$ or 1235 | { t #2 #1 substring$ empty$ 1236 | { s tmp.str * 's := } 1237 | 'skip$ 1238 | if$ 1239 | s empty$ s is.in.url or 1240 | 'skip$ 1241 | { numnames #1 + 'numnames := 1242 | numnames #1 > 1243 | { ", " * } 1244 | { "DOI: " * } 1245 | if$ 1246 | "\doi{" s * "}" * * 1247 | } 1248 | if$ 1249 | "" 's := 1250 | } 1251 | { s tmp.str * 's := } 1252 | if$ 1253 | t #2 global.max$ substring$ 't := 1254 | } 1255 | while$ 1256 | 's := 1257 | s empty$ not 1258 | { new.block s } 1259 | { "" } 1260 | if$ 1261 | } 1262 | 'skip$ 1263 | if$ 1264 | } 1265 | 1266 | FUNCTION {check.electronic} 1267 | { "" 'entry.url := 1268 | #0 'entry.is.electronic := 1269 | 'check.doi 1270 | 'skip$ 1271 | if$ 1272 | 'check.url 1273 | 'skip$ 1274 | if$ 1275 | medium empty$ not 1276 | { medium "MT" = medium "DK" = or medium "CD" = or medium "OL" = or 1277 | { #1 'entry.is.electronic := } 1278 | 'skip$ 1279 | if$ 1280 | } 1281 | 'skip$ 1282 | if$ 1283 | } 1284 | 1285 | FUNCTION {format.note} 1286 | { note empty$ not show.note and 1287 | { note } 1288 | { "" } 1289 | if$ 1290 | } 1291 | 1292 | FUNCTION {empty.misc.check} 1293 | { author empty$ title empty$ 1294 | year empty$ 1295 | and and 1296 | key empty$ not and 1297 | { "all relevant fields are empty in " cite$ * warning$ } 1298 | 'skip$ 1299 | if$ 1300 | } 1301 | 1302 | FUNCTION {monograph} 1303 | { output.bibitem 1304 | author empty$ not 1305 | { format.authors } 1306 | { editor empty$ not 1307 | { format.editors } 1308 | { "empty author and editor in " cite$ * warning$ 1309 | "" 1310 | } 1311 | if$ 1312 | } 1313 | if$ 1314 | output 1315 | new.block 1316 | format.series.vol.num.title "title" output.check 1317 | "M" set.entry.mark 1318 | format.mark "" output.after 1319 | new.block 1320 | format.translators output 1321 | new.sentence 1322 | format.edition output 1323 | new.block 1324 | format.address.publisher output 1325 | format.year "year" output.check 1326 | format.pages bbl.colon output.after 1327 | format.urldate "" output.after 1328 | format.url output 1329 | format.doi output 1330 | new.block 1331 | format.note output 1332 | fin.entry 1333 | } 1334 | 1335 | FUNCTION {incollection} 1336 | { output.bibitem 1337 | format.authors output 1338 | author format.key output 1339 | new.block 1340 | format.title "title" output.check 1341 | "M" set.entry.mark 1342 | format.mark "" output.after 1343 | new.block 1344 | format.translators output 1345 | new.slash 1346 | format.editors output 1347 | new.block 1348 | format.series.vol.num.booktitle "booktitle" output.check 1349 | new.block 1350 | format.edition output 1351 | new.block 1352 | format.address.publisher output 1353 | format.year "year" output.check 1354 | format.pages bbl.colon output.after 1355 | format.urldate "" output.after 1356 | format.url output 1357 | format.doi output 1358 | new.block 1359 | format.note output 1360 | fin.entry 1361 | } 1362 | 1363 | FUNCTION {periodical} 1364 | { output.bibitem 1365 | format.authors output 1366 | author format.key output 1367 | new.block 1368 | format.title "title" output.check 1369 | "J" set.entry.mark 1370 | format.mark "" output.after 1371 | new.block 1372 | format.periodical.year.volume.number output 1373 | new.block 1374 | format.address.publisher output 1375 | format.date "year" output.check 1376 | format.urldate "" output.after 1377 | format.url output 1378 | format.doi output 1379 | new.block 1380 | format.note output 1381 | fin.entry 1382 | } 1383 | 1384 | FUNCTION {article} 1385 | { output.bibitem 1386 | format.authors output 1387 | author format.key output 1388 | new.block 1389 | format.title "title" output.check 1390 | "J" set.entry.mark 1391 | format.mark "" output.after 1392 | new.block 1393 | format.journal "journal" output.check 1394 | format.date "year" output.check 1395 | format.journal.volume output 1396 | format.journal.number "" output.after 1397 | format.journal.pages "" output.after 1398 | format.urldate "" output.after 1399 | format.url output 1400 | format.doi output 1401 | new.block 1402 | format.note output 1403 | fin.entry 1404 | } 1405 | 1406 | FUNCTION {patent} 1407 | { output.bibitem 1408 | format.authors output 1409 | author format.key output 1410 | new.block 1411 | format.title "title" output.check 1412 | "P" set.entry.mark 1413 | format.mark "" output.after 1414 | new.block 1415 | format.date "year" output.check 1416 | format.urldate "" output.after 1417 | format.url output 1418 | format.doi output 1419 | new.block 1420 | format.note output 1421 | fin.entry 1422 | } 1423 | 1424 | FUNCTION {electronic} 1425 | { #1 #1 check.electronic 1426 | #1 'entry.is.electronic := 1427 | output.bibitem 1428 | format.authors output 1429 | author format.key output 1430 | new.block 1431 | format.series.vol.num.title "title" output.check 1432 | "EB" set.entry.mark 1433 | format.mark "" output.after 1434 | new.block 1435 | format.address.publisher output 1436 | date empty$ 1437 | { format.date output } 1438 | 'skip$ 1439 | if$ 1440 | format.pages bbl.colon output.after 1441 | format.editdate "" output.after 1442 | format.urldate "" output.after 1443 | format.url output 1444 | format.doi output 1445 | new.block 1446 | format.note output 1447 | fin.entry 1448 | } 1449 | 1450 | FUNCTION {misc} 1451 | { journal empty$ not 1452 | 'article 1453 | { booktitle empty$ not 1454 | 'incollection 1455 | { publisher empty$ not 1456 | 'monograph 1457 | { entry.is.electronic 1458 | 'electronic 1459 | { "Z" set.entry.mark 1460 | monograph 1461 | } 1462 | if$ 1463 | } 1464 | if$ 1465 | } 1466 | if$ 1467 | } 1468 | if$ 1469 | empty.misc.check 1470 | } 1471 | 1472 | FUNCTION {archive} 1473 | { "A" set.entry.mark 1474 | misc 1475 | } 1476 | 1477 | FUNCTION {book} { monograph } 1478 | 1479 | FUNCTION {booklet} { book } 1480 | 1481 | FUNCTION {collection} 1482 | { "G" set.entry.mark 1483 | monograph 1484 | } 1485 | 1486 | FUNCTION {database} 1487 | { "DB" set.entry.mark 1488 | electronic 1489 | } 1490 | 1491 | FUNCTION {dataset} 1492 | { "DS" set.entry.mark 1493 | electronic 1494 | } 1495 | 1496 | FUNCTION {inbook} { book } 1497 | 1498 | FUNCTION {inproceedings} 1499 | { "C" set.entry.mark 1500 | incollection 1501 | } 1502 | 1503 | FUNCTION {conference} { inproceedings } 1504 | 1505 | FUNCTION {map} 1506 | { "CM" set.entry.mark 1507 | misc 1508 | } 1509 | 1510 | FUNCTION {manual} { monograph } 1511 | 1512 | FUNCTION {mastersthesis} 1513 | { "D" set.entry.mark 1514 | monograph 1515 | } 1516 | 1517 | FUNCTION {newspaper} 1518 | { "N" set.entry.mark 1519 | article 1520 | } 1521 | 1522 | FUNCTION {online} 1523 | { "EB" set.entry.mark 1524 | electronic 1525 | } 1526 | 1527 | FUNCTION {phdthesis} { mastersthesis } 1528 | 1529 | FUNCTION {proceedings} 1530 | { "C" set.entry.mark 1531 | monograph 1532 | } 1533 | 1534 | FUNCTION {software} 1535 | { "CP" set.entry.mark 1536 | electronic 1537 | } 1538 | 1539 | FUNCTION {standard} 1540 | { "S" set.entry.mark 1541 | misc 1542 | } 1543 | 1544 | FUNCTION {techreport} 1545 | { "R" set.entry.mark 1546 | misc 1547 | } 1548 | 1549 | FUNCTION {unpublished} 1550 | { "Z" set.entry.mark 1551 | misc 1552 | } 1553 | 1554 | FUNCTION {default.type} { misc } 1555 | 1556 | MACRO {jan} {"January"} 1557 | 1558 | MACRO {feb} {"February"} 1559 | 1560 | MACRO {mar} {"March"} 1561 | 1562 | MACRO {apr} {"April"} 1563 | 1564 | MACRO {may} {"May"} 1565 | 1566 | MACRO {jun} {"June"} 1567 | 1568 | MACRO {jul} {"July"} 1569 | 1570 | MACRO {aug} {"August"} 1571 | 1572 | MACRO {sep} {"September"} 1573 | 1574 | MACRO {oct} {"October"} 1575 | 1576 | MACRO {nov} {"November"} 1577 | 1578 | MACRO {dec} {"December"} 1579 | 1580 | MACRO {acmcs} {"ACM Computing Surveys"} 1581 | 1582 | MACRO {acta} {"Acta Informatica"} 1583 | 1584 | MACRO {cacm} {"Communications of the ACM"} 1585 | 1586 | MACRO {ibmjrd} {"IBM Journal of Research and Development"} 1587 | 1588 | MACRO {ibmsj} {"IBM Systems Journal"} 1589 | 1590 | MACRO {ieeese} {"IEEE Transactions on Software Engineering"} 1591 | 1592 | MACRO {ieeetc} {"IEEE Transactions on Computers"} 1593 | 1594 | MACRO {ieeetcad} 1595 | {"IEEE Transactions on Computer-Aided Design of Integrated Circuits"} 1596 | 1597 | MACRO {ipl} {"Information Processing Letters"} 1598 | 1599 | MACRO {jacm} {"Journal of the ACM"} 1600 | 1601 | MACRO {jcss} {"Journal of Computer and System Sciences"} 1602 | 1603 | MACRO {scp} {"Science of Computer Programming"} 1604 | 1605 | MACRO {sicomp} {"SIAM Journal on Computing"} 1606 | 1607 | MACRO {tocs} {"ACM Transactions on Computer Systems"} 1608 | 1609 | MACRO {tods} {"ACM Transactions on Database Systems"} 1610 | 1611 | MACRO {tog} {"ACM Transactions on Graphics"} 1612 | 1613 | MACRO {toms} {"ACM Transactions on Mathematical Software"} 1614 | 1615 | MACRO {toois} {"ACM Transactions on Office Information Systems"} 1616 | 1617 | MACRO {toplas} {"ACM Transactions on Programming Languages and Systems"} 1618 | 1619 | MACRO {tcs} {"Theoretical Computer Science"} 1620 | 1621 | FUNCTION {sortify} 1622 | { purify$ 1623 | "l" change.case$ 1624 | } 1625 | 1626 | FUNCTION {chop.word} 1627 | { 's := 1628 | 'len := 1629 | s #1 len substring$ = 1630 | { s len #1 + global.max$ substring$ } 1631 | 's 1632 | if$ 1633 | } 1634 | 1635 | FUNCTION {format.lab.names} 1636 | { 's := 1637 | s #1 "{vv~}{ll}{, jj}{, ff}" format.name$ 't := 1638 | t get.str.lang 'name.lang := 1639 | name.lang lang.en = 1640 | { t #1 "{vv~}{ll}" format.name$} 1641 | { t #1 "{ll}{ff}" format.name$} 1642 | if$ 1643 | s num.names$ #1 > 1644 | { bbl.space * citation.et.al * } 1645 | 'skip$ 1646 | if$ 1647 | } 1648 | 1649 | FUNCTION {author.key.label} 1650 | { author empty$ 1651 | { key empty$ 1652 | { cite$ #1 #3 substring$ } 1653 | 'key 1654 | if$ 1655 | } 1656 | { author format.lab.names } 1657 | if$ 1658 | } 1659 | 1660 | FUNCTION {author.editor.key.label} 1661 | { author empty$ 1662 | { editor empty$ 1663 | { key empty$ 1664 | { cite$ #1 #3 substring$ } 1665 | 'key 1666 | if$ 1667 | } 1668 | { editor format.lab.names } 1669 | if$ 1670 | } 1671 | { author format.lab.names } 1672 | if$ 1673 | } 1674 | 1675 | FUNCTION {author.key.organization.label} 1676 | { author empty$ 1677 | { key empty$ 1678 | { organization empty$ 1679 | { cite$ #1 #3 substring$ } 1680 | { "The " #4 organization chop.word #3 text.prefix$ } 1681 | if$ 1682 | } 1683 | 'key 1684 | if$ 1685 | } 1686 | { author format.lab.names } 1687 | if$ 1688 | } 1689 | 1690 | FUNCTION {editor.key.organization.label} 1691 | { editor empty$ 1692 | { key empty$ 1693 | { organization empty$ 1694 | { cite$ #1 #3 substring$ } 1695 | { "The " #4 organization chop.word #3 text.prefix$ } 1696 | if$ 1697 | } 1698 | 'key 1699 | if$ 1700 | } 1701 | { editor format.lab.names } 1702 | if$ 1703 | } 1704 | 1705 | FUNCTION {calc.short.authors} 1706 | { type$ "book" = 1707 | type$ "inbook" = 1708 | or 1709 | 'author.editor.key.label 1710 | { type$ "collection" = 1711 | type$ "proceedings" = 1712 | or 1713 | { editor empty$ not 1714 | 'editor.key.organization.label 1715 | 'author.key.organization.label 1716 | if$ 1717 | } 1718 | 'author.key.label 1719 | if$ 1720 | } 1721 | if$ 1722 | 'short.list := 1723 | } 1724 | 1725 | FUNCTION {calc.label} 1726 | { calc.short.authors 1727 | short.list 1728 | "(" 1729 | * 1730 | format.year duplicate$ empty$ 1731 | short.list key field.or.null = or 1732 | { pop$ "" } 1733 | 'skip$ 1734 | if$ 1735 | * 1736 | 'label := 1737 | } 1738 | 1739 | INTEGERS { seq.num } 1740 | 1741 | FUNCTION {init.seq} 1742 | { #0 'seq.num :=} 1743 | 1744 | FUNCTION {int.to.fix} 1745 | { "000000000" swap$ int.to.str$ * 1746 | #-1 #10 substring$ 1747 | } 1748 | 1749 | FUNCTION {presort} 1750 | { set.entry.lang 1751 | set.entry.numbered 1752 | show.url show.doi check.electronic 1753 | calc.label 1754 | label sortify 1755 | " " 1756 | * 1757 | seq.num #1 + 'seq.num := 1758 | seq.num int.to.fix 1759 | 'sort.label := 1760 | sort.label * 1761 | #1 entry.max$ substring$ 1762 | 'sort.key$ := 1763 | } 1764 | 1765 | STRINGS { longest.label last.label next.extra } 1766 | 1767 | INTEGERS { longest.label.width last.extra.num number.label } 1768 | 1769 | FUNCTION {initialize.longest.label} 1770 | { "" 'longest.label := 1771 | #0 int.to.chr$ 'last.label := 1772 | "" 'next.extra := 1773 | #0 'longest.label.width := 1774 | #0 'last.extra.num := 1775 | #0 'number.label := 1776 | } 1777 | 1778 | FUNCTION {forward.pass} 1779 | { last.label label = 1780 | { last.extra.num #1 + 'last.extra.num := 1781 | last.extra.num int.to.chr$ 'extra.label := 1782 | } 1783 | { "a" chr.to.int$ 'last.extra.num := 1784 | "" 'extra.label := 1785 | label 'last.label := 1786 | } 1787 | if$ 1788 | number.label #1 + 'number.label := 1789 | } 1790 | 1791 | FUNCTION {reverse.pass} 1792 | { next.extra "b" = 1793 | { "a" 'extra.label := } 1794 | 'skip$ 1795 | if$ 1796 | extra.label 'next.extra := 1797 | extra.label 1798 | duplicate$ empty$ 1799 | 'skip$ 1800 | { "{\natexlab{" swap$ * "}}" * } 1801 | if$ 1802 | 'extra.label := 1803 | label extra.label * 'label := 1804 | } 1805 | 1806 | FUNCTION {bib.sort.order} 1807 | { sort.label 'sort.key$ := 1808 | } 1809 | 1810 | FUNCTION {begin.bib} 1811 | { preamble$ empty$ 1812 | 'skip$ 1813 | { preamble$ write$ newline$ } 1814 | if$ 1815 | "\begin{thebibliography}{" number.label int.to.str$ * "}" * 1816 | write$ newline$ 1817 | "\providecommand{\natexlab}[1]{#1}" 1818 | write$ newline$ 1819 | "\providecommand{\url}[1]{#1}" 1820 | write$ newline$ 1821 | "\expandafter\ifx\csname urlstyle\endcsname\relax\relax\else" 1822 | write$ newline$ 1823 | " \urlstyle{same}\fi" 1824 | write$ newline$ 1825 | show.doi 1826 | { "\providecommand{\href}[2]{\url{#2}}" 1827 | write$ newline$ 1828 | "\providecommand{\doi}[1]{\href{https://doi.org/#1}{#1}}" 1829 | write$ newline$ 1830 | } 1831 | 'skip$ 1832 | if$ 1833 | } 1834 | 1835 | FUNCTION {end.bib} 1836 | { newline$ 1837 | "\end{thebibliography}" write$ newline$ 1838 | } 1839 | 1840 | READ 1841 | 1842 | EXECUTE {init.state.consts} 1843 | 1844 | EXECUTE {load.config} 1845 | 1846 | EXECUTE {init.seq} 1847 | 1848 | ITERATE {presort} 1849 | 1850 | SORT 1851 | 1852 | EXECUTE {initialize.longest.label} 1853 | 1854 | ITERATE {forward.pass} 1855 | 1856 | REVERSE {reverse.pass} 1857 | 1858 | ITERATE {bib.sort.order} 1859 | 1860 | SORT 1861 | 1862 | EXECUTE {begin.bib} 1863 | 1864 | ITERATE {call.type$} 1865 | 1866 | EXECUTE {end.bib} 1867 | -------------------------------------------------------------------------------- /cjc.cls: -------------------------------------------------------------------------------- 1 | \NeedsTeXFormat{LaTeX2e}[2017/04/15] 2 | \ProvidesClass{cjc}[2020/04/19 v0.2 A template framework for Chinese journals] 3 | 4 | % 报错和警告 5 | \newcommand\class@error[1]{% 6 | \ClassError{cjc}{#1}{}% 7 | } 8 | \newcommand\class@warning[1]{% 9 | \ClassWaring{cjc}{#1}% 10 | } 11 | 12 | % 检查 \LaTeXe{} kernel 版本 13 | \@ifl@t@r\fmtversion{2017/04/15}{}{ 14 | \class@error{% 15 | TeX Live 2017 or later version is required to compile this document% 16 | } 17 | } 18 | 19 | % 检查编译引擎,要求使用 XeLaTeX。 20 | \RequirePackage{iftex} 21 | \ifXeTeX\else 22 | \class@error{XeLaTeX is required to compile this document} 23 | \fi 24 | 25 | % 提供 key-value 接口。 26 | \RequirePackage{kvdefinekeys} 27 | \RequirePackage{kvsetkeys} 28 | \RequirePackage{kvoptions} 29 | 30 | \kv@set@family@handler{class@key}{% 31 | \@namedef{class@#1@@name}{#1}% 32 | \def\class@@default{}% 33 | \def\class@@choices{}% 34 | \kv@define@key{class@value}{name}{% 35 | \@namedef{class@#1@@name}{##1}% 36 | }% 37 | \@namedef{class@#1@@check}{}% 38 | \@namedef{class@#1@@code}{}% 39 | \kv@define@key{class@value}{choices}{% 40 | \def\class@@choices{##1}% 41 | \@namedef{class@#1@@reset}{}% 42 | \@namedef{class@#1@@check}{% 43 | \@ifundefined{% 44 | ifclass@\@nameuse{class@#1@@name}@\@nameuse{class@\@nameuse{class@#1@@name}}% 45 | }{% 46 | \class@error{Invalid value "#1 = \@nameuse{class@\@nameuse{class@#1@@name}}"}% 47 | }% 48 | \@nameuse{class@#1@@reset}% 49 | \@nameuse{class@\@nameuse{class@#1@@name}@\@nameuse{class@\@nameuse{class@#1@@name}}true}% 50 | }% 51 | }% 52 | \kv@define@key{class@value}{default}{% 53 | \def\class@@default{##1}% 54 | }% 55 | \kvsetkeys{class@value}{#2}% 56 | \@namedef{class@\@nameuse{class@#1@@name}}{}% 57 | \kv@set@family@handler{class@choice}{% 58 | \ifx\class@@default\@empty 59 | \def\class@@default{##1}% 60 | \fi 61 | \expandafter\newif\csname ifclass@\@nameuse{class@#1@@name}@##1\endcsname 62 | \expandafter\g@addto@macro\csname class@#1@@reset\endcsname{% 63 | \@nameuse{class@\@nameuse{class@#1@@name}@##1false}% 64 | }% 65 | }% 66 | \kvsetkeys@expandafter{class@choice}{\class@@choices}% 67 | \expandafter\let\csname class@\@nameuse{class@#1@@name}\endcsname\class@@default 68 | \expandafter\ifx\csname class@\@nameuse{class@#1@@name}\endcsname\@empty\else 69 | \@nameuse{class@#1@@check}% 70 | \fi 71 | \kv@define@key{class}{#1}{% 72 | \@namedef{class@\@nameuse{class@#1@@name}}{##1}% 73 | \@nameuse{class@#1@@check}% 74 | \@nameuse{class@#1@@code}% 75 | }% 76 | } 77 | 78 | \newcommand\class@define@key[1]{% 79 | \kvsetkeys{class@key}{#1}% 80 | } 81 | \newcommand\classsetup[1]{% 82 | \kvsetkeys{class}{#1}% 83 | } 84 | \newcommand\class@option@hook[2]{% 85 | \expandafter\g@addto@macro\csname class@#1@@code\endcsname{#2}% 86 | } 87 | 88 | 89 | \class@define@key{ 90 | language = { 91 | choices = { 92 | chinese, 93 | english, 94 | }, 95 | default = chinese, 96 | }, 97 | fontset = { 98 | choices = { 99 | windows, 100 | mac, 101 | ubuntu, 102 | fandol, 103 | none, 104 | }, 105 | default = none, 106 | }, 107 | } 108 | 109 | % 使用 \pkg{kvoptions} 提供的 key-value 接口, 110 | \SetupKeyvalOptions{ 111 | family = class, 112 | prefix = class@, 113 | setkeys = \kvsetkeys, 114 | } 115 | 116 | \PassOptionsToClass{UTF8,a4paper,scheme=plain,fontset=none,zihao=5,twoside,twocolumn}{ctexart} 117 | \PassOptionsToPackage{quiet}{xeCJK} 118 | 119 | \DeclareDefaultOption{\PassOptionsToClass{\CurrentOption}{ctexart}} 120 | \ProcessKeyvalOptions* 121 | 122 | % 载入 \cls{ctexart} 文档类,要求为 2.4.9 或更高的版本。 123 | \LoadClass{ctexart}[2017/04/01] 124 | 125 | \RequirePackage{geometry} 126 | \RequirePackage{fontspec}[2017/03/31] 127 | \RequirePackage{amsmath} 128 | \RequirePackage{unicode-math} 129 | \RequirePackage{fancyhdr} 130 | \RequirePackage{graphicx} 131 | \RequirePackage{amsthm} 132 | \RequirePackage{caption} 133 | \RequirePackage[sort&compress]{natbib} 134 | \RequirePackage{url} 135 | \RequirePackage{etoolbox} 136 | 137 | % 对冲突的宏包报错。 138 | \RequirePackage{filehook} 139 | \newcommand\class@package@conflict[2]{ 140 | \AtBeginOfPackageFile*{#2}{ 141 | \class@error{The "#2" package is incompatible with required "#1"} 142 | } 143 | } 144 | \class@package@conflict{natbib}{cite} 145 | \class@package@conflict{unicode-math}{amscd} 146 | \class@package@conflict{unicode-math}{amsfonts} 147 | \class@package@conflict{unicode-math}{amssymb} 148 | \class@package@conflict{unicode-math}{bbm} 149 | \class@package@conflict{unicode-math}{bm} 150 | \class@package@conflict{unicode-math}{eucal} 151 | \class@package@conflict{unicode-math}{eufrak} 152 | \class@package@conflict{unicode-math}{mathrsfs} 153 | 154 | % 字体 155 | 156 | \class@define@key{ 157 | font = { 158 | choices = { 159 | times, 160 | termes, 161 | xits, 162 | libertinus, 163 | lm, 164 | auto, 165 | none, 166 | }, 167 | default = auto, 168 | }, 169 | cjk-font = { 170 | name = cjk@font, 171 | choices = { 172 | windows, 173 | mac, 174 | noto, 175 | fandol, 176 | auto, 177 | none, 178 | }, 179 | default = auto, 180 | }, 181 | math-font = { 182 | name = math@font, 183 | choices = { 184 | xits, 185 | stix, 186 | libertinus, 187 | lm, 188 | none, 189 | }, 190 | default = xits, 191 | }, 192 | } 193 | 194 | % 处理 \opt{fontset} 195 | \ifclass@fontset@mac 196 | \classsetup{ 197 | font = times, 198 | cjk-font = mac, 199 | } 200 | \else 201 | \ifclass@fontset@windows 202 | \classsetup{ 203 | font = times, 204 | cjk-font = windows, 205 | } 206 | \else 207 | \ifclass@fontset@fandol 208 | \classsetup{ 209 | font = xits, 210 | cjk-font = fandol, 211 | } 212 | \else 213 | \ifclass@fontset@ubuntu 214 | \classsetup{ 215 | font = xits, 216 | cjk-font = noto, 217 | } 218 | \fi 219 | \fi 220 | \fi 221 | \fi 222 | 223 | % 检测系统 224 | \class@define@key{ 225 | system = { 226 | choices = { 227 | auto, 228 | mac, 229 | unix, 230 | windows, 231 | }, 232 | default = auto, 233 | }, 234 | } 235 | \ifclass@system@auto 236 | \IfFileExists{/System/Library/Fonts/Menlo.ttc}{ 237 | \classsetup{system = mac} 238 | }{ 239 | \IfFileExists{/dev/null}{ 240 | \IfFileExists{null:}{ 241 | \classsetup{system = windows} 242 | }{ 243 | \classsetup{system = unix} 244 | } 245 | }{ 246 | \classsetup{system = windows} 247 | } 248 | } 249 | \fi 250 | 251 | % XITS 字体于 2018-10-03 更改了字体的文件名,所以需要判断。 252 | % 原文件名为 \file{xits-regular.otf}、\file{xits-math.otf} 等, 253 | % 后改为 \file{XITS-Regular.otf}、\file{XITSMath-Regular.otf} 等。 254 | \let\class@font@family@xits\@empty 255 | \newcommand\class@set@xits@names{% 256 | \ifx\class@font@family@xits\@empty 257 | \IfFontExistsTF{XITSMath-Regular.otf}{% 258 | \gdef\class@font@family@xits{XITS}% 259 | \gdef\class@font@style@xits@rm{Regular}% 260 | \gdef\class@font@style@xits@bf{Bold}% 261 | \gdef\class@font@style@xits@it{Italic}% 262 | \gdef\class@font@style@xits@bfit{BoldItalic}% 263 | \gdef\class@font@name@xits@math@rm{XITSMath-Regular}% 264 | \gdef\class@font@name@xits@math@bf{XITSMath-Bold}% 265 | }{% 266 | \gdef\class@font@family@xits{xits}% 267 | \gdef\class@font@style@xits@rm{regular}% 268 | \gdef\class@font@style@xits@bf{bold}% 269 | \gdef\class@font@style@xits@it{italic}% 270 | \gdef\class@font@style@xits@bfit{bolditalic}% 271 | \gdef\class@font@name@xits@math@rm{xits-math}% 272 | \gdef\class@font@name@xits@math@bf{xits-mathbold}% 273 | }% 274 | \fi 275 | } 276 | 277 | % Libertinus 字体同样。 278 | \let\class@font@family@libertinus\@empty 279 | \newcommand\class@set@libertinus@names{% 280 | \ifx\class@font@family@libertinus\@empty 281 | \IfFontExistsTF{LibertinusSerif-Regular.otf}{% 282 | \gdef\class@font@family@libertinus@serif{LibertinusSerif}% 283 | \gdef\class@font@family@libertinus@sans{LibertinusSans}% 284 | \gdef\class@font@name@libertinus@math{LibertinusMath-Regular}% 285 | \gdef\class@font@style@libertinus@rm{Regular}% 286 | \gdef\class@font@style@libertinus@bf{Bold}% 287 | \gdef\class@font@style@libertinus@it{Italic}% 288 | \gdef\class@font@style@libertinus@bfit{BoldItalic}% 289 | }{% 290 | \gdef\class@font@family@libertinus@serif{libertinusserif}% 291 | \gdef\class@font@family@libertinus@sans{libertinussans}% 292 | \gdef\class@font@name@libertinus@math{libertinusmath-regular}% 293 | \gdef\class@font@style@libertinus@rm{regular}% 294 | \gdef\class@font@style@libertinus@bf{bold}% 295 | \gdef\class@font@style@libertinus@it{italic}% 296 | \gdef\class@font@style@libertinus@bfit{bolditalic}% 297 | }% 298 | \fi 299 | } 300 | 301 | % 西文字体 302 | \ifclass@font@auto 303 | \ifclass@system@unix 304 | \classsetup{font=xits} 305 | \else 306 | \classsetup{font=times} 307 | \fi 308 | \fi 309 | \newcommand\class@load@font@times{% 310 | \setmainfont{Times New Roman}% 311 | \setsansfont{Arial}[Scale = MatchLowercase]% 312 | \ifclass@system@mac 313 | \setmonofont{Menlo}[Scale = MatchLowercase]% 314 | \else 315 | \setmonofont{Courier New}[Scale = MatchLowercase]% 316 | \fi 317 | } 318 | \newcommand\class@load@font@termes{% 319 | \setmainfont{texgyretermes}[ 320 | Extension = .otf, 321 | UprightFont = *-regular, 322 | BoldFont = *-bold, 323 | ItalicFont = *-italic, 324 | BoldItalicFont = *-bolditalic, 325 | ]% 326 | \class@load@texgyre@sans@mono 327 | } 328 | \newcommand\class@load@texgyre@sans@mono{% 329 | \setsansfont{texgyreheros}[ 330 | Extension = .otf, 331 | UprightFont = *-regular, 332 | BoldFont = *-bold, 333 | ItalicFont = *-italic, 334 | BoldItalicFont = *-bolditalic, 335 | Scale = MatchLowercase, 336 | ]% 337 | \setmonofont{texgyrecursor}[ 338 | Extension = .otf, 339 | UprightFont = *-regular, 340 | BoldFont = *-bold, 341 | ItalicFont = *-italic, 342 | BoldItalicFont = *-bolditalic, 343 | Scale = MatchLowercase, 344 | ]% 345 | } 346 | \newcommand\class@load@font@xits{% 347 | \class@set@xits@names 348 | \setmainfont{\class@font@family@xits}[ 349 | Extension = .otf, 350 | UprightFont = *-\class@font@style@xits@rm, 351 | BoldFont = *-\class@font@style@xits@bf, 352 | ItalicFont = *-\class@font@style@xits@it, 353 | BoldItalicFont = *-\class@font@style@xits@bfit, 354 | ]% 355 | \class@load@texgyre@sans@mono 356 | } 357 | \newcommand\class@load@font@libertinus{% 358 | \class@set@libertinus@names 359 | \setmainfont{\class@font@family@libertinus@serif}[ 360 | Extension = .otf, 361 | UprightFont = *-\class@font@style@libertinus@rm, 362 | BoldFont = *-\class@font@style@libertinus@bf, 363 | ItalicFont = *-\class@font@style@libertinus@it, 364 | BoldItalicFont = *-\class@font@style@libertinus@bfit, 365 | ]% 366 | \setsansfont{\class@font@family@libertinus@sans}[ 367 | Extension = .otf, 368 | UprightFont = *-\class@font@style@libertinus@rm, 369 | BoldFont = *-\class@font@style@libertinus@bf, 370 | ItalicFont = *-\class@font@style@libertinus@it, 371 | Scale = MatchLowercase, 372 | ]% 373 | \setmonofont{lmmonolt10}[ 374 | Extension = .otf, 375 | UprightFont = *-regular, 376 | BoldFont = *-bold, 377 | ItalicFont = *-oblique, 378 | BoldItalicFont = *-boldoblique, 379 | Scale = MatchLowercase, 380 | ]% 381 | } 382 | \newcommand\class@load@font@lm{% 383 | \setmainfont{lmroman10}[ 384 | Extension = .otf, 385 | UprightFont = *-regular, 386 | BoldFont = *-bold, 387 | ItalicFont = *-italic, 388 | BoldItalicFont = *-bolditalic, 389 | ]% 390 | \setsansfont{lmsans10}[ 391 | Extension = .otf, 392 | UprightFont = *-regular, 393 | BoldFont = *-bold, 394 | ItalicFont = *-oblique, 395 | BoldItalicFont = *-boldoblique, 396 | ]% 397 | \setmonofont{lmmonolt10}[ 398 | Extension = .otf, 399 | UprightFont = *-regular, 400 | BoldFont = *-bold, 401 | ItalicFont = *-oblique, 402 | BoldItalicFont = *-boldoblique, 403 | ]% 404 | } 405 | \newcommand\class@load@font{% 406 | \@nameuse{class@load@font@\class@font}% 407 | } 408 | \class@load@font 409 | \class@option@hook{font}{\class@load@font} 410 | 411 | % 中文字体 412 | \ifclass@cjk@font@auto 413 | \ifclass@system@mac 414 | \classsetup{cjk-font = mac} 415 | \else 416 | \ifclass@system@windows 417 | \classsetup{cjk-font = windows} 418 | \else 419 | \IfFontExistsTF{Noto Serif CJK SC}{ 420 | \classsetup{cjk-font = noto} 421 | }{ 422 | \classsetup{cjk-font = fandol} 423 | } 424 | \fi 425 | \fi 426 | \fi 427 | \newcommand\class@load@cjk@font@windows{% 428 | \xeCJKsetup{EmboldenFactor=2} 429 | \setCJKmainfont{SimSun}[ 430 | AutoFakeBold = true, 431 | ItalicFont = KaiTi, 432 | ]% 433 | \setCJKsansfont{SimHei}[AutoFakeBold]% 434 | \setCJKmonofont{FangSong}% 435 | \setCJKfamilyfont{zhsong}{SimSun}[AutoFakeBold]% 436 | \setCJKfamilyfont{zhhei}{SimHei}[AutoFakeBold]% 437 | \setCJKfamilyfont{zhkai}{KaiTi}% 438 | \setCJKfamilyfont{zhfs}{FangSong}% 439 | } 440 | \newcommand\class@load@cjk@font@mac{% 441 | \setCJKmainfont{Songti SC}[ 442 | UprightFont = * Light, 443 | BoldFont = * Bold, 444 | ItalicFont = Kaiti SC, 445 | BoldItalicFont = Kaiti SC Bold, 446 | ]% 447 | \setCJKsansfont{Heiti SC}[BoldFont=* Medium]% 448 | \setCJKmonofont{STFangsong} 449 | \setCJKfamilyfont{zhsong}{Songti SC}[ 450 | UprightFont = * Light, 451 | BoldFont = * Bold, 452 | ]% 453 | \setCJKfamilyfont{zhhei}{Heiti SC}[ 454 | UprightFont = * Light, 455 | BoldFont = * Medium, 456 | ]% 457 | \setCJKfamilyfont{zhfs}{STFangsong}% 458 | \setCJKfamilyfont{zhkai}{Kaiti SC}[BoldFont = * Bold]% 459 | \setCJKfamilyfont{zhli}{Baoli SC}% 460 | \setCJKfamilyfont{zhyuan}{Yuanyi SC}[ 461 | UprightFont = * Light, 462 | BoldFont = * Bold, 463 | ]% 464 | \xeCJKsetwidth{‘’“”}{1em}% 465 | } 466 | 467 | % 注意 Noto CJK 的 regular 字重名字不带“Regular”。 468 | \newcommand\class@load@cjk@font@noto{% 469 | \setCJKmainfont{Noto Serif CJK SC}[ 470 | UprightFont = * Light, 471 | BoldFont = * Bold, 472 | ItalicFont = FandolKai-Regular, 473 | ItalicFeatures = {Extension = .otf}, 474 | ]% 475 | \setCJKsansfont{Noto Sans CJK SC}[ 476 | BoldFont = * Medium, 477 | ]% 478 | \setCJKmonofont{Noto Sans Mono CJK SC}% 479 | \setCJKfamilyfont{zhsong}{Noto Serif CJK SC}[ 480 | UprightFont = * Light, 481 | UprightFont = * Bold, 482 | ]% 483 | \setCJKfamilyfont{zhhei}{Noto Sans CJK SC}[ 484 | BoldFont = * Medium, 485 | ]% 486 | \setCJKfamilyfont{zhfs}{FandolFang}[ 487 | Extension = .otf, 488 | UprightFont = *-Regular, 489 | ]% 490 | \setCJKfamilyfont{zhkai}{FandolKai}[ 491 | Extension = .otf, 492 | UprightFont = *-Regular, 493 | ]% 494 | } 495 | \newcommand\class@load@cjk@font@fandol{% 496 | \setCJKmainfont{FandolSong}[ 497 | Extension = .otf, 498 | UprightFont = *-Regular, 499 | BoldFont = *-Bold, 500 | ItalicFont = FandolKai-Regular, 501 | ]% 502 | \setCJKsansfont{FandolHei}[ 503 | Extension = .otf, 504 | UprightFont = *-Regular, 505 | BoldFont = *-Bold, 506 | ]% 507 | \setCJKmonofont{FandolFang}[ 508 | Extension = .otf, 509 | UprightFont = *-Regular, 510 | ]% 511 | \setCJKfamilyfont{zhsong}{FandolSong}[ 512 | Extension = .otf, 513 | UprightFont = *-Regular, 514 | BoldFont = *-Bold, 515 | ]% 516 | \setCJKfamilyfont{zhhei}{FandolHei}[ 517 | Extension = .otf, 518 | UprightFont = *-Regular, 519 | BoldFont = *-Bold, 520 | ]% 521 | \setCJKfamilyfont{zhfs}{FandolFang}[ 522 | Extension = .otf, 523 | UprightFont = *-Regular, 524 | ]% 525 | \setCJKfamilyfont{zhkai}{FandolKai}[ 526 | Extension = .otf, 527 | UprightFont = *-Regular, 528 | ]% 529 | } 530 | \ifclass@cjk@font@none\else 531 | \providecommand\songti{\CJKfamily{zhsong}} 532 | \providecommand\heiti{\CJKfamily{zhhei}} 533 | \providecommand\fangsong{\CJKfamily{zhfs}} 534 | \providecommand\kaishu{\CJKfamily{zhkai}} 535 | \fi 536 | \newcommand\class@load@cjk@font{% 537 | \@nameuse{class@load@cjk@font@\class@cjk@font}% 538 | } 539 | \class@load@cjk@font 540 | \class@option@hook{cjk-font}{\class@load@cjk@font} 541 | 542 | % 使用 \pkg{unicode-math} 配置数学字体。 543 | \unimathsetup{ 544 | math-style = ISO, 545 | bold-style = ISO, 546 | nabla = upright, 547 | partial = upright, 548 | } 549 | 550 | \newcommand\class@load@math@font@xits{% 551 | \class@set@xits@names 552 | \setmathfont{\class@font@name@xits@math@rm}[ 553 | Extension = .otf, 554 | BoldFont = \class@font@name@xits@math@bf, 555 | StylisticSet = 8, 556 | ]% 557 | \setmathfont{\class@font@name@xits@math@rm}[ 558 | Extension = .otf, 559 | StylisticSet = 1, 560 | range = {cal,bfcal}, 561 | ]% 562 | } 563 | \newcommand\class@load@math@font@stix{% 564 | \setmathfont{STIX2Math}[ 565 | Extension = .otf, 566 | StylisticSet = 8, 567 | ]% 568 | \setmathfont{STIX2Math}[ 569 | Extension = .otf, 570 | StylisticSet = 1, 571 | range = {cal,bfcal}, 572 | ]% 573 | } 574 | \newcommand\class@load@math@font@libertinus{% 575 | \class@set@libertinus@names 576 | \setmathfont{\class@font@name@libertinus@math .otf}% 577 | } 578 | \newcommand\class@load@math@font@lm{% 579 | \setmathfont{latinmodern-math.otf}% 580 | } 581 | \newcommand\class@load@math@font{% 582 | \csname class@load@math@font@\class@math@font\endcsname 583 | } 584 | \class@load@math@font 585 | \class@option@hook{math-font}{\class@load@math@font} 586 | 587 | 588 | % 字号 589 | 590 | \linespread{1.25}\selectfont 591 | 592 | 593 | % \subsection{处理语言} 594 | 595 | \newcommand\class@set@names{% 596 | \ifclass@language@chinese 597 | \ctexset{ 598 | appendixname = {附录}, 599 | contentsname = {目录}, 600 | figurename = {图}, 601 | tablename = {表}, 602 | bibname = {参考文献}, 603 | indexname = {索引}, 604 | autoindent = 2, 605 | }% 606 | \else 607 | \ctexset{ 608 | appendixname = {Appendix}, 609 | contentsname = {Contents}, 610 | figurename = {Fig.}, 611 | tablename = {Table}, 612 | bibname = {References}, 613 | indexname = {Index}, 614 | autoindent = 2, 615 | }% 616 | \fi 617 | } 618 | \class@set@names 619 | \class@option@hook{language}{\class@set@names} 620 | 621 | % 由于 Unicode 的一些标点符号是中西文混用的: 622 | % 所以要根据语言设置正确的字体。 623 | \newcommand\class@setchinese{% 624 | \xeCJKResetPunctClass 625 | } 626 | \newcommand\class@setenglish{% 627 | \xeCJKDeclareCharClass{HalfLeft}{"2018, "201C}% 628 | \xeCJKDeclareCharClass{HalfRight}{% 629 | "00B7, "2019, "201D, "2013, "2014, "2025, "2026, "2E3A% 630 | }% 631 | } 632 | \newcommand\class@setdefaultlanguage{% 633 | \ifclass@language@chinese 634 | \class@setchinese 635 | \else 636 | \class@setenglish 637 | \fi 638 | } 639 | 640 | 641 | % 纸张和页面 642 | 643 | % 使用 \pkg{geometry} 宏包设置纸张和页面。 644 | % 纸张:A4; 645 | % 页面设置:上、下 2.6 cm,左、右 2 cm,页眉 1.7 cm,页脚 1.7 cm。 646 | 647 | \geometry{ 648 | paper = a4paper, 649 | vmargin = 2.6cm, 650 | hmargin = 2cm, 651 | headheight = 0.75cm, 652 | headsep = 0.15cm, 653 | twocolumn = true, 654 | columnsep = 0.75cm, 655 | } 656 | 657 | 658 | % 页眉 659 | 660 | \AtBeginDocument{ 661 | \setcounter{page}{\class@page} 662 | } 663 | 664 | % 使用 \pkg{fancy} 需要先调用 |\pagestyle{fancy}| 再修改 \cs{sectionmark}。 665 | \pagestyle{fancy} 666 | \let\sectionmark\@gobble 667 | \renewcommand\headrulewidth{0.4\p@} 668 | 669 | \newcommand\class@hf@font{\fontsize{9bp}{15bp}\linespread{1}\selectfont} 670 | 671 | \fancypagestyle{plain}{% 672 | \fancyhf{}% 673 | \fancyhead[LO]{\class@hf@font \class@number{} 期}% 674 | \fancyhead[CO]{\class@hf@font \class@format@short@names :\class@title}% 675 | \fancyhead[RO,LE]{\class@hf@font\thepage}% 676 | \fancyhead[CE]{\class@hf@font 计算机学报}% 677 | \fancyhead[RE]{\class@hf@font \class@date@zh@year{\class@publish@date}}% 678 | } 679 | \pagestyle{plain} 680 | 681 | \newcommand\class@format@short@names{% 682 | \let\class@@tmp\@empty 683 | \let\class@@et@al\@empty 684 | \kv@set@family@handler{class@authors}{% 685 | \kvsetkeys{class@author}{##2}% 686 | \ifx\class@@tmp\@empty 687 | \let\class@@tmp\class@@name@main 688 | \class@@name@main 689 | \else 690 | \ifx\class@@et@al\@empty 691 | \let\class@@et@al\class@@name@main 692 | \ifclass@language@chinese 693 | 等% 694 | \else 695 | \space\textit{et al}% 696 | \fi 697 | \fi 698 | \fi 699 | }% 700 | \kvsetkeys@expandafter{class@authors}{\class@authors}% 701 | } 702 | 703 | \fancypagestyle{title}{% 704 | \fancyhf{}% 705 | \fancyhead[L]{% 706 | \class@hf@font 707 | 第 \class@volume{} 卷\quad 第 \class@number{} 期 \\ 708 | \class@date@zh@short{\class@publish@date}% 709 | }% 710 | \fancyhead[C]{% 711 | \class@hf@font 712 | 计算机学报\\ 713 | CHINESE JOURNAL OF COMPUTERS% 714 | }% 715 | \fancyhead[R]{% 716 | \class@hf@font 717 | Vol. \class@volume\quad No. \class@number\\ 718 | \class@date@en@short{\class@publish@date}% 719 | }% 720 | } 721 | 722 | \newcommand\class@format@date[2]{% 723 | \edef\class@@date{#2}% 724 | \def\class@@process@date##1-##2-##3\@nil{% 725 | #1{##1}{##2}{##3}% 726 | }% 727 | \expandafter\class@@process@date\class@@date\@nil 728 | } 729 | \newcommand\class@date@zh@short[1]{% 730 | \def\class@@format##1##2##3{% 731 | ##1 年 \number##2 月% 732 | }% 733 | \class@format@date{\class@@format}{#1}% 734 | } 735 | \newcommand\class@date@zh@year[1]{% 736 | \def\class@@format##1##2##3{##1 年}% 737 | \class@format@date{\class@@format}{#1}% 738 | } 739 | \newcommand\class@short@month[1]{% 740 | \ifcase\number#1\relax 741 | XXX.\or 742 | Jan.\or Feb.\or Mar.\or Apr.\or May\or Jun.\or 743 | Jul.\or Aug.\or Sep.\or Oct.\or Nov.\or Dec.% 744 | \fi 745 | }% 746 | \newcommand\class@date@en[1]{% 747 | \def\class@@format##1##2##3{% 748 | ##3 \class@short@month{##2} ##1% 749 | }% 750 | \class@format@date{\class@@format}{#1}% 751 | } 752 | 753 | \newcommand\class@date@en@short[1]{% 754 | \def\class@@format##1##2##3{% 755 | \class@short@month{##2} ##1% 756 | }% 757 | \class@format@date{\class@@format}{#1}% 758 | } 759 | 760 | 761 | % \subsection{标题} 762 | 763 | \class@define@key{ 764 | title = { 765 | default = {标题}, 766 | }, 767 | title* = { 768 | default = {Title}, 769 | name = title@alt, 770 | }, 771 | short-title = { 772 | name = short@title, 773 | }, 774 | authors = {}, 775 | affiliations = {}, 776 | abstract = { 777 | default = {摘要内容}, 778 | }, 779 | abstract* = { 780 | default = {Abstract content}, 781 | name = abstract@alt, 782 | }, 783 | keywords = {}, 784 | keywords* = { 785 | name = keywords@alt, 786 | }, 787 | clc = { 788 | default = {TP391}, 789 | }, 790 | doi = { 791 | default = {10.11897/SP.J.1016.01.\the\year.\class@five@digits\thepage}, 792 | }, 793 | received-date = { 794 | name = received@date, 795 | default = {\the\year-\two@digits{\month}-\two@digits{\day}}, 796 | }, 797 | revised-date = { 798 | name = revised@date, 799 | default = {\the\year-\two@digits{\month}-\two@digits{\day}}, 800 | }, 801 | grants = {}, 802 | grants* = { 803 | name = grants@alt, 804 | }, 805 | publish-date = { 806 | name = publish@date, 807 | default = {\the\year-\two@digits{\month}-\two@digits{\day}}, 808 | }, 809 | volume = { 810 | default = {43}, 811 | }, 812 | number = { 813 | default = {1}, 814 | }, 815 | page = { 816 | default = {1}, 817 | }, 818 | } 819 | 820 | % 主标题 821 | \renewcommand\maketitle{\par% 822 | \begingroup 823 | % \renewcommand\thefootnote{\@fnsymbol\c@footnote}% 824 | % \def\@makefnmark{\rlap{\@textsuperscript{\normalfont\@thefnmark}}}% 825 | \let\@makefnmark\relax 826 | % \long\def\@makefntext##1{\parindent 1em\noindent 827 | % \hb@xt@1.8em{% 828 | % \hss\@textsuperscript{\normalfont\@thefnmark}}##1}% 829 | \long\def\@makefntext##1{##1}% 830 | \if@twocolumn 831 | \ifnum \col@number=\@ne 832 | \@maketitle 833 | \else 834 | \twocolumn[\@maketitle]% 835 | \fi 836 | \else 837 | \newpage 838 | \global\@topnum\z@ % Prevents figures from going at top of page. 839 | \@maketitle 840 | \fi 841 | % \thispagestyle{plain}\@thanks 842 | \thispagestyle{title}% 843 | \class@title@footnote@main 844 | \endgroup 845 | \setcounter{footnote}{0}% 846 | \global\let\thanks\relax 847 | \global\let\maketitle\maketitlealt 848 | \global\let\@maketitle\relax 849 | \global\let\@thanks\@empty 850 | \global\let\@author\@empty 851 | \global\let\@date\@empty 852 | \global\let\@title\@empty 853 | \global\let\title\relax 854 | \global\let\author\relax 855 | \global\let\date\relax 856 | \global\let\and\relax 857 | } 858 | 859 | % 定义命令用于录入信息。 860 | \def\@maketitle{% 861 | \newpage 862 | \null 863 | \class@make@title@zh 864 | \class@make@title@en 865 | \vskip 18bp% 866 | } 867 | 868 | \def\class@make@title@zh{% 869 | \classsetup{language = chinese}% 870 | \vspace*{20bp}% 871 | \begingroup 872 | \centering 873 | \begingroup 874 | \heiti\zihao{2}\class@title\par 875 | \endgroup 876 | \vskip 10.5bp% 877 | \begingroup 878 | \fangsong\zihao{3}\class@format@authors{main}\par 879 | \endgroup 880 | \vskip 5.7bp% 881 | \begingroup 882 | \zihao{6}\class@format@affiliations{main}\par 883 | \endgroup 884 | \endgroup 885 | \vspace*{7.8bp}% 886 | \begingroup 887 | \zihao{-5}% 888 | {\heiti 摘\quad 要}\quad\class@abstract\par 889 | \begingroup 890 | \hangindent=4em% 891 | 关键词\quad 892 | \class@clist@use{\class@keywords}{;}\par 893 | \endgroup 894 | {\heiti 中图法分类号}\quad\class@clc\hspace{3em}% 895 | {\heiti DOI 号}\quad\doi{\class@doi}\par 896 | \endgroup 897 | } 898 | 899 | \newcommand\class@five@digits[1]{% 900 | \ifnum#1<10 901 | 0000% 902 | \else 903 | \ifnum#1<100 904 | 000% 905 | \else 906 | \ifnum#1<1000 907 | 00% 908 | \else 909 | \ifnum#1<10000 910 | 0% 911 | \fi 912 | \fi 913 | \fi 914 | \fi 915 | \number#1% 916 | } 917 | 918 | \def\class@make@title@en{% 919 | \classsetup{language = english}% 920 | \vspace*{12bp}% 921 | \begingroup 922 | \centering 923 | \begingroup 924 | \bfseries\zihao{4}\class@title@alt\par 925 | \endgroup 926 | \vskip 11bp% 927 | \begingroup 928 | \zihao{5}\class@format@authors{alt}\par 929 | \endgroup 930 | \vskip 9bp% 931 | \begingroup 932 | \zihao{6}\class@format@affiliations{alt}\par 933 | \endgroup 934 | \endgroup 935 | \vspace{5bp}% 936 | \begingroup 937 | \zihao{-5}% 938 | \textbf{Abstract}\quad\class@abstract@alt\par 939 | \begingroup 940 | \hangindent=6.32em% 941 | \textbf{Key words}\quad 942 | \class@clist@use{\class@keywords@alt}{; }\par 943 | \endgroup 944 | \endgroup 945 | } 946 | 947 | % 处理中文姓名格式 948 | \newbox\class@@box 949 | \newcommand\class@format@name@zh[1]{% 950 | \sbox\class@@box{#1}% 951 | \ifdim\wd\class@@box<2.1em\relax 952 | \ifdim\wd\class@@box>1.5em\relax 953 | \begingroup 954 | \def\CJKglue{\hskip 0pt plus 2filll}% 955 | \makebox[3em][l]{#1}% 956 | \endgroup 957 | \else 958 | #1% 959 | \fi 960 | \else 961 | #1% 962 | \fi 963 | } 964 | 965 | \newcommand\class@format@name@en[1]{#1} 966 | 967 | \newcommand\class@clist@use[2]{% 968 | \begingroup 969 | \def\class@@tmp{}% 970 | \def\class@clist@processor##1{% 971 | \ifx\class@@tmp\@empty 972 | \def\class@@tmp{#2}% 973 | \else 974 | #2% 975 | \fi 976 | ##1% 977 | }% 978 | \expandafter\comma@parse\expandafter{#1}{\class@clist@processor}% 979 | \endgroup 980 | } 981 | 982 | \newcommand\class@valid@affiliations{} 983 | \def\class@@tmp@affil{} 984 | \newcounter{class@affil@count} 985 | \kv@set@family@handler{class@affil@number}{% 986 | \expandafter\ifx\csname class@affil@number@#1\endcsname\relax 987 | \stepcounter{class@affil@count}% 988 | \expandafter\xdef\csname class@affil@number@#1\endcsname{% 989 | \the\c@class@affil@count 990 | }% 991 | \g@addto@macro\class@valid@affiliations{#1,}% 992 | \fi 993 | \ifx\class@@tmp@affil\@empty 994 | \def\class@@tmp@affil{1}% 995 | \else 996 | ,% 997 | \fi 998 | \csname class@affil@number@#1\endcsname)% 999 | } 1000 | 1001 | \newcommand\class@format@affil@numbers[1]{% 1002 | % \kvsetkeys@expandafter{class@affil@number}{#1}% 1003 | \def\class@@tmp@affil{}% 1004 | \kvsetkeys@expandafter{class@affil@number}{#1}% 1005 | } 1006 | 1007 | \newif\ifclass@@corresponding 1008 | \kv@define@key{class@author}{name}{\def\class@@name@main{#1}} 1009 | \kv@define@key{class@author}{name*}{\def\class@@name@alt{#1}} 1010 | \kv@define@key{class@author}{affiliations}{\def\class@@affils{#1}} 1011 | \kv@define@key{class@author}{biography}{\def\class@@biography{#1}} 1012 | \kv@define@key{class@author}{biography*}{\def\class@@biography@alt{#1}} 1013 | \kv@define@key{class@author}{email}{\def\class@@email{#1}} 1014 | \kv@define@key{class@author}{corresponding}[false]{% 1015 | \@nameuse{class@@corresponding#1}% 1016 | } 1017 | \kv@define@key{class@author}{phone-number}{\def\class@@phone{#1}} 1018 | 1019 | % 选择 main 或者 alternative 1020 | \newcommand\class@format@authors[1]{% 1021 | \let\class@@tmp\@empty 1022 | \kv@set@family@handler{class@authors}{% 1023 | \kvsetkeys{class@author}{##2}% 1024 | \ifx\class@@tmp\@empty 1025 | \def\class@@tmp{1}% 1026 | \else 1027 | \quad 1028 | \fi 1029 | \ifclass@language@chinese 1030 | \scalebox{0.66}[1]{% 1031 | \class@format@name@zh{\@nameuse{class@@name@#1}}% 1032 | \textsuperscript{\class@format@affil@numbers{\class@@affils}}% 1033 | }% 1034 | \else 1035 | \class@format@name@en{\@nameuse{class@@name@#1}}% 1036 | \textsuperscript{\class@format@affil@numbers{\class@@affils}}% 1037 | \fi 1038 | }% 1039 | \kvsetkeys@expandafter{class@authors}{\class@authors}% 1040 | } 1041 | 1042 | \kv@define@key{class@affiliation}{name}{\def\class@@affil@main{#1}} 1043 | \kv@define@key{class@affiliation}{name*}{\def\class@@affil@alt{#1}} 1044 | 1045 | % 选择 main 或者 alt 1046 | \newcommand\class@format@affiliations[1]{% 1047 | \kv@set@family@handler{class@affiliations}{% 1048 | \kvsetkeys{class@affiliation}{##2}% 1049 | \textsuperscript{\csname class@affil@number@##1\endcsname)}% 1050 | (\@nameuse{class@@affil@#1})\par% 1051 | }% 1052 | \begingroup 1053 | \kvsetkeys@expandafter{class@affiliations}{\class@affiliations}% 1054 | \endgroup 1055 | } 1056 | 1057 | % 标题页的脚注 1058 | \newcommand\class@title@footnote@main{% 1059 | \kv@set@family@handler{class@authors}{% 1060 | \class@@correspondingfalse 1061 | \kvsetkeys{class@author}{##2}% 1062 | \class@@name@main 1063 | \ifclass@@corresponding 1064 | (\textsf{通信作者})% 1065 | \fi 1066 | ,% 1067 | \class@@biography\space 1068 | \ifx\class@@email\@empty\else 1069 | E-mail: \email{\class@@email}. 1070 | \fi 1071 | }% 1072 | \footnotetext{% 1073 | 收稿日期:\class@received@date ;% 1074 | 修改日期:\class@revised@date\quad 1075 | \class@grants 1076 | \kvsetkeys@expandafter{class@authors}{\class@authors} 1077 | }% 1078 | \kv@set@family@handler{class@authors}{% 1079 | \kvsetkeys{class@author}{##2}% 1080 | \kv@break 1081 | }% 1082 | \let\class@@phone\@empty 1083 | \kvsetkeys@expandafter{class@authors}{\class@authors} 1084 | \ifx\class@@phone\@empty\else 1085 | \footnotetext{% 1086 | 第1作者手机号码:\class@@phone, 1087 | E-mail: 1088 | \ifx\class@@email\@empty\else 1089 | \email{\class@@email}% 1090 | \fi 1091 | }% 1092 | \fi 1093 | } 1094 | 1095 | 1096 | % 章节标题 1097 | 1098 | % 用 \pkg{ctex} 的接口设置全部章节标题格式。 1099 | 1100 | % 一级标题:4 号黑体,段前 8 磅,段后 8 磅。 1101 | \ctexset{ 1102 | section = { 1103 | format = \zihao{4}, 1104 | nameformat = \heiti, 1105 | numberformat = \bfseries, 1106 | titleformat = \heiti, 1107 | % fixskip = true, 1108 | beforeskip = 8bp, 1109 | afterskip = 8bp, 1110 | afterindent = true, 1111 | }, 1112 | % 1113 | % 二级标题:5 号黑体,段前 0.25 行,段后 0.25 行。 1114 | subsection = { 1115 | format = \zihao{5}, 1116 | nameformat = \heiti, 1117 | numberformat = \bfseries, 1118 | titleformat = \heiti, 1119 | beforeskip = 2.625bp, 1120 | afterskip = 2.625bp, 1121 | afterindent = true, 1122 | }, 1123 | % 1124 | % 三级节标题:5 号宋体,段前段后 0 磅。 1125 | subsubsection = { 1126 | format = \zihao{5}, 1127 | beforeskip = \z@, 1128 | afterskip = \z@, 1129 | afterindent = true, 1130 | }, 1131 | appendix = { 1132 | name = {\appendixname\space}, 1133 | }, 1134 | } 1135 | 1136 | 1137 | % URL 的字体设为保持原样。 1138 | \urlstyle{same} 1139 | 1140 | % 使用 \pkg{xurl} 宏包的方法,增加 URL 可断行的位置。 1141 | \def\UrlBreaks{% 1142 | \do\/% 1143 | \do\a\do\b\do\c\do\d\do\e\do\f\do\g\do\h\do\i\do\j\do\k\do\l% 1144 | \do\m\do\n\do\o\do\p\do\q\do\r\do\s\do\t\do\u\do\v\do\w\do\x\do\y\do\z% 1145 | \do\A\do\B\do\C\do\D\do\E\do\F\do\G\do\H\do\I\do\J\do\K\do\L% 1146 | \do\M\do\N\do\O\do\P\do\Q\do\R\do\S\do\T\do\U\do\V\do\W\do\X\do\Y\do\Z% 1147 | \do0\do1\do2\do3\do4\do5\do6\do7\do8\do9\do=\do/\do.\do:% 1148 | \do\*\do\-\do\~\do\'\do\"\do\-} 1149 | \Urlmuskip=0mu plus 0.1mu 1150 | 1151 | \DeclareRobustCommand\doi[1]{% 1152 | \edef\class@@url@tmp{#1}% 1153 | \expandafter\@doi\expandafter{\class@@url@tmp}% 1154 | } 1155 | \DeclareUrlCommand\@doi{\urlstyle{rm}} 1156 | \DeclareRobustCommand\email[1]{% 1157 | \edef\class@@url@tmp{#1}% 1158 | \expandafter\@email\expandafter{\class@@url@tmp}% 1159 | } 1160 | \DeclareUrlCommand\@email{\urlstyle{rm}} 1161 | 1162 | 1163 | % \subsection{浮动体} 1164 | 1165 | % \LaTeX{} 对放置浮动体的要求比较强,这里按照 UK TeX FAQ 的建议 1166 | % \footnote{\url{https://texfaq.org/FAQ-floats}} 对其适当放宽。 1167 | \renewcommand\topfraction{.85} 1168 | \renewcommand\bottomfraction{.7} 1169 | \renewcommand\textfraction{.15} 1170 | \renewcommand\floatpagefraction{.66} 1171 | \renewcommand\dbltopfraction{.66} 1172 | \renewcommand\dblfloatpagefraction{.66} 1173 | \setcounter{topnumber}{9} 1174 | \setcounter{bottomnumber}{9} 1175 | \setcounter{totalnumber}{20} 1176 | \setcounter{dbltopnumber}{9} 1177 | 1178 | % 修改默认的浮动体描述符为 |htb|。 1179 | \def\fps@figure{htb} 1180 | \def\fps@table{htb} 1181 | 1182 | % 用 \pkg{caption} 宏包设置图、表的格式: 1183 | 1184 | % 图片说明字体为小 5 号。 1185 | 1186 | % 表号、表题置于表的上方,宋体 10.5 磅居中,单倍行距,段前 6 磅,段后 6 磅, 1187 | % 表号与表题文字之间空一字,表号、表题加粗。 1188 | % 表注左缩进两字,续行悬挂缩进左对齐,两端对齐。 1189 | \setlength{\floatsep}{6bp} 1190 | \setlength{\textfloatsep}{6bp} 1191 | \setlength{\intextsep}{6bp} 1192 | \captionsetup{ 1193 | justification = centerlast, 1194 | font = small, 1195 | labelsep = quad, 1196 | skip = 6bp, 1197 | figureposition = bottom, 1198 | tableposition = top, 1199 | } 1200 | \captionsetup[table]{ 1201 | font = {sf,small}, 1202 | } 1203 | 1204 | 1205 | % \subsection{数学符号} 1206 | 1207 | % 根据中文的数学排印习惯进行设置: 1208 | 1209 | % 省略号一律居中,所以 \cs{ldots} 不再居于底部。 1210 | \ifclass@language@chinese 1211 | \def\mathellipsis{\cdots} 1212 | \fi 1213 | 1214 | % 小于等于号、大于等于号要使用倾斜的字形。 1215 | \protected\def\le{\leqslant} 1216 | \protected\def\ge{\geqslant} 1217 | \AtBeginDocument{% 1218 | \renewcommand\leq{\leqslant}% 1219 | \renewcommand\geq{\geqslant}% 1220 | } 1221 | 1222 | % 积分号的上下限默认置于上下两侧。 1223 | \removenolimits{% 1224 | \int\iint\iiint\iiiint\oint\oiint\oiiint 1225 | \intclockwise\varointclockwise\ointctrclockwise\sumint 1226 | \intbar\intBar\fint\cirfnint\awint\rppolint 1227 | \scpolint\npolint\pointint\sqint\intlarhk\intx 1228 | \intcap\intcup\upint\lowint 1229 | } 1230 | 1231 | % 实部、虚部操作符使用罗马体 $\mathrm{Re}$、$\mathrm{Im}$ 而不是 fraktur 体 1232 | % $\Re$、$\Im$。 1233 | \AtBeginDocument{% 1234 | \renewcommand\Re{\operatorname{Re}}% 1235 | \renewcommand\Im{\operatorname{Im}}% 1236 | } 1237 | 1238 | % 兼容旧的粗体命令:\pkg{bm} 的 \cs{bm} 和 \pkg{amsmath} 的 \cs{boldsymbol}。 1239 | \newcommand\bm{\symbf} 1240 | \renewcommand\boldsymbol{\symbf} 1241 | 1242 | % 兼容 \pkg{amssymb} 中的命令。 1243 | \newcommand\square{\mdlgwhtsquare} 1244 | 1245 | % \subsubsection{数学定理} 1246 | 1247 | \newtheoremstyle{cjc} 1248 | {\z@}{\z@} 1249 | {}{2\ccwd} 1250 | {\bfseries}{.} 1251 | {\ccwd}{} 1252 | \theoremstyle{cjc} 1253 | % 定义新的定理 1254 | \newcommand\class@assertionname{断言} 1255 | \newcommand\class@assumptionname{假设} 1256 | \newcommand\class@axiomname{公理} 1257 | \newcommand\class@corollaryname{推论} 1258 | \newcommand\class@definitionname{定义} 1259 | \newcommand\class@examplename{例} 1260 | \newcommand\class@lemmaname{引理} 1261 | \newcommand\class@proofname{证明} 1262 | \newcommand\class@propositionname{命题} 1263 | \newcommand\class@remarkname{注} 1264 | \newcommand\class@theoremname{定理} 1265 | \newtheorem{theorem} {\class@theoremname} 1266 | \newtheorem{assertion} [theorem]{\class@assertionname} 1267 | \newtheorem{axiom} [theorem]{\class@axiomname} 1268 | \newtheorem{corollary} [theorem]{\class@corollaryname} 1269 | \newtheorem{lemma} [theorem]{\class@lemmaname} 1270 | \newtheorem{proposition}[theorem]{\class@propositionname} 1271 | \newtheorem{assumption} {\class@assumptionname} 1272 | \newtheorem{definition} {\class@definitionname} 1273 | \newtheorem{example} {\class@examplename} 1274 | \newtheorem*{remark} {\class@remarkname} 1275 | % \pkg{amsthm} 单独定义了 proof 环境,这里重新定义以满足格式要求。 1276 | % 原本模仿 \pkg{amsthm} 写成 |\item[\hskip\labelsep\hskip2\ccwd #1\hskip\ccwd]|, 1277 | % 但是却会多出一些间隙。 1278 | \DeclareRobustCommand{\qed}{证毕.} 1279 | \renewenvironment{proof}[1][\proofname]{\par 1280 | \textbf{\proofname}.\quad 1281 | }{% 1282 | \par\raggedleft\qed\par 1283 | } 1284 | 1285 | 1286 | % \subsection{参考文献} 1287 | 1288 | \newcommand\bibstyle@cjc{\bibpunct{[}{]}{,}{s}{,}{\textsuperscript{,}}} 1289 | \citestyle{cjc} 1290 | 1291 | % 参考文献列表格式:宋体 10.5 磅,行距 20 磅,续行缩进两字,左对齐。 1292 | \renewcommand\bibsection{% 1293 | \begingroup 1294 | \ctexset{ 1295 | section = { 1296 | format = \centering\fontsize{10.5bp}{16bp}\linespread{1}\selectfont, 1297 | beforeskip = 16bp, 1298 | afterskip = 16bp, 1299 | }, 1300 | }% 1301 | \section*{\refname}% 1302 | \endgroup 1303 | } 1304 | \renewcommand\bibfont{\fontsize{7.5bp}{14bp}\linespread{1}\selectfont} 1305 | \renewcommand\@biblabel[1]{[#1]\hfill} 1306 | \setlength{\bibsep}{\z@} 1307 | 1308 | 1309 | % 附录 1310 | 1311 | \newenvironment{acknowledgments}{% 1312 | \kaishu\zihao{-5}\noindent 1313 | \textsf{致\quad 谢}\quad 1314 | }{} 1315 | 1316 | \g@addto@macro\appendix{% 1317 | \ctexset{ 1318 | section = { 1319 | format = \zihao{5}, 1320 | beforeskip = \z@, 1321 | afterskip = \z@, 1322 | }, 1323 | }% 1324 | \zihao{-5}% 1325 | } 1326 | 1327 | \newcommand\makebiographies{% 1328 | \kv@set@family@handler{class@authors}{% 1329 | \kvsetkeys{class@author}{##2}% 1330 | \noindent 1331 | \textbf{\class@@name@alt},\space 1332 | \class@@biography@alt\par 1333 | }% 1334 | \begingroup 1335 | \zihao{-5}% 1336 | \par\null\par 1337 | \kvsetkeys@expandafter{class@authors}{\class@authors} 1338 | \endgroup 1339 | } 1340 | 1341 | \newenvironment{background}{% 1342 | \zihao{-5}% 1343 | \par\null\par 1344 | \noindent\textbf{Background}\par 1345 | }{} 1346 | 1347 | 1348 | % 其他宏包的设置 1349 | 1350 | % hyperref 1351 | 1352 | \AtEndOfPackageFile*{hyperref}{ 1353 | \hypersetup{ 1354 | colorlinks = true, 1355 | bookmarksnumbered = true, 1356 | bookmarksopen = true, 1357 | bookmarksopenlevel = 2, 1358 | unicode = true, 1359 | psdextra = true, 1360 | } 1361 | \DeclareRobustCommand\@doi[1]{\href{https://doi.org/#1}{\nolinkurl{#1}}} 1362 | \DeclareRobustCommand\@email[1]{\href{mailto:#1}{\nolinkurl{#1}}} 1363 | % 1364 | % 在 PDF 字符串中去掉换行,以减少 \pkg{hyperref} 的警告信息。 1365 | \pdfstringdefDisableCommands{ 1366 | \let\\\@empty 1367 | \let\hspace\@gobble 1368 | } 1369 | % 1370 | % \pkg{hyperref} 与 \pkg{unicode-math} 存在一些兼容性问题,见 1371 | % \href{https://github.com/ustctug/ustcthesis/issues/223}{ 1372 | % ustctug/ustcthesis\#223} 和 1373 | % \href{https://github.com/ho-tex/hyperref/pull/90}{ho-tex/hyperref\#90}。 1374 | \@ifpackagelater{hyperref}{2019/04/27}{}{% 1375 | \g@addto@macro\psdmapshortnames{\let\mu\textmugreek}% 1376 | } 1377 | % 1378 | % 设置中文的 \cs{autoref}。 1379 | % \footnote{\url{https://tex.stackexchange.com/a/66150/82731}} 1380 | \ifclass@language@chinese 1381 | \def\equationautorefname~#1\null{公式~(#1)\null} 1382 | \def\footnoteautorefname{脚注} 1383 | \def\itemautorefname~#1\null{第~#1 项\null} 1384 | \def\figureautorefname{图} 1385 | \def\tableautorefname{表} 1386 | \def\appendixautorefname{附录} 1387 | \def\sectionautorefname~#1\null{第~#1 节\null} 1388 | \def\subsectionautorefname~#1\null{第~#1 节\null} 1389 | \def\subsubsectionautorefname~#1\null{第~#1 节\null} 1390 | \def\theoremautorefname{定理} 1391 | \def\HyRef@autopageref#1{\hyperref[{#1}]{第~\pageref*{#1} 页}} 1392 | \fi 1393 | } 1394 | 1395 | 1396 | % siunitx 宏包 1397 | 1398 | \AtEndOfPackageFile*{siunitx}{ 1399 | \sisetup{ 1400 | group-minimum-digits = 4, 1401 | separate-uncertainty = true, 1402 | inter-unit-product = \ensuremath{{}\cdot{}}, 1403 | } 1404 | \ifclass@language@chinese 1405 | \sisetup{ 1406 | list-final-separator = { 和 }, 1407 | list-pair-separator = { 和 }, 1408 | range-phrase = {~}, 1409 | } 1410 | \fi 1411 | } 1412 | 1413 | 1414 | % algorithmic 宏包 1415 | 1416 | \AtEndOfPackageFile*{algorithmic}{ 1417 | \renewcommand{\algorithmicrequire}{输入:\ignorespaces} 1418 | \renewcommand{\algorithmicensure}{输出:\ignorespaces} 1419 | \renewcommand{\algorithmicend}{\textbf{END}} 1420 | \renewcommand{\algorithmicif}{\textbf{IF}} 1421 | \renewcommand{\algorithmicthen}{\textbf{THEN}} 1422 | \renewcommand{\algorithmicelse}{\textbf{ELSE}} 1423 | \renewcommand{\algorithmicelsif}{\algorithmicelse\ \algorithmicif} 1424 | \renewcommand{\algorithmicendif}{\algorithmicend\ \algorithmicif} 1425 | \renewcommand{\algorithmicfor}{\textbf{FOR}} 1426 | \renewcommand{\algorithmicforall}{\textbf{FOR ALL}} 1427 | \renewcommand{\algorithmicdo}{\textbf{DO}} 1428 | \renewcommand{\algorithmicendfor}{\algorithmicend\ \algorithmicfor} 1429 | \renewcommand{\algorithmicwhile}{\textbf{WHILE}} 1430 | \renewcommand{\algorithmicendwhile}{\algorithmicend\ \algorithmicwhile} 1431 | \renewcommand{\algorithmicloop}{\textbf{LOOP}} 1432 | \renewcommand{\algorithmicendloop}{\algorithmicend\ \algorithmicloop} 1433 | \renewcommand{\algorithmicrepeat}{\textbf{REPEAT}} 1434 | \renewcommand{\algorithmicuntil}{\textbf{UNTIL}} 1435 | \renewcommand{\algorithmicprint}{\textbf{PRINT}} 1436 | \renewcommand{\algorithmicreturn}{\textbf{RETURN}} 1437 | \renewcommand{\algorithmictrue}{\textbf{TRUE}} 1438 | \renewcommand{\algorithmicfalse}{\textbf{FALSE}} 1439 | } 1440 | 1441 | % \PassOptionsToPackage{plaintop}{algorithm} 1442 | \AtEndOfPackageFile*{algorithm}{ 1443 | \def\@fs@cfont{\sffamily} 1444 | \renewcommand\floatc@ruled[2]{{\@fs@cfont #1}\quad#2\par} 1445 | \restylefloat{algorithm} 1446 | \floatname{algorithm}{算法} 1447 | \newfloat{procedure}{htb}{loa}{} 1448 | \floatname{procedure}{过程} 1449 | } 1450 | -------------------------------------------------------------------------------- /example.bib: -------------------------------------------------------------------------------- 1 | @article{article_example, 2 | author = {作者}, 3 | title = {题目}, 4 | journal = {刊名(全称)}, 5 | year = {年}, 6 | number = {卷}, 7 | volume = {期}, 8 | pages = {页码}, 9 | } 10 | 11 | @inproceedings{inproceedings_example, 12 | author = {作者}, 13 | title = {文章题目}, 14 | booktitle = {Proceedings of the ... (会议名称)}, 15 | address = {会议召开城市, 会议召开城市所在国家}, 16 | year = {年}, 17 | pages = {页码}, 18 | } 19 | 20 | @incollection{incollection_example, 21 | author = {作者}, 22 | title = {文章题目}, 23 | editor = {编者}, 24 | booktitle = {文集标题}, 25 | address = {出版地}, 26 | publisher = {出版社}, 27 | year = {出版年}, 28 | pages = {页码}, 29 | } 30 | 31 | @book{book_example, 32 | author = {作者}, 33 | title = {书名}, 34 | edition = {版次(初版不写)}, 35 | address = {出版社地点}, 36 | publisher = {出版社}, 37 | year = {出版年}, 38 | } 39 | 40 | @phdthesis{phdthesis_example, 41 | author = {作者}, 42 | title = {文章题目}, 43 | school = {单位名称}, 44 | address = {单位地点}, 45 | year = {年}, 46 | } 47 | 48 | @mastersthesis{mastersthesis_example, 49 | author = {作者}, 50 | title = {文章题目}, 51 | school = {单位名称}, 52 | address = {单位地点}, 53 | year = {年}, 54 | } 55 | 56 | @techreport{techreport_example, 57 | author = {作者}, 58 | title = {文章题目}, 59 | address = {单位地点}, 60 | institution = {单位}, 61 | number = {报告编号}, 62 | year = {年}, 63 | } 64 | 65 | @patent{patent_example, 66 | author = {专利拥有人}, 67 | title = {专利名称, 专利授权国家}, 68 | date = {专利授权日期}, 69 | } 70 | -------------------------------------------------------------------------------- /example.tex: -------------------------------------------------------------------------------- 1 | % !TeX encoding = UTF-8 2 | % !TeX program = xelatex 3 | % !TeX spellcheck = en_US 4 | 5 | \documentclass{cjc} 6 | 7 | \usepackage{booktabs} 8 | \usepackage{algorithm} 9 | \usepackage{algorithmic} 10 | \usepackage{siunitx} 11 | 12 | \classsetup{ 13 | % 配置里面不要出现空行 14 | title = {题目}, 15 | title* = {Title}, 16 | authors = { 17 | author1 = { 18 | name = {作者名}, 19 | name* = {NAME Name-Name}, 20 | affiliations = {aff1}, 21 | biography = {性别,xxxx年生,学位(或目前学历),职称,是/否计算机学会(CCF)会员(提供会员号),主要研究领域为*****、****.}, 22 | % 英文作者介绍内容包括:出生年, 学位(或目前学历), 职称, 主要研究领域(与中文作者介绍中的研究方向一致). 23 | biography* = {Ph.D., asociate profesor. His/her research interests include ***, ***, and ***.}, 24 | email = {**************}, 25 | phone-number = {……}, % 第1作者手机号码(投稿时必须提供,以便紧急联系,发表时会删除) 26 | }, 27 | author2 = { 28 | name = {作者名}, 29 | name* = {NAME Name}, 30 | affiliations = {aff2, aff3}, 31 | biography = {性别,xxxx年生,学位(或目前学历),职称,是/否计算机学会(CCF)会员(提供会员号),主要研究领域为*****、****.}, 32 | biography* = {英文作者介绍内容包括:出生年, 学位(或目前学历), 职称, 主要研究领域(与中文作者介绍中的研究方向一致).}, 33 | email = {**************}, 34 | }, 35 | author3 = { 36 | name = {作者}, 37 | name* = {NAME Name-Name}, 38 | affiliations = {aff3}, 39 | biography = {性别,xxxx年生,学位(或目前学历),职称,是/否计算机学会(CCF)会员(提供会员号),主要研究领域为*****、****.}, 40 | biography* = {英文作者介绍内容包括:出生年, 学位(或目前学历), 职称, 主要研究领域(与中文作者介绍中的研究方向一致).}, 41 | email = {**************}, 42 | % 通讯作者 43 | corresponding = true, 44 | }, 45 | }, 46 | % 论文定稿后,作者署名、单位无特殊情况不能变更。若变更,须提交签章申请, 47 | % 国家名为中国可以不写,省会城市不写省的名称,其他国家必须写国家名。 48 | affiliations = { 49 | aff1 = { 50 | name = {单位全名\ 部门(系)全名, 市(或直辖市) 国家名\ 邮政编码}, 51 | name* = {Department of ****, University, City ZipCode, Country}, 52 | }, 53 | aff2 = { 54 | name = {单位全名\ 部门(系)全名, 市(或直辖市) 国家名\ 邮政编码}, 55 | name* = {Department of ****, University, City ZipCode}, 56 | }, 57 | aff3 = { 58 | name = {单位全名\ 部门(系)全名, 市(或直辖市) 国家名\ 邮政编码}, 59 | name* = {Department of ****, University, City ZipCode, Country}, 60 | }, 61 | }, 62 | abstract = { 63 | 中文摘要内容置于此处(英文摘要中要有这些内容),字体为小5号宋体。 64 | 摘要贡献部分,要有数据支持,不要出现“...大大提高”、“...显著改善”等描述, 65 | 正确的描述是“比…提高 X\%”、 “在…上改善 X\%”。 66 | }, 67 | abstract* = {Abstract (500英文单词,内容包含中文摘要的内容). }, 68 | % 中文关键字与英文关键字对应且一致,应有5-7个关键词,不要用英文缩写 69 | keywords = {关键词, 关键词, 关键词, 关键词}, 70 | keywords* = {key word, key word, key word, key word}, 71 | grants = { 72 | 本课题得到……基金中文完整名称(No.项目号)、 73 | ……基金中文完整名称(No.项目号)、 74 | ……基金中文完整名称(No.项目号)资助. 75 | }, 76 | % clc = {TP393}, 77 | % doi = {10.11897/SP.J.1016.2020.00001}, % 投稿时不提供DOI号 78 | % received-date = {2019-08-10}, % 收稿日期 79 | % revised-date = {2019-10-19}, % 最终修改稿收到日期,投稿时不填写此项 80 | % publish-date = {2020-03-16}, % 出版日期 81 | % page = 512, 82 | } 83 | 84 | \newcommand\dif{\mathop{}\!\mathrm{d}} 85 | 86 | % hyperref 总是在导言区的最后加载 87 | \usepackage{hyperref} 88 | 89 | 90 | 91 | \begin{document} 92 | 93 | \maketitle 94 | 95 | 96 | \section{一级标题} 97 | 98 | 对投稿的基本要求: 99 | 100 | (1)研究性论文主体应包括引言(重点论述研究的科学问题、意义、解决思路、价值、 101 | 贡献等)、相关工作(为与引言部分独立的一个章节)、主要成果论述、关键实现技术、 102 | 验证(对比实验或理论证明)、结论(结束语)等内容;系统实现或实验应有关键点的详细论述,以便读者能够重复实现论文所述成果。实验应有具体的实验环境设置、全面细致的数据对比分析。 103 | 104 | (2)综述应包括引言、问题与挑战、研究现状分析、未来研究方向、结论等内容。以分析、对比为主,避免堆砌文献或一般性介绍、叙述。 105 | 106 | (3)定理证明、公式推导、大篇幅的数学论述、原始数据,放到论文最后的附录中。 107 | 108 | 稿件提交时的基本要求: 109 | 110 | (1)本模板中要求的各项内容正确齐全,无遗漏; 111 | 112 | (2)语句通顺,无中文、英文语法错误,易于阅读理解,符号使用正确,图、表清晰无误; 113 | 114 | (3)在学术、技术上,论文内容正确无误,各项内容确定。 115 | 116 | \subsection{二级标题} 117 | 118 | \subsubsection{三级标题} 119 | 120 | 正文部分, 字体为5号宋体。 121 | 122 | 文件排版采用 TeX Live。 123 | 124 | 正文文字要求语句通顺,无语法错误,结构合理,条理清楚,不影响审稿人、读者阅读理解全文内容。以下几类问题请作者们特别注意: 125 | 126 | 1)文章题目应明确反映文章的思想和方法;文字流畅,表述清楚; 127 | 128 | 2)中文文字、英文表达无语法错误; 129 | 130 | 3)公式中无符号、表达式的疏漏,没有同一个符号表示两种意思的情况; 131 | 132 | 4)数学中使用的符号、函数名用斜体; 133 | 134 | 5)使用的量符合法定计量单位标准; 135 | 136 | 6)矢量为黑体,标量为白体; 137 | 138 | 7)变量或表示变化的量用斜体; 139 | 140 | 8)图表规范,量、线、序无误,位置正确(图表必须在正文中有所表述后出现,即…如图1所示)(注意纵、横坐标应有坐标名称和刻度值)。 141 | 142 | 9)列出的参考文献必须在文中按顺序引用,即参考文献顺序与引用顺序一致,各项信息齐全(格式见参考文献部分); 143 | 144 | 10)首次出现的缩写需写明全称,首次出现的符号需作出解释。 145 | 146 | 11)图的图例说明、坐标说明全部用中文或量符号。 147 | 148 | 12)图应为矢量图。 149 | 150 | 13)表中表头文字采用中文。 151 | 152 | 14)公式尺寸: 153 | 154 | 标准:10.5磅 155 | 156 | 下标/上标:5.8磅 157 | 158 | 次下标/上标:4.5磅 159 | 160 | 符号:16磅 161 | 162 | 次符号:10.5磅 163 | 164 | 15)组合单位采用标准格式,如:“pJ/bit/m4”应为“\si{pJ/(bit.m^4)}” 165 | 166 | 167 | \begin{theorem} 168 | 定理内容。 169 | “定义”、“假设”、“公理”、“引理”等的排版格式与此相同,详细定理证明、公式可放在附录中。 170 | \end{theorem} 171 | 172 | \begin{proof} 173 | 证明过程. 174 | \end{proof} 175 | 176 | \begin{figure}[htb] 177 | \centering 178 | \includegraphics[width=\linewidth]{example-fig.pdf} 179 | \caption{图片说明 *字体为小 5 号,图片应为黑白图,图中的子图要有子图说明*} 180 | \end{figure} 181 | 182 | \begin{table}[htb] 183 | \centering 184 | \caption{表说明} 185 | \small 186 | \begin{tabular}{cc} 187 | \toprule 188 | 示例表格 & 第一行为表头,表头要有内容 \\ 189 | \midrule 190 | & \\ 191 | \midrule 192 | & \\ 193 | \bottomrule 194 | \end{tabular} 195 | \end{table} 196 | 197 | \begin{procedure} 198 | \caption{过程名称} 199 | \small 200 | \begin{algorithmic} 201 | \REQUIRE 202 | \ENSURE 203 | \STATE \COMMENT{《计算机学报》的方法过程描述字体为小5号宋体,IF 、THEN等伪代码关键词全部用大写字母,变量和函数名称用斜体} 204 | \end{algorithmic} 205 | \end{procedure} 206 | 207 | \begin{algorithm} 208 | \caption{算法名称} 209 | \small 210 | \begin{algorithmic} 211 | \REQUIRE $n \geq 0 \vee x \neq 0$ 212 | \ENSURE $y = x^n$ 213 | \STATE $y \leftarrow 1$ 214 | \IF{$n < 0$} 215 | \STATE $X \leftarrow 1 / x$ 216 | \STATE $N \leftarrow -n$ 217 | \ELSE 218 | \STATE $X \leftarrow x$ 219 | \STATE $N \leftarrow n$ 220 | \ENDIF 221 | \WHILE{$N \neq 0$} 222 | \IF{$N$ is even} 223 | \STATE $X \leftarrow X \times X$ 224 | \STATE $N \leftarrow N / 2$ 225 | \ELSE[$N$ is odd] 226 | \STATE $y \leftarrow y \times X$ 227 | \STATE $N \leftarrow N - 1$ 228 | \ENDIF 229 | \ENDWHILE 230 | \end{algorithmic} 231 | \end{algorithm} 232 | 233 | 234 | 235 | \begin{acknowledgments} 236 | 致谢内容。 237 | \end{acknowledgments} 238 | 239 | 240 | \nocite{*} 241 | 242 | \bibliographystyle{cjc} 243 | \bibliography{example} 244 | 245 | 246 | \newpage 247 | 248 | \appendix 249 | 250 | \section{} 251 | 252 | 附录内容置于此处,字体为小5号宋体。附录内容包括:详细的定理证明、公式推导、原始数据等 253 | 254 | 255 | \makebiographies 256 | 257 | 258 | \begin{background} 259 | *论文背景介绍为英文,字体为小5号Times New Roman体* 260 | 261 | 论文后面为400单词左右的英文背景介绍。介绍的内容包括: 262 | 263 | 本文研究的问题属于哪一个领域的什么问题。该类问题目前国际上解决到什么程度。 264 | 265 | 本文将问题解决到什么程度。 266 | 267 | 课题所属的项目。 268 | 269 | 项目的意义。 270 | 271 | 本研究群体以往在这个方向上的研究成果。 272 | 273 | 本文的成果是解决大课题中的哪一部分,如果涉及863/973以及其项目、基金、研究计划,注意这些项目的英文名称应书写正确。 274 | \end{background} 275 | 276 | \end{document} 277 | -------------------------------------------------------------------------------- /latexmkrc: -------------------------------------------------------------------------------- 1 | $pdf_mode = 5; 2 | $go_mode = 1; 3 | 4 | $pdflatex = "pdflatex -file-line-error -halt-on-error -interaction=nonstopmode -synctex=1 %O %S"; 5 | $xelatex = "xelatex -file-line-error -halt-on-error -interaction=nonstopmode -no-pdf -synctex=1 %O %S"; 6 | $xdvipdfmx = "xdvipdfmx -q -E -o %D %O %S"; 7 | 8 | $bibtex_use = 1.5; 9 | 10 | $clean_ext = "hd synctex.gz xdv"; 11 | 12 | $makeindex = "makeindex -s gind.ist %O -o %D %S"; 13 | add_cus_dep('glo', 'gls', 0, 'glo2gls'); 14 | sub glo2gls { 15 | system("makeindex -s gglo.ist -o \"$_[0].gls\" \"$_[0].glo\""); 16 | } 17 | push @generated_exts, "glo", "gls"; 18 | --------------------------------------------------------------------------------