├── README.md ├── ZKSpace-a-Full-Featured-Layer2-Protocol-based-on-ZK-Rollups.pdf ├── figure ├── .DS_Store ├── Untitled clipping.textClipping ├── arch.png ├── create_liquidity.png ├── deposit.png ├── remove_liquidity.png ├── state.png ├── swap.png ├── transfer.png ├── withdraw.png └── withdraw_liquidity.png ├── template ├── IEEEabrv.bib ├── IEEEtran.bst ├── IEEEtran.cls ├── llncs.cls └── splncs04.bst ├── zks_economy_whitepaper_cn.pdf ├── zks_economy_whitepaper_en.pdf ├── zkswap.bib ├── zkswap_cn.pdf ├── zkswap_cn.tex ├── zkswap_en.pdf ├── zkswap_en.tex ├── zkswap_v2_cn.pdf └── zkswap_v2_en.pdf /README.md: -------------------------------------------------------------------------------- 1 | # zkswap-whitepaper 2 | 3 | Since 2019, the blockchain industry has undergone breathtaking changes. Decentralized finance -- DeFi -- continues to grow at an exponential rate. The Total Value Locked in different DeFi protocols has exceeded 10 billion U.S. dollars. With the continuous development of numerous on-chain assets and off-chain assets going on-chain, we believe that the Total Value Locked in DeFi protocols will soon exceed 100 billion U.S. dollars. These on-chain assets require fast, frictionless, trust-free, and real-time exchange services, which has led to the rise of new decentralized exchange(DEX) protocols such as [Uniswap](https://uniswap.org/docs/v2). 4 | 5 | Although the new DEX model spearheaded by Uniswap has achieved significant development, it still has obvious drawbacks. First, the high gas fee of dozens of dollars per transaction hinders new users to entry; second, every transaction and every execution needs to wait for at least one block to confirm, which gives an unsatisfactory experience; and third, subject to the limiting TPS of Ethereum, Uniswap has a clear bottleneck in transaction numbers and transaction capacity per second. Those drawbacks are not unique on Uniswap. They are common issues faced by all DEXes. 6 | 7 | [ZK-Rollup](https://docs.ethhub.io/ethereum-roadmap/layer-2-scaling/zk-rollups/) is a new type of Layer-2 scalability solution. Compared with other Layer-2 scalability solutions such as Plasma, ZK-Rollup has considerable advantages in terms of security, cost, TPS, and usability. It is especially suitable for building a Layer-2 decentralized exchange. 8 | 9 | [ZKSwap](https://zkswap.app/) (a ZK-Rollups based Swap protocol) is a brand-new exchange protocol based on ZK-Rollups technology. Through Zk-Rollups technology, all ERC20 tokens are transferred to Layer2, and the consistent state of Layer1 and Layer2 is guaranteed based on continuously generated zero-knowledge proofs. This solution allows all exchanges to execute on Layer 2, achieving real-time swap with zero gas fees, unlimited scalability, removing the constraint from the Ethereum's TPS, and block confirmation time. The user no longer has to wait for the one-block confirmation time for each transaction. ZKSwap enables a DEX to provide the smooth user experience of a centralized exchange(CEX) while allowing the users to have full custody over their funds. We believe that ZKSwap is the future form of trading. It will trigger a significant evolution of all existing DEX and CEX. 10 | 11 | At present, the ZKSwap team has finished most of the development work. We will release the ZKSwap exchange protocol in early October. In the future, we will promote the DEX exchange standard on Layer-2, so that all existing DEXes can seamlessly access and use the ZKSwap exchange protocol. 12 | 13 | -------------------------------------------------------------------------------- /ZKSpace-a-Full-Featured-Layer2-Protocol-based-on-ZK-Rollups.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/ZKSpace-a-Full-Featured-Layer2-Protocol-based-on-ZK-Rollups.pdf -------------------------------------------------------------------------------- /figure/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/figure/.DS_Store -------------------------------------------------------------------------------- /figure/Untitled clipping.textClipping: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/figure/Untitled clipping.textClipping -------------------------------------------------------------------------------- /figure/arch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/figure/arch.png -------------------------------------------------------------------------------- /figure/create_liquidity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/figure/create_liquidity.png -------------------------------------------------------------------------------- /figure/deposit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/figure/deposit.png -------------------------------------------------------------------------------- /figure/remove_liquidity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/figure/remove_liquidity.png -------------------------------------------------------------------------------- /figure/state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/figure/state.png -------------------------------------------------------------------------------- /figure/swap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/figure/swap.png -------------------------------------------------------------------------------- /figure/transfer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/figure/transfer.png -------------------------------------------------------------------------------- /figure/withdraw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/figure/withdraw.png -------------------------------------------------------------------------------- /figure/withdraw_liquidity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/figure/withdraw_liquidity.png -------------------------------------------------------------------------------- /template/IEEEabrv.bib: -------------------------------------------------------------------------------- 1 | 2 | IEEEabrv.bib 3 | V1.12 (2007/01/11) 4 | Copyright (c) 2002-2007 by Michael Shell 5 | See: http://www.michaelshell.org/ 6 | for current contact information. 7 | 8 | BibTeX bibliography string definitions of the ABBREVIATED titles of 9 | IEEE journals and magazines and online publications. 10 | 11 | This file is designed for bibliography styles that require 12 | abbreviated titles and is not for use in bibliographies that 13 | require full-length titles. 14 | 15 | Support sites: 16 | http://www.michaelshell.org/tex/ieeetran/ 17 | http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/ 18 | and/or 19 | http://www.ieee.org/ 20 | 21 | Special thanks to Laura Hyslop and ken Rawson of IEEE for their help 22 | in obtaining the information needed to compile this file. Also, 23 | Volker Kuhlmann and Moritz Borgmann kindly provided some corrections 24 | and additions. 25 | 26 | ************************************************************************* 27 | Legal Notice: 28 | This code is offered as-is without any warranty either expressed or 29 | implied; without even the implied warranty of MERCHANTABILITY or 30 | FITNESS FOR A PARTICULAR PURPOSE! 31 | User assumes all risk. 32 | In no event shall IEEE or any contributor to this code be liable for 33 | any damages or losses, including, but not limited to, incidental, 34 | consequential, or any other damages, resulting from the use or misuse 35 | of any information contained here. 36 | 37 | All comments are the opinions of their respective authors and are not 38 | necessarily endorsed by the IEEE. 39 | 40 | This work is distributed under the LaTeX Project Public License (LPPL) 41 | ( http://www.latex-project.org/ ) version 1.3, and may be freely used, 42 | distributed and modified. A copy of the LPPL, version 1.3, is included 43 | in the base LaTeX documentation of all distributions of LaTeX released 44 | 2003/12/01 or later. 45 | Retain all contribution notices and credits. 46 | ** Modified files should be clearly indicated as such, including ** 47 | ** renaming them and changing author support contact information. ** 48 | 49 | File list of work: IEEEabrv.bib, IEEEfull.bib, IEEEexample.bib, 50 | IEEEtran.bst, IEEEtranS.bst, IEEEtranSA.bst, 51 | IEEEtranN.bst, IEEEtranSN.bst, IEEEtran_bst_HOWTO.pdf 52 | ************************************************************************* 53 | 54 | 55 | USAGE: 56 | 57 | \bibliographystyle{mybstfile} 58 | \bibliography{IEEEabrv,mybibfile} 59 | 60 | where the IEEE titles in the .bib database entries use the strings 61 | defined here. e.g., 62 | 63 | 64 | journal = IEEE_J_AC, 65 | 66 | 67 | to yield "{IEEE} Trans. Automat. Contr." 68 | 69 | 70 | IEEE uses abbreviated journal titles in their bibliographies - 71 | this file is suitable for work that is to be submitted to the IEEE. 72 | 73 | 74 | For work that requires full-length titles, you should use the full 75 | titles provided in the companion file, IEEEfull.bib. 76 | 77 | 78 | ** NOTES ** 79 | 80 | 1. Journals have been grouped according to subject in order to make it 81 | easier to locate and extract the definitions for related journals - 82 | as most works use references that are confined to a single topic. 83 | Magazines are listed in straight alphabetical order. 84 | 85 | 2. String names are closely based on IEEE's own internal acronyms. 86 | 87 | 3. Abbreviations follow IEEE's style. 88 | 89 | 4. Older, out-of-print IEEE titles are included (but not including titles 90 | dating prior to IEEE's formation from the IRE and AIEE in 1963). 91 | 92 | 5. The following NEW/current journal definitions have been disabled because 93 | their abbreviations have not yet been verified: 94 | 95 | STRING{IEEE_J_CBB = "{IEEE/ACM} Trans. Comput. Biology Bioinformatics"} 96 | STRING{IEEE_J_CJECE = "Canadian J. Elect. Comput. Eng."} 97 | STRING{IEEE_J_DSC = "{IEEE} Trans. Dependable Secure Comput."} 98 | STRING{IEEE_O_DSO = "{IEEE} Distrib. Syst. Online"} 99 | 100 | 6. The following OLD journal definitions have been disabled because 101 | their abbreviations have not yet been found/verified: 102 | 103 | STRING{IEEE_J_BCTV = "{IEEE} Trans. Broadcast Television Receivers"} 104 | STRING{IEEE_J_EWS = "{IEEE} Trans. Eng. Writing Speech"} 105 | 106 | If you know what the proper abbreviation is for a string in #5 or #6 above, 107 | email me and I will correct them in the next release. 108 | 109 | 110 | 111 | 112 | 113 | IEEE Journals 114 | 115 | 116 | 117 | aerospace and military 118 | @STRING{IEEE_J_AES = "{IEEE} Trans. Aerosp. Electron. Syst."} 119 | @STRING{IEEE_J_ANE = "{IEEE} Trans. Aerosp. Navig. Electron."} 120 | @STRING{IEEE_J_ANNE = "{IEEE} Trans. Aeronaut. Navig. Electron."} 121 | @STRING{IEEE_J_AS = "{IEEE} Trans. Aerosp."} 122 | @STRING{IEEE_J_AIRE = "{IEEE} Trans. Airborne Electron."} 123 | @STRING{IEEE_J_MIL = "{IEEE} Trans. Mil. Electron."} 124 | 125 | 126 | 127 | autos, transportation and vehicles (non-aerospace) 128 | @STRING{IEEE_J_ITS = "{IEEE} Trans. Intell. Transp. Syst."} 129 | @STRING{IEEE_J_VT = "{IEEE} Trans. Veh. Technol."} 130 | @STRING{IEEE_J_VC = "{IEEE} Trans. Veh. Commun."} 131 | 132 | 133 | 134 | circuits, signals, systems, audio and controls 135 | @STRING{IEEE_J_SPL = "{IEEE} Signal Process. Lett."} 136 | @STRING{IEEE_J_ASSP = "{IEEE} Trans. Acoust., Speech, Signal Process."} 137 | @STRING{IEEE_J_AU = "{IEEE} Trans. Audio"} 138 | @STRING{IEEE_J_AUEA = "{IEEE} Trans. Audio Electroacoust."} 139 | @STRING{IEEE_J_AC = "{IEEE} Trans. Autom. Control"} 140 | @STRING{IEEE_J_CAS = "{IEEE} Trans. Circuits Syst."} 141 | @STRING{IEEE_J_CASVT = "{IEEE} Trans. Circuits Syst. Video Technol."} 142 | @STRING{IEEE_J_CASI = "{IEEE} Trans. Circuits Syst. {I}"} 143 | @STRING{IEEE_J_CASII = "{IEEE} Trans. Circuits Syst. {II}"} 144 | in 2004 CASI and CASII renamed part title to CASI_RP and CASII_EB, respectively. 145 | @STRING{IEEE_J_CASI_RP = "{IEEE} Trans. Circuits Syst. {I}"} 146 | @STRING{IEEE_J_CASII_EB = "{IEEE} Trans. Circuits Syst. {II}"} 147 | @STRING{IEEE_J_CT = "{IEEE} Trans. Circuit Theory"} 148 | @STRING{IEEE_J_CST = "{IEEE} Trans. Control Syst. Technol."} 149 | @STRING{IEEE_J_SP = "{IEEE} Trans. Signal Process."} 150 | @STRING{IEEE_J_SU = "{IEEE} Trans. Sonics Ultrason."} 151 | @STRING{IEEE_J_SAP = "{IEEE} Trans. Speech Audio Process."} 152 | @STRING{IEEE_J_UE = "{IEEE} Trans. Ultrason. Eng."} 153 | @STRING{IEEE_J_UFFC = "{IEEE} Trans. Ultrason., Ferroelectr., Freq. Control"} 154 | 155 | 156 | 157 | communications 158 | @STRING{IEEE_J_COML = "{IEEE} Commun. Lett."} 159 | @STRING{IEEE_J_JSAC = "{IEEE} J. Sel. Areas Commun."} 160 | @STRING{IEEE_J_COM = "{IEEE} Trans. Commun."} 161 | @STRING{IEEE_J_COMT = "{IEEE} Trans. Commun. Technol."} 162 | @STRING{IEEE_J_WCOM = "{IEEE} Trans. Wireless Commun."} 163 | 164 | 165 | 166 | components, packaging and manufacturing 167 | @STRING{IEEE_J_ADVP = "{IEEE} Trans. Adv. Packag."} 168 | @STRING{IEEE_J_CHMT = "{IEEE} Trans. Compon., Hybrids, Manuf. Technol."} 169 | @STRING{IEEE_J_CPMTA = "{IEEE} Trans. Compon., Packag., Manuf. Technol. {A}"} 170 | @STRING{IEEE_J_CPMTB = "{IEEE} Trans. Compon., Packag., Manuf. Technol. {B}"} 171 | @STRING{IEEE_J_CPMTC = "{IEEE} Trans. Compon., Packag., Manuf. Technol. {C}"} 172 | @STRING{IEEE_J_CAPT = "{IEEE} Trans. Compon. Packag. Technol."} 173 | @STRING{IEEE_J_CAPTS = "{IEEE} Trans. Compon. Packag. Technol."} 174 | @STRING{IEEE_J_CPART = "{IEEE} Trans. Compon. Parts"} 175 | @STRING{IEEE_J_EPM = "{IEEE} Trans. Electron. Packag. Manuf."} 176 | @STRING{IEEE_J_MFT = "{IEEE} Trans. Manuf. Technol."} 177 | @STRING{IEEE_J_PHP = "{IEEE} Trans. Parts, Hybrids, Packag."} 178 | @STRING{IEEE_J_PMP = "{IEEE} Trans. Parts, Mater., Packag."} 179 | 180 | 181 | 182 | CAD 183 | @STRING{IEEE_J_TCAD = "{IEEE} J. Technol. Comput. Aided Design"} 184 | @STRING{IEEE_J_CAD = "{IEEE} Trans. Comput.-Aided Design Integr. Circuits Syst."} 185 | 186 | 187 | 188 | coding, data, information, knowledge 189 | @STRING{IEEE_J_IT = "{IEEE} Trans. Inf. Theory"} 190 | @STRING{IEEE_J_KDE = "{IEEE} Trans. Knowl. Data Eng."} 191 | 192 | 193 | 194 | computers, computation, networking and software 195 | @STRING{IEEE_J_C = "{IEEE} Trans. Comput."} 196 | @STRING{IEEE_J_CAL = "{IEEE} Comput. Archit. Lett."} 197 | disabled till definition is verified 198 | STRING{IEEE_J_DSC = "{IEEE} Trans. Dependable Secure Comput."} 199 | @STRING{IEEE_J_ECOMP = "{IEEE} Trans. Electron. Comput."} 200 | @STRING{IEEE_J_EVC = "{IEEE} Trans. Evol. Comput."} 201 | @STRING{IEEE_J_FUZZ = "{IEEE} Trans. Fuzzy Syst."} 202 | @STRING{IEEE_J_IFS = "{IEEE} Trans. Inf. Forensics Security"} 203 | @STRING{IEEE_J_MC = "{IEEE} Trans. Mobile Comput."} 204 | @STRING{IEEE_J_NET = "{IEEE/ACM} Trans. Netw."} 205 | @STRING{IEEE_J_NN = "{IEEE} Trans. Neural Netw."} 206 | @STRING{IEEE_J_PDS = "{IEEE} Trans. Parallel Distrib. Syst."} 207 | @STRING{IEEE_J_SE = "{IEEE} Trans. Softw. Eng."} 208 | 209 | 210 | 211 | computer graphics, imaging, and multimedia 212 | @STRING{IEEE_J_JDT = "{IEEE/OSA} J. Display Technol."} 213 | @STRING{IEEE_J_IP = "{IEEE} Trans. Image Process."} 214 | @STRING{IEEE_J_MM = "{IEEE} Trans. Multimedia"} 215 | @STRING{IEEE_J_VCG = "{IEEE} Trans. Vis. Comput. Graphics"} 216 | 217 | 218 | 219 | cybernetics, ergonomics, robots, man-machine, and automation 220 | @STRING{IEEE_J_ASE = "{IEEE} Trans. Autom. Sci. Eng."} 221 | @STRING{IEEE_J_JRA = "{IEEE} J. Robot. Autom."} 222 | @STRING{IEEE_J_HFE = "{IEEE} Trans. Hum. Factors Electron."} 223 | @STRING{IEEE_J_MMS = "{IEEE} Trans. Man-Mach. Syst."} 224 | @STRING{IEEE_J_PAMI = "{IEEE} Trans. Pattern Anal. Mach. Intell."} 225 | in 1989 JRA became RA 226 | in August 2004, RA split into ASE and RO 227 | @STRING{IEEE_J_RA = "{IEEE} Trans. Robot. Autom."} 228 | @STRING{IEEE_J_RO = "{IEEE} Trans. Robot."} 229 | @STRING{IEEE_J_SMC = "{IEEE} Trans. Syst., Man, Cybern."} 230 | @STRING{IEEE_J_SMCA = "{IEEE} Trans. Syst., Man, Cybern. {A}"} 231 | @STRING{IEEE_J_SMCB = "{IEEE} Trans. Syst., Man, Cybern. {B}"} 232 | @STRING{IEEE_J_SMCC = "{IEEE} Trans. Syst., Man, Cybern. {C}"} 233 | @STRING{IEEE_J_SSC = "{IEEE} Trans. Syst. Sci. Cybern."} 234 | 235 | 236 | 237 | earth, wind, fire and water 238 | @STRING{IEEE_J_GE = "{IEEE} Trans. Geosci. Electron."} 239 | @STRING{IEEE_J_GRS = "{IEEE} Trans. Geosci. Remote Sens."} 240 | @STRING{IEEE_J_GRSL = "{IEEE} Geosci. Remote Sens. Lett."} 241 | @STRING{IEEE_J_OE = "{IEEE} J. Ocean. Eng."} 242 | 243 | 244 | 245 | education, engineering, history, IEEE, professional 246 | disabled till definition is verified 247 | STRING{IEEE_J_CJECE = "Canadian J. Elect. Comput. Eng."} 248 | @STRING{IEEE_J_PROC = "Proc. {IEEE}"} 249 | @STRING{IEEE_J_EDU = "{IEEE} Trans. Educ."} 250 | @STRING{IEEE_J_EM = "{IEEE} Trans. Eng. Manag."} 251 | disabled till definition is verified 252 | STRING{IEEE_J_EWS = "{IEEE} Trans. Eng. Writing Speech"} 253 | @STRING{IEEE_J_PC = "{IEEE} Trans. Prof. Commun."} 254 | 255 | 256 | 257 | electromagnetics, antennas, EMI, magnetics and microwave 258 | @STRING{IEEE_J_AWPL = "{IEEE} Antennas Wireless Propag. Lett."} 259 | @STRING{IEEE_J_MGWL = "{IEEE} Microw. Guided Wave Lett."} 260 | IEEE seems to want "Compon." here, not "Comp." 261 | @STRING{IEEE_J_MWCL = "{IEEE} Microw. Wireless Compon. Lett."} 262 | @STRING{IEEE_J_AP = "{IEEE} Trans. Antennas Propag."} 263 | @STRING{IEEE_J_EMC = "{IEEE} Trans. Electromagn. Compat."} 264 | @STRING{IEEE_J_MAG = "{IEEE} Trans. Magn."} 265 | @STRING{IEEE_J_MTT = "{IEEE} Trans. Microw. Theory Tech."} 266 | @STRING{IEEE_J_RFI = "{IEEE} Trans. Radio Freq. Interference"} 267 | @STRING{IEEE_J_TJMJ = "{IEEE} Transl. J. Magn. Jpn."} 268 | 269 | 270 | 271 | energy and power 272 | @STRING{IEEE_J_EC = "{IEEE} Trans. Energy Convers."} 273 | @STRING{IEEE_J_PEL = "{IEEE} Power Electron. Lett."} 274 | @STRING{IEEE_J_PWRAS = "{IEEE} Trans. Power App. Syst."} 275 | @STRING{IEEE_J_PWRD = "{IEEE} Trans. Power Del."} 276 | @STRING{IEEE_J_PWRE = "{IEEE} Trans. Power Electron."} 277 | @STRING{IEEE_J_PWRS = "{IEEE} Trans. Power Syst."} 278 | 279 | 280 | 281 | industrial, commercial and consumer 282 | @STRING{IEEE_J_APPIND = "{IEEE} Trans. Appl. Ind."} 283 | @STRING{IEEE_J_BC = "{IEEE} Trans. Broadcast."} 284 | disabled till definition is verified 285 | STRING{IEEE_J_BCTV = "{IEEE} Trans. Broadcast Television Receivers"} 286 | @STRING{IEEE_J_CE = "{IEEE} Trans. Consum. Electron."} 287 | @STRING{IEEE_J_IE = "{IEEE} Trans. Ind. Electron."} 288 | @STRING{IEEE_J_IECI = "{IEEE} Trans. Ind. Electron. Contr. Instrum."} 289 | @STRING{IEEE_J_IA = "{IEEE} Trans. Ind. Appl."} 290 | @STRING{IEEE_J_IGA = "{IEEE} Trans. Ind. Gen. Appl."} 291 | @STRING{IEEE_J_IINF = "{IEEE} Trans. Ind. Informat."} 292 | @STRING{IEEE_J_PSE = "{IEEE} J. Product Safety Eng."} 293 | 294 | 295 | 296 | instrumentation and measurement 297 | @STRING{IEEE_J_IM = "{IEEE} Trans. Instrum. Meas."} 298 | 299 | 300 | 301 | insulation and materials 302 | @STRING{IEEE_J_JEM = "{IEEE/TMS} J. Electron. Mater."} 303 | @STRING{IEEE_J_DEI = "{IEEE} Trans. Dielectr. Electr. Insul."} 304 | @STRING{IEEE_J_EI = "{IEEE} Trans. Electr. Insul."} 305 | 306 | 307 | 308 | mechanical 309 | @STRING{IEEE_J_MECH = "{IEEE/ASME} Trans. Mechatronics"} 310 | @STRING{IEEE_J_MEMS = "J. Microelectromech. Syst."} 311 | 312 | 313 | 314 | medical and biological 315 | @STRING{IEEE_J_BME = "{IEEE} Trans. Biomed. Eng."} 316 | Note: The B-ME journal later dropped the hyphen and became the BME. 317 | @STRING{IEEE_J_B-ME = "{IEEE} Trans. Bio-Med. Eng."} 318 | @STRING{IEEE_J_BMELC = "{IEEE} Trans. Bio-Med. Electron."} 319 | disabled till definition is verified 320 | STRING{IEEE_J_CBB = "{IEEE/ACM} Trans. Comput. Biology Bioinformatics"} 321 | @STRING{IEEE_J_ITBM = "{IEEE} Trans. Inf. Technol. Biomed."} 322 | @STRING{IEEE_J_ME = "{IEEE} Trans. Med. Electron."} 323 | @STRING{IEEE_J_MI = "{IEEE} Trans. Med. Imag."} 324 | @STRING{IEEE_J_NB = "{IEEE} Trans. Nanobiosci."} 325 | @STRING{IEEE_J_NSRE = "{IEEE} Trans. Neural Syst. Rehabil. Eng."} 326 | @STRING{IEEE_J_RE = "{IEEE} Trans. Rehabil. Eng."} 327 | 328 | 329 | 330 | optics, lightwave and photonics 331 | @STRING{IEEE_J_PTL = "{IEEE} Photon. Technol. Lett."} 332 | @STRING{IEEE_J_JLT = "J. Lightw. Technol."} 333 | 334 | 335 | 336 | physics, electrons, nanotechnology, nuclear and quantum electronics 337 | @STRING{IEEE_J_EDL = "{IEEE} Electron Device Lett."} 338 | @STRING{IEEE_J_JQE = "{IEEE} J. Quantum Electron."} 339 | @STRING{IEEE_J_JSTQE = "{IEEE} J. Sel. Topics Quantum Electron."} 340 | @STRING{IEEE_J_ED = "{IEEE} Trans. Electron Devices"} 341 | @STRING{IEEE_J_NANO = "{IEEE} Trans. Nanotechnol."} 342 | @STRING{IEEE_J_NS = "{IEEE} Trans. Nucl. Sci."} 343 | @STRING{IEEE_J_PS = "{IEEE} Trans. Plasma Sci."} 344 | 345 | 346 | 347 | reliability 348 | IEEE seems to want "Mat." here, not "Mater." 349 | @STRING{IEEE_J_DMR = "{IEEE} Trans. Device Mater. Rel."} 350 | @STRING{IEEE_J_R = "{IEEE} Trans. Rel."} 351 | 352 | 353 | 354 | semiconductors, superconductors, electrochemical and solid state 355 | @STRING{IEEE_J_ESSL = "{IEEE/ECS} Electrochem. Solid-State Lett."} 356 | @STRING{IEEE_J_JSSC = "{IEEE} J. Solid-State Circuits"} 357 | @STRING{IEEE_J_ASC = "{IEEE} Trans. Appl. Supercond."} 358 | @STRING{IEEE_J_SM = "{IEEE} Trans. Semicond. Manuf."} 359 | 360 | 361 | 362 | sensors 363 | @STRING{IEEE_J_SENSOR = "{IEEE} Sensors J."} 364 | 365 | 366 | 367 | VLSI 368 | @STRING{IEEE_J_VLSI = "{IEEE} Trans. {VLSI} Syst."} 369 | 370 | 371 | 372 | 373 | 374 | 375 | IEEE Magazines 376 | 377 | 378 | 379 | @STRING{IEEE_M_AES = "{IEEE} Aerosp. Electron. Syst. Mag."} 380 | @STRING{IEEE_M_HIST = "{IEEE} Ann. Hist. Comput."} 381 | @STRING{IEEE_M_AP = "{IEEE} Antennas Propag. Mag."} 382 | @STRING{IEEE_M_ASSP = "{IEEE} {ASSP} Mag."} 383 | @STRING{IEEE_M_CD = "{IEEE} Circuits Devices Mag."} 384 | @STRING{IEEE_M_CAS = "{IEEE} Circuits Syst. Mag."} 385 | @STRING{IEEE_M_COM = "{IEEE} Commun. Mag."} 386 | @STRING{IEEE_M_COMSOC = "{IEEE} Commun. Soc. Mag."} 387 | @STRING{IEEE_M_CIM = "{IEEE} Comput. Intell. Mag."} 388 | CSEM changed to CSE in 1999 389 | @STRING{IEEE_M_CSE = "{IEEE} Comput. Sci. Eng."} 390 | @STRING{IEEE_M_CSEM = "{IEEE} Comput. Sci. Eng. Mag."} 391 | @STRING{IEEE_M_C = "{IEEE} Computer"} 392 | @STRING{IEEE_M_CAP = "{IEEE} Comput. Appl. Power"} 393 | @STRING{IEEE_M_CGA = "{IEEE} Comput. Graph. Appl."} 394 | @STRING{IEEE_M_CONC = "{IEEE} Concurrency"} 395 | @STRING{IEEE_M_CS = "{IEEE} Control Syst. Mag."} 396 | @STRING{IEEE_M_DTC = "{IEEE} Des. Test. Comput."} 397 | @STRING{IEEE_M_EI = "{IEEE} Electr. Insul. Mag."} 398 | @STRING{IEEE_M_ETR = "{IEEE} ElectroTechnol. Rev."} 399 | @STRING{IEEE_M_EMB = "{IEEE} Eng. Med. Biol. Mag."} 400 | @STRING{IEEE_M_EMR = "{IEEE} Eng. Manag. Rev."} 401 | @STRING{IEEE_M_EXP = "{IEEE} Expert"} 402 | @STRING{IEEE_M_IA = "{IEEE} Ind. Appl. Mag."} 403 | @STRING{IEEE_M_IM = "{IEEE} Instrum. Meas. Mag."} 404 | @STRING{IEEE_M_IS = "{IEEE} Intell. Syst."} 405 | @STRING{IEEE_M_IC = "{IEEE} Internet Comput."} 406 | @STRING{IEEE_M_ITP = "{IEEE} {IT} Prof."} 407 | @STRING{IEEE_M_MICRO = "{IEEE} Micro"} 408 | @STRING{IEEE_M_MW = "{IEEE} Microw. Mag."} 409 | @STRING{IEEE_M_MM = "{IEEE} Multimedia"} 410 | @STRING{IEEE_M_NET = "{IEEE} Netw."} 411 | IEEE's editorial manual lists "Pers. Commun.", 412 | but "Personal Commun. Mag." seems to be what is used in the journals 413 | @STRING{IEEE_M_PCOM = "{IEEE} Personal Commun. Mag."} 414 | @STRING{IEEE_M_POT = "{IEEE} Potentials"} 415 | CAP and PER merged to form PE in 2003 416 | @STRING{IEEE_M_PE = "{IEEE} Power Energy Mag."} 417 | @STRING{IEEE_M_PER = "{IEEE} Power Eng. Rev."} 418 | @STRING{IEEE_M_PVC = "{IEEE} Pervasive Comput."} 419 | @STRING{IEEE_M_RA = "{IEEE} Robot. Autom. Mag."} 420 | @STRING{IEEE_M_SAP = "{IEEE} Security Privacy"} 421 | @STRING{IEEE_M_SP = "{IEEE} Signal Process. Mag."} 422 | @STRING{IEEE_M_S = "{IEEE} Softw."} 423 | @STRING{IEEE_M_SPECT = "{IEEE} Spectr."} 424 | @STRING{IEEE_M_TS = "{IEEE} Technol. Soc. Mag."} 425 | @STRING{IEEE_M_VT = "{IEEE} Veh. Technol. Mag."} 426 | @STRING{IEEE_M_WC = "{IEEE} Wireless Commun. Mag."} 427 | @STRING{IEEE_M_TODAY = "Today's Engineer"} 428 | 429 | 430 | 431 | 432 | 433 | 434 | IEEE Online Publications 435 | 436 | 437 | 438 | @STRING{IEEE_O_CSTO = "{IEEE} Commun. Surveys Tuts."} 439 | disabled till definition is verified 440 | STRING{IEEE_O_DSO = "{IEEE} Distrib. Syst. Online"} 441 | 442 | 443 | 444 | 445 | 446 | -- 447 | EOF 448 | -------------------------------------------------------------------------------- /template/IEEEtran.bst: -------------------------------------------------------------------------------- 1 | %% 2 | %% IEEEtran.bst 3 | %% BibTeX Bibliography Style file for IEEE Journals and Conferences (unsorted) 4 | %% Version 1.12 (2007/01/11) 5 | %% 6 | %% Copyright (c) 2003-2007 Michael Shell 7 | %% 8 | %% Original starting code base and algorithms obtained from the output of 9 | %% Patrick W. Daly's makebst package as well as from prior versions of 10 | %% IEEE BibTeX styles: 11 | %% 12 | %% 1. Howard Trickey and Oren Patashnik's ieeetr.bst (1985/1988) 13 | %% 2. Silvano Balemi and Richard H. Roy's IEEEbib.bst (1993) 14 | %% 15 | %% Support sites: 16 | %% http://www.michaelshell.org/tex/ieeetran/ 17 | %% http://www.ctan.org/tex-archive/macros/latex/contrib/IEEEtran/ 18 | %% and/or 19 | %% http://www.ieee.org/ 20 | %% 21 | %% For use with BibTeX version 0.99a or later 22 | %% 23 | %% This is a numerical citation style. 24 | %% 25 | %%************************************************************************* 26 | %% Legal Notice: 27 | %% This code is offered as-is without any warranty either expressed or 28 | %% implied; without even the implied warranty of MERCHANTABILITY or 29 | %% FITNESS FOR A PARTICULAR PURPOSE! 30 | %% User assumes all risk. 31 | %% In no event shall IEEE or any contributor to this code be liable for 32 | %% any damages or losses, including, but not limited to, incidental, 33 | %% consequential, or any other damages, resulting from the use or misuse 34 | %% of any information contained here. 35 | %% 36 | %% All comments are the opinions of their respective authors and are not 37 | %% necessarily endorsed by the IEEE. 38 | %% 39 | %% This work is distributed under the LaTeX Project Public License (LPPL) 40 | %% ( http://www.latex-project.org/ ) version 1.3, and may be freely used, 41 | %% distributed and modified. A copy of the LPPL, version 1.3, is included 42 | %% in the base LaTeX documentation of all distributions of LaTeX released 43 | %% 2003/12/01 or later. 44 | %% Retain all contribution notices and credits. 45 | %% ** Modified files should be clearly indicated as such, including ** 46 | %% ** renaming them and changing author support contact information. ** 47 | %% 48 | %% File list of work: IEEEabrv.bib, IEEEfull.bib, IEEEexample.bib, 49 | %% IEEEtran.bst, IEEEtranS.bst, IEEEtranSA.bst, 50 | %% IEEEtranN.bst, IEEEtranSN.bst, IEEEtran_bst_HOWTO.pdf 51 | %%************************************************************************* 52 | % 53 | % 54 | % Changelog: 55 | % 56 | % 1.00 (2002/08/13) Initial release 57 | % 58 | % 1.10 (2002/09/27) 59 | % 1. Corrected minor bug for improperly formed warning message when a 60 | % book was not given a title. Thanks to Ming Kin Lai for reporting this. 61 | % 2. Added support for CTLname_format_string and CTLname_latex_cmd fields 62 | % in the BST control entry type. 63 | % 64 | % 1.11 (2003/04/02) 65 | % 1. Fixed bug with URLs containing underscores when using url.sty. Thanks 66 | % to Ming Kin Lai for reporting this. 67 | % 68 | % 1.12 (2007/01/11) 69 | % 1. Fixed bug with unwanted comma before "et al." when an entry contained 70 | % more than two author names. Thanks to Pallav Gupta for reporting this. 71 | % 2. Fixed bug with anomalous closing quote in tech reports that have a 72 | % type, but without a number or address. Thanks to Mehrdad Mirreza for 73 | % reporting this. 74 | % 3. Use braces in \providecommand in begin.bib to better support 75 | % latex2html. TeX style length assignments OK with recent versions 76 | % of latex2html - 1.71 (2002/2/1) or later is strongly recommended. 77 | % Use of the language field still causes trouble with latex2html. 78 | % Thanks to Federico Beffa for reporting this. 79 | % 4. Added IEEEtran.bst ID and version comment string to .bbl output. 80 | % 5. Provide a \BIBdecl hook that allows the user to execute commands 81 | % just prior to the first entry. 82 | % 6. Use default urlstyle (is using url.sty) of "same" rather than rm to 83 | % better work with a wider variety of bibliography styles. 84 | % 7. Changed month abbreviations from Sept., July and June to Sep., Jul., 85 | % and Jun., respectively, as IEEE now does. Thanks to Moritz Borgmann 86 | % for reporting this. 87 | % 8. Control entry types should not be considered when calculating longest 88 | % label width. 89 | % 9. Added alias www for electronic/online. 90 | % 10. Added CTLname_url_prefix control entry type. 91 | 92 | 93 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 94 | %% DEFAULTS FOR THE CONTROLS OF THE BST STYLE %% 95 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 96 | 97 | % These are the defaults for the user adjustable controls. The values used 98 | % here can be overridden by the user via IEEEtranBSTCTL entry type. 99 | 100 | % NOTE: The recommended LaTeX command to invoke a control entry type is: 101 | % 102 | %\makeatletter 103 | %\def\bstctlcite{\@ifnextchar[{\@bstctlcite}{\@bstctlcite[@auxout]}} 104 | %\def\@bstctlcite[#1]#2{\@bsphack 105 | % \@for\@citeb:=#2\do{% 106 | % \edef\@citeb{\expandafter\@firstofone\@citeb}% 107 | % \if@filesw\immediate\write\csname #1\endcsname{\string\citation{\@citeb}}\fi}% 108 | % \@esphack} 109 | %\makeatother 110 | % 111 | % It is called at the start of the document, before the first \cite, like: 112 | % \bstctlcite{IEEEexample:BSTcontrol} 113 | % 114 | % IEEEtran.cls V1.6 and later does provide this command. 115 | 116 | 117 | 118 | % #0 turns off the display of the number for articles. 119 | % #1 enables 120 | FUNCTION {default.is.use.number.for.article} { #1 } 121 | 122 | 123 | % #0 turns off the display of the paper and type fields in @inproceedings. 124 | % #1 enables 125 | FUNCTION {default.is.use.paper} { #1 } 126 | 127 | 128 | % #0 turns off the forced use of "et al." 129 | % #1 enables 130 | FUNCTION {default.is.forced.et.al} { #0 } 131 | 132 | % The maximum number of names that can be present beyond which an "et al." 133 | % usage is forced. Be sure that num.names.shown.with.forced.et.al (below) 134 | % is not greater than this value! 135 | % Note: There are many instances of references in IEEE journals which have 136 | % a very large number of authors as well as instances in which "et al." is 137 | % used profusely. 138 | FUNCTION {default.max.num.names.before.forced.et.al} { #10 } 139 | 140 | % The number of names that will be shown with a forced "et al.". 141 | % Must be less than or equal to max.num.names.before.forced.et.al 142 | FUNCTION {default.num.names.shown.with.forced.et.al} { #1 } 143 | 144 | 145 | % #0 turns off the alternate interword spacing for entries with URLs. 146 | % #1 enables 147 | FUNCTION {default.is.use.alt.interword.spacing} { #1 } 148 | 149 | % If alternate interword spacing for entries with URLs is enabled, this is 150 | % the interword spacing stretch factor that will be used. For example, the 151 | % default "4" here means that the interword spacing in entries with URLs can 152 | % stretch to four times normal. Does not have to be an integer. Note that 153 | % the value specified here can be overridden by the user in their LaTeX 154 | % code via a command such as: 155 | % "\providecommand\BIBentryALTinterwordstretchfactor{1.5}" in addition to 156 | % that via the IEEEtranBSTCTL entry type. 157 | FUNCTION {default.ALTinterwordstretchfactor} { "4" } 158 | 159 | 160 | % #0 turns off the "dashification" of repeated (i.e., identical to those 161 | % of the previous entry) names. IEEE normally does this. 162 | % #1 enables 163 | FUNCTION {default.is.dash.repeated.names} { #1 } 164 | 165 | 166 | % The default name format control string. 167 | FUNCTION {default.name.format.string}{ "{f.~}{vv~}{ll}{, jj}" } 168 | 169 | 170 | % The default LaTeX font command for the names. 171 | FUNCTION {default.name.latex.cmd}{ "" } 172 | 173 | 174 | % The default URL prefix. 175 | FUNCTION {default.name.url.prefix}{ "[Online]. Available:" } 176 | 177 | 178 | % Other controls that cannot be accessed via IEEEtranBSTCTL entry type. 179 | 180 | % #0 turns off the terminal startup banner/completed message so as to 181 | % operate more quietly. 182 | % #1 enables 183 | FUNCTION {is.print.banners.to.terminal} { #1 } 184 | 185 | 186 | 187 | 188 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%% 189 | %% FILE VERSION AND BANNER %% 190 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%% 191 | 192 | FUNCTION{bst.file.version} { "1.12" } 193 | FUNCTION{bst.file.date} { "2007/01/11" } 194 | FUNCTION{bst.file.website} { "http://www.michaelshell.org/tex/ieeetran/bibtex/" } 195 | 196 | FUNCTION {banner.message} 197 | { is.print.banners.to.terminal 198 | { "-- IEEEtran.bst version" " " * bst.file.version * 199 | " (" * bst.file.date * ") " * "by Michael Shell." * 200 | top$ 201 | "-- " bst.file.website * 202 | top$ 203 | "-- See the " quote$ * "IEEEtran_bst_HOWTO.pdf" * quote$ * " manual for usage information." * 204 | top$ 205 | } 206 | { skip$ } 207 | if$ 208 | } 209 | 210 | FUNCTION {completed.message} 211 | { is.print.banners.to.terminal 212 | { "" 213 | top$ 214 | "Done." 215 | top$ 216 | } 217 | { skip$ } 218 | if$ 219 | } 220 | 221 | 222 | 223 | 224 | %%%%%%%%%%%%%%%%%%%%%% 225 | %% STRING CONSTANTS %% 226 | %%%%%%%%%%%%%%%%%%%%%% 227 | 228 | FUNCTION {bbl.and}{ "and" } 229 | FUNCTION {bbl.etal}{ "et~al." } 230 | FUNCTION {bbl.editors}{ "eds." } 231 | FUNCTION {bbl.editor}{ "ed." } 232 | FUNCTION {bbl.edition}{ "ed." } 233 | FUNCTION {bbl.volume}{ "vol." } 234 | FUNCTION {bbl.of}{ "of" } 235 | FUNCTION {bbl.number}{ "no." } 236 | FUNCTION {bbl.in}{ "in" } 237 | FUNCTION {bbl.pages}{ "pp." } 238 | FUNCTION {bbl.page}{ "p." } 239 | FUNCTION {bbl.chapter}{ "ch." } 240 | FUNCTION {bbl.paper}{ "paper" } 241 | FUNCTION {bbl.part}{ "pt." } 242 | FUNCTION {bbl.patent}{ "Patent" } 243 | FUNCTION {bbl.patentUS}{ "U.S." } 244 | FUNCTION {bbl.revision}{ "Rev." } 245 | FUNCTION {bbl.series}{ "ser." } 246 | FUNCTION {bbl.standard}{ "Std." } 247 | FUNCTION {bbl.techrep}{ "Tech. Rep." } 248 | FUNCTION {bbl.mthesis}{ "Master's thesis" } 249 | FUNCTION {bbl.phdthesis}{ "Ph.D. dissertation" } 250 | FUNCTION {bbl.st}{ "st" } 251 | FUNCTION {bbl.nd}{ "nd" } 252 | FUNCTION {bbl.rd}{ "rd" } 253 | FUNCTION {bbl.th}{ "th" } 254 | 255 | 256 | % This is the LaTeX spacer that is used when a larger than normal space 257 | % is called for (such as just before the address:publisher). 258 | FUNCTION {large.space} { "\hskip 1em plus 0.5em minus 0.4em\relax " } 259 | 260 | % The LaTeX code for dashes that are used to represent repeated names. 261 | % Note: Some older IEEE journals used something like 262 | % "\rule{0.275in}{0.5pt}\," which is fairly thick and runs right along 263 | % the baseline. However, IEEE now uses a thinner, above baseline, 264 | % six dash long sequence. 265 | FUNCTION {repeated.name.dashes} { "------" } 266 | 267 | 268 | 269 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 270 | %% PREDEFINED STRING MACROS %% 271 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 272 | 273 | MACRO {jan} {"Jan."} 274 | MACRO {feb} {"Feb."} 275 | MACRO {mar} {"Mar."} 276 | MACRO {apr} {"Apr."} 277 | MACRO {may} {"May"} 278 | MACRO {jun} {"Jun."} 279 | MACRO {jul} {"Jul."} 280 | MACRO {aug} {"Aug."} 281 | MACRO {sep} {"Sep."} 282 | MACRO {oct} {"Oct."} 283 | MACRO {nov} {"Nov."} 284 | MACRO {dec} {"Dec."} 285 | 286 | 287 | 288 | %%%%%%%%%%%%%%%%%% 289 | %% ENTRY FIELDS %% 290 | %%%%%%%%%%%%%%%%%% 291 | 292 | ENTRY 293 | { address 294 | assignee 295 | author 296 | booktitle 297 | chapter 298 | day 299 | dayfiled 300 | edition 301 | editor 302 | howpublished 303 | institution 304 | intype 305 | journal 306 | key 307 | language 308 | month 309 | monthfiled 310 | nationality 311 | note 312 | number 313 | organization 314 | pages 315 | paper 316 | publisher 317 | school 318 | series 319 | revision 320 | title 321 | type 322 | url 323 | volume 324 | year 325 | yearfiled 326 | CTLuse_article_number 327 | CTLuse_paper 328 | CTLuse_forced_etal 329 | CTLmax_names_forced_etal 330 | CTLnames_show_etal 331 | CTLuse_alt_spacing 332 | CTLalt_stretch_factor 333 | CTLdash_repeated_names 334 | CTLname_format_string 335 | CTLname_latex_cmd 336 | CTLname_url_prefix 337 | } 338 | {} 339 | { label } 340 | 341 | 342 | 343 | 344 | %%%%%%%%%%%%%%%%%%%%%%% 345 | %% INTEGER VARIABLES %% 346 | %%%%%%%%%%%%%%%%%%%%%%% 347 | 348 | INTEGERS { prev.status.punct this.status.punct punct.std 349 | punct.no punct.comma punct.period 350 | prev.status.space this.status.space space.std 351 | space.no space.normal space.large 352 | prev.status.quote this.status.quote quote.std 353 | quote.no quote.close 354 | prev.status.nline this.status.nline nline.std 355 | nline.no nline.newblock 356 | status.cap cap.std 357 | cap.no cap.yes} 358 | 359 | INTEGERS { longest.label.width multiresult nameptr namesleft number.label numnames } 360 | 361 | INTEGERS { is.use.number.for.article 362 | is.use.paper 363 | is.forced.et.al 364 | max.num.names.before.forced.et.al 365 | num.names.shown.with.forced.et.al 366 | is.use.alt.interword.spacing 367 | is.dash.repeated.names} 368 | 369 | 370 | %%%%%%%%%%%%%%%%%%%%%% 371 | %% STRING VARIABLES %% 372 | %%%%%%%%%%%%%%%%%%%%%% 373 | 374 | STRINGS { bibinfo 375 | longest.label 376 | oldname 377 | s 378 | t 379 | ALTinterwordstretchfactor 380 | name.format.string 381 | name.latex.cmd 382 | name.url.prefix} 383 | 384 | 385 | 386 | 387 | %%%%%%%%%%%%%%%%%%%%%%%%% 388 | %% LOW LEVEL FUNCTIONS %% 389 | %%%%%%%%%%%%%%%%%%%%%%%%% 390 | 391 | FUNCTION {initialize.controls} 392 | { default.is.use.number.for.article 'is.use.number.for.article := 393 | default.is.use.paper 'is.use.paper := 394 | default.is.forced.et.al 'is.forced.et.al := 395 | default.max.num.names.before.forced.et.al 'max.num.names.before.forced.et.al := 396 | default.num.names.shown.with.forced.et.al 'num.names.shown.with.forced.et.al := 397 | default.is.use.alt.interword.spacing 'is.use.alt.interword.spacing := 398 | default.is.dash.repeated.names 'is.dash.repeated.names := 399 | default.ALTinterwordstretchfactor 'ALTinterwordstretchfactor := 400 | default.name.format.string 'name.format.string := 401 | default.name.latex.cmd 'name.latex.cmd := 402 | default.name.url.prefix 'name.url.prefix := 403 | } 404 | 405 | 406 | % This IEEEtran.bst features a very powerful and flexible mechanism for 407 | % controlling the capitalization, punctuation, spacing, quotation, and 408 | % newlines of the formatted entry fields. (Note: IEEEtran.bst does not need 409 | % or use the newline/newblock feature, but it has been implemented for 410 | % possible future use.) The output states of IEEEtran.bst consist of 411 | % multiple independent attributes and, as such, can be thought of as being 412 | % vectors, rather than the simple scalar values ("before.all", 413 | % "mid.sentence", etc.) used in most other .bst files. 414 | % 415 | % The more flexible and complex design used here was motivated in part by 416 | % IEEE's rather unusual bibliography style. For example, IEEE ends the 417 | % previous field item with a period and large space prior to the publisher 418 | % address; the @electronic entry types use periods as inter-item punctuation 419 | % rather than the commas used by the other entry types; and URLs are never 420 | % followed by periods even though they are the last item in the entry. 421 | % Although it is possible to accommodate these features with the conventional 422 | % output state system, the seemingly endless exceptions make for convoluted, 423 | % unreliable and difficult to maintain code. 424 | % 425 | % IEEEtran.bst's output state system can be easily understood via a simple 426 | % illustration of two most recently formatted entry fields (on the stack): 427 | % 428 | % CURRENT_ITEM 429 | % "PREVIOUS_ITEM 430 | % 431 | % which, in this example, is to eventually appear in the bibliography as: 432 | % 433 | % "PREVIOUS_ITEM," CURRENT_ITEM 434 | % 435 | % It is the job of the output routine to take the previous item off of the 436 | % stack (while leaving the current item at the top of the stack), apply its 437 | % trailing punctuation (including closing quote marks) and spacing, and then 438 | % to write the result to BibTeX's output buffer: 439 | % 440 | % "PREVIOUS_ITEM," 441 | % 442 | % Punctuation (and spacing) between items is often determined by both of the 443 | % items rather than just the first one. The presence of quotation marks 444 | % further complicates the situation because, in standard English, trailing 445 | % punctuation marks are supposed to be contained within the quotes. 446 | % 447 | % IEEEtran.bst maintains two output state (aka "status") vectors which 448 | % correspond to the previous and current (aka "this") items. Each vector 449 | % consists of several independent attributes which track punctuation, 450 | % spacing, quotation, and newlines. Capitalization status is handled by a 451 | % separate scalar because the format routines, not the output routine, 452 | % handle capitalization and, therefore, there is no need to maintain the 453 | % capitalization attribute for both the "previous" and "this" items. 454 | % 455 | % When a format routine adds a new item, it copies the current output status 456 | % vector to the previous output status vector and (usually) resets the 457 | % current (this) output status vector to a "standard status" vector. Using a 458 | % "standard status" vector in this way allows us to redefine what we mean by 459 | % "standard status" at the start of each entry handler and reuse the same 460 | % format routines under the various inter-item separation schemes. For 461 | % example, the standard status vector for the @book entry type may use 462 | % commas for item separators, while the @electronic type may use periods, 463 | % yet both entry handlers exploit many of the exact same format routines. 464 | % 465 | % Because format routines have write access to the output status vector of 466 | % the previous item, they can override the punctuation choices of the 467 | % previous format routine! Therefore, it becomes trivial to implement rules 468 | % such as "Always use a period and a large space before the publisher." By 469 | % pushing the generation of the closing quote mark to the output routine, we 470 | % avoid all the problems caused by having to close a quote before having all 471 | % the information required to determine what the punctuation should be. 472 | % 473 | % The IEEEtran.bst output state system can easily be expanded if needed. 474 | % For instance, it is easy to add a "space.tie" attribute value if the 475 | % bibliography rules mandate that two items have to be joined with an 476 | % unbreakable space. 477 | 478 | FUNCTION {initialize.status.constants} 479 | { #0 'punct.no := 480 | #1 'punct.comma := 481 | #2 'punct.period := 482 | #0 'space.no := 483 | #1 'space.normal := 484 | #2 'space.large := 485 | #0 'quote.no := 486 | #1 'quote.close := 487 | #0 'cap.no := 488 | #1 'cap.yes := 489 | #0 'nline.no := 490 | #1 'nline.newblock := 491 | } 492 | 493 | FUNCTION {std.status.using.comma} 494 | { punct.comma 'punct.std := 495 | space.normal 'space.std := 496 | quote.no 'quote.std := 497 | nline.no 'nline.std := 498 | cap.no 'cap.std := 499 | } 500 | 501 | FUNCTION {std.status.using.period} 502 | { punct.period 'punct.std := 503 | space.normal 'space.std := 504 | quote.no 'quote.std := 505 | nline.no 'nline.std := 506 | cap.yes 'cap.std := 507 | } 508 | 509 | FUNCTION {initialize.prev.this.status} 510 | { punct.no 'prev.status.punct := 511 | space.no 'prev.status.space := 512 | quote.no 'prev.status.quote := 513 | nline.no 'prev.status.nline := 514 | punct.no 'this.status.punct := 515 | space.no 'this.status.space := 516 | quote.no 'this.status.quote := 517 | nline.no 'this.status.nline := 518 | cap.yes 'status.cap := 519 | } 520 | 521 | FUNCTION {this.status.std} 522 | { punct.std 'this.status.punct := 523 | space.std 'this.status.space := 524 | quote.std 'this.status.quote := 525 | nline.std 'this.status.nline := 526 | } 527 | 528 | FUNCTION {cap.status.std}{ cap.std 'status.cap := } 529 | 530 | FUNCTION {this.to.prev.status} 531 | { this.status.punct 'prev.status.punct := 532 | this.status.space 'prev.status.space := 533 | this.status.quote 'prev.status.quote := 534 | this.status.nline 'prev.status.nline := 535 | } 536 | 537 | 538 | FUNCTION {not} 539 | { { #0 } 540 | { #1 } 541 | if$ 542 | } 543 | 544 | FUNCTION {and} 545 | { { skip$ } 546 | { pop$ #0 } 547 | if$ 548 | } 549 | 550 | FUNCTION {or} 551 | { { pop$ #1 } 552 | { skip$ } 553 | if$ 554 | } 555 | 556 | 557 | % convert the strings "yes" or "no" to #1 or #0 respectively 558 | FUNCTION {yes.no.to.int} 559 | { "l" change.case$ duplicate$ 560 | "yes" = 561 | { pop$ #1 } 562 | { duplicate$ "no" = 563 | { pop$ #0 } 564 | { "unknown boolean " quote$ * swap$ * quote$ * 565 | " in " * cite$ * warning$ 566 | #0 567 | } 568 | if$ 569 | } 570 | if$ 571 | } 572 | 573 | 574 | % pushes true if the single char string on the stack is in the 575 | % range of "0" to "9" 576 | FUNCTION {is.num} 577 | { chr.to.int$ 578 | duplicate$ "0" chr.to.int$ < not 579 | swap$ "9" chr.to.int$ > not and 580 | } 581 | 582 | % multiplies the integer on the stack by a factor of 10 583 | FUNCTION {bump.int.mag} 584 | { #0 'multiresult := 585 | { duplicate$ #0 > } 586 | { #1 - 587 | multiresult #10 + 588 | 'multiresult := 589 | } 590 | while$ 591 | pop$ 592 | multiresult 593 | } 594 | 595 | % converts a single character string on the stack to an integer 596 | FUNCTION {char.to.integer} 597 | { duplicate$ 598 | is.num 599 | { chr.to.int$ "0" chr.to.int$ - } 600 | {"noninteger character " quote$ * swap$ * quote$ * 601 | " in integer field of " * cite$ * warning$ 602 | #0 603 | } 604 | if$ 605 | } 606 | 607 | % converts a string on the stack to an integer 608 | FUNCTION {string.to.integer} 609 | { duplicate$ text.length$ 'namesleft := 610 | #1 'nameptr := 611 | #0 'numnames := 612 | { nameptr namesleft > not } 613 | { duplicate$ nameptr #1 substring$ 614 | char.to.integer numnames bump.int.mag + 615 | 'numnames := 616 | nameptr #1 + 617 | 'nameptr := 618 | } 619 | while$ 620 | pop$ 621 | numnames 622 | } 623 | 624 | 625 | 626 | 627 | % The output routines write out the *next* to the top (previous) item on the 628 | % stack, adding punctuation and such as needed. Since IEEEtran.bst maintains 629 | % the output status for the top two items on the stack, these output 630 | % routines have to consider the previous output status (which corresponds to 631 | % the item that is being output). Full independent control of punctuation, 632 | % closing quote marks, spacing, and newblock is provided. 633 | % 634 | % "output.nonnull" does not check for the presence of a previous empty 635 | % item. 636 | % 637 | % "output" does check for the presence of a previous empty item and will 638 | % remove an empty item rather than outputing it. 639 | % 640 | % "output.warn" is like "output", but will issue a warning if it detects 641 | % an empty item. 642 | 643 | FUNCTION {output.nonnull} 644 | { swap$ 645 | prev.status.punct punct.comma = 646 | { "," * } 647 | { skip$ } 648 | if$ 649 | prev.status.punct punct.period = 650 | { add.period$ } 651 | { skip$ } 652 | if$ 653 | prev.status.quote quote.close = 654 | { "''" * } 655 | { skip$ } 656 | if$ 657 | prev.status.space space.normal = 658 | { " " * } 659 | { skip$ } 660 | if$ 661 | prev.status.space space.large = 662 | { large.space * } 663 | { skip$ } 664 | if$ 665 | write$ 666 | prev.status.nline nline.newblock = 667 | { newline$ "\newblock " write$ } 668 | { skip$ } 669 | if$ 670 | } 671 | 672 | FUNCTION {output} 673 | { duplicate$ empty$ 674 | 'pop$ 675 | 'output.nonnull 676 | if$ 677 | } 678 | 679 | FUNCTION {output.warn} 680 | { 't := 681 | duplicate$ empty$ 682 | { pop$ "empty " t * " in " * cite$ * warning$ } 683 | 'output.nonnull 684 | if$ 685 | } 686 | 687 | % "fin.entry" is the output routine that handles the last item of the entry 688 | % (which will be on the top of the stack when "fin.entry" is called). 689 | 690 | FUNCTION {fin.entry} 691 | { this.status.punct punct.no = 692 | { skip$ } 693 | { add.period$ } 694 | if$ 695 | this.status.quote quote.close = 696 | { "''" * } 697 | { skip$ } 698 | if$ 699 | write$ 700 | newline$ 701 | } 702 | 703 | 704 | FUNCTION {is.last.char.not.punct} 705 | { duplicate$ 706 | "}" * add.period$ 707 | #-1 #1 substring$ "." = 708 | } 709 | 710 | FUNCTION {is.multiple.pages} 711 | { 't := 712 | #0 'multiresult := 713 | { multiresult not 714 | t empty$ not 715 | and 716 | } 717 | { t #1 #1 substring$ 718 | duplicate$ "-" = 719 | swap$ duplicate$ "," = 720 | swap$ "+" = 721 | or or 722 | { #1 'multiresult := } 723 | { t #2 global.max$ substring$ 't := } 724 | if$ 725 | } 726 | while$ 727 | multiresult 728 | } 729 | 730 | FUNCTION {capitalize}{ "u" change.case$ "t" change.case$ } 731 | 732 | FUNCTION {emphasize} 733 | { duplicate$ empty$ 734 | { pop$ "" } 735 | { "\emph{" swap$ * "}" * } 736 | if$ 737 | } 738 | 739 | FUNCTION {do.name.latex.cmd} 740 | { name.latex.cmd 741 | empty$ 742 | { skip$ } 743 | { name.latex.cmd "{" * swap$ * "}" * } 744 | if$ 745 | } 746 | 747 | % IEEEtran.bst uses its own \BIBforeignlanguage command which directly 748 | % invokes the TeX hyphenation patterns without the need of the Babel 749 | % package. Babel does a lot more than switch hyphenation patterns and 750 | % its loading can cause unintended effects in many class files (such as 751 | % IEEEtran.cls). 752 | FUNCTION {select.language} 753 | { duplicate$ empty$ 'pop$ 754 | { language empty$ 'skip$ 755 | { "\BIBforeignlanguage{" language * "}{" * swap$ * "}" * } 756 | if$ 757 | } 758 | if$ 759 | } 760 | 761 | FUNCTION {tie.or.space.prefix} 762 | { duplicate$ text.length$ #3 < 763 | { "~" } 764 | { " " } 765 | if$ 766 | swap$ 767 | } 768 | 769 | FUNCTION {get.bbl.editor} 770 | { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } 771 | 772 | FUNCTION {space.word}{ " " swap$ * " " * } 773 | 774 | 775 | % Field Conditioners, Converters, Checkers and External Interfaces 776 | 777 | FUNCTION {empty.field.to.null.string} 778 | { duplicate$ empty$ 779 | { pop$ "" } 780 | { skip$ } 781 | if$ 782 | } 783 | 784 | FUNCTION {either.or.check} 785 | { empty$ 786 | { pop$ } 787 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } 788 | if$ 789 | } 790 | 791 | FUNCTION {empty.entry.warn} 792 | { author empty$ title empty$ howpublished empty$ 793 | month empty$ year empty$ note empty$ url empty$ 794 | and and and and and and 795 | { "all relevant fields are empty in " cite$ * warning$ } 796 | 'skip$ 797 | if$ 798 | } 799 | 800 | 801 | % The bibinfo system provides a way for the electronic parsing/acquisition 802 | % of a bibliography's contents as is done by ReVTeX. For example, a field 803 | % could be entered into the bibliography as: 804 | % \bibinfo{volume}{2} 805 | % Only the "2" would show up in the document, but the LaTeX \bibinfo command 806 | % could do additional things with the information. IEEEtran.bst does provide 807 | % a \bibinfo command via "\providecommand{\bibinfo}[2]{#2}". However, it is 808 | % currently not used as the bogus bibinfo functions defined here output the 809 | % entry values directly without the \bibinfo wrapper. The bibinfo functions 810 | % themselves (and the calls to them) are retained for possible future use. 811 | % 812 | % bibinfo.check avoids acting on missing fields while bibinfo.warn will 813 | % issue a warning message if a missing field is detected. Prior to calling 814 | % the bibinfo functions, the user should push the field value and then its 815 | % name string, in that order. 816 | 817 | FUNCTION {bibinfo.check} 818 | { swap$ duplicate$ missing$ 819 | { pop$ pop$ "" } 820 | { duplicate$ empty$ 821 | { swap$ pop$ } 822 | { swap$ pop$ } 823 | if$ 824 | } 825 | if$ 826 | } 827 | 828 | FUNCTION {bibinfo.warn} 829 | { swap$ duplicate$ missing$ 830 | { swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ "" } 831 | { duplicate$ empty$ 832 | { swap$ "empty " swap$ * " in " * cite$ * warning$ } 833 | { swap$ pop$ } 834 | if$ 835 | } 836 | if$ 837 | } 838 | 839 | 840 | % IEEE separates large numbers with more than 4 digits into groups of 841 | % three. IEEE uses a small space to separate these number groups. 842 | % Typical applications include patent and page numbers. 843 | 844 | % number of consecutive digits required to trigger the group separation. 845 | FUNCTION {large.number.trigger}{ #5 } 846 | 847 | % For numbers longer than the trigger, this is the blocksize of the groups. 848 | % The blocksize must be less than the trigger threshold, and 2 * blocksize 849 | % must be greater than the trigger threshold (can't do more than one 850 | % separation on the initial trigger). 851 | FUNCTION {large.number.blocksize}{ #3 } 852 | 853 | % What is actually inserted between the number groups. 854 | FUNCTION {large.number.separator}{ "\," } 855 | 856 | % So as to save on integer variables by reusing existing ones, numnames 857 | % holds the current number of consecutive digits read and nameptr holds 858 | % the number that will trigger an inserted space. 859 | FUNCTION {large.number.separate} 860 | { 't := 861 | "" 862 | #0 'numnames := 863 | large.number.trigger 'nameptr := 864 | { t empty$ not } 865 | { t #-1 #1 substring$ is.num 866 | { numnames #1 + 'numnames := } 867 | { #0 'numnames := 868 | large.number.trigger 'nameptr := 869 | } 870 | if$ 871 | t #-1 #1 substring$ swap$ * 872 | t #-2 global.max$ substring$ 't := 873 | numnames nameptr = 874 | { duplicate$ #1 nameptr large.number.blocksize - substring$ swap$ 875 | nameptr large.number.blocksize - #1 + global.max$ substring$ 876 | large.number.separator swap$ * * 877 | nameptr large.number.blocksize - 'numnames := 878 | large.number.blocksize #1 + 'nameptr := 879 | } 880 | { skip$ } 881 | if$ 882 | } 883 | while$ 884 | } 885 | 886 | % Converts all single dashes "-" to double dashes "--". 887 | FUNCTION {n.dashify} 888 | { large.number.separate 889 | 't := 890 | "" 891 | { t empty$ not } 892 | { t #1 #1 substring$ "-" = 893 | { t #1 #2 substring$ "--" = not 894 | { "--" * 895 | t #2 global.max$ substring$ 't := 896 | } 897 | { { t #1 #1 substring$ "-" = } 898 | { "-" * 899 | t #2 global.max$ substring$ 't := 900 | } 901 | while$ 902 | } 903 | if$ 904 | } 905 | { t #1 #1 substring$ * 906 | t #2 global.max$ substring$ 't := 907 | } 908 | if$ 909 | } 910 | while$ 911 | } 912 | 913 | 914 | % This function detects entries with names that are identical to that of 915 | % the previous entry and replaces the repeated names with dashes (if the 916 | % "is.dash.repeated.names" user control is nonzero). 917 | FUNCTION {name.or.dash} 918 | { 's := 919 | oldname empty$ 920 | { s 'oldname := s } 921 | { s oldname = 922 | { is.dash.repeated.names 923 | { repeated.name.dashes } 924 | { s 'oldname := s } 925 | if$ 926 | } 927 | { s 'oldname := s } 928 | if$ 929 | } 930 | if$ 931 | } 932 | 933 | % Converts the number string on the top of the stack to 934 | % "numerical ordinal form" (e.g., "7" to "7th"). There is 935 | % no artificial limit to the upper bound of the numbers as the 936 | % least significant digit always determines the ordinal form. 937 | FUNCTION {num.to.ordinal} 938 | { duplicate$ #-1 #1 substring$ "1" = 939 | { bbl.st * } 940 | { duplicate$ #-1 #1 substring$ "2" = 941 | { bbl.nd * } 942 | { duplicate$ #-1 #1 substring$ "3" = 943 | { bbl.rd * } 944 | { bbl.th * } 945 | if$ 946 | } 947 | if$ 948 | } 949 | if$ 950 | } 951 | 952 | % If the string on the top of the stack begins with a number, 953 | % (e.g., 11th) then replace the string with the leading number 954 | % it contains. Otherwise retain the string as-is. s holds the 955 | % extracted number, t holds the part of the string that remains 956 | % to be scanned. 957 | FUNCTION {extract.num} 958 | { duplicate$ 't := 959 | "" 's := 960 | { t empty$ not } 961 | { t #1 #1 substring$ 962 | t #2 global.max$ substring$ 't := 963 | duplicate$ is.num 964 | { s swap$ * 's := } 965 | { pop$ "" 't := } 966 | if$ 967 | } 968 | while$ 969 | s empty$ 970 | 'skip$ 971 | { pop$ s } 972 | if$ 973 | } 974 | 975 | % Converts the word number string on the top of the stack to 976 | % Arabic string form. Will be successful up to "tenth". 977 | FUNCTION {word.to.num} 978 | { duplicate$ "l" change.case$ 's := 979 | s "first" = 980 | { pop$ "1" } 981 | { skip$ } 982 | if$ 983 | s "second" = 984 | { pop$ "2" } 985 | { skip$ } 986 | if$ 987 | s "third" = 988 | { pop$ "3" } 989 | { skip$ } 990 | if$ 991 | s "fourth" = 992 | { pop$ "4" } 993 | { skip$ } 994 | if$ 995 | s "fifth" = 996 | { pop$ "5" } 997 | { skip$ } 998 | if$ 999 | s "sixth" = 1000 | { pop$ "6" } 1001 | { skip$ } 1002 | if$ 1003 | s "seventh" = 1004 | { pop$ "7" } 1005 | { skip$ } 1006 | if$ 1007 | s "eighth" = 1008 | { pop$ "8" } 1009 | { skip$ } 1010 | if$ 1011 | s "ninth" = 1012 | { pop$ "9" } 1013 | { skip$ } 1014 | if$ 1015 | s "tenth" = 1016 | { pop$ "10" } 1017 | { skip$ } 1018 | if$ 1019 | } 1020 | 1021 | 1022 | % Converts the string on the top of the stack to numerical 1023 | % ordinal (e.g., "11th") form. 1024 | FUNCTION {convert.edition} 1025 | { duplicate$ empty$ 'skip$ 1026 | { duplicate$ #1 #1 substring$ is.num 1027 | { extract.num 1028 | num.to.ordinal 1029 | } 1030 | { word.to.num 1031 | duplicate$ #1 #1 substring$ is.num 1032 | { num.to.ordinal } 1033 | { "edition ordinal word " quote$ * edition * quote$ * 1034 | " may be too high (or improper) for conversion" * " in " * cite$ * warning$ 1035 | } 1036 | if$ 1037 | } 1038 | if$ 1039 | } 1040 | if$ 1041 | } 1042 | 1043 | 1044 | 1045 | 1046 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1047 | %% LATEX BIBLIOGRAPHY CODE %% 1048 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1049 | 1050 | FUNCTION {start.entry} 1051 | { newline$ 1052 | "\bibitem{" write$ 1053 | cite$ write$ 1054 | "}" write$ 1055 | newline$ 1056 | "" 1057 | initialize.prev.this.status 1058 | } 1059 | 1060 | % Here we write out all the LaTeX code that we will need. The most involved 1061 | % code sequences are those that control the alternate interword spacing and 1062 | % foreign language hyphenation patterns. The heavy use of \providecommand 1063 | % gives users a way to override the defaults. Special thanks to Javier Bezos, 1064 | % Johannes Braams, Robin Fairbairns, Heiko Oberdiek, Donald Arseneau and all 1065 | % the other gurus on comp.text.tex for their help and advice on the topic of 1066 | % \selectlanguage, Babel and BibTeX. 1067 | FUNCTION {begin.bib} 1068 | { "% Generated by IEEEtran.bst, version: " bst.file.version * " (" * bst.file.date * ")" * 1069 | write$ newline$ 1070 | preamble$ empty$ 'skip$ 1071 | { preamble$ write$ newline$ } 1072 | if$ 1073 | "\begin{thebibliography}{" longest.label * "}" * 1074 | write$ newline$ 1075 | "\providecommand{\url}[1]{#1}" 1076 | write$ newline$ 1077 | "\csname url@samestyle\endcsname" 1078 | write$ newline$ 1079 | "\providecommand{\newblock}{\relax}" 1080 | write$ newline$ 1081 | "\providecommand{\bibinfo}[2]{#2}" 1082 | write$ newline$ 1083 | "\providecommand{\BIBentrySTDinterwordspacing}{\spaceskip=0pt\relax}" 1084 | write$ newline$ 1085 | "\providecommand{\BIBentryALTinterwordstretchfactor}{" 1086 | ALTinterwordstretchfactor * "}" * 1087 | write$ newline$ 1088 | "\providecommand{\BIBentryALTinterwordspacing}{\spaceskip=\fontdimen2\font plus " 1089 | write$ newline$ 1090 | "\BIBentryALTinterwordstretchfactor\fontdimen3\font minus \fontdimen4\font\relax}" 1091 | write$ newline$ 1092 | "\providecommand{\BIBforeignlanguage}[2]{{%" 1093 | write$ newline$ 1094 | "\expandafter\ifx\csname l@#1\endcsname\relax" 1095 | write$ newline$ 1096 | "\typeout{** WARNING: IEEEtran.bst: No hyphenation pattern has been}%" 1097 | write$ newline$ 1098 | "\typeout{** loaded for the language `#1'. Using the pattern for}%" 1099 | write$ newline$ 1100 | "\typeout{** the default language instead.}%" 1101 | write$ newline$ 1102 | "\else" 1103 | write$ newline$ 1104 | "\language=\csname l@#1\endcsname" 1105 | write$ newline$ 1106 | "\fi" 1107 | write$ newline$ 1108 | "#2}}" 1109 | write$ newline$ 1110 | "\providecommand{\BIBdecl}{\relax}" 1111 | write$ newline$ 1112 | "\BIBdecl" 1113 | write$ newline$ 1114 | } 1115 | 1116 | FUNCTION {end.bib} 1117 | { newline$ "\end{thebibliography}" write$ newline$ } 1118 | 1119 | FUNCTION {if.url.alt.interword.spacing} 1120 | { is.use.alt.interword.spacing 1121 | {url empty$ 'skip$ {"\BIBentryALTinterwordspacing" write$ newline$} if$} 1122 | { skip$ } 1123 | if$ 1124 | } 1125 | 1126 | FUNCTION {if.url.std.interword.spacing} 1127 | { is.use.alt.interword.spacing 1128 | {url empty$ 'skip$ {"\BIBentrySTDinterwordspacing" write$ newline$} if$} 1129 | { skip$ } 1130 | if$ 1131 | } 1132 | 1133 | 1134 | 1135 | 1136 | %%%%%%%%%%%%%%%%%%%%%%%% 1137 | %% LONGEST LABEL PASS %% 1138 | %%%%%%%%%%%%%%%%%%%%%%%% 1139 | 1140 | FUNCTION {initialize.longest.label} 1141 | { "" 'longest.label := 1142 | #1 'number.label := 1143 | #0 'longest.label.width := 1144 | } 1145 | 1146 | FUNCTION {longest.label.pass} 1147 | { type$ "ieeetranbstctl" = 1148 | { skip$ } 1149 | { number.label int.to.str$ 'label := 1150 | number.label #1 + 'number.label := 1151 | label width$ longest.label.width > 1152 | { label 'longest.label := 1153 | label width$ 'longest.label.width := 1154 | } 1155 | { skip$ } 1156 | if$ 1157 | } 1158 | if$ 1159 | } 1160 | 1161 | 1162 | 1163 | 1164 | %%%%%%%%%%%%%%%%%%%%% 1165 | %% FORMAT HANDLERS %% 1166 | %%%%%%%%%%%%%%%%%%%%% 1167 | 1168 | %% Lower Level Formats (used by higher level formats) 1169 | 1170 | FUNCTION {format.address.org.or.pub.date} 1171 | { 't := 1172 | "" 1173 | year empty$ 1174 | { "empty year in " cite$ * warning$ } 1175 | { skip$ } 1176 | if$ 1177 | address empty$ t empty$ and 1178 | year empty$ and month empty$ and 1179 | { skip$ } 1180 | { this.to.prev.status 1181 | this.status.std 1182 | cap.status.std 1183 | address "address" bibinfo.check * 1184 | t empty$ 1185 | { skip$ } 1186 | { punct.period 'prev.status.punct := 1187 | space.large 'prev.status.space := 1188 | address empty$ 1189 | { skip$ } 1190 | { ": " * } 1191 | if$ 1192 | t * 1193 | } 1194 | if$ 1195 | year empty$ month empty$ and 1196 | { skip$ } 1197 | { t empty$ address empty$ and 1198 | { skip$ } 1199 | { ", " * } 1200 | if$ 1201 | month empty$ 1202 | { year empty$ 1203 | { skip$ } 1204 | { year "year" bibinfo.check * } 1205 | if$ 1206 | } 1207 | { month "month" bibinfo.check * 1208 | year empty$ 1209 | { skip$ } 1210 | { " " * year "year" bibinfo.check * } 1211 | if$ 1212 | } 1213 | if$ 1214 | } 1215 | if$ 1216 | } 1217 | if$ 1218 | } 1219 | 1220 | 1221 | FUNCTION {format.names} 1222 | { 'bibinfo := 1223 | duplicate$ empty$ 'skip$ { 1224 | this.to.prev.status 1225 | this.status.std 1226 | 's := 1227 | "" 't := 1228 | #1 'nameptr := 1229 | s num.names$ 'numnames := 1230 | numnames 'namesleft := 1231 | { namesleft #0 > } 1232 | { s nameptr 1233 | name.format.string 1234 | format.name$ 1235 | bibinfo bibinfo.check 1236 | 't := 1237 | nameptr #1 > 1238 | { nameptr num.names.shown.with.forced.et.al #1 + = 1239 | numnames max.num.names.before.forced.et.al > 1240 | is.forced.et.al and and 1241 | { "others" 't := 1242 | #1 'namesleft := 1243 | } 1244 | { skip$ } 1245 | if$ 1246 | namesleft #1 > 1247 | { ", " * t do.name.latex.cmd * } 1248 | { s nameptr "{ll}" format.name$ duplicate$ "others" = 1249 | { 't := } 1250 | { pop$ } 1251 | if$ 1252 | t "others" = 1253 | { " " * bbl.etal emphasize * } 1254 | { numnames #2 > 1255 | { "," * } 1256 | { skip$ } 1257 | if$ 1258 | bbl.and 1259 | space.word * t do.name.latex.cmd * 1260 | } 1261 | if$ 1262 | } 1263 | if$ 1264 | } 1265 | { t do.name.latex.cmd } 1266 | if$ 1267 | nameptr #1 + 'nameptr := 1268 | namesleft #1 - 'namesleft := 1269 | } 1270 | while$ 1271 | cap.status.std 1272 | } if$ 1273 | } 1274 | 1275 | 1276 | 1277 | 1278 | %% Higher Level Formats 1279 | 1280 | %% addresses/locations 1281 | 1282 | FUNCTION {format.address} 1283 | { address duplicate$ empty$ 'skip$ 1284 | { this.to.prev.status 1285 | this.status.std 1286 | cap.status.std 1287 | } 1288 | if$ 1289 | } 1290 | 1291 | 1292 | 1293 | %% author/editor names 1294 | 1295 | FUNCTION {format.authors}{ author "author" format.names } 1296 | 1297 | FUNCTION {format.editors} 1298 | { editor "editor" format.names duplicate$ empty$ 'skip$ 1299 | { ", " * 1300 | get.bbl.editor 1301 | capitalize 1302 | * 1303 | } 1304 | if$ 1305 | } 1306 | 1307 | 1308 | 1309 | %% date 1310 | 1311 | FUNCTION {format.date} 1312 | { 1313 | month "month" bibinfo.check duplicate$ empty$ 1314 | year "year" bibinfo.check duplicate$ empty$ 1315 | { swap$ 'skip$ 1316 | { this.to.prev.status 1317 | this.status.std 1318 | cap.status.std 1319 | "there's a month but no year in " cite$ * warning$ } 1320 | if$ 1321 | * 1322 | } 1323 | { this.to.prev.status 1324 | this.status.std 1325 | cap.status.std 1326 | swap$ 'skip$ 1327 | { 1328 | swap$ 1329 | " " * swap$ 1330 | } 1331 | if$ 1332 | * 1333 | } 1334 | if$ 1335 | } 1336 | 1337 | FUNCTION {format.date.electronic} 1338 | { month "month" bibinfo.check duplicate$ empty$ 1339 | year "year" bibinfo.check duplicate$ empty$ 1340 | { swap$ 1341 | { pop$ } 1342 | { "there's a month but no year in " cite$ * warning$ 1343 | pop$ ")" * "(" swap$ * 1344 | this.to.prev.status 1345 | punct.no 'this.status.punct := 1346 | space.normal 'this.status.space := 1347 | quote.no 'this.status.quote := 1348 | cap.yes 'status.cap := 1349 | } 1350 | if$ 1351 | } 1352 | { swap$ 1353 | { swap$ pop$ ")" * "(" swap$ * } 1354 | { "(" swap$ * ", " * swap$ * ")" * } 1355 | if$ 1356 | this.to.prev.status 1357 | punct.no 'this.status.punct := 1358 | space.normal 'this.status.space := 1359 | quote.no 'this.status.quote := 1360 | cap.yes 'status.cap := 1361 | } 1362 | if$ 1363 | } 1364 | 1365 | 1366 | 1367 | %% edition/title 1368 | 1369 | % Note: IEEE considers the edition to be closely associated with 1370 | % the title of a book. So, in IEEEtran.bst the edition is normally handled 1371 | % within the formatting of the title. The format.edition function is 1372 | % retained here for possible future use. 1373 | FUNCTION {format.edition} 1374 | { edition duplicate$ empty$ 'skip$ 1375 | { this.to.prev.status 1376 | this.status.std 1377 | convert.edition 1378 | status.cap 1379 | { "t" } 1380 | { "l" } 1381 | if$ change.case$ 1382 | "edition" bibinfo.check 1383 | "~" * bbl.edition * 1384 | cap.status.std 1385 | } 1386 | if$ 1387 | } 1388 | 1389 | % This is used to format the booktitle of a conference proceedings. 1390 | % Here we use the "intype" field to provide the user a way to 1391 | % override the word "in" (e.g., with things like "presented at") 1392 | % Use of intype stops the emphasis of the booktitle to indicate that 1393 | % we no longer mean the written conference proceedings, but the 1394 | % conference itself. 1395 | FUNCTION {format.in.booktitle} 1396 | { booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$ 1397 | { this.to.prev.status 1398 | this.status.std 1399 | select.language 1400 | intype missing$ 1401 | { emphasize 1402 | bbl.in " " * 1403 | } 1404 | { intype " " * } 1405 | if$ 1406 | swap$ * 1407 | cap.status.std 1408 | } 1409 | if$ 1410 | } 1411 | 1412 | % This is used to format the booktitle of collection. 1413 | % Here the "intype" field is not supported, but "edition" is. 1414 | FUNCTION {format.in.booktitle.edition} 1415 | { booktitle "booktitle" bibinfo.check duplicate$ empty$ 'skip$ 1416 | { this.to.prev.status 1417 | this.status.std 1418 | select.language 1419 | emphasize 1420 | edition empty$ 'skip$ 1421 | { ", " * 1422 | edition 1423 | convert.edition 1424 | "l" change.case$ 1425 | * "~" * bbl.edition * 1426 | } 1427 | if$ 1428 | bbl.in " " * swap$ * 1429 | cap.status.std 1430 | } 1431 | if$ 1432 | } 1433 | 1434 | FUNCTION {format.article.title} 1435 | { title duplicate$ empty$ 'skip$ 1436 | { this.to.prev.status 1437 | this.status.std 1438 | "t" change.case$ 1439 | } 1440 | if$ 1441 | "title" bibinfo.check 1442 | duplicate$ empty$ 'skip$ 1443 | { quote.close 'this.status.quote := 1444 | is.last.char.not.punct 1445 | { punct.std 'this.status.punct := } 1446 | { punct.no 'this.status.punct := } 1447 | if$ 1448 | select.language 1449 | "``" swap$ * 1450 | cap.status.std 1451 | } 1452 | if$ 1453 | } 1454 | 1455 | FUNCTION {format.article.title.electronic} 1456 | { title duplicate$ empty$ 'skip$ 1457 | { this.to.prev.status 1458 | this.status.std 1459 | cap.status.std 1460 | "t" change.case$ 1461 | } 1462 | if$ 1463 | "title" bibinfo.check 1464 | duplicate$ empty$ 1465 | { skip$ } 1466 | { select.language } 1467 | if$ 1468 | } 1469 | 1470 | FUNCTION {format.book.title.edition} 1471 | { title "title" bibinfo.check 1472 | duplicate$ empty$ 1473 | { "empty title in " cite$ * warning$ } 1474 | { this.to.prev.status 1475 | this.status.std 1476 | select.language 1477 | emphasize 1478 | edition empty$ 'skip$ 1479 | { ", " * 1480 | edition 1481 | convert.edition 1482 | status.cap 1483 | { "t" } 1484 | { "l" } 1485 | if$ 1486 | change.case$ 1487 | * "~" * bbl.edition * 1488 | } 1489 | if$ 1490 | cap.status.std 1491 | } 1492 | if$ 1493 | } 1494 | 1495 | FUNCTION {format.book.title} 1496 | { title "title" bibinfo.check 1497 | duplicate$ empty$ 'skip$ 1498 | { this.to.prev.status 1499 | this.status.std 1500 | cap.status.std 1501 | select.language 1502 | emphasize 1503 | } 1504 | if$ 1505 | } 1506 | 1507 | 1508 | 1509 | %% journal 1510 | 1511 | FUNCTION {format.journal} 1512 | { journal duplicate$ empty$ 'skip$ 1513 | { this.to.prev.status 1514 | this.status.std 1515 | cap.status.std 1516 | select.language 1517 | emphasize 1518 | } 1519 | if$ 1520 | } 1521 | 1522 | 1523 | 1524 | %% how published 1525 | 1526 | FUNCTION {format.howpublished} 1527 | { howpublished duplicate$ empty$ 'skip$ 1528 | { this.to.prev.status 1529 | this.status.std 1530 | cap.status.std 1531 | } 1532 | if$ 1533 | } 1534 | 1535 | 1536 | 1537 | %% institutions/organization/publishers/school 1538 | 1539 | FUNCTION {format.institution} 1540 | { institution duplicate$ empty$ 'skip$ 1541 | { this.to.prev.status 1542 | this.status.std 1543 | cap.status.std 1544 | } 1545 | if$ 1546 | } 1547 | 1548 | FUNCTION {format.organization} 1549 | { organization duplicate$ empty$ 'skip$ 1550 | { this.to.prev.status 1551 | this.status.std 1552 | cap.status.std 1553 | } 1554 | if$ 1555 | } 1556 | 1557 | FUNCTION {format.address.publisher.date} 1558 | { publisher "publisher" bibinfo.warn format.address.org.or.pub.date } 1559 | 1560 | FUNCTION {format.address.publisher.date.nowarn} 1561 | { publisher "publisher" bibinfo.check format.address.org.or.pub.date } 1562 | 1563 | FUNCTION {format.address.organization.date} 1564 | { organization "organization" bibinfo.check format.address.org.or.pub.date } 1565 | 1566 | FUNCTION {format.school} 1567 | { school duplicate$ empty$ 'skip$ 1568 | { this.to.prev.status 1569 | this.status.std 1570 | cap.status.std 1571 | } 1572 | if$ 1573 | } 1574 | 1575 | 1576 | 1577 | %% volume/number/series/chapter/pages 1578 | 1579 | FUNCTION {format.volume} 1580 | { volume empty.field.to.null.string 1581 | duplicate$ empty$ 'skip$ 1582 | { this.to.prev.status 1583 | this.status.std 1584 | bbl.volume 1585 | status.cap 1586 | { capitalize } 1587 | { skip$ } 1588 | if$ 1589 | swap$ tie.or.space.prefix 1590 | "volume" bibinfo.check 1591 | * * 1592 | cap.status.std 1593 | } 1594 | if$ 1595 | } 1596 | 1597 | FUNCTION {format.number} 1598 | { number empty.field.to.null.string 1599 | duplicate$ empty$ 'skip$ 1600 | { this.to.prev.status 1601 | this.status.std 1602 | status.cap 1603 | { bbl.number capitalize } 1604 | { bbl.number } 1605 | if$ 1606 | swap$ tie.or.space.prefix 1607 | "number" bibinfo.check 1608 | * * 1609 | cap.status.std 1610 | } 1611 | if$ 1612 | } 1613 | 1614 | FUNCTION {format.number.if.use.for.article} 1615 | { is.use.number.for.article 1616 | { format.number } 1617 | { "" } 1618 | if$ 1619 | } 1620 | 1621 | % IEEE does not seem to tie the series so closely with the volume 1622 | % and number as is done in other bibliography styles. Instead the 1623 | % series is treated somewhat like an extension of the title. 1624 | FUNCTION {format.series} 1625 | { series empty$ 1626 | { "" } 1627 | { this.to.prev.status 1628 | this.status.std 1629 | bbl.series " " * 1630 | series "series" bibinfo.check * 1631 | cap.status.std 1632 | } 1633 | if$ 1634 | } 1635 | 1636 | 1637 | FUNCTION {format.chapter} 1638 | { chapter empty$ 1639 | { "" } 1640 | { this.to.prev.status 1641 | this.status.std 1642 | type empty$ 1643 | { bbl.chapter } 1644 | { type "l" change.case$ 1645 | "type" bibinfo.check 1646 | } 1647 | if$ 1648 | chapter tie.or.space.prefix 1649 | "chapter" bibinfo.check 1650 | * * 1651 | cap.status.std 1652 | } 1653 | if$ 1654 | } 1655 | 1656 | 1657 | % The intended use of format.paper is for paper numbers of inproceedings. 1658 | % The paper type can be overridden via the type field. 1659 | % We allow the type to be displayed even if the paper number is absent 1660 | % for things like "postdeadline paper" 1661 | FUNCTION {format.paper} 1662 | { is.use.paper 1663 | { paper empty$ 1664 | { type empty$ 1665 | { "" } 1666 | { this.to.prev.status 1667 | this.status.std 1668 | type "type" bibinfo.check 1669 | cap.status.std 1670 | } 1671 | if$ 1672 | } 1673 | { this.to.prev.status 1674 | this.status.std 1675 | type empty$ 1676 | { bbl.paper } 1677 | { type "type" bibinfo.check } 1678 | if$ 1679 | " " * paper 1680 | "paper" bibinfo.check 1681 | * 1682 | cap.status.std 1683 | } 1684 | if$ 1685 | } 1686 | { "" } 1687 | if$ 1688 | } 1689 | 1690 | 1691 | FUNCTION {format.pages} 1692 | { pages duplicate$ empty$ 'skip$ 1693 | { this.to.prev.status 1694 | this.status.std 1695 | duplicate$ is.multiple.pages 1696 | { 1697 | bbl.pages swap$ 1698 | n.dashify 1699 | } 1700 | { 1701 | bbl.page swap$ 1702 | } 1703 | if$ 1704 | tie.or.space.prefix 1705 | "pages" bibinfo.check 1706 | * * 1707 | cap.status.std 1708 | } 1709 | if$ 1710 | } 1711 | 1712 | 1713 | 1714 | %% technical report number 1715 | 1716 | FUNCTION {format.tech.report.number} 1717 | { number "number" bibinfo.check 1718 | this.to.prev.status 1719 | this.status.std 1720 | cap.status.std 1721 | type duplicate$ empty$ 1722 | { pop$ 1723 | bbl.techrep 1724 | } 1725 | { skip$ } 1726 | if$ 1727 | "type" bibinfo.check 1728 | swap$ duplicate$ empty$ 1729 | { pop$ } 1730 | { tie.or.space.prefix * * } 1731 | if$ 1732 | } 1733 | 1734 | 1735 | 1736 | %% note 1737 | 1738 | FUNCTION {format.note} 1739 | { note empty$ 1740 | { "" } 1741 | { this.to.prev.status 1742 | this.status.std 1743 | punct.period 'this.status.punct := 1744 | note #1 #1 substring$ 1745 | duplicate$ "{" = 1746 | { skip$ } 1747 | { status.cap 1748 | { "u" } 1749 | { "l" } 1750 | if$ 1751 | change.case$ 1752 | } 1753 | if$ 1754 | note #2 global.max$ substring$ * "note" bibinfo.check 1755 | cap.yes 'status.cap := 1756 | } 1757 | if$ 1758 | } 1759 | 1760 | 1761 | 1762 | %% patent 1763 | 1764 | FUNCTION {format.patent.date} 1765 | { this.to.prev.status 1766 | this.status.std 1767 | year empty$ 1768 | { monthfiled duplicate$ empty$ 1769 | { "monthfiled" bibinfo.check pop$ "" } 1770 | { "monthfiled" bibinfo.check } 1771 | if$ 1772 | dayfiled duplicate$ empty$ 1773 | { "dayfiled" bibinfo.check pop$ "" * } 1774 | { "dayfiled" bibinfo.check 1775 | monthfiled empty$ 1776 | { "dayfiled without a monthfiled in " cite$ * warning$ 1777 | * 1778 | } 1779 | { " " swap$ * * } 1780 | if$ 1781 | } 1782 | if$ 1783 | yearfiled empty$ 1784 | { "no year or yearfiled in " cite$ * warning$ } 1785 | { yearfiled "yearfiled" bibinfo.check 1786 | swap$ 1787 | duplicate$ empty$ 1788 | { pop$ } 1789 | { ", " * swap$ * } 1790 | if$ 1791 | } 1792 | if$ 1793 | } 1794 | { month duplicate$ empty$ 1795 | { "month" bibinfo.check pop$ "" } 1796 | { "month" bibinfo.check } 1797 | if$ 1798 | day duplicate$ empty$ 1799 | { "day" bibinfo.check pop$ "" * } 1800 | { "day" bibinfo.check 1801 | month empty$ 1802 | { "day without a month in " cite$ * warning$ 1803 | * 1804 | } 1805 | { " " swap$ * * } 1806 | if$ 1807 | } 1808 | if$ 1809 | year "year" bibinfo.check 1810 | swap$ 1811 | duplicate$ empty$ 1812 | { pop$ } 1813 | { ", " * swap$ * } 1814 | if$ 1815 | } 1816 | if$ 1817 | cap.status.std 1818 | } 1819 | 1820 | FUNCTION {format.patent.nationality.type.number} 1821 | { this.to.prev.status 1822 | this.status.std 1823 | nationality duplicate$ empty$ 1824 | { "nationality" bibinfo.warn pop$ "" } 1825 | { "nationality" bibinfo.check 1826 | duplicate$ "l" change.case$ "united states" = 1827 | { pop$ bbl.patentUS } 1828 | { skip$ } 1829 | if$ 1830 | " " * 1831 | } 1832 | if$ 1833 | type empty$ 1834 | { bbl.patent "type" bibinfo.check } 1835 | { type "type" bibinfo.check } 1836 | if$ 1837 | * 1838 | number duplicate$ empty$ 1839 | { "number" bibinfo.warn pop$ } 1840 | { "number" bibinfo.check 1841 | large.number.separate 1842 | swap$ " " * swap$ * 1843 | } 1844 | if$ 1845 | cap.status.std 1846 | } 1847 | 1848 | 1849 | 1850 | %% standard 1851 | 1852 | FUNCTION {format.organization.institution.standard.type.number} 1853 | { this.to.prev.status 1854 | this.status.std 1855 | organization duplicate$ empty$ 1856 | { pop$ 1857 | institution duplicate$ empty$ 1858 | { "institution" bibinfo.warn } 1859 | { "institution" bibinfo.warn " " * } 1860 | if$ 1861 | } 1862 | { "organization" bibinfo.warn " " * } 1863 | if$ 1864 | type empty$ 1865 | { bbl.standard "type" bibinfo.check } 1866 | { type "type" bibinfo.check } 1867 | if$ 1868 | * 1869 | number duplicate$ empty$ 1870 | { "number" bibinfo.check pop$ } 1871 | { "number" bibinfo.check 1872 | large.number.separate 1873 | swap$ " " * swap$ * 1874 | } 1875 | if$ 1876 | cap.status.std 1877 | } 1878 | 1879 | FUNCTION {format.revision} 1880 | { revision empty$ 1881 | { "" } 1882 | { this.to.prev.status 1883 | this.status.std 1884 | bbl.revision 1885 | revision tie.or.space.prefix 1886 | "revision" bibinfo.check 1887 | * * 1888 | cap.status.std 1889 | } 1890 | if$ 1891 | } 1892 | 1893 | 1894 | %% thesis 1895 | 1896 | FUNCTION {format.master.thesis.type} 1897 | { this.to.prev.status 1898 | this.status.std 1899 | type empty$ 1900 | { 1901 | bbl.mthesis 1902 | } 1903 | { 1904 | type "type" bibinfo.check 1905 | } 1906 | if$ 1907 | cap.status.std 1908 | } 1909 | 1910 | FUNCTION {format.phd.thesis.type} 1911 | { this.to.prev.status 1912 | this.status.std 1913 | type empty$ 1914 | { 1915 | bbl.phdthesis 1916 | } 1917 | { 1918 | type "type" bibinfo.check 1919 | } 1920 | if$ 1921 | cap.status.std 1922 | } 1923 | 1924 | 1925 | 1926 | %% URL 1927 | 1928 | FUNCTION {format.url} 1929 | { url empty$ 1930 | { "" } 1931 | { this.to.prev.status 1932 | this.status.std 1933 | cap.yes 'status.cap := 1934 | name.url.prefix " " * 1935 | "\url{" * url * "}" * 1936 | punct.no 'this.status.punct := 1937 | punct.period 'prev.status.punct := 1938 | space.normal 'this.status.space := 1939 | space.normal 'prev.status.space := 1940 | quote.no 'this.status.quote := 1941 | } 1942 | if$ 1943 | } 1944 | 1945 | 1946 | 1947 | 1948 | %%%%%%%%%%%%%%%%%%%% 1949 | %% ENTRY HANDLERS %% 1950 | %%%%%%%%%%%%%%%%%%%% 1951 | 1952 | 1953 | % Note: In many journals, IEEE (or the authors) tend not to show the number 1954 | % for articles, so the display of the number is controlled here by the 1955 | % switch "is.use.number.for.article" 1956 | FUNCTION {article} 1957 | { std.status.using.comma 1958 | start.entry 1959 | if.url.alt.interword.spacing 1960 | format.authors "author" output.warn 1961 | name.or.dash 1962 | format.article.title "title" output.warn 1963 | format.journal "journal" bibinfo.check "journal" output.warn 1964 | format.volume output 1965 | format.number.if.use.for.article output 1966 | format.pages output 1967 | format.date "year" output.warn 1968 | format.note output 1969 | format.url output 1970 | fin.entry 1971 | if.url.std.interword.spacing 1972 | } 1973 | 1974 | FUNCTION {book} 1975 | { std.status.using.comma 1976 | start.entry 1977 | if.url.alt.interword.spacing 1978 | author empty$ 1979 | { format.editors "author and editor" output.warn } 1980 | { format.authors output.nonnull } 1981 | if$ 1982 | name.or.dash 1983 | format.book.title.edition output 1984 | format.series output 1985 | author empty$ 1986 | { skip$ } 1987 | { format.editors output } 1988 | if$ 1989 | format.address.publisher.date output 1990 | format.volume output 1991 | format.number output 1992 | format.note output 1993 | format.url output 1994 | fin.entry 1995 | if.url.std.interword.spacing 1996 | } 1997 | 1998 | FUNCTION {booklet} 1999 | { std.status.using.comma 2000 | start.entry 2001 | if.url.alt.interword.spacing 2002 | format.authors output 2003 | name.or.dash 2004 | format.article.title "title" output.warn 2005 | format.howpublished "howpublished" bibinfo.check output 2006 | format.organization "organization" bibinfo.check output 2007 | format.address "address" bibinfo.check output 2008 | format.date output 2009 | format.note output 2010 | format.url output 2011 | fin.entry 2012 | if.url.std.interword.spacing 2013 | } 2014 | 2015 | FUNCTION {electronic} 2016 | { std.status.using.period 2017 | start.entry 2018 | if.url.alt.interword.spacing 2019 | format.authors output 2020 | name.or.dash 2021 | format.date.electronic output 2022 | format.article.title.electronic output 2023 | format.howpublished "howpublished" bibinfo.check output 2024 | format.organization "organization" bibinfo.check output 2025 | format.address "address" bibinfo.check output 2026 | format.note output 2027 | format.url output 2028 | fin.entry 2029 | empty.entry.warn 2030 | if.url.std.interword.spacing 2031 | } 2032 | 2033 | FUNCTION {inbook} 2034 | { std.status.using.comma 2035 | start.entry 2036 | if.url.alt.interword.spacing 2037 | author empty$ 2038 | { format.editors "author and editor" output.warn } 2039 | { format.authors output.nonnull } 2040 | if$ 2041 | name.or.dash 2042 | format.book.title.edition output 2043 | format.series output 2044 | format.address.publisher.date output 2045 | format.volume output 2046 | format.number output 2047 | format.chapter output 2048 | format.pages output 2049 | format.note output 2050 | format.url output 2051 | fin.entry 2052 | if.url.std.interword.spacing 2053 | } 2054 | 2055 | FUNCTION {incollection} 2056 | { std.status.using.comma 2057 | start.entry 2058 | if.url.alt.interword.spacing 2059 | format.authors "author" output.warn 2060 | name.or.dash 2061 | format.article.title "title" output.warn 2062 | format.in.booktitle.edition "booktitle" output.warn 2063 | format.series output 2064 | format.editors output 2065 | format.address.publisher.date.nowarn output 2066 | format.volume output 2067 | format.number output 2068 | format.chapter output 2069 | format.pages output 2070 | format.note output 2071 | format.url output 2072 | fin.entry 2073 | if.url.std.interword.spacing 2074 | } 2075 | 2076 | FUNCTION {inproceedings} 2077 | { std.status.using.comma 2078 | start.entry 2079 | if.url.alt.interword.spacing 2080 | format.authors "author" output.warn 2081 | name.or.dash 2082 | format.article.title "title" output.warn 2083 | format.in.booktitle "booktitle" output.warn 2084 | format.series output 2085 | format.editors output 2086 | format.volume output 2087 | format.number output 2088 | publisher empty$ 2089 | { format.address.organization.date output } 2090 | { format.organization "organization" bibinfo.check output 2091 | format.address.publisher.date output 2092 | } 2093 | if$ 2094 | format.paper output 2095 | format.pages output 2096 | format.note output 2097 | format.url output 2098 | fin.entry 2099 | if.url.std.interword.spacing 2100 | } 2101 | 2102 | FUNCTION {manual} 2103 | { std.status.using.comma 2104 | start.entry 2105 | if.url.alt.interword.spacing 2106 | format.authors output 2107 | name.or.dash 2108 | format.book.title.edition "title" output.warn 2109 | format.howpublished "howpublished" bibinfo.check output 2110 | format.organization "organization" bibinfo.check output 2111 | format.address "address" bibinfo.check output 2112 | format.date output 2113 | format.note output 2114 | format.url output 2115 | fin.entry 2116 | if.url.std.interword.spacing 2117 | } 2118 | 2119 | FUNCTION {mastersthesis} 2120 | { std.status.using.comma 2121 | start.entry 2122 | if.url.alt.interword.spacing 2123 | format.authors "author" output.warn 2124 | name.or.dash 2125 | format.article.title "title" output.warn 2126 | format.master.thesis.type output.nonnull 2127 | format.school "school" bibinfo.warn output 2128 | format.address "address" bibinfo.check output 2129 | format.date "year" output.warn 2130 | format.note output 2131 | format.url output 2132 | fin.entry 2133 | if.url.std.interword.spacing 2134 | } 2135 | 2136 | FUNCTION {misc} 2137 | { std.status.using.comma 2138 | start.entry 2139 | if.url.alt.interword.spacing 2140 | format.authors output 2141 | name.or.dash 2142 | format.article.title output 2143 | format.howpublished "howpublished" bibinfo.check output 2144 | format.organization "organization" bibinfo.check output 2145 | format.address "address" bibinfo.check output 2146 | format.pages output 2147 | format.date output 2148 | format.note output 2149 | format.url output 2150 | fin.entry 2151 | empty.entry.warn 2152 | if.url.std.interword.spacing 2153 | } 2154 | 2155 | FUNCTION {patent} 2156 | { std.status.using.comma 2157 | start.entry 2158 | if.url.alt.interword.spacing 2159 | format.authors output 2160 | name.or.dash 2161 | format.article.title output 2162 | format.patent.nationality.type.number output 2163 | format.patent.date output 2164 | format.note output 2165 | format.url output 2166 | fin.entry 2167 | empty.entry.warn 2168 | if.url.std.interword.spacing 2169 | } 2170 | 2171 | FUNCTION {periodical} 2172 | { std.status.using.comma 2173 | start.entry 2174 | if.url.alt.interword.spacing 2175 | format.editors output 2176 | name.or.dash 2177 | format.book.title "title" output.warn 2178 | format.series output 2179 | format.volume output 2180 | format.number output 2181 | format.organization "organization" bibinfo.check output 2182 | format.date "year" output.warn 2183 | format.note output 2184 | format.url output 2185 | fin.entry 2186 | if.url.std.interword.spacing 2187 | } 2188 | 2189 | FUNCTION {phdthesis} 2190 | { std.status.using.comma 2191 | start.entry 2192 | if.url.alt.interword.spacing 2193 | format.authors "author" output.warn 2194 | name.or.dash 2195 | format.article.title "title" output.warn 2196 | format.phd.thesis.type output.nonnull 2197 | format.school "school" bibinfo.warn output 2198 | format.address "address" bibinfo.check output 2199 | format.date "year" output.warn 2200 | format.note output 2201 | format.url output 2202 | fin.entry 2203 | if.url.std.interword.spacing 2204 | } 2205 | 2206 | FUNCTION {proceedings} 2207 | { std.status.using.comma 2208 | start.entry 2209 | if.url.alt.interword.spacing 2210 | format.editors output 2211 | name.or.dash 2212 | format.book.title "title" output.warn 2213 | format.series output 2214 | format.volume output 2215 | format.number output 2216 | publisher empty$ 2217 | { format.address.organization.date output } 2218 | { format.organization "organization" bibinfo.check output 2219 | format.address.publisher.date output 2220 | } 2221 | if$ 2222 | format.note output 2223 | format.url output 2224 | fin.entry 2225 | if.url.std.interword.spacing 2226 | } 2227 | 2228 | FUNCTION {standard} 2229 | { std.status.using.comma 2230 | start.entry 2231 | if.url.alt.interword.spacing 2232 | format.authors output 2233 | name.or.dash 2234 | format.book.title "title" output.warn 2235 | format.howpublished "howpublished" bibinfo.check output 2236 | format.organization.institution.standard.type.number output 2237 | format.revision output 2238 | format.date output 2239 | format.note output 2240 | format.url output 2241 | fin.entry 2242 | if.url.std.interword.spacing 2243 | } 2244 | 2245 | FUNCTION {techreport} 2246 | { std.status.using.comma 2247 | start.entry 2248 | if.url.alt.interword.spacing 2249 | format.authors "author" output.warn 2250 | name.or.dash 2251 | format.article.title "title" output.warn 2252 | format.howpublished "howpublished" bibinfo.check output 2253 | format.institution "institution" bibinfo.warn output 2254 | format.address "address" bibinfo.check output 2255 | format.tech.report.number output.nonnull 2256 | format.date "year" output.warn 2257 | format.note output 2258 | format.url output 2259 | fin.entry 2260 | if.url.std.interword.spacing 2261 | } 2262 | 2263 | FUNCTION {unpublished} 2264 | { std.status.using.comma 2265 | start.entry 2266 | if.url.alt.interword.spacing 2267 | format.authors "author" output.warn 2268 | name.or.dash 2269 | format.article.title "title" output.warn 2270 | format.date output 2271 | format.note "note" output.warn 2272 | format.url output 2273 | fin.entry 2274 | if.url.std.interword.spacing 2275 | } 2276 | 2277 | 2278 | % The special entry type which provides the user interface to the 2279 | % BST controls 2280 | FUNCTION {IEEEtranBSTCTL} 2281 | { is.print.banners.to.terminal 2282 | { "** IEEEtran BST control entry " quote$ * cite$ * quote$ * " detected." * 2283 | top$ 2284 | } 2285 | { skip$ } 2286 | if$ 2287 | CTLuse_article_number 2288 | empty$ 2289 | { skip$ } 2290 | { CTLuse_article_number 2291 | yes.no.to.int 2292 | 'is.use.number.for.article := 2293 | } 2294 | if$ 2295 | CTLuse_paper 2296 | empty$ 2297 | { skip$ } 2298 | { CTLuse_paper 2299 | yes.no.to.int 2300 | 'is.use.paper := 2301 | } 2302 | if$ 2303 | CTLuse_forced_etal 2304 | empty$ 2305 | { skip$ } 2306 | { CTLuse_forced_etal 2307 | yes.no.to.int 2308 | 'is.forced.et.al := 2309 | } 2310 | if$ 2311 | CTLmax_names_forced_etal 2312 | empty$ 2313 | { skip$ } 2314 | { CTLmax_names_forced_etal 2315 | string.to.integer 2316 | 'max.num.names.before.forced.et.al := 2317 | } 2318 | if$ 2319 | CTLnames_show_etal 2320 | empty$ 2321 | { skip$ } 2322 | { CTLnames_show_etal 2323 | string.to.integer 2324 | 'num.names.shown.with.forced.et.al := 2325 | } 2326 | if$ 2327 | CTLuse_alt_spacing 2328 | empty$ 2329 | { skip$ } 2330 | { CTLuse_alt_spacing 2331 | yes.no.to.int 2332 | 'is.use.alt.interword.spacing := 2333 | } 2334 | if$ 2335 | CTLalt_stretch_factor 2336 | empty$ 2337 | { skip$ } 2338 | { CTLalt_stretch_factor 2339 | 'ALTinterwordstretchfactor := 2340 | "\renewcommand{\BIBentryALTinterwordstretchfactor}{" 2341 | ALTinterwordstretchfactor * "}" * 2342 | write$ newline$ 2343 | } 2344 | if$ 2345 | CTLdash_repeated_names 2346 | empty$ 2347 | { skip$ } 2348 | { CTLdash_repeated_names 2349 | yes.no.to.int 2350 | 'is.dash.repeated.names := 2351 | } 2352 | if$ 2353 | CTLname_format_string 2354 | empty$ 2355 | { skip$ } 2356 | { CTLname_format_string 2357 | 'name.format.string := 2358 | } 2359 | if$ 2360 | CTLname_latex_cmd 2361 | empty$ 2362 | { skip$ } 2363 | { CTLname_latex_cmd 2364 | 'name.latex.cmd := 2365 | } 2366 | if$ 2367 | CTLname_url_prefix 2368 | missing$ 2369 | { skip$ } 2370 | { CTLname_url_prefix 2371 | 'name.url.prefix := 2372 | } 2373 | if$ 2374 | 2375 | 2376 | num.names.shown.with.forced.et.al max.num.names.before.forced.et.al > 2377 | { "CTLnames_show_etal cannot be greater than CTLmax_names_forced_etal in " cite$ * warning$ 2378 | max.num.names.before.forced.et.al 'num.names.shown.with.forced.et.al := 2379 | } 2380 | { skip$ } 2381 | if$ 2382 | } 2383 | 2384 | 2385 | %%%%%%%%%%%%%%%%%%% 2386 | %% ENTRY ALIASES %% 2387 | %%%%%%%%%%%%%%%%%%% 2388 | FUNCTION {conference}{inproceedings} 2389 | FUNCTION {online}{electronic} 2390 | FUNCTION {internet}{electronic} 2391 | FUNCTION {webpage}{electronic} 2392 | FUNCTION {www}{electronic} 2393 | FUNCTION {default.type}{misc} 2394 | 2395 | 2396 | 2397 | %%%%%%%%%%%%%%%%%% 2398 | %% MAIN PROGRAM %% 2399 | %%%%%%%%%%%%%%%%%% 2400 | 2401 | READ 2402 | 2403 | EXECUTE {initialize.controls} 2404 | EXECUTE {initialize.status.constants} 2405 | EXECUTE {banner.message} 2406 | 2407 | EXECUTE {initialize.longest.label} 2408 | ITERATE {longest.label.pass} 2409 | 2410 | EXECUTE {begin.bib} 2411 | ITERATE {call.type$} 2412 | EXECUTE {end.bib} 2413 | 2414 | EXECUTE{completed.message} 2415 | 2416 | 2417 | %% That's all folks, mds. 2418 | -------------------------------------------------------------------------------- /template/llncs.cls: -------------------------------------------------------------------------------- 1 | % LLNCS DOCUMENT CLASS -- version 2.20 (10-Mar-2018) 2 | % Springer Verlag LaTeX2e support for Lecture Notes in Computer Science 3 | % 4 | %% 5 | %% \CharacterTable 6 | %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z 7 | %% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z 8 | %% Digits \0\1\2\3\4\5\6\7\8\9 9 | %% Exclamation \! Double quote \" Hash (number) \# 10 | %% Dollar \$ Percent \% Ampersand \& 11 | %% Acute accent \' Left paren \( Right paren \) 12 | %% Asterisk \* Plus \+ Comma \, 13 | %% Minus \- Point \. Solidus \/ 14 | %% Colon \: Semicolon \; Less than \< 15 | %% Equals \= Greater than \> Question mark \? 16 | %% Commercial at \@ Left bracket \[ Backslash \\ 17 | %% Right bracket \] Circumflex \^ Underscore \_ 18 | %% Grave accent \` Left brace \{ Vertical bar \| 19 | %% Right brace \} Tilde \~} 20 | %% 21 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 22 | \ProvidesClass{llncs}[2018/03/10 v2.20 23 | ^^J LaTeX document class for Lecture Notes in Computer Science] 24 | % Options 25 | \let\if@envcntreset\iffalse 26 | \DeclareOption{envcountreset}{\let\if@envcntreset\iftrue} 27 | \DeclareOption{citeauthoryear}{\let\citeauthoryear=Y} 28 | \DeclareOption{oribibl}{\let\oribibl=Y} 29 | \let\if@custvec\iftrue 30 | \DeclareOption{orivec}{\let\if@custvec\iffalse} 31 | \let\if@envcntsame\iffalse 32 | \DeclareOption{envcountsame}{\let\if@envcntsame\iftrue} 33 | \let\if@envcntsect\iffalse 34 | \DeclareOption{envcountsect}{\let\if@envcntsect\iftrue} 35 | \let\if@runhead\iffalse 36 | \DeclareOption{runningheads}{\let\if@runhead\iftrue} 37 | 38 | \let\if@openright\iftrue 39 | \let\if@openbib\iffalse 40 | \DeclareOption{openbib}{\let\if@openbib\iftrue} 41 | 42 | % languages 43 | \let\switcht@@therlang\relax 44 | \def\ds@deutsch{\def\switcht@@therlang{\switcht@deutsch}} 45 | \def\ds@francais{\def\switcht@@therlang{\switcht@francais}} 46 | 47 | \DeclareOption*{\PassOptionsToClass{\CurrentOption}{article}} 48 | 49 | \ProcessOptions 50 | 51 | \LoadClass[twoside]{article} 52 | \RequirePackage{multicol} % needed for the list of participants, index 53 | \RequirePackage{aliascnt} 54 | 55 | \setlength{\textwidth}{12.2cm} 56 | \setlength{\textheight}{19.3cm} 57 | \renewcommand\@pnumwidth{2em} 58 | \renewcommand\@tocrmarg{3.5em} 59 | % 60 | \def\@dottedtocline#1#2#3#4#5{% 61 | \ifnum #1>\c@tocdepth \else 62 | \vskip \z@ \@plus.2\p@ 63 | {\leftskip #2\relax \rightskip \@tocrmarg \advance\rightskip by 0pt plus 2cm 64 | \parfillskip -\rightskip \pretolerance=10000 65 | \parindent #2\relax\@afterindenttrue 66 | \interlinepenalty\@M 67 | \leavevmode 68 | \@tempdima #3\relax 69 | \advance\leftskip \@tempdima \null\nobreak\hskip -\leftskip 70 | {#4}\nobreak 71 | \leaders\hbox{$\m@th 72 | \mkern \@dotsep mu\hbox{.}\mkern \@dotsep 73 | mu$}\hfill 74 | \nobreak 75 | \hb@xt@\@pnumwidth{\hfil\normalfont \normalcolor #5}% 76 | \par}% 77 | \fi} 78 | % 79 | \def\switcht@albion{% 80 | \def\abstractname{Abstract.} 81 | \def\ackname{Acknowledgement.} 82 | \def\andname{and} 83 | \def\lastandname{\unskip, and} 84 | \def\appendixname{Appendix} 85 | \def\chaptername{Chapter} 86 | \def\claimname{Claim} 87 | \def\conjecturename{Conjecture} 88 | \def\contentsname{Table of Contents} 89 | \def\corollaryname{Corollary} 90 | \def\definitionname{Definition} 91 | \def\examplename{Example} 92 | \def\exercisename{Exercise} 93 | \def\figurename{Fig.} 94 | \def\keywordname{{\bf Keywords:}} 95 | \def\indexname{Index} 96 | \def\lemmaname{Lemma} 97 | \def\contriblistname{List of Contributors} 98 | \def\listfigurename{List of Figures} 99 | \def\listtablename{List of Tables} 100 | \def\mailname{{\it Correspondence to\/}:} 101 | \def\noteaddname{Note added in proof} 102 | \def\notename{Note} 103 | \def\partname{Part} 104 | \def\problemname{Problem} 105 | \def\proofname{Proof} 106 | \def\propertyname{Property} 107 | \def\propositionname{Proposition} 108 | \def\questionname{Question} 109 | \def\remarkname{Remark} 110 | \def\seename{see} 111 | \def\solutionname{Solution} 112 | \def\subclassname{{\it Subject Classifications\/}:} 113 | \def\tablename{Table} 114 | \def\theoremname{Theorem}} 115 | \switcht@albion 116 | % Names of theorem like environments are already defined 117 | % but must be translated if another language is chosen 118 | % 119 | % French section 120 | \def\switcht@francais{%\typeout{On parle francais.}% 121 | \def\abstractname{R\'esum\'e.}% 122 | \def\ackname{Remerciements.}% 123 | \def\andname{et}% 124 | \def\lastandname{ et}% 125 | \def\appendixname{Appendice} 126 | \def\chaptername{Chapitre}% 127 | \def\claimname{Pr\'etention}% 128 | \def\conjecturename{Hypoth\`ese}% 129 | \def\contentsname{Table des mati\`eres}% 130 | \def\corollaryname{Corollaire}% 131 | \def\definitionname{D\'efinition}% 132 | \def\examplename{Exemple}% 133 | \def\exercisename{Exercice}% 134 | \def\figurename{Fig.}% 135 | \def\keywordname{{\bf Mots-cl\'e:}} 136 | \def\indexname{Index} 137 | \def\lemmaname{Lemme}% 138 | \def\contriblistname{Liste des contributeurs} 139 | \def\listfigurename{Liste des figures}% 140 | \def\listtablename{Liste des tables}% 141 | \def\mailname{{\it Correspondence to\/}:} 142 | \def\noteaddname{Note ajout\'ee \`a l'\'epreuve}% 143 | \def\notename{Remarque}% 144 | \def\partname{Partie}% 145 | \def\problemname{Probl\`eme}% 146 | \def\proofname{Preuve}% 147 | \def\propertyname{Caract\'eristique}% 148 | %\def\propositionname{Proposition}% 149 | \def\questionname{Question}% 150 | \def\remarkname{Remarque}% 151 | \def\seename{voir} 152 | \def\solutionname{Solution}% 153 | \def\subclassname{{\it Subject Classifications\/}:} 154 | \def\tablename{Tableau}% 155 | \def\theoremname{Th\'eor\`eme}% 156 | } 157 | % 158 | % German section 159 | \def\switcht@deutsch{%\typeout{Man spricht deutsch.}% 160 | \def\abstractname{Zusammenfassung.}% 161 | \def\ackname{Danksagung.}% 162 | \def\andname{und}% 163 | \def\lastandname{ und}% 164 | \def\appendixname{Anhang}% 165 | \def\chaptername{Kapitel}% 166 | \def\claimname{Behauptung}% 167 | \def\conjecturename{Hypothese}% 168 | \def\contentsname{Inhaltsverzeichnis}% 169 | \def\corollaryname{Korollar}% 170 | %\def\definitionname{Definition}% 171 | \def\examplename{Beispiel}% 172 | \def\exercisename{\"Ubung}% 173 | \def\figurename{Abb.}% 174 | \def\keywordname{{\bf Schl\"usselw\"orter:}} 175 | \def\indexname{Index} 176 | %\def\lemmaname{Lemma}% 177 | \def\contriblistname{Mitarbeiter} 178 | \def\listfigurename{Abbildungsverzeichnis}% 179 | \def\listtablename{Tabellenverzeichnis}% 180 | \def\mailname{{\it Correspondence to\/}:} 181 | \def\noteaddname{Nachtrag}% 182 | \def\notename{Anmerkung}% 183 | \def\partname{Teil}% 184 | %\def\problemname{Problem}% 185 | \def\proofname{Beweis}% 186 | \def\propertyname{Eigenschaft}% 187 | %\def\propositionname{Proposition}% 188 | \def\questionname{Frage}% 189 | \def\remarkname{Anmerkung}% 190 | \def\seename{siehe} 191 | \def\solutionname{L\"osung}% 192 | \def\subclassname{{\it Subject Classifications\/}:} 193 | \def\tablename{Tabelle}% 194 | %\def\theoremname{Theorem}% 195 | } 196 | 197 | % Ragged bottom for the actual page 198 | \def\thisbottomragged{\def\@textbottom{\vskip\z@ plus.0001fil 199 | \global\let\@textbottom\relax}} 200 | 201 | \renewcommand\small{% 202 | \@setfontsize\small\@ixpt{11}% 203 | \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ 204 | \abovedisplayshortskip \z@ \@plus2\p@ 205 | \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ 206 | \def\@listi{\leftmargin\leftmargini 207 | \parsep 0\p@ \@plus1\p@ \@minus\p@ 208 | \topsep 8\p@ \@plus2\p@ \@minus4\p@ 209 | \itemsep0\p@}% 210 | \belowdisplayskip \abovedisplayskip 211 | } 212 | 213 | \frenchspacing 214 | \widowpenalty=10000 215 | \clubpenalty=10000 216 | 217 | \setlength\oddsidemargin {63\p@} 218 | \setlength\evensidemargin {63\p@} 219 | \setlength\marginparwidth {90\p@} 220 | 221 | \setlength\headsep {16\p@} 222 | 223 | \setlength\footnotesep{7.7\p@} 224 | \setlength\textfloatsep{8mm\@plus 2\p@ \@minus 4\p@} 225 | \setlength\intextsep {8mm\@plus 2\p@ \@minus 2\p@} 226 | 227 | \setcounter{secnumdepth}{2} 228 | 229 | \newcounter {chapter} 230 | \renewcommand\thechapter {\@arabic\c@chapter} 231 | 232 | \newif\if@mainmatter \@mainmattertrue 233 | \newcommand\frontmatter{\cleardoublepage 234 | \@mainmatterfalse\pagenumbering{Roman}} 235 | \newcommand\mainmatter{\cleardoublepage 236 | \@mainmattertrue\pagenumbering{arabic}} 237 | \newcommand\backmatter{\if@openright\cleardoublepage\else\clearpage\fi 238 | \@mainmatterfalse} 239 | 240 | \renewcommand\part{\cleardoublepage 241 | \thispagestyle{empty}% 242 | \if@twocolumn 243 | \onecolumn 244 | \@tempswatrue 245 | \else 246 | \@tempswafalse 247 | \fi 248 | \null\vfil 249 | \secdef\@part\@spart} 250 | 251 | \def\@part[#1]#2{% 252 | \ifnum \c@secnumdepth >-2\relax 253 | \refstepcounter{part}% 254 | \addcontentsline{toc}{part}{\thepart\hspace{1em}#1}% 255 | \else 256 | \addcontentsline{toc}{part}{#1}% 257 | \fi 258 | \markboth{}{}% 259 | {\centering 260 | \interlinepenalty \@M 261 | \normalfont 262 | \ifnum \c@secnumdepth >-2\relax 263 | \huge\bfseries \partname~\thepart 264 | \par 265 | \vskip 20\p@ 266 | \fi 267 | \Huge \bfseries #2\par}% 268 | \@endpart} 269 | \def\@spart#1{% 270 | {\centering 271 | \interlinepenalty \@M 272 | \normalfont 273 | \Huge \bfseries #1\par}% 274 | \@endpart} 275 | \def\@endpart{\vfil\newpage 276 | \if@twoside 277 | \null 278 | \thispagestyle{empty}% 279 | \newpage 280 | \fi 281 | \if@tempswa 282 | \twocolumn 283 | \fi} 284 | 285 | \newcommand\chapter{\clearpage 286 | \thispagestyle{empty}% 287 | \global\@topnum\z@ 288 | \@afterindentfalse 289 | \secdef\@chapter\@schapter} 290 | \def\@chapter[#1]#2{\ifnum \c@secnumdepth >\m@ne 291 | \if@mainmatter 292 | \refstepcounter{chapter}% 293 | \typeout{\@chapapp\space\thechapter.}% 294 | \addcontentsline{toc}{chapter}% 295 | {\protect\numberline{\thechapter}#1}% 296 | \else 297 | \addcontentsline{toc}{chapter}{#1}% 298 | \fi 299 | \else 300 | \addcontentsline{toc}{chapter}{#1}% 301 | \fi 302 | \chaptermark{#1}% 303 | \addtocontents{lof}{\protect\addvspace{10\p@}}% 304 | \addtocontents{lot}{\protect\addvspace{10\p@}}% 305 | \if@twocolumn 306 | \@topnewpage[\@makechapterhead{#2}]% 307 | \else 308 | \@makechapterhead{#2}% 309 | \@afterheading 310 | \fi} 311 | \def\@makechapterhead#1{% 312 | % \vspace*{50\p@}% 313 | {\centering 314 | \ifnum \c@secnumdepth >\m@ne 315 | \if@mainmatter 316 | \large\bfseries \@chapapp{} \thechapter 317 | \par\nobreak 318 | \vskip 20\p@ 319 | \fi 320 | \fi 321 | \interlinepenalty\@M 322 | \Large \bfseries #1\par\nobreak 323 | \vskip 40\p@ 324 | }} 325 | \def\@schapter#1{\if@twocolumn 326 | \@topnewpage[\@makeschapterhead{#1}]% 327 | \else 328 | \@makeschapterhead{#1}% 329 | \@afterheading 330 | \fi} 331 | \def\@makeschapterhead#1{% 332 | % \vspace*{50\p@}% 333 | {\centering 334 | \normalfont 335 | \interlinepenalty\@M 336 | \Large \bfseries #1\par\nobreak 337 | \vskip 40\p@ 338 | }} 339 | 340 | \renewcommand\section{\@startsection{section}{1}{\z@}% 341 | {-18\p@ \@plus -4\p@ \@minus -4\p@}% 342 | {12\p@ \@plus 4\p@ \@minus 4\p@}% 343 | {\normalfont\large\bfseries\boldmath 344 | \rightskip=\z@ \@plus 8em\pretolerance=10000 }} 345 | \renewcommand\subsection{\@startsection{subsection}{2}{\z@}% 346 | {-18\p@ \@plus -4\p@ \@minus -4\p@}% 347 | {8\p@ \@plus 4\p@ \@minus 4\p@}% 348 | {\normalfont\normalsize\bfseries\boldmath 349 | \rightskip=\z@ \@plus 8em\pretolerance=10000 }} 350 | \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% 351 | {-18\p@ \@plus -4\p@ \@minus -4\p@}% 352 | {-0.5em \@plus -0.22em \@minus -0.1em}% 353 | {\normalfont\normalsize\bfseries\boldmath}} 354 | \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% 355 | {-12\p@ \@plus -4\p@ \@minus -4\p@}% 356 | {-0.5em \@plus -0.22em \@minus -0.1em}% 357 | {\normalfont\normalsize\itshape}} 358 | \renewcommand\subparagraph[1]{\typeout{LLNCS warning: You should not use 359 | \string\subparagraph\space with this class}\vskip0.5cm 360 | You should not use \verb|\subparagraph| with this class.\vskip0.5cm} 361 | 362 | \DeclareMathSymbol{\Gamma}{\mathalpha}{letters}{"00} 363 | \DeclareMathSymbol{\Delta}{\mathalpha}{letters}{"01} 364 | \DeclareMathSymbol{\Theta}{\mathalpha}{letters}{"02} 365 | \DeclareMathSymbol{\Lambda}{\mathalpha}{letters}{"03} 366 | \DeclareMathSymbol{\Xi}{\mathalpha}{letters}{"04} 367 | \DeclareMathSymbol{\Pi}{\mathalpha}{letters}{"05} 368 | \DeclareMathSymbol{\Sigma}{\mathalpha}{letters}{"06} 369 | \DeclareMathSymbol{\Upsilon}{\mathalpha}{letters}{"07} 370 | \DeclareMathSymbol{\Phi}{\mathalpha}{letters}{"08} 371 | \DeclareMathSymbol{\Psi}{\mathalpha}{letters}{"09} 372 | \DeclareMathSymbol{\Omega}{\mathalpha}{letters}{"0A} 373 | 374 | \let\footnotesize\small 375 | 376 | \if@custvec 377 | \def\vec#1{\mathchoice{\mbox{\boldmath$\displaystyle#1$}} 378 | {\mbox{\boldmath$\textstyle#1$}} 379 | {\mbox{\boldmath$\scriptstyle#1$}} 380 | {\mbox{\boldmath$\scriptscriptstyle#1$}}} 381 | \fi 382 | 383 | \def\squareforqed{\hbox{\rlap{$\sqcap$}$\sqcup$}} 384 | \def\qed{\ifmmode\squareforqed\else{\unskip\nobreak\hfil 385 | \penalty50\hskip1em\null\nobreak\hfil\squareforqed 386 | \parfillskip=0pt\finalhyphendemerits=0\endgraf}\fi} 387 | 388 | \def\getsto{\mathrel{\mathchoice {\vcenter{\offinterlineskip 389 | \halign{\hfil 390 | $\displaystyle##$\hfil\cr\gets\cr\to\cr}}} 391 | {\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr\gets 392 | \cr\to\cr}}} 393 | {\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr\gets 394 | \cr\to\cr}}} 395 | {\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr 396 | \gets\cr\to\cr}}}}} 397 | \def\lid{\mathrel{\mathchoice {\vcenter{\offinterlineskip\halign{\hfil 398 | $\displaystyle##$\hfil\cr<\cr\noalign{\vskip1.2pt}=\cr}}} 399 | {\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr<\cr 400 | \noalign{\vskip1.2pt}=\cr}}} 401 | {\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr<\cr 402 | \noalign{\vskip1pt}=\cr}}} 403 | {\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr 404 | <\cr 405 | \noalign{\vskip0.9pt}=\cr}}}}} 406 | \def\gid{\mathrel{\mathchoice {\vcenter{\offinterlineskip\halign{\hfil 407 | $\displaystyle##$\hfil\cr>\cr\noalign{\vskip1.2pt}=\cr}}} 408 | {\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr>\cr 409 | \noalign{\vskip1.2pt}=\cr}}} 410 | {\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr>\cr 411 | \noalign{\vskip1pt}=\cr}}} 412 | {\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr 413 | >\cr 414 | \noalign{\vskip0.9pt}=\cr}}}}} 415 | \def\grole{\mathrel{\mathchoice {\vcenter{\offinterlineskip 416 | \halign{\hfil 417 | $\displaystyle##$\hfil\cr>\cr\noalign{\vskip-1pt}<\cr}}} 418 | {\vcenter{\offinterlineskip\halign{\hfil$\textstyle##$\hfil\cr 419 | >\cr\noalign{\vskip-1pt}<\cr}}} 420 | {\vcenter{\offinterlineskip\halign{\hfil$\scriptstyle##$\hfil\cr 421 | >\cr\noalign{\vskip-0.8pt}<\cr}}} 422 | {\vcenter{\offinterlineskip\halign{\hfil$\scriptscriptstyle##$\hfil\cr 423 | >\cr\noalign{\vskip-0.3pt}<\cr}}}}} 424 | \def\bbbr{{\rm I\!R}} %reelle Zahlen 425 | \def\bbbm{{\rm I\!M}} 426 | \def\bbbn{{\rm I\!N}} %natuerliche Zahlen 427 | \def\bbbf{{\rm I\!F}} 428 | \def\bbbh{{\rm I\!H}} 429 | \def\bbbk{{\rm I\!K}} 430 | \def\bbbp{{\rm I\!P}} 431 | \def\bbbone{{\mathchoice {\rm 1\mskip-4mu l} {\rm 1\mskip-4mu l} 432 | {\rm 1\mskip-4.5mu l} {\rm 1\mskip-5mu l}}} 433 | \def\bbbc{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm C$}\hbox{\hbox 434 | to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}} 435 | {\setbox0=\hbox{$\textstyle\rm C$}\hbox{\hbox 436 | to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}} 437 | {\setbox0=\hbox{$\scriptstyle\rm C$}\hbox{\hbox 438 | to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}} 439 | {\setbox0=\hbox{$\scriptscriptstyle\rm C$}\hbox{\hbox 440 | to0pt{\kern0.4\wd0\vrule height0.9\ht0\hss}\box0}}}} 441 | \def\bbbq{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm 442 | Q$}\hbox{\raise 443 | 0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.8\ht0\hss}\box0}} 444 | {\setbox0=\hbox{$\textstyle\rm Q$}\hbox{\raise 445 | 0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.8\ht0\hss}\box0}} 446 | {\setbox0=\hbox{$\scriptstyle\rm Q$}\hbox{\raise 447 | 0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.7\ht0\hss}\box0}} 448 | {\setbox0=\hbox{$\scriptscriptstyle\rm Q$}\hbox{\raise 449 | 0.15\ht0\hbox to0pt{\kern0.4\wd0\vrule height0.7\ht0\hss}\box0}}}} 450 | \def\bbbt{{\mathchoice {\setbox0=\hbox{$\displaystyle\rm 451 | T$}\hbox{\hbox to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}} 452 | {\setbox0=\hbox{$\textstyle\rm T$}\hbox{\hbox 453 | to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}} 454 | {\setbox0=\hbox{$\scriptstyle\rm T$}\hbox{\hbox 455 | to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}} 456 | {\setbox0=\hbox{$\scriptscriptstyle\rm T$}\hbox{\hbox 457 | to0pt{\kern0.3\wd0\vrule height0.9\ht0\hss}\box0}}}} 458 | \def\bbbs{{\mathchoice 459 | {\setbox0=\hbox{$\displaystyle \rm S$}\hbox{\raise0.5\ht0\hbox 460 | to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\hbox 461 | to0pt{\kern0.55\wd0\vrule height0.5\ht0\hss}\box0}} 462 | {\setbox0=\hbox{$\textstyle \rm S$}\hbox{\raise0.5\ht0\hbox 463 | to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\hbox 464 | to0pt{\kern0.55\wd0\vrule height0.5\ht0\hss}\box0}} 465 | {\setbox0=\hbox{$\scriptstyle \rm S$}\hbox{\raise0.5\ht0\hbox 466 | to0pt{\kern0.35\wd0\vrule height0.45\ht0\hss}\raise0.05\ht0\hbox 467 | to0pt{\kern0.5\wd0\vrule height0.45\ht0\hss}\box0}} 468 | {\setbox0=\hbox{$\scriptscriptstyle\rm S$}\hbox{\raise0.5\ht0\hbox 469 | to0pt{\kern0.4\wd0\vrule height0.45\ht0\hss}\raise0.05\ht0\hbox 470 | to0pt{\kern0.55\wd0\vrule height0.45\ht0\hss}\box0}}}} 471 | \def\bbbz{{\mathchoice {\hbox{$\mathsf\textstyle Z\kern-0.4em Z$}} 472 | {\hbox{$\mathsf\textstyle Z\kern-0.4em Z$}} 473 | {\hbox{$\mathsf\scriptstyle Z\kern-0.3em Z$}} 474 | {\hbox{$\mathsf\scriptscriptstyle Z\kern-0.2em Z$}}}} 475 | 476 | \let\ts\, 477 | 478 | \setlength\leftmargini {17\p@} 479 | \setlength\leftmargin {\leftmargini} 480 | \setlength\leftmarginii {\leftmargini} 481 | \setlength\leftmarginiii {\leftmargini} 482 | \setlength\leftmarginiv {\leftmargini} 483 | \setlength \labelsep {.5em} 484 | \setlength \labelwidth{\leftmargini} 485 | \addtolength\labelwidth{-\labelsep} 486 | 487 | \def\@listI{\leftmargin\leftmargini 488 | \parsep 0\p@ \@plus1\p@ \@minus\p@ 489 | \topsep 8\p@ \@plus2\p@ \@minus4\p@ 490 | \itemsep0\p@} 491 | \let\@listi\@listI 492 | \@listi 493 | \def\@listii {\leftmargin\leftmarginii 494 | \labelwidth\leftmarginii 495 | \advance\labelwidth-\labelsep 496 | \topsep 0\p@ \@plus2\p@ \@minus\p@} 497 | \def\@listiii{\leftmargin\leftmarginiii 498 | \labelwidth\leftmarginiii 499 | \advance\labelwidth-\labelsep 500 | \topsep 0\p@ \@plus\p@\@minus\p@ 501 | \parsep \z@ 502 | \partopsep \p@ \@plus\z@ \@minus\p@} 503 | 504 | \renewcommand\labelitemi{\normalfont\bfseries --} 505 | \renewcommand\labelitemii{$\m@th\bullet$} 506 | 507 | \setlength\arraycolsep{1.4\p@} 508 | \setlength\tabcolsep{1.4\p@} 509 | 510 | \def\tableofcontents{\chapter*{\contentsname\@mkboth{{\contentsname}}% 511 | {{\contentsname}}} 512 | \def\authcount##1{\setcounter{auco}{##1}\setcounter{@auth}{1}} 513 | \def\lastand{\ifnum\value{auco}=2\relax 514 | \unskip{} \andname\ 515 | \else 516 | \unskip \lastandname\ 517 | \fi}% 518 | \def\and{\stepcounter{@auth}\relax 519 | \ifnum\value{@auth}=\value{auco}% 520 | \lastand 521 | \else 522 | \unskip, 523 | \fi}% 524 | \@starttoc{toc}\if@restonecol\twocolumn\fi} 525 | 526 | \def\l@part#1#2{\addpenalty{\@secpenalty}% 527 | \addvspace{2em plus\p@}% % space above part line 528 | \begingroup 529 | \parindent \z@ 530 | \rightskip \z@ plus 5em 531 | \hrule\vskip5pt 532 | \large % same size as for a contribution heading 533 | \bfseries\boldmath % set line in boldface 534 | \leavevmode % TeX command to enter horizontal mode. 535 | #1\par 536 | \vskip5pt 537 | \hrule 538 | \vskip1pt 539 | \nobreak % Never break after part entry 540 | \endgroup} 541 | 542 | \def\@dotsep{2} 543 | 544 | \let\phantomsection=\relax 545 | 546 | \def\hyperhrefextend{\ifx\hyper@anchor\@undefined\else 547 | {}\fi} 548 | 549 | \def\addnumcontentsmark#1#2#3{% 550 | \addtocontents{#1}{\protect\contentsline{#2}{\protect\numberline 551 | {\thechapter}#3}{\thepage}\hyperhrefextend}}% 552 | \def\addcontentsmark#1#2#3{% 553 | \addtocontents{#1}{\protect\contentsline{#2}{#3}{\thepage}\hyperhrefextend}}% 554 | \def\addcontentsmarkwop#1#2#3{% 555 | \addtocontents{#1}{\protect\contentsline{#2}{#3}{0}\hyperhrefextend}}% 556 | 557 | \def\@adcmk[#1]{\ifcase #1 \or 558 | \def\@gtempa{\addnumcontentsmark}% 559 | \or \def\@gtempa{\addcontentsmark}% 560 | \or \def\@gtempa{\addcontentsmarkwop}% 561 | \fi\@gtempa{toc}{chapter}% 562 | } 563 | \def\addtocmark{% 564 | \phantomsection 565 | \@ifnextchar[{\@adcmk}{\@adcmk[3]}% 566 | } 567 | 568 | \def\l@chapter#1#2{\addpenalty{-\@highpenalty} 569 | \vskip 1.0em plus 1pt \@tempdima 1.5em \begingroup 570 | \parindent \z@ \rightskip \@tocrmarg 571 | \advance\rightskip by 0pt plus 2cm 572 | \parfillskip -\rightskip \pretolerance=10000 573 | \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip 574 | {\large\bfseries\boldmath#1}\ifx0#2\hfil\null 575 | \else 576 | \nobreak 577 | \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern 578 | \@dotsep mu$}\hfill 579 | \nobreak\hbox to\@pnumwidth{\hss #2}% 580 | \fi\par 581 | \penalty\@highpenalty \endgroup} 582 | 583 | \def\l@title#1#2{\addpenalty{-\@highpenalty} 584 | \addvspace{8pt plus 1pt} 585 | \@tempdima \z@ 586 | \begingroup 587 | \parindent \z@ \rightskip \@tocrmarg 588 | \advance\rightskip by 0pt plus 2cm 589 | \parfillskip -\rightskip \pretolerance=10000 590 | \leavevmode \advance\leftskip\@tempdima \hskip -\leftskip 591 | #1\nobreak 592 | \leaders\hbox{$\m@th \mkern \@dotsep mu.\mkern 593 | \@dotsep mu$}\hfill 594 | \nobreak\hbox to\@pnumwidth{\hss #2}\par 595 | \penalty\@highpenalty \endgroup} 596 | 597 | \def\l@author#1#2{\addpenalty{\@highpenalty} 598 | \@tempdima=15\p@ %\z@ 599 | \begingroup 600 | \parindent \z@ \rightskip \@tocrmarg 601 | \advance\rightskip by 0pt plus 2cm 602 | \pretolerance=10000 603 | \leavevmode \advance\leftskip\@tempdima %\hskip -\leftskip 604 | \textit{#1}\par 605 | \penalty\@highpenalty \endgroup} 606 | 607 | \setcounter{tocdepth}{0} 608 | \newdimen\tocchpnum 609 | \newdimen\tocsecnum 610 | \newdimen\tocsectotal 611 | \newdimen\tocsubsecnum 612 | \newdimen\tocsubsectotal 613 | \newdimen\tocsubsubsecnum 614 | \newdimen\tocsubsubsectotal 615 | \newdimen\tocparanum 616 | \newdimen\tocparatotal 617 | \newdimen\tocsubparanum 618 | \tocchpnum=\z@ % no chapter numbers 619 | \tocsecnum=15\p@ % section 88. plus 2.222pt 620 | \tocsubsecnum=23\p@ % subsection 88.8 plus 2.222pt 621 | \tocsubsubsecnum=27\p@ % subsubsection 88.8.8 plus 1.444pt 622 | \tocparanum=35\p@ % paragraph 88.8.8.8 plus 1.666pt 623 | \tocsubparanum=43\p@ % subparagraph 88.8.8.8.8 plus 1.888pt 624 | \def\calctocindent{% 625 | \tocsectotal=\tocchpnum 626 | \advance\tocsectotal by\tocsecnum 627 | \tocsubsectotal=\tocsectotal 628 | \advance\tocsubsectotal by\tocsubsecnum 629 | \tocsubsubsectotal=\tocsubsectotal 630 | \advance\tocsubsubsectotal by\tocsubsubsecnum 631 | \tocparatotal=\tocsubsubsectotal 632 | \advance\tocparatotal by\tocparanum} 633 | \calctocindent 634 | 635 | \def\l@section{\@dottedtocline{1}{\tocchpnum}{\tocsecnum}} 636 | \def\l@subsection{\@dottedtocline{2}{\tocsectotal}{\tocsubsecnum}} 637 | \def\l@subsubsection{\@dottedtocline{3}{\tocsubsectotal}{\tocsubsubsecnum}} 638 | \def\l@paragraph{\@dottedtocline{4}{\tocsubsubsectotal}{\tocparanum}} 639 | \def\l@subparagraph{\@dottedtocline{5}{\tocparatotal}{\tocsubparanum}} 640 | 641 | \def\listoffigures{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn 642 | \fi\section*{\listfigurename\@mkboth{{\listfigurename}}{{\listfigurename}}} 643 | \@starttoc{lof}\if@restonecol\twocolumn\fi} 644 | \def\l@figure{\@dottedtocline{1}{0em}{1.5em}} 645 | 646 | \def\listoftables{\@restonecolfalse\if@twocolumn\@restonecoltrue\onecolumn 647 | \fi\section*{\listtablename\@mkboth{{\listtablename}}{{\listtablename}}} 648 | \@starttoc{lot}\if@restonecol\twocolumn\fi} 649 | \let\l@table\l@figure 650 | 651 | \renewcommand\listoffigures{% 652 | \section*{\listfigurename 653 | \@mkboth{\listfigurename}{\listfigurename}}% 654 | \@starttoc{lof}% 655 | } 656 | 657 | \renewcommand\listoftables{% 658 | \section*{\listtablename 659 | \@mkboth{\listtablename}{\listtablename}}% 660 | \@starttoc{lot}% 661 | } 662 | 663 | \ifx\oribibl\undefined 664 | \ifx\citeauthoryear\undefined 665 | \renewenvironment{thebibliography}[1] 666 | {\section*{\refname} 667 | \def\@biblabel##1{##1.} 668 | \small 669 | \list{\@biblabel{\@arabic\c@enumiv}}% 670 | {\settowidth\labelwidth{\@biblabel{#1}}% 671 | \leftmargin\labelwidth 672 | \advance\leftmargin\labelsep 673 | \if@openbib 674 | \advance\leftmargin\bibindent 675 | \itemindent -\bibindent 676 | \listparindent \itemindent 677 | \parsep \z@ 678 | \fi 679 | \usecounter{enumiv}% 680 | \let\p@enumiv\@empty 681 | \renewcommand\theenumiv{\@arabic\c@enumiv}}% 682 | \if@openbib 683 | \renewcommand\newblock{\par}% 684 | \else 685 | \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}% 686 | \fi 687 | \sloppy\clubpenalty4000\widowpenalty4000% 688 | \sfcode`\.=\@m} 689 | {\def\@noitemerr 690 | {\@latex@warning{Empty `thebibliography' environment}}% 691 | \endlist} 692 | \def\@lbibitem[#1]#2{\item[{[#1]}\hfill]\if@filesw 693 | {\let\protect\noexpand\immediate 694 | \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces} 695 | \newcount\@tempcntc 696 | \def\@citex[#1]#2{\if@filesw\immediate\write\@auxout{\string\citation{#2}}\fi 697 | \@tempcnta\z@\@tempcntb\m@ne\def\@citea{}\@cite{\@for\@citeb:=#2\do 698 | {\@ifundefined 699 | {b@\@citeb}{\@citeo\@tempcntb\m@ne\@citea\def\@citea{,}{\bfseries 700 | ?}\@warning 701 | {Citation `\@citeb' on page \thepage \space undefined}}% 702 | {\setbox\z@\hbox{\global\@tempcntc0\csname b@\@citeb\endcsname\relax}% 703 | \ifnum\@tempcntc=\z@ \@citeo\@tempcntb\m@ne 704 | \@citea\def\@citea{,}\hbox{\csname b@\@citeb\endcsname}% 705 | \else 706 | \advance\@tempcntb\@ne 707 | \ifnum\@tempcntb=\@tempcntc 708 | \else\advance\@tempcntb\m@ne\@citeo 709 | \@tempcnta\@tempcntc\@tempcntb\@tempcntc\fi\fi}}\@citeo}{#1}} 710 | \def\@citeo{\ifnum\@tempcnta>\@tempcntb\else 711 | \@citea\def\@citea{,\,\hskip\z@skip}% 712 | \ifnum\@tempcnta=\@tempcntb\the\@tempcnta\else 713 | {\advance\@tempcnta\@ne\ifnum\@tempcnta=\@tempcntb \else 714 | \def\@citea{--}\fi 715 | \advance\@tempcnta\m@ne\the\@tempcnta\@citea\the\@tempcntb}\fi\fi} 716 | \else 717 | \renewenvironment{thebibliography}[1] 718 | {\section*{\refname} 719 | \small 720 | \list{}% 721 | {\settowidth\labelwidth{}% 722 | \leftmargin\parindent 723 | \itemindent=-\parindent 724 | \labelsep=\z@ 725 | \if@openbib 726 | \advance\leftmargin\bibindent 727 | \itemindent -\bibindent 728 | \listparindent \itemindent 729 | \parsep \z@ 730 | \fi 731 | \usecounter{enumiv}% 732 | \let\p@enumiv\@empty 733 | \renewcommand\theenumiv{}}% 734 | \if@openbib 735 | \renewcommand\newblock{\par}% 736 | \else 737 | \renewcommand\newblock{\hskip .11em \@plus.33em \@minus.07em}% 738 | \fi 739 | \sloppy\clubpenalty4000\widowpenalty4000% 740 | \sfcode`\.=\@m} 741 | {\def\@noitemerr 742 | {\@latex@warning{Empty `thebibliography' environment}}% 743 | \endlist} 744 | \def\@cite#1{#1}% 745 | \def\@lbibitem[#1]#2{\item[]\if@filesw 746 | {\def\protect##1{\string ##1\space}\immediate 747 | \write\@auxout{\string\bibcite{#2}{#1}}}\fi\ignorespaces} 748 | \fi 749 | \else 750 | \@cons\@openbib@code{\noexpand\small} 751 | \fi 752 | 753 | \def\idxquad{\hskip 10\p@}% space that divides entry from number 754 | 755 | \def\@idxitem{\par\hangindent 10\p@} 756 | 757 | \def\subitem{\par\setbox0=\hbox{--\enspace}% second order 758 | \noindent\hangindent\wd0\box0}% index entry 759 | 760 | \def\subsubitem{\par\setbox0=\hbox{--\,--\enspace}% third 761 | \noindent\hangindent\wd0\box0}% order index entry 762 | 763 | \def\indexspace{\par \vskip 10\p@ plus5\p@ minus3\p@\relax} 764 | 765 | \renewenvironment{theindex} 766 | {\@mkboth{\indexname}{\indexname}% 767 | \thispagestyle{empty}\parindent\z@ 768 | \parskip\z@ \@plus .3\p@\relax 769 | \let\item\par 770 | \def\,{\relax\ifmmode\mskip\thinmuskip 771 | \else\hskip0.2em\ignorespaces\fi}% 772 | \normalfont\small 773 | \begin{multicols}{2}[\@makeschapterhead{\indexname}]% 774 | } 775 | {\end{multicols}} 776 | 777 | \renewcommand\footnoterule{% 778 | \kern-3\p@ 779 | \hrule\@width 2truecm 780 | \kern2.6\p@} 781 | \newdimen\fnindent 782 | \fnindent1em 783 | \long\def\@makefntext#1{% 784 | \parindent \fnindent% 785 | \leftskip \fnindent% 786 | \noindent 787 | \llap{\hb@xt@1em{\hss\@makefnmark\ }}\ignorespaces#1} 788 | 789 | \long\def\@makecaption#1#2{% 790 | \small 791 | \vskip\abovecaptionskip 792 | \sbox\@tempboxa{{\bfseries #1.} #2}% 793 | \ifdim \wd\@tempboxa >\hsize 794 | {\bfseries #1.} #2\par 795 | \else 796 | \global \@minipagefalse 797 | \hb@xt@\hsize{\hfil\box\@tempboxa\hfil}% 798 | \fi 799 | \vskip\belowcaptionskip} 800 | 801 | \def\fps@figure{htbp} 802 | \def\fnum@figure{\figurename\thinspace\thefigure} 803 | \def \@floatboxreset {% 804 | \reset@font 805 | \small 806 | \@setnobreak 807 | \@setminipage 808 | } 809 | \def\fps@table{htbp} 810 | \def\fnum@table{\tablename~\thetable} 811 | \renewenvironment{table} 812 | {\setlength\abovecaptionskip{0\p@}% 813 | \setlength\belowcaptionskip{10\p@}% 814 | \@float{table}} 815 | {\end@float} 816 | \renewenvironment{table*} 817 | {\setlength\abovecaptionskip{0\p@}% 818 | \setlength\belowcaptionskip{10\p@}% 819 | \@dblfloat{table}} 820 | {\end@dblfloat} 821 | 822 | \long\def\@caption#1[#2]#3{\par\addcontentsline{\csname 823 | ext@#1\endcsname}{#1}{\protect\numberline{\csname 824 | the#1\endcsname}{\ignorespaces #2}}\begingroup 825 | \@parboxrestore 826 | \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par 827 | \endgroup} 828 | 829 | % LaTeX does not provide a command to enter the authors institute 830 | % addresses. The \institute command is defined here. 831 | 832 | \newcounter{@inst} 833 | \newcounter{@auth} 834 | \newcounter{auco} 835 | \newdimen\instindent 836 | \newbox\authrun 837 | \newtoks\authorrunning 838 | \newtoks\tocauthor 839 | \newbox\titrun 840 | \newtoks\titlerunning 841 | \newtoks\toctitle 842 | 843 | \def\clearheadinfo{\gdef\@author{No Author Given}% 844 | \gdef\@title{No Title Given}% 845 | \gdef\@subtitle{}% 846 | \gdef\@institute{No Institute Given}% 847 | \gdef\@thanks{}% 848 | \global\titlerunning={}\global\authorrunning={}% 849 | \global\toctitle={}\global\tocauthor={}} 850 | 851 | \def\institute#1{\gdef\@institute{#1}} 852 | 853 | \def\institutename{\par 854 | \begingroup 855 | \parskip=\z@ 856 | \parindent=\z@ 857 | \setcounter{@inst}{1}% 858 | \def\and{\par\stepcounter{@inst}% 859 | \noindent$^{\the@inst}$\enspace\ignorespaces}% 860 | \setbox0=\vbox{\def\thanks##1{}\@institute}% 861 | \ifnum\c@@inst=1\relax 862 | \gdef\fnnstart{0}% 863 | \else 864 | \xdef\fnnstart{\c@@inst}% 865 | \setcounter{@inst}{1}% 866 | \noindent$^{\the@inst}$\enspace 867 | \fi 868 | \ignorespaces 869 | \@institute\par 870 | \endgroup} 871 | 872 | \def\@fnsymbol#1{\ensuremath{\ifcase#1\or\star\or{\star\star}\or 873 | {\star\star\star}\or \dagger\or \ddagger\or 874 | \mathchar "278\or \mathchar "27B\or \|\or **\or \dagger\dagger 875 | \or \ddagger\ddagger \else\@ctrerr\fi}} 876 | 877 | \def\inst#1{\unskip$^{#1}$} 878 | \def\orcidID#1{\unskip$^{[#1]}$} % added MR 2018-03-10 879 | \def\fnmsep{\unskip$^,$} 880 | \def\email#1{{\tt#1}} 881 | 882 | \AtBeginDocument{\@ifundefined{url}{\def\url#1{#1}}{}% 883 | \@ifpackageloaded{babel}{% 884 | \@ifundefined{extrasenglish}{}{\addto\extrasenglish{\switcht@albion}}% 885 | \@ifundefined{extrasfrenchb}{}{\addto\extrasfrenchb{\switcht@francais}}% 886 | \@ifundefined{extrasgerman}{}{\addto\extrasgerman{\switcht@deutsch}}% 887 | \@ifundefined{extrasngerman}{}{\addto\extrasngerman{\switcht@deutsch}}% 888 | }{\switcht@@therlang}% 889 | \providecommand{\keywords}[1]{\def\and{{\textperiodcentered} }% 890 | \par\addvspace\baselineskip 891 | \noindent\keywordname\enspace\ignorespaces#1}% 892 | \@ifpackageloaded{hyperref}{% 893 | \def\doi#1{\href{https://doi.org/#1}{https://doi.org/#1}}}{ 894 | \def\doi#1{https://doi.org/#1}} 895 | } 896 | \def\homedir{\~{ }} 897 | 898 | \def\subtitle#1{\gdef\@subtitle{#1}} 899 | \clearheadinfo 900 | % 901 | %%% to avoid hyperref warnings 902 | \providecommand*{\toclevel@author}{999} 903 | %%% to make title-entry parent of section-entries 904 | \providecommand*{\toclevel@title}{0} 905 | % 906 | \renewcommand\maketitle{\newpage 907 | \phantomsection 908 | \refstepcounter{chapter}% 909 | \stepcounter{section}% 910 | \setcounter{section}{0}% 911 | \setcounter{subsection}{0}% 912 | \setcounter{figure}{0} 913 | \setcounter{table}{0} 914 | \setcounter{equation}{0} 915 | \setcounter{footnote}{0}% 916 | \begingroup 917 | \parindent=\z@ 918 | \renewcommand\thefootnote{\@fnsymbol\c@footnote}% 919 | \if@twocolumn 920 | \ifnum \col@number=\@ne 921 | \@maketitle 922 | \else 923 | \twocolumn[\@maketitle]% 924 | \fi 925 | \else 926 | \newpage 927 | \global\@topnum\z@ % Prevents figures from going at top of page. 928 | \@maketitle 929 | \fi 930 | \thispagestyle{empty}\@thanks 931 | % 932 | \def\\{\unskip\ \ignorespaces}\def\inst##1{\unskip{}}% 933 | \def\thanks##1{\unskip{}}\def\fnmsep{\unskip}% 934 | \instindent=\hsize 935 | \advance\instindent by-\headlineindent 936 | \if!\the\toctitle!\addcontentsline{toc}{title}{\@title}\else 937 | \addcontentsline{toc}{title}{\the\toctitle}\fi 938 | \if@runhead 939 | \if!\the\titlerunning!\else 940 | \edef\@title{\the\titlerunning}% 941 | \fi 942 | \global\setbox\titrun=\hbox{\small\rm\unboldmath\ignorespaces\@title}% 943 | \ifdim\wd\titrun>\instindent 944 | \typeout{Title too long for running head. Please supply}% 945 | \typeout{a shorter form with \string\titlerunning\space prior to 946 | \string\maketitle}% 947 | \global\setbox\titrun=\hbox{\small\rm 948 | Title Suppressed Due to Excessive Length}% 949 | \fi 950 | \xdef\@title{\copy\titrun}% 951 | \fi 952 | % 953 | \if!\the\tocauthor!\relax 954 | {\def\and{\noexpand\protect\noexpand\and}% 955 | \def\inst##1{}% added MR 2017-09-20 to remove inst numbers from the TOC 956 | \def\orcidID##1{}% added MR 2017-09-20 to remove ORCID ids from the TOC 957 | \protected@xdef\toc@uthor{\@author}}% 958 | \else 959 | \def\\{\noexpand\protect\noexpand\newline}% 960 | \protected@xdef\scratch{\the\tocauthor}% 961 | \protected@xdef\toc@uthor{\scratch}% 962 | \fi 963 | \addtocontents{toc}{\noexpand\protect\noexpand\authcount{\the\c@auco}}% 964 | \addcontentsline{toc}{author}{\toc@uthor}% 965 | \if@runhead 966 | \if!\the\authorrunning! 967 | \value{@inst}=\value{@auth}% 968 | \setcounter{@auth}{1}% 969 | \else 970 | \edef\@author{\the\authorrunning}% 971 | \fi 972 | \global\setbox\authrun=\hbox{\def\inst##1{}% added MR 2017-09-20 to remove inst numbers from the runninghead 973 | \def\orcidID##1{}% added MR 2017-09-20 to remove ORCID ids from the runninghead 974 | \small\unboldmath\@author\unskip}% 975 | \ifdim\wd\authrun>\instindent 976 | \typeout{Names of authors too long for running head. Please supply}% 977 | \typeout{a shorter form with \string\authorrunning\space prior to 978 | \string\maketitle}% 979 | \global\setbox\authrun=\hbox{\small\rm 980 | Authors Suppressed Due to Excessive Length}% 981 | \fi 982 | \xdef\@author{\copy\authrun}% 983 | \markboth{\@author}{\@title}% 984 | \fi 985 | \endgroup 986 | \setcounter{footnote}{\fnnstart}% 987 | \clearheadinfo} 988 | % 989 | \def\@maketitle{\newpage 990 | \markboth{}{}% 991 | \def\lastand{\ifnum\value{@inst}=2\relax 992 | \unskip{} \andname\ 993 | \else 994 | \unskip \lastandname\ 995 | \fi}% 996 | \def\and{\stepcounter{@auth}\relax 997 | \ifnum\value{@auth}=\value{@inst}% 998 | \lastand 999 | \else 1000 | \unskip, 1001 | \fi}% 1002 | \begin{center}% 1003 | \let\newline\\ 1004 | {\Large \bfseries\boldmath 1005 | \pretolerance=10000 1006 | \@title \par}\vskip .8cm 1007 | \if!\@subtitle!\else {\large \bfseries\boldmath 1008 | \vskip -.65cm 1009 | \pretolerance=10000 1010 | \@subtitle \par}\vskip .8cm\fi 1011 | \setbox0=\vbox{\setcounter{@auth}{1}\def\and{\stepcounter{@auth}}% 1012 | \def\thanks##1{}\@author}% 1013 | \global\value{@inst}=\value{@auth}% 1014 | \global\value{auco}=\value{@auth}% 1015 | \setcounter{@auth}{1}% 1016 | {\lineskip .5em 1017 | \noindent\ignorespaces 1018 | \@author\vskip.35cm} 1019 | {\small\institutename} 1020 | \end{center}% 1021 | } 1022 | 1023 | % definition of the "\spnewtheorem" command. 1024 | % 1025 | % Usage: 1026 | % 1027 | % \spnewtheorem{env_nam}{caption}[within]{cap_font}{body_font} 1028 | % or \spnewtheorem{env_nam}[numbered_like]{caption}{cap_font}{body_font} 1029 | % or \spnewtheorem*{env_nam}{caption}{cap_font}{body_font} 1030 | % 1031 | % New is "cap_font" and "body_font". It stands for 1032 | % fontdefinition of the caption and the text itself. 1033 | % 1034 | % "\spnewtheorem*" gives a theorem without number. 1035 | % 1036 | % A defined spnewthoerem environment is used as described 1037 | % by Lamport. 1038 | % 1039 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 1040 | 1041 | \def\@thmcountersep{} 1042 | \def\@thmcounterend{.} 1043 | 1044 | \def\spnewtheorem{\@ifstar{\@sthm}{\@Sthm}} 1045 | 1046 | % definition of \spnewtheorem with number 1047 | 1048 | \def\@spnthm#1#2{% 1049 | \@ifnextchar[{\@spxnthm{#1}{#2}}{\@spynthm{#1}{#2}}} 1050 | \def\@Sthm#1{\@ifnextchar[{\@spothm{#1}}{\@spnthm{#1}}} 1051 | 1052 | \def\@spxnthm#1#2[#3]#4#5{\expandafter\@ifdefinable\csname #1\endcsname 1053 | {\@definecounter{#1}\@addtoreset{#1}{#3}% 1054 | \expandafter\xdef\csname the#1\endcsname{\expandafter\noexpand 1055 | \csname the#3\endcsname \noexpand\@thmcountersep \@thmcounter{#1}}% 1056 | \expandafter\xdef\csname #1name\endcsname{#2}% 1057 | \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#4}{#5}}% 1058 | \global\@namedef{end#1}{\@endtheorem}}} 1059 | 1060 | \def\@spynthm#1#2#3#4{\expandafter\@ifdefinable\csname #1\endcsname 1061 | {\@definecounter{#1}% 1062 | \expandafter\xdef\csname the#1\endcsname{\@thmcounter{#1}}% 1063 | \expandafter\xdef\csname #1name\endcsname{#2}% 1064 | \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#3}{#4}}% 1065 | \global\@namedef{end#1}{\@endtheorem}}} 1066 | 1067 | \def\@spothm#1[#2]#3#4#5{% 1068 | \@ifundefined{c@#2}{\@latexerr{No theorem environment `#2' defined}\@eha}% 1069 | {\expandafter\@ifdefinable\csname #1\endcsname 1070 | {\newaliascnt{#1}{#2}% 1071 | \expandafter\xdef\csname #1name\endcsname{#3}% 1072 | \global\@namedef{#1}{\@spthm{#1}{\csname #1name\endcsname}{#4}{#5}}% 1073 | \global\@namedef{end#1}{\@endtheorem}}}} 1074 | 1075 | \def\@spthm#1#2#3#4{\topsep 7\p@ \@plus2\p@ \@minus4\p@ 1076 | \refstepcounter{#1}% 1077 | \@ifnextchar[{\@spythm{#1}{#2}{#3}{#4}}{\@spxthm{#1}{#2}{#3}{#4}}} 1078 | 1079 | \def\@spxthm#1#2#3#4{\@spbegintheorem{#2}{\csname the#1\endcsname}{#3}{#4}% 1080 | \ignorespaces} 1081 | 1082 | \def\@spythm#1#2#3#4[#5]{\@spopargbegintheorem{#2}{\csname 1083 | the#1\endcsname}{#5}{#3}{#4}\ignorespaces} 1084 | 1085 | \def\@spbegintheorem#1#2#3#4{\trivlist 1086 | \item[\hskip\labelsep{#3#1\ #2\@thmcounterend}]#4} 1087 | 1088 | \def\@spopargbegintheorem#1#2#3#4#5{\trivlist 1089 | \item[\hskip\labelsep{#4#1\ #2}]{#4(#3)\@thmcounterend\ }#5} 1090 | 1091 | % definition of \spnewtheorem* without number 1092 | 1093 | \def\@sthm#1#2{\@Ynthm{#1}{#2}} 1094 | 1095 | \def\@Ynthm#1#2#3#4{\expandafter\@ifdefinable\csname #1\endcsname 1096 | {\global\@namedef{#1}{\@Thm{\csname #1name\endcsname}{#3}{#4}}% 1097 | \expandafter\xdef\csname #1name\endcsname{#2}% 1098 | \global\@namedef{end#1}{\@endtheorem}}} 1099 | 1100 | \def\@Thm#1#2#3{\topsep 7\p@ \@plus2\p@ \@minus4\p@ 1101 | \@ifnextchar[{\@Ythm{#1}{#2}{#3}}{\@Xthm{#1}{#2}{#3}}} 1102 | 1103 | \def\@Xthm#1#2#3{\@Begintheorem{#1}{#2}{#3}\ignorespaces} 1104 | 1105 | \def\@Ythm#1#2#3[#4]{\@Opargbegintheorem{#1} 1106 | {#4}{#2}{#3}\ignorespaces} 1107 | 1108 | \def\@Begintheorem#1#2#3{#3\trivlist 1109 | \item[\hskip\labelsep{#2#1\@thmcounterend}]} 1110 | 1111 | \def\@Opargbegintheorem#1#2#3#4{#4\trivlist 1112 | \item[\hskip\labelsep{#3#1}]{#3(#2)\@thmcounterend\ }} 1113 | 1114 | \if@envcntsect 1115 | \def\@thmcountersep{.} 1116 | \spnewtheorem{theorem}{Theorem}[section]{\bfseries}{\itshape} 1117 | \else 1118 | \spnewtheorem{theorem}{Theorem}{\bfseries}{\itshape} 1119 | \if@envcntreset 1120 | \@addtoreset{theorem}{section} 1121 | \else 1122 | \@addtoreset{theorem}{chapter} 1123 | \fi 1124 | \fi 1125 | 1126 | %definition of divers theorem environments 1127 | \spnewtheorem*{claim}{Claim}{\itshape}{\rmfamily} 1128 | \spnewtheorem*{proof}{Proof}{\itshape}{\rmfamily} 1129 | \if@envcntsame % alle Umgebungen wie Theorem. 1130 | \def\spn@wtheorem#1#2#3#4{\@spothm{#1}[theorem]{#2}{#3}{#4}} 1131 | \else % alle Umgebungen mit eigenem Zaehler 1132 | \if@envcntsect % mit section numeriert 1133 | \def\spn@wtheorem#1#2#3#4{\@spxnthm{#1}{#2}[section]{#3}{#4}} 1134 | \else % nicht mit section numeriert 1135 | \if@envcntreset 1136 | \def\spn@wtheorem#1#2#3#4{\@spynthm{#1}{#2}{#3}{#4} 1137 | \@addtoreset{#1}{section}} 1138 | \else 1139 | \def\spn@wtheorem#1#2#3#4{\@spynthm{#1}{#2}{#3}{#4} 1140 | \@addtoreset{#1}{chapter}}% 1141 | \fi 1142 | \fi 1143 | \fi 1144 | \spn@wtheorem{case}{Case}{\itshape}{\rmfamily} 1145 | \spn@wtheorem{conjecture}{Conjecture}{\itshape}{\rmfamily} 1146 | \spn@wtheorem{corollary}{Corollary}{\bfseries}{\itshape} 1147 | \spn@wtheorem{definition}{Definition}{\bfseries}{\itshape} 1148 | \spn@wtheorem{example}{Example}{\itshape}{\rmfamily} 1149 | \spn@wtheorem{exercise}{Exercise}{\itshape}{\rmfamily} 1150 | \spn@wtheorem{lemma}{Lemma}{\bfseries}{\itshape} 1151 | \spn@wtheorem{note}{Note}{\itshape}{\rmfamily} 1152 | \spn@wtheorem{problem}{Problem}{\itshape}{\rmfamily} 1153 | \spn@wtheorem{property}{Property}{\itshape}{\rmfamily} 1154 | \spn@wtheorem{proposition}{Proposition}{\bfseries}{\itshape} 1155 | \spn@wtheorem{question}{Question}{\itshape}{\rmfamily} 1156 | \spn@wtheorem{solution}{Solution}{\itshape}{\rmfamily} 1157 | \spn@wtheorem{remark}{Remark}{\itshape}{\rmfamily} 1158 | 1159 | \def\@takefromreset#1#2{% 1160 | \def\@tempa{#1}% 1161 | \let\@tempd\@elt 1162 | \def\@elt##1{% 1163 | \def\@tempb{##1}% 1164 | \ifx\@tempa\@tempb\else 1165 | \@addtoreset{##1}{#2}% 1166 | \fi}% 1167 | \expandafter\expandafter\let\expandafter\@tempc\csname cl@#2\endcsname 1168 | \expandafter\def\csname cl@#2\endcsname{}% 1169 | \@tempc 1170 | \let\@elt\@tempd} 1171 | 1172 | \def\theopargself{\def\@spopargbegintheorem##1##2##3##4##5{\trivlist 1173 | \item[\hskip\labelsep{##4##1\ ##2}]{##4##3\@thmcounterend\ }##5} 1174 | \def\@Opargbegintheorem##1##2##3##4{##4\trivlist 1175 | \item[\hskip\labelsep{##3##1}]{##3##2\@thmcounterend\ }} 1176 | } 1177 | 1178 | \renewenvironment{abstract}{% 1179 | \list{}{\advance\topsep by0.35cm\relax\small 1180 | \leftmargin=1cm 1181 | \labelwidth=\z@ 1182 | \listparindent=\z@ 1183 | \itemindent\listparindent 1184 | \rightmargin\leftmargin}\item[\hskip\labelsep 1185 | \bfseries\abstractname]} 1186 | {\endlist} 1187 | 1188 | \newdimen\headlineindent % dimension for space between 1189 | \headlineindent=1.166cm % number and text of headings. 1190 | 1191 | \def\ps@headings{\let\@mkboth\@gobbletwo 1192 | \let\@oddfoot\@empty\let\@evenfoot\@empty 1193 | \def\@evenhead{\normalfont\small\rlap{\thepage}\hspace{\headlineindent}% 1194 | \leftmark\hfil} 1195 | \def\@oddhead{\normalfont\small\hfil\rightmark\hspace{\headlineindent}% 1196 | \llap{\thepage}} 1197 | \def\chaptermark##1{}% 1198 | \def\sectionmark##1{}% 1199 | \def\subsectionmark##1{}} 1200 | 1201 | \def\ps@titlepage{\let\@mkboth\@gobbletwo 1202 | \let\@oddfoot\@empty\let\@evenfoot\@empty 1203 | \def\@evenhead{\normalfont\small\rlap{\thepage}\hspace{\headlineindent}% 1204 | \hfil} 1205 | \def\@oddhead{\normalfont\small\hfil\hspace{\headlineindent}% 1206 | \llap{\thepage}} 1207 | \def\chaptermark##1{}% 1208 | \def\sectionmark##1{}% 1209 | \def\subsectionmark##1{}} 1210 | 1211 | \if@runhead\ps@headings\else 1212 | \ps@empty\fi 1213 | 1214 | \setlength\arraycolsep{1.4\p@} 1215 | \setlength\tabcolsep{1.4\p@} 1216 | 1217 | \endinput 1218 | %end of file llncs.cls 1219 | -------------------------------------------------------------------------------- /template/splncs04.bst: -------------------------------------------------------------------------------- 1 | %% BibTeX bibliography style `splncs03' 2 | %% 3 | %% BibTeX bibliography style for use with numbered references in 4 | %% Springer Verlag's "Lecture Notes in Computer Science" series. 5 | %% (See Springer's documentation for llncs.cls for 6 | %% more details of the suggested reference format.) Note that this 7 | %% file will not work for author-year style citations. 8 | %% 9 | %% Use \documentclass{llncs} and \bibliographystyle{splncs03}, and cite 10 | %% a reference with (e.g.) \cite{smith77} to get a "[1]" in the text. 11 | %% 12 | %% This file comes to you courtesy of Maurizio "Titto" Patrignani of 13 | %% Dipartimento di Informatica e Automazione Universita' Roma Tre 14 | %% 15 | %% ================================================================================================ 16 | %% This was file `titto-lncs-02.bst' produced on Wed Apr 1, 2009 17 | %% Edited by hand by titto based on `titto-lncs-01.bst' (see below) 18 | %% 19 | %% CHANGES (with respect to titto-lncs-01.bst): 20 | %% - Removed the call to \urlprefix (thus no "URL" string is added to the output) 21 | %% ================================================================================================ 22 | %% This was file `titto-lncs-01.bst' produced on Fri Aug 22, 2008 23 | %% Edited by hand by titto based on `titto.bst' (see below) 24 | %% 25 | %% CHANGES (with respect to titto.bst): 26 | %% - Removed the "capitalize" command for editors string "(eds.)" and "(ed.)" 27 | %% - Introduced the functions titto.bbl.pages and titto.bbl.page for journal pages (without "pp.") 28 | %% - Added a new.sentence command to separate with a dot booktitle and series in the inproceedings 29 | %% - Commented all new.block commands before urls and notes (to separate them with a comma) 30 | %% - Introduced the functions titto.bbl.volume for handling journal volumes (without "vol." label) 31 | %% - Used for editors the same name conventions used for authors (see function format.in.ed.booktitle) 32 | %% - Removed a \newblock to avoid long spaces between title and "In: ..." 33 | %% - Added function titto.space.prefix to add a space instead of "~" after the (removed) "vol." label 34 | %% - Added doi 35 | %% ================================================================================================ 36 | %% This was file `titto.bst', 37 | %% generated with the docstrip utility. 38 | %% 39 | %% The original source files were: 40 | %% 41 | %% merlin.mbs (with options: `vonx,nm-rvvc,yr-par,jttl-rm,volp-com,jwdpg,jwdvol,numser,ser-vol,jnm-x,btit-rm,bt-rm,edparxc,bkedcap,au-col,in-col,fin-bare,pp,ed,abr,mth-bare,xedn,jabr,and-com,and-com-ed,xand,url,url-blk,em-x,nfss,') 42 | %% ---------------------------------------- 43 | %% *** Tentative .bst file for Springer LNCS *** 44 | %% 45 | %% Copyright 1994-2007 Patrick W Daly 46 | % =============================================================== 47 | % IMPORTANT NOTICE: 48 | % This bibliographic style (bst) file has been generated from one or 49 | % more master bibliographic style (mbs) files, listed above. 50 | % 51 | % This generated file can be redistributed and/or modified under the terms 52 | % of the LaTeX Project Public License Distributed from CTAN 53 | % archives in directory macros/latex/base/lppl.txt; either 54 | % version 1 of the License, or any later version. 55 | % =============================================================== 56 | % Name and version information of the main mbs file: 57 | % \ProvidesFile{merlin.mbs}[2007/04/24 4.20 (PWD, AO, DPC)] 58 | % For use with BibTeX version 0.99a or later 59 | %------------------------------------------------------------------- 60 | % This bibliography style file is intended for texts in ENGLISH 61 | % This is a numerical citation style, and as such is standard LaTeX. 62 | % It requires no extra package to interface to the main text. 63 | % The form of the \bibitem entries is 64 | % \bibitem{key}... 65 | % Usage of \cite is as follows: 66 | % \cite{key} ==>> [#] 67 | % \cite[chap. 2]{key} ==>> [#, chap. 2] 68 | % where # is a number determined by the ordering in the reference list. 69 | % The order in the reference list is alphabetical by authors. 70 | %--------------------------------------------------------------------- 71 | 72 | ENTRY 73 | { address 74 | author 75 | booktitle 76 | chapter 77 | doi 78 | edition 79 | editor 80 | eid 81 | howpublished 82 | institution 83 | journal 84 | key 85 | month 86 | note 87 | number 88 | organization 89 | pages 90 | publisher 91 | school 92 | series 93 | title 94 | type 95 | url 96 | volume 97 | year 98 | } 99 | {} 100 | { label } 101 | INTEGERS { output.state before.all mid.sentence after.sentence after.block } 102 | FUNCTION {init.state.consts} 103 | { #0 'before.all := 104 | #1 'mid.sentence := 105 | #2 'after.sentence := 106 | #3 'after.block := 107 | } 108 | STRINGS { s t} 109 | FUNCTION {output.nonnull} 110 | { 's := 111 | output.state mid.sentence = 112 | { ", " * write$ } 113 | { output.state after.block = 114 | { add.period$ write$ 115 | % newline$ 116 | % "\newblock " write$ % removed for titto-lncs-01 117 | " " write$ % to avoid long spaces between title and "In: ..." 118 | } 119 | { output.state before.all = 120 | 'write$ 121 | { add.period$ " " * write$ } 122 | if$ 123 | } 124 | if$ 125 | mid.sentence 'output.state := 126 | } 127 | if$ 128 | s 129 | } 130 | FUNCTION {output} 131 | { duplicate$ empty$ 132 | 'pop$ 133 | 'output.nonnull 134 | if$ 135 | } 136 | FUNCTION {output.check} 137 | { 't := 138 | duplicate$ empty$ 139 | { pop$ "empty " t * " in " * cite$ * warning$ } 140 | 'output.nonnull 141 | if$ 142 | } 143 | FUNCTION {fin.entry} 144 | { duplicate$ empty$ 145 | 'pop$ 146 | 'write$ 147 | if$ 148 | newline$ 149 | } 150 | 151 | FUNCTION {new.block} 152 | { output.state before.all = 153 | 'skip$ 154 | { after.block 'output.state := } 155 | if$ 156 | } 157 | FUNCTION {new.sentence} 158 | { output.state after.block = 159 | 'skip$ 160 | { output.state before.all = 161 | 'skip$ 162 | { after.sentence 'output.state := } 163 | if$ 164 | } 165 | if$ 166 | } 167 | FUNCTION {add.blank} 168 | { " " * before.all 'output.state := 169 | } 170 | 171 | 172 | FUNCTION {add.colon} 173 | { duplicate$ empty$ 174 | 'skip$ 175 | { ":" * add.blank } 176 | if$ 177 | } 178 | 179 | FUNCTION {date.block} 180 | { 181 | new.block 182 | } 183 | 184 | FUNCTION {not} 185 | { { #0 } 186 | { #1 } 187 | if$ 188 | } 189 | FUNCTION {and} 190 | { 'skip$ 191 | { pop$ #0 } 192 | if$ 193 | } 194 | FUNCTION {or} 195 | { { pop$ #1 } 196 | 'skip$ 197 | if$ 198 | } 199 | STRINGS {z} 200 | FUNCTION {remove.dots} 201 | { 'z := 202 | "" 203 | { z empty$ not } 204 | { z #1 #1 substring$ 205 | z #2 global.max$ substring$ 'z := 206 | duplicate$ "." = 'pop$ 207 | { * } 208 | if$ 209 | } 210 | while$ 211 | } 212 | FUNCTION {new.block.checka} 213 | { empty$ 214 | 'skip$ 215 | 'new.block 216 | if$ 217 | } 218 | FUNCTION {new.block.checkb} 219 | { empty$ 220 | swap$ empty$ 221 | and 222 | 'skip$ 223 | 'new.block 224 | if$ 225 | } 226 | FUNCTION {new.sentence.checka} 227 | { empty$ 228 | 'skip$ 229 | 'new.sentence 230 | if$ 231 | } 232 | FUNCTION {new.sentence.checkb} 233 | { empty$ 234 | swap$ empty$ 235 | and 236 | 'skip$ 237 | 'new.sentence 238 | if$ 239 | } 240 | FUNCTION {field.or.null} 241 | { duplicate$ empty$ 242 | { pop$ "" } 243 | 'skip$ 244 | if$ 245 | } 246 | FUNCTION {emphasize} 247 | { skip$ } 248 | 249 | FUNCTION {embolden} 250 | { duplicate$ empty$ 251 | { pop$ "" } 252 | { "\textbf{" swap$ * "}" * } 253 | if$ 254 | } 255 | FUNCTION {tie.or.space.prefix} 256 | { duplicate$ text.length$ #5 < 257 | { "~" } 258 | { " " } 259 | if$ 260 | swap$ 261 | } 262 | FUNCTION {titto.space.prefix} % always introduce a space 263 | { duplicate$ text.length$ #3 < 264 | { " " } 265 | { " " } 266 | if$ 267 | swap$ 268 | } 269 | 270 | 271 | FUNCTION {capitalize} 272 | { "u" change.case$ "t" change.case$ } 273 | 274 | FUNCTION {space.word} 275 | { " " swap$ * " " * } 276 | % Here are the language-specific definitions for explicit words. 277 | % Each function has a name bbl.xxx where xxx is the English word. 278 | % The language selected here is ENGLISH 279 | FUNCTION {bbl.and} 280 | { "and"} 281 | 282 | FUNCTION {bbl.etal} 283 | { "et~al." } 284 | 285 | FUNCTION {bbl.editors} 286 | { "eds." } 287 | 288 | FUNCTION {bbl.editor} 289 | { "ed." } 290 | 291 | FUNCTION {bbl.edby} 292 | { "edited by" } 293 | 294 | FUNCTION {bbl.edition} 295 | { "edn." } 296 | 297 | FUNCTION {bbl.volume} 298 | { "vol." } 299 | 300 | FUNCTION {titto.bbl.volume} % for handling journals 301 | { "" } 302 | 303 | FUNCTION {bbl.of} 304 | { "of" } 305 | 306 | FUNCTION {bbl.number} 307 | { "no." } 308 | 309 | FUNCTION {bbl.nr} 310 | { "no." } 311 | 312 | FUNCTION {bbl.in} 313 | { "in" } 314 | 315 | FUNCTION {bbl.pages} 316 | { "pp." } 317 | 318 | FUNCTION {bbl.page} 319 | { "p." } 320 | 321 | FUNCTION {titto.bbl.pages} % for journals 322 | { "" } 323 | 324 | FUNCTION {titto.bbl.page} % for journals 325 | { "" } 326 | 327 | FUNCTION {bbl.chapter} 328 | { "chap." } 329 | 330 | FUNCTION {bbl.techrep} 331 | { "Tech. Rep." } 332 | 333 | FUNCTION {bbl.mthesis} 334 | { "Master's thesis" } 335 | 336 | FUNCTION {bbl.phdthesis} 337 | { "Ph.D. thesis" } 338 | 339 | MACRO {jan} {"Jan."} 340 | 341 | MACRO {feb} {"Feb."} 342 | 343 | MACRO {mar} {"Mar."} 344 | 345 | MACRO {apr} {"Apr."} 346 | 347 | MACRO {may} {"May"} 348 | 349 | MACRO {jun} {"Jun."} 350 | 351 | MACRO {jul} {"Jul."} 352 | 353 | MACRO {aug} {"Aug."} 354 | 355 | MACRO {sep} {"Sep."} 356 | 357 | MACRO {oct} {"Oct."} 358 | 359 | MACRO {nov} {"Nov."} 360 | 361 | MACRO {dec} {"Dec."} 362 | 363 | MACRO {acmcs} {"ACM Comput. Surv."} 364 | 365 | MACRO {acta} {"Acta Inf."} 366 | 367 | MACRO {cacm} {"Commun. ACM"} 368 | 369 | MACRO {ibmjrd} {"IBM J. Res. Dev."} 370 | 371 | MACRO {ibmsj} {"IBM Syst.~J."} 372 | 373 | MACRO {ieeese} {"IEEE Trans. Software Eng."} 374 | 375 | MACRO {ieeetc} {"IEEE Trans. Comput."} 376 | 377 | MACRO {ieeetcad} 378 | {"IEEE Trans. Comput. Aid. Des."} 379 | 380 | MACRO {ipl} {"Inf. Process. Lett."} 381 | 382 | MACRO {jacm} {"J.~ACM"} 383 | 384 | MACRO {jcss} {"J.~Comput. Syst. Sci."} 385 | 386 | MACRO {scp} {"Sci. Comput. Program."} 387 | 388 | MACRO {sicomp} {"SIAM J. Comput."} 389 | 390 | MACRO {tocs} {"ACM Trans. Comput. Syst."} 391 | 392 | MACRO {tods} {"ACM Trans. Database Syst."} 393 | 394 | MACRO {tog} {"ACM Trans. Graphic."} 395 | 396 | MACRO {toms} {"ACM Trans. Math. Software"} 397 | 398 | MACRO {toois} {"ACM Trans. Office Inf. Syst."} 399 | 400 | MACRO {toplas} {"ACM Trans. Progr. Lang. Syst."} 401 | 402 | MACRO {tcs} {"Theor. Comput. Sci."} 403 | 404 | FUNCTION {bibinfo.check} 405 | { swap$ 406 | duplicate$ missing$ 407 | { 408 | pop$ pop$ 409 | "" 410 | } 411 | { duplicate$ empty$ 412 | { 413 | swap$ pop$ 414 | } 415 | { swap$ 416 | pop$ 417 | } 418 | if$ 419 | } 420 | if$ 421 | } 422 | FUNCTION {bibinfo.warn} 423 | { swap$ 424 | duplicate$ missing$ 425 | { 426 | swap$ "missing " swap$ * " in " * cite$ * warning$ pop$ 427 | "" 428 | } 429 | { duplicate$ empty$ 430 | { 431 | swap$ "empty " swap$ * " in " * cite$ * warning$ 432 | } 433 | { swap$ 434 | pop$ 435 | } 436 | if$ 437 | } 438 | if$ 439 | } 440 | FUNCTION {format.url} 441 | { url empty$ 442 | { "" } 443 | % { "\urlprefix\url{" url * "}" * } 444 | { "\url{" url * "}" * } % changed in titto-lncs-02.bst 445 | if$ 446 | } 447 | 448 | FUNCTION {format.doi} % added in splncs04.bst 449 | { doi empty$ 450 | { "" } 451 | { after.block 'output.state := 452 | "\doi{" doi * "}" * } 453 | if$ 454 | } 455 | 456 | INTEGERS { nameptr namesleft numnames } 457 | 458 | 459 | STRINGS { bibinfo} 460 | 461 | FUNCTION {format.names} 462 | { 'bibinfo := 463 | duplicate$ empty$ 'skip$ { 464 | 's := 465 | "" 't := 466 | #1 'nameptr := 467 | s num.names$ 'numnames := 468 | numnames 'namesleft := 469 | { namesleft #0 > } 470 | { s nameptr 471 | "{vv~}{ll}{, jj}{, f{.}.}" 472 | format.name$ 473 | bibinfo bibinfo.check 474 | 't := 475 | nameptr #1 > 476 | { 477 | namesleft #1 > 478 | { ", " * t * } 479 | { 480 | s nameptr "{ll}" format.name$ duplicate$ "others" = 481 | { 't := } 482 | { pop$ } 483 | if$ 484 | "," * 485 | t "others" = 486 | { 487 | " " * bbl.etal * 488 | } 489 | { " " * t * } 490 | if$ 491 | } 492 | if$ 493 | } 494 | 't 495 | if$ 496 | nameptr #1 + 'nameptr := 497 | namesleft #1 - 'namesleft := 498 | } 499 | while$ 500 | } if$ 501 | } 502 | FUNCTION {format.names.ed} 503 | { 504 | 'bibinfo := 505 | duplicate$ empty$ 'skip$ { 506 | 's := 507 | "" 't := 508 | #1 'nameptr := 509 | s num.names$ 'numnames := 510 | numnames 'namesleft := 511 | { namesleft #0 > } 512 | { s nameptr 513 | "{f{.}.~}{vv~}{ll}{ jj}" 514 | format.name$ 515 | bibinfo bibinfo.check 516 | 't := 517 | nameptr #1 > 518 | { 519 | namesleft #1 > 520 | { ", " * t * } 521 | { 522 | s nameptr "{ll}" format.name$ duplicate$ "others" = 523 | { 't := } 524 | { pop$ } 525 | if$ 526 | "," * 527 | t "others" = 528 | { 529 | 530 | " " * bbl.etal * 531 | } 532 | { " " * t * } 533 | if$ 534 | } 535 | if$ 536 | } 537 | 't 538 | if$ 539 | nameptr #1 + 'nameptr := 540 | namesleft #1 - 'namesleft := 541 | } 542 | while$ 543 | } if$ 544 | } 545 | FUNCTION {format.authors} 546 | { author "author" format.names 547 | } 548 | FUNCTION {get.bbl.editor} 549 | { editor num.names$ #1 > 'bbl.editors 'bbl.editor if$ } 550 | 551 | FUNCTION {format.editors} 552 | { editor "editor" format.names duplicate$ empty$ 'skip$ 553 | { 554 | " " * 555 | get.bbl.editor 556 | % capitalize 557 | "(" swap$ * ")" * 558 | * 559 | } 560 | if$ 561 | } 562 | FUNCTION {format.note} 563 | { 564 | note empty$ 565 | { "" } 566 | { note #1 #1 substring$ 567 | duplicate$ "{" = 568 | 'skip$ 569 | { output.state mid.sentence = 570 | { "l" } 571 | { "u" } 572 | if$ 573 | change.case$ 574 | } 575 | if$ 576 | note #2 global.max$ substring$ * "note" bibinfo.check 577 | } 578 | if$ 579 | } 580 | 581 | FUNCTION {format.title} 582 | { title 583 | duplicate$ empty$ 'skip$ 584 | { "t" change.case$ } 585 | if$ 586 | "title" bibinfo.check 587 | } 588 | FUNCTION {output.bibitem} 589 | { newline$ 590 | "\bibitem{" write$ 591 | cite$ write$ 592 | "}" write$ 593 | newline$ 594 | "" 595 | before.all 'output.state := 596 | } 597 | 598 | FUNCTION {n.dashify} 599 | { 600 | 't := 601 | "" 602 | { t empty$ not } 603 | { t #1 #1 substring$ "-" = 604 | { t #1 #2 substring$ "--" = not 605 | { "--" * 606 | t #2 global.max$ substring$ 't := 607 | } 608 | { { t #1 #1 substring$ "-" = } 609 | { "-" * 610 | t #2 global.max$ substring$ 't := 611 | } 612 | while$ 613 | } 614 | if$ 615 | } 616 | { t #1 #1 substring$ * 617 | t #2 global.max$ substring$ 't := 618 | } 619 | if$ 620 | } 621 | while$ 622 | } 623 | 624 | FUNCTION {word.in} 625 | { bbl.in capitalize 626 | ":" * 627 | " " * } 628 | 629 | FUNCTION {format.date} 630 | { 631 | month "month" bibinfo.check 632 | duplicate$ empty$ 633 | year "year" bibinfo.check duplicate$ empty$ 634 | { swap$ 'skip$ 635 | { "there's a month but no year in " cite$ * warning$ } 636 | if$ 637 | * 638 | } 639 | { swap$ 'skip$ 640 | { 641 | swap$ 642 | " " * swap$ 643 | } 644 | if$ 645 | * 646 | remove.dots 647 | } 648 | if$ 649 | duplicate$ empty$ 650 | 'skip$ 651 | { 652 | before.all 'output.state := 653 | " (" swap$ * ")" * 654 | } 655 | if$ 656 | } 657 | FUNCTION {format.btitle} 658 | { title "title" bibinfo.check 659 | duplicate$ empty$ 'skip$ 660 | { 661 | } 662 | if$ 663 | } 664 | FUNCTION {either.or.check} 665 | { empty$ 666 | 'pop$ 667 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } 668 | if$ 669 | } 670 | FUNCTION {format.bvolume} 671 | { volume empty$ 672 | { "" } 673 | { bbl.volume volume tie.or.space.prefix 674 | "volume" bibinfo.check * * 675 | series "series" bibinfo.check 676 | duplicate$ empty$ 'pop$ 677 | { emphasize ", " * swap$ * } 678 | if$ 679 | "volume and number" number either.or.check 680 | } 681 | if$ 682 | } 683 | FUNCTION {format.number.series} 684 | { volume empty$ 685 | { number empty$ 686 | { series field.or.null } 687 | { output.state mid.sentence = 688 | { bbl.number } 689 | { bbl.number capitalize } 690 | if$ 691 | number tie.or.space.prefix "number" bibinfo.check * * 692 | series empty$ 693 | { "there's a number but no series in " cite$ * warning$ } 694 | { bbl.in space.word * 695 | series "series" bibinfo.check * 696 | } 697 | if$ 698 | } 699 | if$ 700 | } 701 | { "" } 702 | if$ 703 | } 704 | 705 | FUNCTION {format.edition} 706 | { edition duplicate$ empty$ 'skip$ 707 | { 708 | output.state mid.sentence = 709 | { "l" } 710 | { "t" } 711 | if$ change.case$ 712 | "edition" bibinfo.check 713 | " " * bbl.edition * 714 | } 715 | if$ 716 | } 717 | INTEGERS { multiresult } 718 | FUNCTION {multi.page.check} 719 | { 't := 720 | #0 'multiresult := 721 | { multiresult not 722 | t empty$ not 723 | and 724 | } 725 | { t #1 #1 substring$ 726 | duplicate$ "-" = 727 | swap$ duplicate$ "," = 728 | swap$ "+" = 729 | or or 730 | { #1 'multiresult := } 731 | { t #2 global.max$ substring$ 't := } 732 | if$ 733 | } 734 | while$ 735 | multiresult 736 | } 737 | FUNCTION {format.pages} 738 | { pages duplicate$ empty$ 'skip$ 739 | { duplicate$ multi.page.check 740 | { 741 | bbl.pages swap$ 742 | n.dashify 743 | } 744 | { 745 | bbl.page swap$ 746 | } 747 | if$ 748 | tie.or.space.prefix 749 | "pages" bibinfo.check 750 | * * 751 | } 752 | if$ 753 | } 754 | FUNCTION {format.journal.pages} 755 | { pages duplicate$ empty$ 'pop$ 756 | { swap$ duplicate$ empty$ 757 | { pop$ pop$ format.pages } 758 | { 759 | ", " * 760 | swap$ 761 | n.dashify 762 | pages multi.page.check 763 | 'titto.bbl.pages 764 | 'titto.bbl.page 765 | if$ 766 | swap$ tie.or.space.prefix 767 | "pages" bibinfo.check 768 | * * 769 | * 770 | } 771 | if$ 772 | } 773 | if$ 774 | } 775 | FUNCTION {format.journal.eid} 776 | { eid "eid" bibinfo.check 777 | duplicate$ empty$ 'pop$ 778 | { swap$ duplicate$ empty$ 'skip$ 779 | { 780 | ", " * 781 | } 782 | if$ 783 | swap$ * 784 | } 785 | if$ 786 | } 787 | FUNCTION {format.vol.num.pages} % this function is used only for journal entries 788 | { volume field.or.null embolden 789 | duplicate$ empty$ 'skip$ 790 | { 791 | % bbl.volume swap$ tie.or.space.prefix 792 | titto.bbl.volume swap$ titto.space.prefix 793 | % rationale for the change above: for journals you don't want "vol." label 794 | % hence it does not make sense to attach the journal number to the label when 795 | % it is short 796 | "volume" bibinfo.check 797 | * * 798 | } 799 | if$ 800 | number "number" bibinfo.check duplicate$ empty$ 'skip$ 801 | { 802 | swap$ duplicate$ empty$ 803 | { "there's a number but no volume in " cite$ * warning$ } 804 | 'skip$ 805 | if$ 806 | swap$ 807 | "(" swap$ * ")" * 808 | } 809 | if$ * 810 | eid empty$ 811 | { format.journal.pages } 812 | { format.journal.eid } 813 | if$ 814 | } 815 | 816 | FUNCTION {format.chapter.pages} 817 | { chapter empty$ 818 | 'format.pages 819 | { type empty$ 820 | { bbl.chapter } 821 | { type "l" change.case$ 822 | "type" bibinfo.check 823 | } 824 | if$ 825 | chapter tie.or.space.prefix 826 | "chapter" bibinfo.check 827 | * * 828 | pages empty$ 829 | 'skip$ 830 | { ", " * format.pages * } 831 | if$ 832 | } 833 | if$ 834 | } 835 | 836 | FUNCTION {format.booktitle} 837 | { 838 | booktitle "booktitle" bibinfo.check 839 | } 840 | FUNCTION {format.in.ed.booktitle} 841 | { format.booktitle duplicate$ empty$ 'skip$ 842 | { 843 | % editor "editor" format.names.ed duplicate$ empty$ 'pop$ % changed by titto 844 | editor "editor" format.names duplicate$ empty$ 'pop$ 845 | { 846 | " " * 847 | get.bbl.editor 848 | % capitalize 849 | "(" swap$ * ") " * 850 | * swap$ 851 | * } 852 | if$ 853 | word.in swap$ * 854 | } 855 | if$ 856 | } 857 | FUNCTION {empty.misc.check} 858 | { author empty$ title empty$ howpublished empty$ 859 | month empty$ year empty$ note empty$ 860 | and and and and and 861 | key empty$ not and 862 | { "all relevant fields are empty in " cite$ * warning$ } 863 | 'skip$ 864 | if$ 865 | } 866 | FUNCTION {format.thesis.type} 867 | { type duplicate$ empty$ 868 | 'pop$ 869 | { swap$ pop$ 870 | "t" change.case$ "type" bibinfo.check 871 | } 872 | if$ 873 | } 874 | FUNCTION {format.tr.number} 875 | { number "number" bibinfo.check 876 | type duplicate$ empty$ 877 | { pop$ bbl.techrep } 878 | 'skip$ 879 | if$ 880 | "type" bibinfo.check 881 | swap$ duplicate$ empty$ 882 | { pop$ "t" change.case$ } 883 | { tie.or.space.prefix * * } 884 | if$ 885 | } 886 | FUNCTION {format.article.crossref} 887 | { 888 | key duplicate$ empty$ 889 | { pop$ 890 | journal duplicate$ empty$ 891 | { "need key or journal for " cite$ * " to crossref " * crossref * warning$ } 892 | { "journal" bibinfo.check emphasize word.in swap$ * } 893 | if$ 894 | } 895 | { word.in swap$ * " " *} 896 | if$ 897 | " \cite{" * crossref * "}" * 898 | } 899 | FUNCTION {format.crossref.editor} 900 | { editor #1 "{vv~}{ll}" format.name$ 901 | "editor" bibinfo.check 902 | editor num.names$ duplicate$ 903 | #2 > 904 | { pop$ 905 | "editor" bibinfo.check 906 | " " * bbl.etal 907 | * 908 | } 909 | { #2 < 910 | 'skip$ 911 | { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = 912 | { 913 | "editor" bibinfo.check 914 | " " * bbl.etal 915 | * 916 | } 917 | { 918 | bbl.and space.word 919 | * editor #2 "{vv~}{ll}" format.name$ 920 | "editor" bibinfo.check 921 | * 922 | } 923 | if$ 924 | } 925 | if$ 926 | } 927 | if$ 928 | } 929 | FUNCTION {format.book.crossref} 930 | { volume duplicate$ empty$ 931 | { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ 932 | pop$ word.in 933 | } 934 | { bbl.volume 935 | capitalize 936 | swap$ tie.or.space.prefix "volume" bibinfo.check * * bbl.of space.word * 937 | } 938 | if$ 939 | editor empty$ 940 | editor field.or.null author field.or.null = 941 | or 942 | { key empty$ 943 | { series empty$ 944 | { "need editor, key, or series for " cite$ * " to crossref " * 945 | crossref * warning$ 946 | "" * 947 | } 948 | { series emphasize * } 949 | if$ 950 | } 951 | { key * } 952 | if$ 953 | } 954 | { format.crossref.editor * } 955 | if$ 956 | " \cite{" * crossref * "}" * 957 | } 958 | FUNCTION {format.incoll.inproc.crossref} 959 | { 960 | editor empty$ 961 | editor field.or.null author field.or.null = 962 | or 963 | { key empty$ 964 | { format.booktitle duplicate$ empty$ 965 | { "need editor, key, or booktitle for " cite$ * " to crossref " * 966 | crossref * warning$ 967 | } 968 | { word.in swap$ * } 969 | if$ 970 | } 971 | { word.in key * " " *} 972 | if$ 973 | } 974 | { word.in format.crossref.editor * " " *} 975 | if$ 976 | " \cite{" * crossref * "}" * 977 | } 978 | FUNCTION {format.org.or.pub} 979 | { 't := 980 | "" 981 | address empty$ t empty$ and 982 | 'skip$ 983 | { 984 | t empty$ 985 | { address "address" bibinfo.check * 986 | } 987 | { t * 988 | address empty$ 989 | 'skip$ 990 | { ", " * address "address" bibinfo.check * } 991 | if$ 992 | } 993 | if$ 994 | } 995 | if$ 996 | } 997 | FUNCTION {format.publisher.address} 998 | { publisher "publisher" bibinfo.warn format.org.or.pub 999 | } 1000 | 1001 | FUNCTION {format.organization.address} 1002 | { organization "organization" bibinfo.check format.org.or.pub 1003 | } 1004 | 1005 | FUNCTION {article} 1006 | { output.bibitem 1007 | format.authors "author" output.check 1008 | add.colon 1009 | new.block 1010 | format.title "title" output.check 1011 | new.block 1012 | crossref missing$ 1013 | { 1014 | journal 1015 | "journal" bibinfo.check 1016 | "journal" output.check 1017 | add.blank 1018 | format.vol.num.pages output 1019 | format.date "year" output.check 1020 | } 1021 | { format.article.crossref output.nonnull 1022 | format.pages output 1023 | } 1024 | if$ 1025 | % new.block 1026 | format.doi output 1027 | format.url output 1028 | % new.block 1029 | format.note output 1030 | fin.entry 1031 | } 1032 | FUNCTION {book} 1033 | { output.bibitem 1034 | author empty$ 1035 | { format.editors "author and editor" output.check 1036 | add.colon 1037 | } 1038 | { format.authors output.nonnull 1039 | add.colon 1040 | crossref missing$ 1041 | { "author and editor" editor either.or.check } 1042 | 'skip$ 1043 | if$ 1044 | } 1045 | if$ 1046 | new.block 1047 | format.btitle "title" output.check 1048 | crossref missing$ 1049 | { format.bvolume output 1050 | new.block 1051 | new.sentence 1052 | format.number.series output 1053 | format.publisher.address output 1054 | } 1055 | { 1056 | new.block 1057 | format.book.crossref output.nonnull 1058 | } 1059 | if$ 1060 | format.edition output 1061 | format.date "year" output.check 1062 | % new.block 1063 | format.doi output 1064 | format.url output 1065 | % new.block 1066 | format.note output 1067 | fin.entry 1068 | } 1069 | FUNCTION {booklet} 1070 | { output.bibitem 1071 | format.authors output 1072 | add.colon 1073 | new.block 1074 | format.title "title" output.check 1075 | new.block 1076 | howpublished "howpublished" bibinfo.check output 1077 | address "address" bibinfo.check output 1078 | format.date output 1079 | % new.block 1080 | format.doi output 1081 | format.url output 1082 | % new.block 1083 | format.note output 1084 | fin.entry 1085 | } 1086 | 1087 | FUNCTION {inbook} 1088 | { output.bibitem 1089 | author empty$ 1090 | { format.editors "author and editor" output.check 1091 | add.colon 1092 | } 1093 | { format.authors output.nonnull 1094 | add.colon 1095 | crossref missing$ 1096 | { "author and editor" editor either.or.check } 1097 | 'skip$ 1098 | if$ 1099 | } 1100 | if$ 1101 | new.block 1102 | format.btitle "title" output.check 1103 | crossref missing$ 1104 | { 1105 | format.bvolume output 1106 | format.chapter.pages "chapter and pages" output.check 1107 | new.block 1108 | new.sentence 1109 | format.number.series output 1110 | format.publisher.address output 1111 | } 1112 | { 1113 | format.chapter.pages "chapter and pages" output.check 1114 | new.block 1115 | format.book.crossref output.nonnull 1116 | } 1117 | if$ 1118 | format.edition output 1119 | format.date "year" output.check 1120 | % new.block 1121 | format.doi output 1122 | format.url output 1123 | % new.block 1124 | format.note output 1125 | fin.entry 1126 | } 1127 | 1128 | FUNCTION {incollection} 1129 | { output.bibitem 1130 | format.authors "author" output.check 1131 | add.colon 1132 | new.block 1133 | format.title "title" output.check 1134 | new.block 1135 | crossref missing$ 1136 | { format.in.ed.booktitle "booktitle" output.check 1137 | format.bvolume output 1138 | format.chapter.pages output 1139 | new.sentence 1140 | format.number.series output 1141 | format.publisher.address output 1142 | format.edition output 1143 | format.date "year" output.check 1144 | } 1145 | { format.incoll.inproc.crossref output.nonnull 1146 | format.chapter.pages output 1147 | } 1148 | if$ 1149 | % new.block 1150 | format.doi output 1151 | format.url output 1152 | % new.block 1153 | format.note output 1154 | fin.entry 1155 | } 1156 | FUNCTION {inproceedings} 1157 | { output.bibitem 1158 | format.authors "author" output.check 1159 | add.colon 1160 | new.block 1161 | format.title "title" output.check 1162 | new.block 1163 | crossref missing$ 1164 | { format.in.ed.booktitle "booktitle" output.check 1165 | new.sentence % added by titto 1166 | format.bvolume output 1167 | format.pages output 1168 | new.sentence 1169 | format.number.series output 1170 | publisher empty$ 1171 | { format.organization.address output } 1172 | { organization "organization" bibinfo.check output 1173 | format.publisher.address output 1174 | } 1175 | if$ 1176 | format.date "year" output.check 1177 | } 1178 | { format.incoll.inproc.crossref output.nonnull 1179 | format.pages output 1180 | } 1181 | if$ 1182 | % new.block 1183 | format.doi output 1184 | format.url output 1185 | % new.block 1186 | format.note output 1187 | fin.entry 1188 | } 1189 | FUNCTION {conference} { inproceedings } 1190 | FUNCTION {manual} 1191 | { output.bibitem 1192 | author empty$ 1193 | { organization "organization" bibinfo.check 1194 | duplicate$ empty$ 'pop$ 1195 | { output 1196 | address "address" bibinfo.check output 1197 | } 1198 | if$ 1199 | } 1200 | { format.authors output.nonnull } 1201 | if$ 1202 | add.colon 1203 | new.block 1204 | format.btitle "title" output.check 1205 | author empty$ 1206 | { organization empty$ 1207 | { 1208 | address new.block.checka 1209 | address "address" bibinfo.check output 1210 | } 1211 | 'skip$ 1212 | if$ 1213 | } 1214 | { 1215 | organization address new.block.checkb 1216 | organization "organization" bibinfo.check output 1217 | address "address" bibinfo.check output 1218 | } 1219 | if$ 1220 | format.edition output 1221 | format.date output 1222 | % new.block 1223 | format.doi output 1224 | format.url output 1225 | % new.block 1226 | format.note output 1227 | fin.entry 1228 | } 1229 | 1230 | FUNCTION {mastersthesis} 1231 | { output.bibitem 1232 | format.authors "author" output.check 1233 | add.colon 1234 | new.block 1235 | format.btitle 1236 | "title" output.check 1237 | new.block 1238 | bbl.mthesis format.thesis.type output.nonnull 1239 | school "school" bibinfo.warn output 1240 | address "address" bibinfo.check output 1241 | format.date "year" output.check 1242 | % new.block 1243 | format.doi output 1244 | format.url output 1245 | % new.block 1246 | format.note output 1247 | fin.entry 1248 | } 1249 | 1250 | FUNCTION {misc} 1251 | { output.bibitem 1252 | format.authors output 1253 | add.colon 1254 | title howpublished new.block.checkb 1255 | format.title output 1256 | howpublished new.block.checka 1257 | howpublished "howpublished" bibinfo.check output 1258 | format.date output 1259 | % new.block 1260 | format.doi output 1261 | format.url output 1262 | % new.block 1263 | format.note output 1264 | fin.entry 1265 | empty.misc.check 1266 | } 1267 | FUNCTION {phdthesis} 1268 | { output.bibitem 1269 | format.authors "author" output.check 1270 | add.colon 1271 | new.block 1272 | format.btitle 1273 | "title" output.check 1274 | new.block 1275 | bbl.phdthesis format.thesis.type output.nonnull 1276 | school "school" bibinfo.warn output 1277 | address "address" bibinfo.check output 1278 | format.date "year" output.check 1279 | % new.block 1280 | format.doi output 1281 | format.url output 1282 | % new.block 1283 | format.note output 1284 | fin.entry 1285 | } 1286 | 1287 | FUNCTION {proceedings} 1288 | { output.bibitem 1289 | editor empty$ 1290 | { organization "organization" bibinfo.check output 1291 | } 1292 | { format.editors output.nonnull } 1293 | if$ 1294 | add.colon 1295 | new.block 1296 | format.btitle "title" output.check 1297 | format.bvolume output 1298 | editor empty$ 1299 | { publisher empty$ 1300 | { format.number.series output } 1301 | { 1302 | new.sentence 1303 | format.number.series output 1304 | format.publisher.address output 1305 | } 1306 | if$ 1307 | } 1308 | { publisher empty$ 1309 | { 1310 | new.sentence 1311 | format.number.series output 1312 | format.organization.address output } 1313 | { 1314 | new.sentence 1315 | format.number.series output 1316 | organization "organization" bibinfo.check output 1317 | format.publisher.address output 1318 | } 1319 | if$ 1320 | } 1321 | if$ 1322 | format.date "year" output.check 1323 | % new.block 1324 | format.doi output 1325 | format.url output 1326 | % new.block 1327 | format.note output 1328 | fin.entry 1329 | } 1330 | 1331 | FUNCTION {techreport} 1332 | { output.bibitem 1333 | format.authors "author" output.check 1334 | add.colon 1335 | new.block 1336 | format.title 1337 | "title" output.check 1338 | new.block 1339 | format.tr.number output.nonnull 1340 | institution "institution" bibinfo.warn output 1341 | address "address" bibinfo.check output 1342 | format.date "year" output.check 1343 | % new.block 1344 | format.doi output 1345 | format.url output 1346 | % new.block 1347 | format.note output 1348 | fin.entry 1349 | } 1350 | 1351 | FUNCTION {unpublished} 1352 | { output.bibitem 1353 | format.authors "author" output.check 1354 | add.colon 1355 | new.block 1356 | format.title "title" output.check 1357 | format.date output 1358 | % new.block 1359 | format.url output 1360 | % new.block 1361 | format.note "note" output.check 1362 | fin.entry 1363 | } 1364 | 1365 | FUNCTION {default.type} { misc } 1366 | READ 1367 | FUNCTION {sortify} 1368 | { purify$ 1369 | "l" change.case$ 1370 | } 1371 | INTEGERS { len } 1372 | FUNCTION {chop.word} 1373 | { 's := 1374 | 'len := 1375 | s #1 len substring$ = 1376 | { s len #1 + global.max$ substring$ } 1377 | 's 1378 | if$ 1379 | } 1380 | FUNCTION {sort.format.names} 1381 | { 's := 1382 | #1 'nameptr := 1383 | "" 1384 | s num.names$ 'numnames := 1385 | numnames 'namesleft := 1386 | { namesleft #0 > } 1387 | { s nameptr 1388 | "{ll{ }}{ ff{ }}{ jj{ }}" 1389 | format.name$ 't := 1390 | nameptr #1 > 1391 | { 1392 | " " * 1393 | namesleft #1 = t "others" = and 1394 | { "zzzzz" * } 1395 | { t sortify * } 1396 | if$ 1397 | } 1398 | { t sortify * } 1399 | if$ 1400 | nameptr #1 + 'nameptr := 1401 | namesleft #1 - 'namesleft := 1402 | } 1403 | while$ 1404 | } 1405 | 1406 | FUNCTION {sort.format.title} 1407 | { 't := 1408 | "A " #2 1409 | "An " #3 1410 | "The " #4 t chop.word 1411 | chop.word 1412 | chop.word 1413 | sortify 1414 | #1 global.max$ substring$ 1415 | } 1416 | FUNCTION {author.sort} 1417 | { author empty$ 1418 | { key empty$ 1419 | { "to sort, need author or key in " cite$ * warning$ 1420 | "" 1421 | } 1422 | { key sortify } 1423 | if$ 1424 | } 1425 | { author sort.format.names } 1426 | if$ 1427 | } 1428 | FUNCTION {author.editor.sort} 1429 | { author empty$ 1430 | { editor empty$ 1431 | { key empty$ 1432 | { "to sort, need author, editor, or key in " cite$ * warning$ 1433 | "" 1434 | } 1435 | { key sortify } 1436 | if$ 1437 | } 1438 | { editor sort.format.names } 1439 | if$ 1440 | } 1441 | { author sort.format.names } 1442 | if$ 1443 | } 1444 | FUNCTION {author.organization.sort} 1445 | { author empty$ 1446 | { organization empty$ 1447 | { key empty$ 1448 | { "to sort, need author, organization, or key in " cite$ * warning$ 1449 | "" 1450 | } 1451 | { key sortify } 1452 | if$ 1453 | } 1454 | { "The " #4 organization chop.word sortify } 1455 | if$ 1456 | } 1457 | { author sort.format.names } 1458 | if$ 1459 | } 1460 | FUNCTION {editor.organization.sort} 1461 | { editor empty$ 1462 | { organization empty$ 1463 | { key empty$ 1464 | { "to sort, need editor, organization, or key in " cite$ * warning$ 1465 | "" 1466 | } 1467 | { key sortify } 1468 | if$ 1469 | } 1470 | { "The " #4 organization chop.word sortify } 1471 | if$ 1472 | } 1473 | { editor sort.format.names } 1474 | if$ 1475 | } 1476 | FUNCTION {presort} 1477 | { type$ "book" = 1478 | type$ "inbook" = 1479 | or 1480 | 'author.editor.sort 1481 | { type$ "proceedings" = 1482 | 'editor.organization.sort 1483 | { type$ "manual" = 1484 | 'author.organization.sort 1485 | 'author.sort 1486 | if$ 1487 | } 1488 | if$ 1489 | } 1490 | if$ 1491 | " " 1492 | * 1493 | year field.or.null sortify 1494 | * 1495 | " " 1496 | * 1497 | title field.or.null 1498 | sort.format.title 1499 | * 1500 | #1 entry.max$ substring$ 1501 | 'sort.key$ := 1502 | } 1503 | ITERATE {presort} 1504 | SORT 1505 | STRINGS { longest.label } 1506 | INTEGERS { number.label longest.label.width } 1507 | FUNCTION {initialize.longest.label} 1508 | { "" 'longest.label := 1509 | #1 'number.label := 1510 | #0 'longest.label.width := 1511 | } 1512 | FUNCTION {longest.label.pass} 1513 | { number.label int.to.str$ 'label := 1514 | number.label #1 + 'number.label := 1515 | label width$ longest.label.width > 1516 | { label 'longest.label := 1517 | label width$ 'longest.label.width := 1518 | } 1519 | 'skip$ 1520 | if$ 1521 | } 1522 | EXECUTE {initialize.longest.label} 1523 | ITERATE {longest.label.pass} 1524 | FUNCTION {begin.bib} 1525 | { preamble$ empty$ 1526 | 'skip$ 1527 | { preamble$ write$ newline$ } 1528 | if$ 1529 | "\begin{thebibliography}{" longest.label * "}" * 1530 | write$ newline$ 1531 | "\providecommand{\url}[1]{\texttt{#1}}" 1532 | write$ newline$ 1533 | "\providecommand{\urlprefix}{URL }" 1534 | write$ newline$ 1535 | "\providecommand{\doi}[1]{https://doi.org/#1}" 1536 | write$ newline$ 1537 | } 1538 | EXECUTE {begin.bib} 1539 | EXECUTE {init.state.consts} 1540 | ITERATE {call.type$} 1541 | FUNCTION {end.bib} 1542 | { newline$ 1543 | "\end{thebibliography}" write$ newline$ 1544 | } 1545 | EXECUTE {end.bib} 1546 | %% End of customized bst file 1547 | %% 1548 | %% End of file `titto.bst'. 1549 | -------------------------------------------------------------------------------- /zks_economy_whitepaper_cn.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/zks_economy_whitepaper_cn.pdf -------------------------------------------------------------------------------- /zks_economy_whitepaper_en.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/zks_economy_whitepaper_en.pdf -------------------------------------------------------------------------------- /zkswap.bib: -------------------------------------------------------------------------------- 1 | @misc{uniswapofficial, 2 | title = {Uniswap is a decentralized protocol for automated liquidity provision on Ethereum.}, 3 | howpublished = {\url{https://https://uniswap.org/}} 4 | } 5 | 6 | @misc{zkrollups, 7 | author = {Alex Gluchowski}, 8 | title = {Zk rollup: scaling with zero-knowledge proofs}, 9 | howpublished = {\url{https://pandax-statics.oss-cn-shenzhen.aliyuncs.com/statics/1221233526992813.pdf}} 10 | } 11 | 12 | @misc{zksync, 13 | title = {zkSync is a fully trustless, secure, user-centric protocol for scaling payments and smart contracts on Ethereum}, 14 | howpublished = {\url{https://zksync.io/}} 15 | } 16 | 17 | @misc{uniswapv1, 18 | title = {Uniswap V1}, 19 | howpublished = {\url{https://uniswap.org/docs/v1/}} 20 | } 21 | 22 | @misc{uniswapv2, 23 | title = {Uniswap v2 github}, 24 | howpublished = {\url{https://github.com/Uniswap/uniswap-v2-core}} 25 | } 26 | 27 | @misc{cryptoeprint:2019:953, 28 | author = {Ariel Gabizon and Zachary J. Williamson and Oana Ciobotaru}, 29 | title = {PLONK: Permutations over Lagrange-bases for Oecumenical Noninteractive arguments of Knowledge}, 30 | howpublished = {Cryptology ePrint Archive, Report 2019/953}, 31 | year = {2019}, 32 | note = {\url{https://eprint.iacr.org/2019/953}}, 33 | } -------------------------------------------------------------------------------- /zkswap_cn.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/zkswap_cn.pdf -------------------------------------------------------------------------------- /zkswap_cn.tex: -------------------------------------------------------------------------------- 1 | \documentclass[]{template/llncs} 2 | \usepackage{url} 3 | \usepackage{graphicx} 4 | \usepackage{amsmath} 5 | \usepackage{amsfonts} 6 | \usepackage[linesnumbered,ruled,vlined]{algorithm2e} 7 | \usepackage[ 8 | colorlinks = true, 9 | linkcolor = black, 10 | anchorcolor = black, 11 | citecolor = black, 12 | filecolor = black, 13 | urlcolor = black 14 | ]{hyperref} 15 | \usepackage{xeCJK} 16 | \setCJKmainfont{PingFangSC-Light} 17 | 18 | \begin{document} 19 | \bibliographystyle{unsrt} 20 | \pagestyle{plain} 21 | 22 | % 23 | \title{ZKSwap:基于 ZK-Rollup的Layer2 代币Swap协议} 24 | 25 | \author{L2 Lab} 26 | 27 | \institute{ 28 | \email{dev@l2lab.org} \\ 29 | \vspace{0.5cm} 30 | \today 31 | } 32 | 33 | \maketitle 34 | 35 | % 36 | \section{引言} 37 | 38 | 2019年以来,区块链行业发生了翻天覆地的变化,分布式金融 DeFi 正在快速崛起。各类链上资产在各种 DeFi 协议中,锁定的资产规模已突破100亿美金。随着链上资产的继续蓬勃发展和链下资产上链的不断推进,我们有理由相信 DeFi 协议锁定的资产规模将很快突破1000亿美金的市值。这些链上资产都有 快速、零摩擦、免信任实时兑换的需求,因此带动了 Uniswap \cite{uniswapofficial} 等新型兑换协议的崛起。 39 | 40 | 虽然以 Uniswap 为代表的新型 DEX 取得了很大的发展,但是依然有非常明确的缺点。第一:动辄几十美金的 Gas 费用,阻碍了新增用户进入; 第二:每一笔交易、每一个操作都需要等待至少一个区块确认,实时性差; 第三:受制于以太坊链上 TPS 的限制,Uniswap 每秒钟可以成交的交易次数和交易容量有明显的天花板。以上三点是目前所有 DEX 面临的痛点。 41 | 42 | ZK-Rollup \cite{zkrollups} 是一种新型的 Layer-2 扩容方案,与 Plasma 等其他 Layer-2 扩容方案相比,ZK-Rollup 在安全性、经济性、TPS以及可用性方面都有巨大的优势,特别适合用于搭建Layer-2去中心化交易所。 43 | 44 | ZKSwap (ZK-Rollup based Swap)是一套全新的基于 Zkrollup 技术的兑换协议,通过 Zk-Rollups 技术把所有的ERC20 token 转移到 Layer2 上,基于不断生成的零知识证明来保证 Layer1 和 Layer2 状态的一致性,从而让所有的兑换在 Layer2 上发生,可以做到零 Gas 费用的实时兑换(不再要等待一个区块确认时间),并且具备无限的拓展性,摆脱以太坊 TPS 和区块确认时间的限制,让 DEX 具备CEX (中心化交易所)般丝滑的体验,并同时实时掌控自己的资金安全。我们认为ZKSwap 就是未来的交易形态,必将对现有所有的 DEX 和 CEX 带来极大的变革。 45 | 46 | 目前大部分开发工作已经完成,我们将在10月初发布ZKSwap的兑换协议,后续我们将推动Layer-2 上面的DEX 兑换标准,使目前现有的 DEX,都可以无缝接入和使用 ZKSwap 突破性的兑换协议。 47 | 48 | 49 | \section{技术基础} 50 | 51 | \subsection{Uniswap v1 版本} 52 | Uniswap\cite{uniswapv1} 是一套基于“固定乘积”自动化做市商机制的去中心化交易协议,由一系列部署在以太坊上的智能合约组成。用户可以通过提供一定比例的 ETH 和任意 ERC20 资产创建资金池,每个资金池都保存了一对资产,并为这两种资产的交易提供流动性。所有流动性的提供者会根据所提供流动性的比例分享交易量的 0.3\% 作为回报。在 uniswap 中,第一个流动性提供者需要设定资金池中两种资产的比例,自动做市商算法会保证每次交易前后两种资产的乘积保持恒定。以下简要介绍 uniswap 各项基本操作,帮助理解后文相关概念。 53 | 54 | \subsubsection{创建资金池} 55 | 56 | 在 Uniswap 中,每个交易对有且只有一个资金池,一般由第一个流动性提供者创建。例如,流动性提供者创建了一个 ETH-ZKS 的资金池,随后可以开始添加流动性。初始存入的 ETH 数量为 $x_0$,存入的 ZKS 数量为 $y_0$,且 $x_0*y_0 = c_0$。其中,ZKS 是以太坊上任意 ERC-20 代币。 57 | 58 | \subsubsection{流动性代币} 59 | 60 | 流动性提供者(Liquidity Provider,以下简称 LP)将获得对应资金池的流动性代币(Liquidity Provider Token,以下简称 LP Token),用来代表LP占目前资金池的份额。LP Token 是一种符合 ERC-20 标准代币,可以在不移除资金池流动性的情况下进行传输。每个资金池都有一种对应的 LP Token。上述初始 LP 可以获得 $n_0 = \sqrt{(x_0*y_0)} - MIN\_LIQUIDITY$ 个 LP Token。其中,由于LP Token 的总量将在后续计算中作为分母被用到,因此在首次添加流动性时, 系统会把 $MIN\_LIQUIDITY$ 作为 LP Token 最小预留量,发送到 0x0 地址,防止 LP Token 总量变为零。 61 | 62 | 以下假设在任意时刻 $i$,资金池中有 $x_i$ 个 ETH,$y_i$ 个 ZKS 代币,它们的乘积常量为 $c_i = x_i *y_i$,发行的 LP Token 总量为 $n_i$。其中,$i = 0,1,2,……$ 63 | 64 | \subsubsection{添加流动性} 65 | 66 | 用户可以根据当前资金池中代币的比例,以同等比例添加流动性,并获得 LP Token。假设新的 LP 向流动性池中注入 $X$ 个 ETH 和 $Y$ 个 ZKS,注入时必须保证 $X/Y = x_i/y_i$。该 LP 可以获得合约增发的 $N = n_i*X/x_i$ 个 LP Token。增加流动性之后,资金池的 reserve 将更新为 $x_{i+1}*y_{i+1} = (x_i+X)*(y_i+Y) = c_{i+1}$。LP Token 的总量为 $n_{i+1} = n_i + N$。 67 | 68 | \subsubsection{减少流动性} 69 | 70 | LP 可以通过在流动性池合约中销毁 LP Token 来减少流动性,并从资金池中取回对应份额的 ETH 和 ZKS 代币。假设 LP 销毁的 LP Token 数量为 N’,则 LP 可取回的 ETH 数量为 $X’ = x_i*N’/n_i$,可取回的 ZKS 代币的数量为 $Y’ = y_i*N’/n_i$。移除流动性后,资金池的reserve 将更新为 $x_{i+1}*y_{i+1} = (x_i - X’)*(y_i - Y’) = c_{i+1}$。LP Token 总量更新为 $n_{i+1} = n_i - N'$。值得注意的是,由于 LP 在添加流动性和移除流动性时资金池的 reserve 可能不同,因此 LP 存入和取出的币的数量和比例都可能发生变化。 71 | 72 | \subsubsection{Swap 交易} 73 | 74 | 资金池创建并注入流动性后,持有 ETH 或 ZKS 的用户就可以开始在资金池中进行 Swap,用 ETH 兑换 ZKS,或者用 ZKS 兑换 ETH。这里以用 ETH 兑换 ZKS 为例。用户向资金池中转入 $m$ 个 ETH,资金池中 ETH 将变为 $x_{i+1} = x_i + m,$用户可以对应获得 $y_{i+1}$ 个 ZKS 代币。根据 uniswap 的 AMM 算法,在扣除 $0.003m$ 的手续费后,应保持 $(x_{i+1} - 0.003m)*y_{i+1} = x_i*y_i$。因此,用户将获得 $y_{i+1} = (x_i*y_i)/(x_{i+1} - 0.003m)$ 个 ZKS 代币。手续费会在交易后自动加入资金池的 reserve,因此交易后整个资金池的reserve 变为 $x_{i+1}*y_{i+1} = c_{i+1} > c_i$由于没有新的 LP Token 生成或销毁,LP Token 的总量保持不变,即 $n_{i+1} = n_i$。这意味着所有 LP 的份额不变,但每单位份额对应的资金池 reserve 总量增加了。 75 | 76 | 77 | \subsection{Uniswap v2 版本} 78 | Uniswap v1 实现了基本的 AMM 交易所功能,但也存在一些问题。但由于其合约是不可升级的,开发团队为了修复这一问题,又重新实现了一版 Uniswap v2 \cite{uniswapv2},其基本功能和 Uniswap v1 一致,但增加了一些新特性,包括: 79 | 80 | \begin{itemize} 81 | \item 可以直接创建两种 ERC-20 代币的交易对,而不需要像 uniswap v1 一样需要通过 ETH 作为中间媒介来间接进行两者的交易; 82 | \item 更加合理的价格预言机,利用区块第一笔交易前一笔交易价格的随机性,使价格不容易被操控; 83 | \item 闪电兑换(Flash Swap),用户可以先获得目标代币,后续再完成swap;或者可以在规定时间内归还代币,从而不触发swap过程,这相当于可以借用资金池中的代币; 84 | \item 资金池中原本交易收取的 0.3\% 手续费可以分为两部分,其中 0.25\% 仍用于手续费,另外 0.05\% 被发送到预先设定的地址,作为预留的协议手续费,可用作不同用途; 85 | \end{itemize} 86 | 87 | 这些新增特性增加了uniswap 的实用性,本文所述的 ZKSwap 的交易特性与 uniswap v2 保持一致。 88 | 89 | \subsection{ZK-Rollup 和 zkSync} 90 | ZK-Rollups 是近年来比较流行的 Layer-2 扩容解决方案,其基本思想是通过把大量交易聚合,链上验证证明的方式达到扩容的目的。ZK-Rollups 通过智能合约来解析和验证这些聚合的交易,并利用零知识证明技术把聚合交易的证明上链,从而减少了链上需要存储的数据。所有资金本身都锁定在智能合约中,而大部分的计算和存储都放在链下。 91 | zkSync\cite{zksync} 是 ZK-Rollups 的一个实现,目前其 v1 版本已经在以太坊主网部署。其基本的工作原理如下: 92 | \begin{itemize} 93 | \item 用户把签好名的交易提交给 Validator; 94 | \item Validator 把一段时间内收到的多笔交易执行 roll up 操作,合并为一个区块,并把更新后的合约状态树的根哈希,以及状态更新对应的 SNARK 证明发送到链上合约中。这个SNARK 可以证明新状态确实是这一系列交易作用在旧状态上的结果; 95 | \item 另外,validator 还会把每笔交易对应的状态增量 ∆ 发送到链上,这使得任何人都可以重新构建出每一笔交易后的状态; 96 | \item 上述的SNARK证明和状态增量∆都需要经过链上合约的验证,从而证明所有交易的合法性以及区块数据的可用性。 97 | \end{itemize} 98 | 99 | 由于 SNARK 验证的 Gas 消耗远小于验证大量单笔交易的 Gas 消耗总和,且把完整状态存在链下也比存在链上要便宜,因此 ZK-Rollup 在理论上可以实现对以太坊主网 100~200 倍的扩容,同时显著降低 Gas 消耗。 100 | ZK-Rollup 的安全性几乎和对应 Layer-1 的安全性保持一致,因为: 101 | 102 | \begin{itemize} 103 | \item Validator 无法篡改状态,也无法挪用任何 Layer-2 的资金,因为所有状态的改变都需要对应的证明,无法伪造;且私钥始终掌握在用户手中; 104 | \item 由于链上存储了交易状态的增量和相关证明,即使 Validator 停止工作,用户也可以从链上数据恢复出每一笔交易,并取回锁定的 Token; 105 | \item 用户不需要保持在线,因为不需要存储任何额外数据。 106 | \end{itemize} 107 | 108 | zkSync 目前支持三种操作: 109 | 110 | \begin{itemize} 111 | \item Deposit,存币:把 Layer-1 中的 Token 转移到 zkSync Layer-2; 112 | \item Withdraw,取币:从 Layer-2 中取回账户的 Token,并发送到 Layer-1 的账户; 113 | \item Transfer,转账:在 Layer-2 上实现 Token 的转账,无需手续费。 114 | \end{itemize} 115 | 116 | \section{ZKSwap 去中心化 Swap 协议} 117 | 118 | 本项目实现一种基于 ZK-Rollup 技术的 Layer-2 AMM 去中心化交易协议 ZKSwap,在 Layer-2 上实现了uniswap 的所有功能,在保证去中心化交易的核心价值的同时,实现实时交易,把 Uniswap 的 TPS(每秒可以处理的交易数量)提升了多个数量级,同时交易的过程几乎不需要消耗任何 Gas 费用。 119 | 120 | \subsection{ZKSwap 系统框架} 121 | 122 | ZKSwap 系统由链上智能合约,链下ZKSwap Server,零知识证明系统和前端用户界面组成。 123 | 124 | \begin{figure}[htbp] 125 | \centering 126 | \includegraphics[width=0.9\columnwidth]{figure/arch} 127 | \caption{系统架构} 128 | \label{fig:arch} 129 | \end{figure} 130 | 131 | \subsubsection{ZKSwap 智能合约} 132 | 133 | ZKSwap 会在以太坊区块链上部署一系列智能合约,用于存储用户存入的代币,同时需要记录和验证Layer-2的状态更新和相关证明,是连接链上和链下的关键枢纽。 134 | 135 | \subsubsection{ZKSwap Layer-2 服务端} 136 | 137 | ZKSwap 服务端是在链下实际处理所有交易的模块。ZKSwap 服务端可以通过 WebSocket 接口和用户发生交互,同时还可以监听以太坊区块链上的交易。所有合法的交易请求将被放入 ZKSwap 内存池中,最终由 Swap Engine 负责处理。内存池中的交易类型和上一节中 Uniswap 所有操作类型保持一致。Block proposer 对交易进行 Rollup,生成新区块,并由 State Keeper 更新 Layer-2 中所有代币的状态。State Keeper 会把状态发送给 Commiter,后者负责与Prove server 通信,获得对应交易的证明,并最终将状态和对应的 SNARK 证明通过 Ethererum sender 发送到链上的 ZKSwap 智能合约。 138 | 139 | \subsubsection{Plonk 零知识证明系} 140 | 141 | ZKSwap 的零知识证明系统采用分布式架构,并采用最新的零知识证明算法 PLONK\cite{cryptoeprint:2019:953} 生成证明。Prove server支持多个Prover。多个Prover 主动查询 Prove server 中的证明任务,生成证明后发回 Prove server。PLONK 的全局 trust setup只需要生成一次,电路规模在一定范围内的应用都可复用,极大地降低了零知识证明的使用门槛。 142 | 143 | \subsection{ZKSwap 状态树} 144 | 145 | \begin{figure}[htbp] 146 | \centering 147 | \includegraphics[width=0.9\columnwidth]{figure/state} 148 | \caption{状态树} 149 | \label{fig:state} 150 | \end{figure} 151 | 152 | ZKSwap 系统的状态树记录了当前系统中所有账户的余额状态。ZKSwap 的状态树是一棵高度为 34的默克尔树。根节点 Root 的子节点为系统中所有账户节点(24层)。账户节点分为两种类型: 153 | 154 | \begin{itemize} 155 | \item 普通账户节点,用于记录账户内所有 Token 的状态。普通账户节点可以有任意多个叶子节点(10层),每个叶子节点都代表一种类型的 Token 及其数量;同一账户下的 Token 类型不可重复; 156 | \item Pair 账户节点,用于记录 ZKSwap 中某个交易对资金池的状态。Pair 账户节点只包含两个叶子节点,每个叶子节点代表该资金池中一种 Token 的余额和类型。 157 | \end{itemize} 158 | 159 | ZKSwap 中交易的过程实际就是状态树更新的过程。下面介绍 ZKSwap 中所有交易类型和对应的状态变化。 160 | 161 | \subsection{存币(Deposit )} 162 | 163 | \begin{figure}[htbp] 164 | \centering 165 | \includegraphics[width=0.9\columnwidth]{figure/deposit} 166 | \caption{Deposit} 167 | \label{fig:deposit} 168 | \end{figure} 169 | 170 | Deposit 是指用户把以太坊链上的代币存入 ZKSwap 合约,使其可以在 Layer-2 中使用的过程。Deposit 操作由用户从链上发起。当 ZKSwap Server 监听到用户在链上将 Token 转入 ZKSwap 智能合约的交易后,会根据交易详情更新状态树。首先,根据交易所属的账户找到对应的 Account,并根据 Deposit 的金额更新 Account 下对应 Token 的状态。若该 Account 下没有对应 Token 的叶子节点,首先需要创建该 Token 对应的叶子节点,再进行状态更新。叶子节点的状态更新完成后,根节点的哈希也会随之更新。 171 | 172 | 更新后的状态树根节点哈希会和 Deposit 交易的 SNARK 证明一起被发送到链上的 ZKSwap 合约中。 173 | 174 | \subsection{取币(Withdraw)} 175 | 176 | \begin{figure}[htbp] 177 | \centering 178 | \includegraphics[width=0.9\columnwidth]{figure/withdraw} 179 | \caption{Withdraw} 180 | \label{fig:withdraw} 181 | \end{figure} 182 | 183 | Withdraw 是指用户从 Layer-2 中将 Token 提出,并从 ZKSwap 合约中解锁,发到对应 Layer-1 账户的过程。Withdraw 操作由用户从 Layer-2 发起,ZKSwap server 在收到用户对某一 Token 的提币请求后,会更新对应账户下对应 Token 的状态,并把更新后的状态树根节点哈希和 Withdraw 操作应用的证明发送到链上 ZKSwap 合约。合约验证通过后会把合约中锁定的对应 Token 发送到对应链上账户。 184 | 185 | \subsection{转账(Transfer)} 186 | 187 | \begin{figure}[htbp] 188 | \centering 189 | \includegraphics[width=0.9\columnwidth]{figure/transfer} 190 | \caption{Transfer} 191 | \label{fig:transfer} 192 | \end{figure} 193 | 194 | Transfer 是指用户在 ZKSwap Layer-2 把某种 Token 发送给另一用户的过程。Transfer 由用户在 Layer-2 发起。当 ZKSwap Server 收到 Transfer 请求后,会根据请求详情找到对应的收发账户,并根据发送金额更新收发双方账户下该 Token 的状态。状态树根节点哈希也会随之更新,并和 Transfer 操作对应的 SNARK 证明一起被发送到 ZKSwap 链上合约。Transfer 不会改变链上对应 Token 的状态,因为 Token 仍然锁定在 ZKSwap 合约中,并没有在链上发生转移。 195 | 196 | \pagebreak 197 | 198 | \subsection{增加流动性(Create Liquidity)} 199 | 200 | \begin{figure}[htbp] 201 | \centering 202 | \includegraphics[width=0.9\columnwidth]{figure/create_liquidity} 203 | \caption{Create Liquidity} 204 | \label{fig:create_liquidity} 205 | \end{figure} 206 | 207 | Create liquidity 是指用户在 Layer-2 完成创建或增加流动性的操作,其定义和 uniswap 保持一致。Create liquidity 由用户在 Layer-2 发起,当 ZKSwap server 收到用户创建某一对 Token 流动性的请求后,首先需要找到对应的发起人 Account 和这一对 Token 的 Pair Account(若 Pair Account 不存在,需要先创建 Pair 资金池);然后把 Account 下两种 Token 按照 AMM 算法规定的比例要求 Transfer 到 Pair Account 下;同时系统会计算出用户可以获得的 LP Token 数量,并更新流动性提供者 Account 下对应的 LP Token 状态。所有状态更新完成后,状态树的根节点哈希将会和 Create Liquidity 对应的证明一起被发送到链上的 ZKSwap 合约。首次创建的 LP token 需要由 ZKSwap 合约在链上部署对应 LP Token 的合约。 208 | 209 | \pagebreak 210 | 211 | 212 | \subsection{减少流动性(Remove Liquidity)} 213 | 214 | \begin{figure}[htbp] 215 | \centering 216 | \includegraphics[width=0.9\columnwidth]{figure/remove_liquidity} 217 | \caption{Remove Liquidity} 218 | \label{fig:remove_liquidity} 219 | \end{figure} 220 | 221 | Remove Liquidity 是指用户从 Layer-2 的某一 Pair 资金池中销毁 LP Token,并在 Layer-2 中取回相应比例的两种 Token 的过程。Remove Liquidity 由用户在 Layer-2 发起,当 ZKSwap Server 收到用户 Remove Liquidity 请求时,首先会找到对应 Account,销毁 Account 下对应数量的 Liquidity Token;接着会将 Liquidity Token 对应的 Pair Account 下的两种 Token 按照比例 Transfer 给销毁 Liquidity Token 的 Account。操作完成后状态树会做相应更新,根节点哈希和对应的 Remove Liquidity 操作的证明将被发送到链上的 ZKSwap 合约。 222 | 223 | \pagebreak 224 | 225 | 226 | \subsection{Swap 交易} 227 | 228 | \begin{figure}[htbp] 229 | \centering 230 | \includegraphics[width=0.9\columnwidth]{figure/swap} 231 | \caption{Swap 交易} 232 | \label{fig:swap} 233 | \end{figure} 234 | 235 | Swap 是指用户在 Layer-2 的资金池中完成交易的过程。假设用户需要在包含 TokenA -TokenB Pair Token 的资金池中进行 Swap 交易。用户首先从 Layer-2 将自己 Account 下的 TokenA 发送到对应的 Pair Account,ZKSwap 会根据 AMM 算法计算用户可以获得的 TokenB 的数量并发送给用户。状态树随之更新,ZKSwap Server会将更新后的状态树根节点哈希以及 Swap 操作对应的证明发送到链上的 ZKSwap 合约。Swap 交易不会改变链上 Token 的状态,因为 Token 本身仍然锁定在 ZKSwap 合约中。 236 | 237 | \subsection{提取流动性(Withdraw Liquidity)} 238 | 239 | \begin{figure}[htbp] 240 | \centering 241 | \includegraphics[width=0.9\columnwidth]{figure/withdraw_liquidity} 242 | \caption{Withdraw Liquidity} 243 | \label{fig:withdraw_liquidity} 244 | \end{figure} 245 | 246 | Withdraw Liquidity 是指用户从 Layer-2 账户中的 Liquidity Token 提取到 Layer-1 的过程。Withdraw Liquidity 在 Layer-2 的发起过程和状态更新与上述普通的 Withdraw 完全一致,但在 Layer-1 中产生的结果不同。ZKSwap 合约收到 Withdraw Liquidity 请求后,会自动触发 Liquidity Token 的 mint 操作,在 Layer-1 中创造出额外的 Liquidity Token,并发送给指定账户。 247 | 248 | 249 | \section{总结与展望} 250 | 251 | ZKSwap 利用 ZK-Rollup 技术,在 Layer-2 实现了 Uniswap 的完整功能,是一套去中心化的 Layer-2 代币 AMM 自动化做市商 Swap 协议。ZKSwap 协议可无限扩展,支持超高 TPS,且流动性提供者和用户不需要支付高昂的 gas 费用,并且具备实时交易性,用户不再需要等待区块确认,就可以在Layer2 上面完成极速的交易,极大降低了DEX的使用门槛,对现在所有的DEX 和CEX 都带来了巨大变革。 252 | 253 | ZKSwap 由 L2 Lab 支持开发。在未来,L2 Lab 将继续推动 Layer-2 协议层的发展,结合 ZKSwap、Layer-2 隐私稳定币等一系列 Layer-2 基础协议,打造完整的 Layer-2 DeFi 生态。 254 | 255 | 通过打造用户体验极佳的的 Layer-2 协议标准,L2 Lab 致力于推动区块链行业的范式转换,让Layer-1 成为清结算的根基,Layer-2 成为连接区块链应用和 Layer-3 的桥梁和出入口。我们会致力于推动让所有的区块链应用都运行在没有任何限制的 Layer-3 的世界。 256 | 我们会致力于让ZKSwap 成为DEX中最好用的产品,时机成熟的时候,也会推出流动性挖矿计划和 DAO 计划,助力分布式金融 DeFi 的崛起,一起引领区块链应用的范式变革。 257 | 258 | 259 | \bibliographystyle{template/splncs04} 260 | \bibliography{zkswap.bib} 261 | 262 | \end{document} -------------------------------------------------------------------------------- /zkswap_en.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/zkswap_en.pdf -------------------------------------------------------------------------------- /zkswap_en.tex: -------------------------------------------------------------------------------- 1 | \documentclass[]{template/llncs} 2 | \usepackage{url} 3 | \usepackage{graphicx} 4 | \usepackage{amsmath} 5 | \usepackage{amsfonts} 6 | \usepackage[linesnumbered,ruled,vlined]{algorithm2e} 7 | \usepackage[ 8 | colorlinks = true, 9 | linkcolor = black, 10 | anchorcolor = black, 11 | citecolor = black, 12 | filecolor = black, 13 | urlcolor = black 14 | ]{hyperref} 15 | \usepackage{xeCJK} 16 | \setCJKmainfont{PingFangSC-Light} 17 | 18 | \begin{document} 19 | \bibliographystyle{unsrt} 20 | \pagestyle{plain} 21 | 22 | % 23 | \title{ZKSwap: a Layer-2 Token Swap Protocol based on ZK-Rollup} 24 | 25 | \author{L2 Lab} 26 | 27 | \institute{ 28 | \email{dev@l2lab.org} \\ 29 | \vspace{0.5cm} 30 | \today 31 | } 32 | 33 | \maketitle 34 | 35 | % 36 | \section{Introduction} 37 | 38 | Since 2019, the blockchain industry has undergone breathtaking changes. Decentralized finance -- DeFi -- continues to grow at an exponential rate. The Total Value Locked in different DeFi protocols has exceeded 10 billion U.S. dollars. With the continuous development of numerous on-chain assets and off-chain assets going on-chain, we believe that the Total Value Locked in DeFi protocols will soon exceed 100 billion U.S. dollars. These on-chain assets require fast, frictionless, trust-free, and real-time exchange services, which has led to the rise of new decentralized exchange(DEX) protocols such as Uniswap\cite{uniswapofficial}. 39 | 40 | Although the new DEX model spearheaded by Uniswap has achieved significant development, it still has obvious drawbacks. First, the high gas fee of dozens of dollars per transaction hinders new users to entry; second, every transaction and every execution needs to wait for at least one block to confirm, which gives an unsatisfactory experience; and third, subject to the limiting TPS of Ethereum, Uniswap has a clear bottleneck in transaction numbers and transaction capacity per second. Those drawbacks are not unique on Uniswap. They are common issues faced by all DEXes. 41 | 42 | ZK-Rollup\cite{zkrollups} is a new type of Layer-2 scalability solution. Compared with other Layer-2 scalability solutions such as Plasma, ZK-Rollup has considerable advantages in terms of security, cost, TPS, and usability. It is especially suitable for building a Layer-2 decentralized exchange. 43 | 44 | ZKSwap (a ZK-Rollups based Swap protocol) is a brand-new exchange protocol based on ZK-Rollups technology. Through Zk-Rollups technology, all ERC20 tokens are transferred to Layer2, and the consistent state of Layer1 and Layer2 is guaranteed based on continuously generated zero-knowledge proofs. This solution allows all exchanges to execute on Layer 2, achieving real-time swap with zero gas fees, unlimited scalability, removing the constraint from the Ethereum's TPS, and block confirmation time. The user no longer has to wait for the one-block confirmation time for each transaction. ZKSwap enables a DEX to provide the smooth user experience of a centralized exchange(CEX) while allowing the users to have full custody over their funds. We believe that ZKSwap is the future form of trading. It will trigger a significant evolution of all existing DEX and CEX. 45 | 46 | At present, the ZKSwap team has finished most of the development work. We will release the ZKSwap exchange protocol in early October. In the future, we will promote the DEX exchange standard on Layer-2, so that all existing DEXes can seamlessly access and use the ZKSwap exchange protocol. 47 | 48 | 49 | \section{Technical Overview 50 | } 51 | 52 | \subsection{Uniswap V1} 53 | Uniswap\cite{uniswapv1} is an automated liquidity protocol powered by a constant product formula and implemented in a system of non-upgradeable smart contracts on the Ethereum blockchain. Users can create a liquidity pool by providing a certain percentage of ETH and any other ERC20 asset. One liquidity pool reserves ERC20 tokens and provides liquidity for the transactions between these two assets. In return, all liquidity providers will split the 0.3\% of the transaction volume as a liquidity provider fee. In Uniswap, the first liquidity provider needs to set the ratio of the two assets in the liquidity pool. The automated market maker algorithm will ensure that the product of the two assets before and after each transaction remains constant. The following is a brief introduction to the basic key concepts of Uniswap to help users understand related concepts coming up next. 54 | 55 | 56 | \subsubsection{Create a Liquidity Pool} 57 | 58 | In Uniswap, each trading pair has only one liquidity pool, which is generally created by the first liquidity provider. For example, a liquidity provider creates an ETH-ZKS liquidity pool, and then adds liquidity. The initial amount of ETH deposited is $x_0$, the number of ZKS stored is $y_0$, and $x_0*y_0 = c_0$. Here ZKS can be any ERC-20 token. 59 | 60 | 61 | \subsubsection{Liquidity Token} 62 | 63 | Liquidity Provider (hereinafter referred to as LP) will obtain the Liquidity Provider Token, (hereinafter referred to as LP Token or LT), which is used to represent the share of LP in the current liquidity pool. LP Token is an ERC-20 token that can be transferred without removing the liquidity of the liquidity pool. Each liquidity pool has a corresponding LP Token. 64 | 65 | The above-mentioned initial LP will receive $n_0 = \sqrt {x_0 * y_0} - MIN\_LIQUIDITY$ number of LP Tokens. Among them, since the total amount of LP Token will be used as the denominator in subsequent calculations, when adding liquidity for the first time, the system will set $MIN\_LIQUIDITY$, as the minimum reserved amount of LP Token, send it to address 0x0 to prevent the total amount of LP Token from becoming zero. 66 | 67 | The following assumes that at any time $i$, there are $x_i$ ETH and $y_i$ ZKS in the liquidity pool, their product constant is $c_i = x_i * y_i$, and the total amount of LT issued is $n_i$. Among them, $i = 0, 1, 2, …$ 68 | 69 | \subsubsection{Create Liquidity} 70 | 71 | When adding liquidity to an existing pool, users must deposit pair tokens proportional to the current ratio. Suppose a new LP deposits $X$ ETH and $Y$ ZKS to the liquidity pool, the LP must ensure that $X/Y = x_i/y_i$. The LP will in turn receive the newly minted $N = n_i*X/x_i$ number of LP Tokens. After adding liquidity, the reserve of the liquidity pool will be $x_{i+1}*y_{i+1} = (x_i+X)*(y_i+Y) = c_{i+1}$. The total amount of LP Token is $n_{i+1} = n_i + N$. 72 | 73 | 74 | \subsubsection{Remove Liquidity} 75 | 76 | LP can remove liquidity by burning their LT in the liquidity pool contract to withdraw their share of ETH and ZKS tokens from the pool. Assuming that the amount of LT burned by LP is $N'$, the amount of ETH that LP can withdraw is $X'= x_i*N'/n_i$, and the amount of ZKS tokens is $Y'= y_i*N'/n_i$. After the liquidity is removed, the reserve of the liquidity pool will be updated to $x_{i+1}*y_{i+1} = (x_i-X')*(y_i-Y') = c_{i+1}$. The total LT is updated to $n_{i+1} = n_i-N'$. Please note that the reserves of the liquidity pool might be different at the time when the LP deposits and when they withdraw, therefore the number and the ratio of tokens the LP can withdraw might change accordingly. 77 | 78 | 79 | \subsubsection{Swap Transaction} 80 | 81 | After the liquidity pool is created and liquidity is injected, users who hold ETH or ZKS can start swapping in the liquidity pool. Here we use exchanging ETH for ZKS as an example. The user transfers m ETH to the liquidity pool, and the ETH in the liquidity pool will become $x_{i+1} = x_i + m$, and the user, in turn, receives $y_{i+1}$ ZKS tokens. According to the AMM algorithm in Uniswap, after deducting the $0.003*m$ fee, the remaining ZKS token amount should be $(x_{i+1} - 0.003m)*y_{i+1} = x_i*y_i$. Therefore, the user will get $y_{i+1} = (x_i*y_i)/(x_{i+1} - 0.003m)$ ZKS tokens. The liquidity provider fee will be automatically added to the liquidity pool after the transaction reserve, so after the transaction, the reserve of the entire liquidity pool becomes $x_{i+1}*y_{i+1} = c_{i+1}> c_i$. Since there is no other LP Token minted or burned at the moment, the total amount of LP Token remains unchanged, that is, $n_{i+1} = n_i$. This means that the ratios of all LPs remain the same, but each unit share now corresponds to more amount of the liquidity pool reserve. 82 | 83 | 84 | 85 | \subsection{Uniswap V2} 86 | Uniswap V1 implements basic AMM exchange functions, but there were also some issues. Since its contract is not upgradeable, in order to fix this problem, the development team re-implemented Uniswap V2 \cite{uniswapv2}, with basic functions the same as Uniswap v1 and some new features including 87 | 88 | 89 | \begin{itemize} 90 | \item The users can directly create a trading pair of two ERC-20 tokens, instead of using ETH as an intermediary in Uniswap V1; 91 | \item A more reasonable price oracle, using the randomness of the price of the transaction before the first transaction in the block to make the price hard to manipulate; 92 | \item Flash Swap, where users can obtain the target token first, and complete the swap later; or they can return the tokens within a certain time, so as not to trigger the swap process, which is equivalent to borrowing tokens in the liquidity pool; 93 | \item The original 0.3\% liquidity provider fee can be divided into two parts, of which 0.25\% is still used to split by liquidity providers proportional to their contribution to liquidity reserves, and 0.05\% is sent to the pre-set address as the Protocol Fee, which can be used for different purposes; 94 | 95 | \end{itemize} 96 | 97 | These new features increase the usability of Uniswap. For the exchange functionality, ZKSwap remains the same as Uniswap V2. 98 | 99 | \subsection{ZK-Rollup and zkSync} 100 | ZK-Rollups is a popular Layer 2 scalability solution. Its basic idea is to aggregate a large number of transactions then verify the proof on-chain. ZK-Rollups analyzes and verifies these aggregated transactions through smart contracts, and uses zero-knowledge proof technology to put the proof of aggregate transactions on-chain, thereby reducing the data that needs to be stored on-chain. All funds are locked in the smart contract, and most of the calculations and storage are done off-chain. 101 | 102 | zkSync\cite{zksync} is one implementation of ZK-Rollups, and its v1 version is currently deployed on the Ethereum mainnet. Its basic working principle is as follows: 103 | 104 | \begin{itemize} 105 | \item The user submits the signed transaction to the Validator; 106 | \item The Validator rolls up multiple transactions they have received within a period of time, merges them into one block, updates the root hash of the contract state tree, and sends the SNARK proof corresponding to the state update to the contract on-chain. This SNARK proof can prove that the new state is indeed the series of trading results modified to the old state; 107 | \item In addition, the Validator will also send the state delta ∆ corresponding to each transaction on-chain, which allows anyone to reconstruct the state after each transaction; 108 | \item The above SNARK proof and the delta ∆ of the blockchain state both need to be verified by the on-chain contract to prove the validity of all transactions and the data availability; 109 | \end{itemize} 110 | 111 | Since the gas for SNARK proof is much less than the sum of gas to verify a large number of individual transactions and storing the full state off-chain is also much cheaper than storing it on-chain. Therefore, ZK-Rollup can theoretically achieve 100~200 times more scalability than the Ethereum mainnet while significantly reducing gas consumption. 112 | 113 | The security of ZK-Rollup is almost the same as that of the corresponding Layer 1, because: 114 | 115 | 116 | \begin{itemize} 117 | \item The Validator cannot tamper with the state, nor can it embezzle any Layer 2 funds, because all state changes need corresponding proof, which cannot be forged; and the private key is always in the hands of the user. 118 | \item Since the delta ∆ of the blockchain state and related proofs are stored on-chain, even if the Validator stops working, users can restore every transaction and retrieve the locked Token from on-chain data; 119 | \item The user does not need to stay online because there is no need to store any additional data. 120 | \end{itemize} 121 | 122 | zkSync currently supports three operations: 123 | 124 | \begin{itemize} 125 | \item Deposit: transfer Tokens on Layer 1 to zkSync Layer 2; 126 | \item Withdraw: withdraw Tokens from the account on Layer 2 and send it to the account on Layer 1; 127 | \item Transfer: transfer Tokens on Layer 2 without the need for gas fees. 128 | \end{itemize} 129 | 130 | \section{ZKSwap Decentralized Swap Protocol} 131 | 132 | This white paper implements a Layer 2 AMM decentralized transaction protocol ZKSwap. Based on ZK-Rollup technology, ZKSwap executes the full functionality of Uniswap on Layer 2, while ensuring the core value of decentralized exchange, ZKSwap increases the TPS by multiple orders of magnitude compared to Uniswap, and transaction processing hardly consumes any gas fees. 133 | 134 | \subsection{ZKSwap System Architecture} 135 | 136 | The ZKSwap system consists of on-chain smart contracts, off-chain ZKSwap Server, the zero-knowledge proof system, and front-end user interface. 137 | 138 | \begin{figure}[htbp] 139 | \centering 140 | \includegraphics[width=0.9\columnwidth]{figure/arch} 141 | \caption{System architecture} 142 | \label{fig:arch} 143 | \end{figure} 144 | 145 | \subsubsection{ZKSwap Smart Contract} 146 | 147 | ZKSwap will deploy a series of smart contracts on the Ethereum blockchain to store the tokens deposited by users while recording and verifying Layer 2 status updates and related proof. Those smart contracts are the key hub connecting on-chain and off-chain. 148 | 149 | 150 | \subsubsection{ZKSwap Layer 2 Server} 151 | 152 | The ZKSwap server is the module that processes all transactions off-chain. The ZKSwap server can use the WebSocket to interact with the user, and monitor transactions on the Ethereum blockchain. All valid transaction requests will be put into the ZKSwap mem pool and processed by the Swap Engine. The transaction types in the mem pool are the same as the transaction types of Uniswap. 153 | The Block Proposer will roll up the transactions and generate a new block. The State Keeper will update the status of all tokens on Layer 2. The State Keeper will send the state to the Commiter, which is responsible for communicating with the Prove Server, obtain the proof of the corresponding transaction, and finally send the state and the corresponding SNARK proof via Ethereum sender to the ZKSwap smart contract on-chain. 154 | 155 | 156 | \subsubsection{Plonk Zero-knowledge Proof System} 157 | 158 | ZKSwap's zero-knowledge proof system adopts a distributed architecture and uses the latest zero-knowledge proof algorithm PLONK\cite{cryptoeprint:2019:953} to generate proofs. The Prove Server supports multiple Provers. Multiple Provers actively query the proof tasks in the Prove Server and send them back to the Prover Server after generating the proof. PLONK's global trust setup only needs to be generated once, and the circuit can be greatly reused within a certain range, reducing the threshold for using zero-knowledge proofs. 159 | 160 | \subsection{ZKSwap state tree} 161 | 162 | \begin{figure}[htbp] 163 | \centering 164 | \includegraphics[width=0.9\columnwidth]{figure/state} 165 | \caption{State} 166 | \label{fig:state} 167 | \end{figure} 168 | 169 | The status tree of the ZKSwap system records the balance of all accounts in the current system. The state tree of ZKSwap is a Merkel tree with a height of 34. The child nodes of the Root are all account nodes (24 levels) in the system. There are two types of account nodes: 170 | 171 | 172 | \begin{itemize} 173 | \item Ordinary account node: to record the status of all tokens in the account. Ordinary account nodes can have any number of leaf nodes (10 levels), each leaf node represents a type of token and its amount; there can’t be repeated token types within one account. 174 | \item Pair account node: to record the status of the liquidity pool of a certain pair of assets ZKSwap. The Pair Account Node contains only two leaf nodes. Each leaf node represents the balance and type of one token in the liquidity pool. 175 | \end{itemize} 176 | 177 | The transaction process in ZKSwap is essentially the process of updating the state tree. The following section will be the introduction of all transaction types in ZKSwap and their corresponding State changes. 178 | 179 | \subsection{Deposit} 180 | 181 | \begin{figure}[htbp] 182 | \centering 183 | \includegraphics[width=0.9\columnwidth]{figure/deposit} 184 | \caption{Deposit} 185 | \label{fig:deposit} 186 | \end{figure} 187 | 188 | Deposit refers to the process where users deposit Ethereum and ERC20 tokens into the ZKSwap contract so that those tokens can be used on Layer 2. The Deposit process is initiated by the user on-chain. When ZKSwap Server monitors that the user transfers tokens to the ZKSwap smart contract, it will update the Status Tree according to the transaction details. First, it will find the corresponding Account to which the transaction belongs, then update the status of the corresponding Token under that Account based on the Deposited amount. If there is no leaf node corresponding to the Token under this Account, then first create the leaf node corresponding to the Token, and then update the status. When the status of the leaf node is updated, the hash of the root node will be updated accordingly. 189 | 190 | The updated hash of the root node of the state tree, together with the SNARK proof of the Deposit transaction, will be sent to the ZKSwap contract on-chain. 191 | 192 | \subsection{Withdraw} 193 | 194 | \begin{figure}[htbp] 195 | \centering 196 | \includegraphics[width=0.9\columnwidth]{figure/withdraw} 197 | \caption{Withdraw} 198 | \label{fig:withdraw} 199 | \end{figure} 200 | 201 | Withdraw means that the user withdraws the Token from Layer 2, unlocks it from the ZKSwap contract, and sends it to the corresponding Layer 1 account. The Withdraw process is initiated by the user from Layer 2. When the ZKSwap Server receives the user’s withdrawal request, it will update the status of the corresponding Token under the corresponding account, and send the updated root node hash and the proof of the Withdraw process to the ZKSwap contract on-chain. After the smart contract verifies it as valid, the contract will unlock the corresponding Token and send it to the account on the corresponding chain. 202 | 203 | 204 | \subsection{Transfer} 205 | 206 | \begin{figure}[htbp] 207 | \centering 208 | \includegraphics[width=0.9\columnwidth]{figure/transfer} 209 | \caption{Transfer} 210 | \label{fig:transfer} 211 | \end{figure} 212 | 213 | Transfer refers to the process where one user sends a certain token to another user in ZKSwap Layer 2. The Transfer process is initiated by the user on Layer 2. When the ZKSwap Server receives the Transfer request, it will find the corresponding sending and receiving accounts according to the request details. 214 | And it will update the status of the Token under the accounts of the sender and receiver according to the sent amount. The hash of the root node of the state tree will be updated accordingly, and together with the SNARK proof corresponding to the Transfer operation, be sent to the contract on the ZKSwap smart contract on-chain. Transfer does not change the on-chain status of the token, because the token is still locked in the ZKSwap contract and has not been transferred on-chain. 215 | 216 | 217 | \subsection{Create Liquidity} 218 | 219 | \begin{figure}[htbp] 220 | \centering 221 | \includegraphics[width=0.9\columnwidth]{figure/create_liquidity} 222 | \caption{Create Liquidity} 223 | \label{fig:create_liquidity} 224 | \end{figure} 225 | 226 | Create liquidity refers to the process where the user creates a liquidity pool or adds liquidity to an existing pool on Layer 2. The definition remains the same as that in Uniswap. 227 | Create Liquidity is initiated by the user on Layer 2. When the ZKSwap Server receives the user’s request to create liquidity for a pair of assets, it first needs to find the initiator’s Account and the Pair Account of the pair of tokens (If the Pair Account does not exist, the user needs to create a Pair liquidity pool first); then, transfer the two Tokens are calculated according to the AMM algorithm. 228 | to the Pair Account proportionately; at the same time, the system will calculate the number of LP Tokens the user will receive, and update the corresponding LP Token status under the liquidity provider Account. After all status updates are completed, the status tree root node hash will be sent to the ZKSwap smart contract on-chain together with the proof of Create Liquidity. The initial minted LP token will need to be done by the ZKSwap Contract to deploy the corresponding LP Token contract on-chain. 229 | 230 | 231 | \subsection{Remove Liquidity } 232 | 233 | \begin{figure}[htbp] 234 | \centering 235 | \includegraphics[width=0.9\columnwidth]{figure/remove_liquidity} 236 | \caption{Remove Liquidity} 237 | \label{fig:remove_liquidity} 238 | \end{figure} 239 | 240 | Remove Liquidity refers to the process where the user burns the LP Token from a certain Pair liquidity pool on Layer 2 and withdraws the two tokens from the pool reserve. Remove Liquidity is initiated by the user on Layer 2, when ZKSwap Server receives a user’s Remove Liquidity request, it will first find the corresponding Account and burn the corresponding amount of Liquidity Tokens; then the two Tokens under the Pair Account corresponding to Liquidity Token will be proportionately transferred to the Account which has just burned its Liquidity Tokens. After the process is completed, the state tree will be updated accordingly, and the root node hash and the proof of the corresponding Remove Liquidity operation will be sent to the ZKSwap contract on-chain. 241 | 242 | \pagebreak 243 | 244 | 245 | \subsection{Swap } 246 | 247 | \begin{figure}[htbp] 248 | \centering 249 | \includegraphics[width=0.9\columnwidth]{figure/swap} 250 | \caption{Swap} 251 | \label{fig:swap} 252 | \end{figure} 253 | 254 | Swap refers to the process where users complete transactions in the Layer 2 liquidity pools. Suppose the user needs to swap in the pool that contains TokenA -TokenB Pair Token. The user first sends TokenA from his account on Layer 2 to the corresponding Pair Account. Then ZKSwap will calculate the number of TokenB for the user according to the AMM algorithm and send it to the user. The state tree is updated accordingly. The ZKSwap Server will update the root node hash of the state tree. The hash and the swap proof will be sent to the ZKSwap contract on-chain. Swap transactions will not change the status of the token on-chain, because the token itself is still locked in the ZKSwap contract. 255 | 256 | 257 | \subsection{Withdraw Liquidity} 258 | 259 | \begin{figure}[htbp] 260 | \centering 261 | \includegraphics[width=0.9\columnwidth]{figure/withdraw_liquidity} 262 | \caption{Withdraw Liquidity} 263 | \label{fig:withdraw_liquidity} 264 | \end{figure} 265 | 266 | Withdraw Liquidity refers to the process where the user withdraws the Liquidity Token from the Layer 2 account to Layer 1. Withdraw Liquidity’s initiation process and status update on Layer 2 are exactly the same as the above-mentioned ordinary Withdraw, but it produces different results on Layer 1. After the ZKSwap contract receives the Withdraw Liquidity request, it will automatically trigger Liquidity Token minting to mint additional Liquidity Tokens onLayer 1 and send it to the designated account. 267 | 268 | 269 | \section{Summary and Outlook} 270 | 271 | ZKSwap uses ZK-Rollup technology to realize the complete function of Uniswap in Layer-2. It is a set of decentralized Layer-2 token AMM (Automated Market Maker) Swap protocol, with infinite scalability and high TPS. Liquidity providers and users do not need to pay high gas fees and always have real-time transactions. Users no longer need to wait for block confirmations to complete transactions on Layer 2, which dramatically reduces the threshold for using DEX and brings significant changes to all current DEX and CEX. 272 | 273 | ZKSwap is developed with the support of L2 Lab. In the future, L2 Lab will continue to promote the development of the Layer 2 protocol layer, combining a series of Layer 2 basic protocols such as ZKSwap and Layer 2 privacy stable coins to create a complete Layer 2 DeFi ecosystem. 274 | 275 | By creating a Layer-2 protocol standard with excellent user experience, L2 Lab is committed to promoting the paradigm shift in the blockchain industry, making Layer 1 the foundation of clearing and settlement, and Layer 2 connecting blockchain applications and Layer 3 bridges and entrances. We are committed to promoting all blockchain applications to run in a layer-3 world without any restrictions. 276 | 277 | We will be committed to making ZKSwap the most useful product in DEX. When the time is right, we will also launch a liquid mining plan, and DAO plans to help the rise of distributed financial DeFi and lead the paradigm change of blockchain applications. 278 | 279 | 280 | 281 | \bibliographystyle{template/splncs04} 282 | \bibliography{zkswap.bib} 283 | 284 | \end{document} -------------------------------------------------------------------------------- /zkswap_v2_cn.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/zkswap_v2_cn.pdf -------------------------------------------------------------------------------- /zkswap_v2_en.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/l2labs/zkspace-whitepaper/e5abd862225cef519f57f6acf2e4b5be637af4ba/zkswap_v2_en.pdf --------------------------------------------------------------------------------