├── figs ├── default_all.pdf ├── default_all.png ├── use_style.pdf ├── use_style.png ├── usetex_True.pdf ├── usetex_True.png ├── specified_size.pdf ├── specified_size.png └── paper.mplstyle ├── .github └── workflows │ └── pdflatex.yml ├── README.md ├── notes-biblio.bib ├── orcidlink.sty ├── latex-mpl-fig-tips.tex ├── .gitignore └── JHEP.bst /figs/default_all.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duetosymmetry/latex-mpl-fig-tips/HEAD/figs/default_all.pdf -------------------------------------------------------------------------------- /figs/default_all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duetosymmetry/latex-mpl-fig-tips/HEAD/figs/default_all.png -------------------------------------------------------------------------------- /figs/use_style.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duetosymmetry/latex-mpl-fig-tips/HEAD/figs/use_style.pdf -------------------------------------------------------------------------------- /figs/use_style.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duetosymmetry/latex-mpl-fig-tips/HEAD/figs/use_style.png -------------------------------------------------------------------------------- /figs/usetex_True.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duetosymmetry/latex-mpl-fig-tips/HEAD/figs/usetex_True.pdf -------------------------------------------------------------------------------- /figs/usetex_True.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duetosymmetry/latex-mpl-fig-tips/HEAD/figs/usetex_True.png -------------------------------------------------------------------------------- /figs/specified_size.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duetosymmetry/latex-mpl-fig-tips/HEAD/figs/specified_size.pdf -------------------------------------------------------------------------------- /figs/specified_size.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/duetosymmetry/latex-mpl-fig-tips/HEAD/figs/specified_size.png -------------------------------------------------------------------------------- /.github/workflows/pdflatex.yml: -------------------------------------------------------------------------------- 1 | name: LaTeX build 2 | on: 3 | push: 4 | branches-ignore: 5 | - 'gh-action-result/pdflatex' 6 | jobs: 7 | build_latex: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Set up Git repository 11 | uses: actions/checkout@v4 12 | - name: Compile LaTeX document 13 | uses: xu-cheng/latex-action@v3 14 | with: 15 | root_file: latex-mpl-fig-tips.tex 16 | - name: Commit to orphan branch 17 | run: | 18 | git checkout --orphan gh-action-result/pdflatex 19 | git rm -rf . 20 | git add latex-mpl-fig-tips.pdf 21 | git -c user.name='GitHub Action' -c user.email='action@github.com' commit -m "Built paper" 22 | - name: Push changes 23 | uses: ad-m/github-push-action@master 24 | with: 25 | github_token: ${{ secrets.GITHUB_TOKEN }} 26 | branch: gh-action-result/pdflatex 27 | force: true 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![LaTeX build](../../actions/workflows/pdflatex.yml/badge.svg)](../../actions/workflows/pdflatex.yml) 2 | [![Latest build of the paper](https://img.shields.io/badge/PDF-latest-orange.svg?style=flat)](../gh-action-result/pdflatex/latex-mpl-fig-tips.pdf) 3 | 4 | This repo is a supplement to the post [Fonts/sizes in matplotlib 5 | figures for LaTeX 6 | publications](https://duetosymmetry.com/code/latex-mpl-fig-tips/) on 7 | my web site. If you haven't read the post yet, go check it out. If 8 | you've already read the post, you're probably most interested in: 9 | - [latex-mpl-fig-tips.tex](latex-mpl-fig-tips.tex): The example LaTeX 10 | code 11 | - [figs/make-figs.ipynb](figs/make-figs.ipynb): The jupyter notebook 12 | with plotting code that generated the figures 13 | - [figs/paper.mplstyle](figs/paper.mplstyle): The example mplstyle 14 | file that's used in the python code above. 15 | 16 | This repo was based on [this other template repo](https://github.com/duetosymmetry/LaTeX-template). 17 | -------------------------------------------------------------------------------- /notes-biblio.bib: -------------------------------------------------------------------------------- 1 | @article{Wald:1993nt, 2 | author = "Wald, Robert M.", 3 | title = "{Black hole entropy is the Noether charge}", 4 | journal = "Phys. Rev.", 5 | volume = "D48", 6 | year = "1993", 7 | number = "8", 8 | pages = "R3427-R3431", 9 | doi = "10.1103/PhysRevD.48.R3427", 10 | eprint = "gr-qc/9307038", 11 | archivePrefix = "arXiv", 12 | primaryClass = "gr-qc", 13 | reportNumber = "EFI-93-42", 14 | SLACcitation = "%%CITATION = GR-QC/9307038;%%" 15 | } 16 | 17 | 18 | @article{Noether:1918zz, 19 | author = "Noether, Emmy", 20 | title = "{Invariant Variation Problems}", 21 | journal = "Gott. Nachr.", 22 | volume = "1918", 23 | year = "1918", 24 | pages = "235-257", 25 | doi = "10.1080/00411457108231446", 26 | note = "[Transp. Theory Statist. Phys.1,186(1971)]", 27 | eprint = "physics/0503066", 28 | archivePrefix = "arXiv", 29 | primaryClass = "physics", 30 | SLACcitation = "%%CITATION = PHYSICS/0503066;%%" 31 | } 32 | 33 | @book{bender1999advanced, 34 | title={Advanced Mathematical Methods for Scientists and Engineers: Asymptotic Methods and Perturbation Theory}, 35 | author={Bender, C.M. and Orszag, S.A.}, 36 | isbn={9780387989310}, 37 | lccn={99044783}, 38 | series={Advanced Mathematical Methods for Scientists and Engineers}, 39 | urlIGNORE={https://books.google.com/books?id=-yQXwhE6iWMC}, 40 | year={1999}, 41 | publisher={Springer} 42 | } 43 | -------------------------------------------------------------------------------- /orcidlink.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `orcidlink.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% orcidlink.dtx (with options: `package') 8 | %% 9 | %% This is a generated file. 10 | %% 11 | %% Copyright (C) 2019-2024 by Leo C. Stein 12 | %% -------------------------------------------------------------------------- 13 | %% This work may be distributed and/or modified under the 14 | %% conditions of the LaTeX Project Public License, either version 1.3 15 | %% of this license or (at your option) any later version. 16 | %% The latest version of this license is in 17 | %% http://www.latex-project.org/lppl.txt 18 | %% and version 1.3 or later is part of all distributions of LaTeX 19 | %% version 2005/12/01 or later. 20 | %% 21 | \NeedsTeXFormat{LaTeX2e}[1994/06/01] 22 | \ProvidesPackage{orcidlink} 23 | [2024/06/26 v1.1.0 Support ORCID's three different ID formats.] 24 | 25 | %% This started out as Milo's code on TeX.SE, 26 | %% see https://tex.stackexchange.com/a/445583/34063. 27 | %% It has since been expanded with more commands. 28 | \RequirePackage{hyperref} 29 | \RequirePackage{tikz} 30 | 31 | \ProcessOptions\relax 32 | 33 | \usetikzlibrary{svg.path} 34 | 35 | \definecolor{orcidlogocol}{HTML}{A6CE39} 36 | \tikzset{ 37 | orcidlogo/.pic={ 38 | \fill[orcidlogocol] svg{M256,128c0,70.7-57.3,128-128,128C57.3,256,0,198.7,0,128C0,57.3,57.3,0,128,0C198.7,0,256,57.3,256,128z}; 39 | \fill[white] svg{M86.3,186.2H70.9V79.1h15.4v48.4V186.2z} 40 | svg{M108.9,79.1h41.6c39.6,0,57,28.3,57,53.6c0,27.5-21.5,53.6-56.8,53.6h-41.8V79.1z M124.3,172.4h24.5c34.9,0,42.9-26.5,42.9-39.7c0-21.5-13.7-39.7-43.7-39.7h-23.7V172.4z} 41 | svg{M88.7,56.8c0,5.5-4.5,10.1-10.1,10.1c-5.6,0-10.1-4.6-10.1-10.1c0-5.6,4.5-10.1,10.1-10.1C84.2,46.7,88.7,51.3,88.7,56.8z}; 42 | } 43 | } 44 | 45 | %% Reciprocal of the height of the svg whose source is above. The 46 | %% original generates a 256pt high graphic; this macro holds 1/256. 47 | \newcommand{\@OrigHeightRecip}{0.00390625} 48 | 49 | %% We will compute the current X height to make the logo the right height 50 | \newlength{\@curXheight} 51 | 52 | %% Prevent externalization of the ORCiD logo. 53 | \newcommand{\@preventExternalization}{% 54 | \ifcsname tikz@library@external@loaded\endcsname% 55 | \tikzset{external/export next=false}\else\fi% 56 | } 57 | 58 | \newcommand{\orcidlogo}{% 59 | \texorpdfstring{% 60 | \setlength{\@curXheight}{\fontcharht\font`X}% 61 | \XeTeXLinkBox{% 62 | \@preventExternalization% 63 | \begin{tikzpicture}[yscale=-\@OrigHeightRecip*\@curXheight, 64 | xscale=\@OrigHeightRecip*\@curXheight,transform shape] 65 | \pic{orcidlogo}; 66 | \end{tikzpicture}% 67 | }}{}} 68 | 69 | \DeclareRobustCommand\orcidlinkX[3]{\href{https://orcid.org/#2}{% 70 | \ifstrempty{#1}{}{#1\,}\orcidlogo\ifstrempty{#3}{}{\,#3}}} 71 | \newcommand{\orcidlinkf}[1]{\orcidlinkX{}{#1}{https://orcid.org/#1}} 72 | \newcommand{\orcidlinkc}[1]{\orcidlinkX{}{#1}{#1}} 73 | \newcommand{\orcidlinki}[2]{\orcidlinkX{#1}{#2}{}} 74 | \newcommand{\orcidlink}[1]{\orcidlinkX{}{#1}{}} 75 | 76 | \endinput 77 | %% 78 | %% End of file `orcidlink.sty'. 79 | -------------------------------------------------------------------------------- /latex-mpl-fig-tips.tex: -------------------------------------------------------------------------------- 1 | % LCS: voodoo for arXiv scripts, must appear in the first 4 lines 2 | \pdfoutput=1 3 | \documentclass[aps,prd,twocolumn,superscriptaddress,preprintnumbers,floatfix,nofootinbib]{revtex4-2} 4 | %\documentclass[aps,prl,preprint,superscriptaddress]{revtex4-1} 5 | %\documentclass[aps,prl,reprint,groupedaddress]{revtex4-1} 6 | 7 | \usepackage{graphicx} 8 | \usepackage{amsmath, amssymb, mathrsfs} 9 | \usepackage{color} 10 | \usepackage{bm} 11 | % LCS: Proper input/output encoding 12 | \usepackage[T1]{fontenc} 13 | \usepackage[utf8]{inputenc} 14 | \usepackage{microtype} 15 | \usepackage[normalem]{ulem} 16 | \usepackage[dvipsnames]{xcolor} 17 | \usepackage[colorlinks,urlcolor=NavyBlue,citecolor=NavyBlue,linkcolor=NavyBlue,pdfusetitle]{hyperref} 18 | \usepackage[all]{hypcap} 19 | \usepackage{orcidlink} 20 | 21 | \usepackage{lipsum} 22 | 23 | \newcommand{\NR}{\text{NR}} 24 | 25 | % LCS: Directories for figures. This makes life easier for moving 26 | % figures around. 27 | \graphicspath{{figs/}} 28 | 29 | %% Try to control orphans, widows, and extra whitespace 30 | %\widowpenalty=10000 31 | %\clubpenalty=10000 32 | %\raggedbottom 33 | %\interfootnotelinepenalty=3000 34 | 35 | \newcommand{\Note}[1]{\textcolor{red}{\textbf{[#1]}}} 36 | \newcommand{\lcs}[1]{\textcolor{WildStrawberry}{#1}} 37 | 38 | \begin{document} 39 | 40 | 41 | %Title of paper 42 | \title{Notes on XXX} 43 | 44 | \author{Leo C.\ Stein\,\orcidlink{0000-0001-7559-9597}} 45 | \email[]{lcstein@olemiss.edu} 46 | %\thanks{} 47 | %\altaffiliation{} 48 | \affiliation{Department of Physics and Astronomy, 49 | University of Mississippi, University, MS 38677, USA} 50 | 51 | % Because hyperref only gets the *last* author, we need to be explicit. 52 | %\hypersetup{pdfauthor={Stein}} 53 | 54 | \date{\today} 55 | 56 | \begin{abstract} 57 | Here is our abstract. 58 | Some well known problem. 59 | Currently limitation of the field. 60 | Here we solve the problem. 61 | This leads to result of ABC. 62 | \end{abstract} 63 | 64 | %\maketitle must follow title, authors, abstract 65 | \maketitle 66 | 67 | %\tableofcontents 68 | 69 | \section{Introduction} 70 | \label{sec:introduction} 71 | 72 | As is by now well known, black hole entropy is a Noether 73 | charge~\cite{Wald:1993nt, Noether:1918zz}. 74 | \lipsum[1] 75 | 76 | \section{Results} 77 | \label{sec:results} 78 | 79 | We used matched asymptotic expansions~\cite{bender1999advanced}. 80 | % 81 | \begin{figure}[t] 82 | \begin{center} 83 | %\includegraphics[width=\columnwidth]{use_style} 84 | \includegraphics[width=\columnwidth]{specified_size} 85 | \end{center} 86 | \vspace{-\baselineskip} 87 | \caption{% 88 | Isn't this figure so lovely? We all just love making figures in 89 | \texttt{matplotlib}.} 90 | \label{fig:lovely} 91 | \vspace{-\baselineskip} 92 | \end{figure} 93 | % 94 | \lipsum[2-4] 95 | 96 | \section{Discussion and conclusions} 97 | \label{sec:disc-concl} 98 | 99 | In this article, we solved the previously open problem of XYZ. 100 | \lipsum[5] 101 | 102 | \subsection{Future work} 103 | \label{sec:future-work} 104 | 105 | Our method can be adapted for generalizations. 106 | 107 | \acknowledgments 108 | % 109 | The authors would like to thank 110 | % 111 | TODO 112 | % 113 | for useful discussions. 114 | 115 | % \appendix 116 | % Put messy things here 117 | 118 | \bibliographystyle{JHEP} 119 | \bibliography{notes-biblio} 120 | 121 | \end{document} 122 | 123 | % Local Variables: 124 | % mode: latex 125 | % End: 126 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ### LCS Originally from https://raw.githubusercontent.com/github/gitignore/master/TeX.gitignore 2 | 3 | ## Core latex/pdflatex auxiliary files: 4 | *.aux 5 | *.lof 6 | *.log 7 | *.lot 8 | *.fls 9 | *.out 10 | *.toc 11 | *.fmt 12 | *.fot 13 | *.cb 14 | *.cb2 15 | .*.lb 16 | 17 | ## Intermediate documents: 18 | *.dvi 19 | *.xdv 20 | *-converted-to.* 21 | # these rules might exclude image files for figures etc. 22 | # *.ps 23 | # *.eps 24 | # *.pdf 25 | 26 | ## Generated if empty string is given at "Please type another file name for output:" 27 | .pdf 28 | 29 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 30 | *.bbl 31 | *.bcf 32 | *.blg 33 | *-blx.aux 34 | *-blx.bib 35 | *.run.xml 36 | 37 | ## Build tool auxiliary files: 38 | *.fdb_latexmk 39 | *.synctex 40 | *.synctex(busy) 41 | *.synctex.gz 42 | *.synctex.gz(busy) 43 | *.pdfsync 44 | 45 | ## Build tool directories for auxiliary files 46 | # latexrun 47 | latex.out/ 48 | 49 | ## Auxiliary and intermediate files from other packages: 50 | # algorithms 51 | *.alg 52 | *.loa 53 | 54 | # achemso 55 | acs-*.bib 56 | 57 | # amsthm 58 | *.thm 59 | 60 | # beamer 61 | *.nav 62 | *.pre 63 | *.snm 64 | *.vrb 65 | 66 | # changes 67 | *.soc 68 | 69 | # comment 70 | *.cut 71 | 72 | # cprotect 73 | *.cpt 74 | 75 | # elsarticle (documentclass of Elsevier journals) 76 | *.spl 77 | 78 | # endnotes 79 | *.ent 80 | 81 | # fixme 82 | *.lox 83 | 84 | # feynmf/feynmp 85 | *.mf 86 | *.mp 87 | *.t[1-9] 88 | *.t[1-9][0-9] 89 | *.tfm 90 | 91 | #(r)(e)ledmac/(r)(e)ledpar 92 | *.end 93 | *.?end 94 | *.[1-9] 95 | *.[1-9][0-9] 96 | *.[1-9][0-9][0-9] 97 | *.[1-9]R 98 | *.[1-9][0-9]R 99 | *.[1-9][0-9][0-9]R 100 | *.eledsec[1-9] 101 | *.eledsec[1-9]R 102 | *.eledsec[1-9][0-9] 103 | *.eledsec[1-9][0-9]R 104 | *.eledsec[1-9][0-9][0-9] 105 | *.eledsec[1-9][0-9][0-9]R 106 | 107 | # glossaries 108 | *.acn 109 | *.acr 110 | *.glg 111 | *.glo 112 | *.gls 113 | *.glsdefs 114 | *.lzo 115 | *.lzs 116 | 117 | # uncomment this for glossaries-extra (will ignore makeindex's style files!) 118 | # *.ist 119 | 120 | # gnuplottex 121 | *-gnuplottex-* 122 | 123 | # gregoriotex 124 | *.gaux 125 | *.gtex 126 | 127 | # htlatex 128 | *.4ct 129 | *.4tc 130 | *.idv 131 | *.lg 132 | *.trc 133 | *.xref 134 | 135 | # hyperref 136 | *.brf 137 | 138 | # knitr 139 | *-concordance.tex 140 | # TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files 141 | # *.tikz 142 | *-tikzDictionary 143 | 144 | # listings 145 | *.lol 146 | 147 | # luatexja-ruby 148 | *.ltjruby 149 | 150 | # makeidx 151 | *.idx 152 | *.ilg 153 | *.ind 154 | 155 | # minitoc 156 | *.maf 157 | *.mlf 158 | *.mlt 159 | *.mtc[0-9]* 160 | *.slf[0-9]* 161 | *.slt[0-9]* 162 | *.stc[0-9]* 163 | 164 | # minted 165 | _minted* 166 | *.pyg 167 | 168 | # morewrites 169 | *.mw 170 | 171 | # nomencl 172 | *.nlg 173 | *.nlo 174 | *.nls 175 | 176 | # pax 177 | *.pax 178 | 179 | # pdfpcnotes 180 | *.pdfpc 181 | 182 | # sagetex 183 | *.sagetex.sage 184 | *.sagetex.py 185 | *.sagetex.scmd 186 | 187 | # scrwfile 188 | *.wrt 189 | 190 | # sympy 191 | *.sout 192 | *.sympy 193 | sympy-plots-for-*.tex/ 194 | 195 | # pdfcomment 196 | *.upa 197 | *.upb 198 | 199 | # pythontex 200 | *.pytxcode 201 | pythontex-files-*/ 202 | 203 | # tcolorbox 204 | *.listing 205 | 206 | # thmtools 207 | *.loe 208 | 209 | # TikZ & PGF 210 | *.dpth 211 | *.md5 212 | *.auxlock 213 | 214 | # todonotes 215 | *.tdo 216 | 217 | # vhistory 218 | *.hst 219 | *.ver 220 | 221 | # easy-todo 222 | *.lod 223 | 224 | # xcolor 225 | *.xcp 226 | 227 | # xmpincl 228 | *.xmpi 229 | 230 | # xindy 231 | *.xdy 232 | 233 | # xypic precompiled matrices and outlines 234 | *.xyc 235 | *.xyd 236 | 237 | # endfloat 238 | *.ttt 239 | *.fff 240 | 241 | # Latexian 242 | TSWLatexianTemp* 243 | 244 | ## Editors: 245 | # WinEdt 246 | *.bak 247 | *.sav 248 | 249 | # Texpad 250 | .texpadtmp 251 | 252 | # LyX 253 | *.lyx~ 254 | 255 | # Kile 256 | *.backup 257 | 258 | # gummi 259 | .*.swp 260 | 261 | # KBibTeX 262 | *~[0-9]* 263 | 264 | # TeXnicCenter 265 | *.tps 266 | 267 | # auto folder when using emacs and auctex 268 | ./auto/* 269 | *.el 270 | 271 | # expex forward references with \gathertags 272 | *-tags.tex 273 | 274 | # standalone packages 275 | *.sta 276 | 277 | # Makeindex log files 278 | *.lpz 279 | 280 | # xwatermark package 281 | *.xwm 282 | 283 | # REVTeX puts footnotes in the bibliography by default, unless the nofootinbib 284 | # option is specified. Footnotes are the stored in a file with suffix Notes.bib. 285 | # Uncomment the next line to have this generated file ignored. 286 | *Notes.bib 287 | 288 | ## LCS Added 289 | # Generated PDF 290 | latex-mpl-fig-tips.pdf 291 | 292 | .ipynb_checkpoints 293 | -------------------------------------------------------------------------------- /figs/paper.mplstyle: -------------------------------------------------------------------------------- 1 | ## See https://matplotlib.org/stable/tutorials/introductory/customizing.html#a-sample-matplotlibrc-file 2 | 3 | text.usetex: True 4 | text.latex.preamble: \usepackage{amsmath}\usepackage{amssymb} 5 | font.family: serif 6 | font.serif: Computer Modern 7 | savefig.bbox: tight 8 | savefig.format: pdf 9 | 10 | lines.linewidth: .5 11 | 12 | ## *************************************************************************** 13 | ## * AXES * 14 | ## *************************************************************************** 15 | axes.linewidth: 0.5 # edge line width 16 | axes.labelsize: 10 # font size of the x and y labels 17 | axes.labelpad: 3.0 # space between label and axis 18 | #axes.labelweight: normal # weight of the x and y labels 19 | axes.grid: True 20 | axes.grid.axis: y 21 | 22 | grid.linewidth: 0.2 23 | 24 | ## *************************************************************************** 25 | ## * TICKS * 26 | ## *************************************************************************** 27 | ## See https://matplotlib.org/api/axis_api.html#matplotlib.axis.Tick 28 | xtick.top: True # draw ticks on the top side 29 | # xtick.bottom: True # draw ticks on the bottom side 30 | # xtick.labeltop: False # draw label on the top 31 | # xtick.labelbottom: True # draw label on the bottom 32 | # xtick.major.size: 3 # major tick size in points 33 | # xtick.minor.size: 1.5 # minor tick size in points 34 | xtick.major.width: .3 # major tick width in points 35 | # xtick.minor.width: .3 # minor tick width in points 36 | # xtick.major.pad: 2 # distance to major tick label in points 37 | # xtick.minor.pad: 2 # distance to the minor tick label in points 38 | # xtick.color: black # color of the ticks 39 | # xtick.labelcolor: inherit # color of the tick labels or inherit from xtick.color 40 | xtick.labelsize: 8 # font size of the tick labels 41 | xtick.direction: in # direction: {in, out, inout} 42 | # xtick.minor.visible: True # visibility of minor ticks on x-axis 43 | # xtick.major.top: True # draw x axis top major ticks 44 | # xtick.major.bottom: True # draw x axis bottom major ticks 45 | # xtick.minor.top: False # draw x axis top minor ticks 46 | # xtick.minor.bottom: False # draw x axis bottom minor ticks 47 | # xtick.alignment: center # alignment of xticks 48 | # 49 | # ytick.left: True # draw ticks on the left side 50 | ytick.right: True # draw ticks on the right side 51 | # ytick.labelleft: True # draw tick labels on the left side 52 | # ytick.labelright: False # draw tick labels on the right side 53 | # ytick.major.size: 3 # major tick size in points 54 | # ytick.minor.size: 1.5 # minor tick size in points 55 | # ytick.major.width: .3 # major tick width in points 56 | # ytick.minor.width: .3 # minor tick width in points 57 | # ytick.major.pad: 2 # distance to major tick label in points 58 | # ytick.minor.pad: 2 # distance to the minor tick label in points 59 | # ytick.color: black # color of the ticks 60 | # ytick.labelcolor: inherit # color of the tick labels or inherit from ytick.color 61 | ytick.labelsize: 8 # font size of the tick labels 62 | ytick.direction: in # direction: {in, out, inout} 63 | # ytick.minor.visible: True # visibility of minor ticks on y-axis 64 | # ytick.major.left: True # draw y axis left major ticks 65 | # ytick.major.right: True # draw y axis right major ticks 66 | # ytick.minor.left: True # draw y axis left minor ticks 67 | # ytick.minor.right: True # draw y axis right minor ticks 68 | # ytick.alignment: center_baseline # alignment of yticks 69 | 70 | ## *************************************************************************** 71 | ## * LEGEND * 72 | ## *************************************************************************** 73 | legend.loc: upper right 74 | legend.frameon: False # if True, draw the legend on a background patch 75 | # legend.framealpha: 0.8 # legend patch transparency 76 | # legend.fancybox: True # if True, use a rounded box for the 77 | # legend background, else a rectangle 78 | #legend.markerscale: 1.0 # the relative size of legend markers vs. original 79 | legend.fontsize: 6 80 | 81 | ## *************************************************************************** 82 | ## * FIGURE * 83 | ## *************************************************************************** 84 | # figure.figsize: 3.4, 2.55 # figure size in inches 85 | figure.dpi: 300 # figure dots per inch 86 | # figure.frameon: True # enable figure frame 87 | -------------------------------------------------------------------------------- /JHEP.bst: -------------------------------------------------------------------------------- 1 | % JHEP bibliography style ver. 2.18 2 | % 3 | % The bibtex output produced by inSPIRE, while far from perfect, is pretty 4 | % suitable for use with this style. Indeed, this style was designed with 5 | % inSPIRE in mind. 6 | % 7 | % 8 | % 9 | % Copyright 2015 SISSA Medialab 10 | % 11 | % This work may be distributed and/or modified under the 12 | % conditions of the LaTeX Project Public License, either version 1.3 13 | % of this license or (at your option) any later version. 14 | % The latest version of this license is in 15 | % http://www.latex-project.org/lppl.txt 16 | % and version 1.3 or later is part of all distributions of LaTeX 17 | % version 2005/12/01 or later. 18 | % 19 | % This work has the LPPL maintenance status `author-maintained'. 20 | % 21 | % The Current Maintainer of this work is 22 | % SISSA Medialab 23 | % 24 | % This work consists of the file JHEP.bst. 25 | 26 | 27 | ENTRY 28 | { address 29 | author 30 | booktitle 31 | chapter 32 | edition 33 | editor 34 | howpublished 35 | institution 36 | journal 37 | key 38 | month 39 | note 40 | number 41 | organization 42 | pages 43 | publisher 44 | school 45 | series 46 | title 47 | doi 48 | SLACcitation 49 | type 50 | volume 51 | year 52 | archive 53 | eprint 54 | report 55 | collaboration 56 | url 57 | } 58 | {} 59 | { label } 60 | 61 | INTEGERS { output.state before.all mid.sentence after.quote after.sentence 62 | after.quoted.block after.block } 63 | 64 | FUNCTION {init.state.consts} 65 | { #0 'before.all := 66 | #1 'mid.sentence := 67 | #2 'after.quote := 68 | #3 'after.sentence := 69 | #4 'after.quoted.block := 70 | #5 'after.block := 71 | } 72 | 73 | STRINGS { s t ref z } 74 | 75 | FUNCTION {output.nonnull} 76 | { 77 | 's := 78 | output.state mid.sentence = 79 | { ", " * write$ } 80 | { output.state after.quote = 81 | { " " * write$ } 82 | { output.state after.block = 83 | { add.period$ write$ 84 | newline$ 85 | "\newblock " write$ 86 | } 87 | { output.state before.all = 88 | 'write$ 89 | { output.state after.quoted.block = 90 | { write$ 91 | newline$ 92 | "\newblock " write$ 93 | } 94 | { add.period$ " " * write$ } 95 | if$ 96 | } 97 | if$ 98 | } 99 | if$ 100 | } 101 | if$ 102 | mid.sentence 'output.state := 103 | } 104 | if$ 105 | s 106 | } 107 | 108 | FUNCTION {output} 109 | { duplicate$ empty$ 110 | 'pop$ 111 | 'output.nonnull 112 | if$ 113 | } 114 | 115 | FUNCTION {output.check} 116 | { 't := 117 | duplicate$ empty$ 118 | { pop$ "empty " t * " in " * cite$ * warning$ } 119 | 'output.nonnull 120 | if$ 121 | } 122 | 123 | FUNCTION {output.bibitem} 124 | { newline$ 125 | "\bibitem{" write$ 126 | cite$ write$ 127 | "}" write$ 128 | newline$ 129 | "" 130 | before.all 'output.state := 131 | } 132 | 133 | FUNCTION {blank.sep} 134 | { after.quote 'output.state := 135 | } 136 | 137 | 138 | 139 | FUNCTION {fin.entry} 140 | { output.state after.quoted.block = 141 | 'skip$ 142 | 'add.period$ 143 | if$ 144 | write$ 145 | newline$ 146 | } 147 | 148 | FUNCTION {new.block} 149 | { output.state before.all = 150 | 'skip$ 151 | { output.state after.quote = 152 | { after.quoted.block 'output.state := } 153 | { after.block 'output.state := } 154 | if$ 155 | } 156 | if$ 157 | } 158 | 159 | FUNCTION {new.sentence} 160 | { output.state after.block = 161 | 'skip$ 162 | { output.state before.all = 163 | 'skip$ 164 | { after.sentence 'output.state := } 165 | if$ 166 | } 167 | if$ 168 | } 169 | 170 | FUNCTION {not} 171 | { { #0 } 172 | { #1 } 173 | if$ 174 | } 175 | 176 | FUNCTION {and} 177 | { 'skip$ 178 | { pop$ #0 } 179 | if$ 180 | } 181 | 182 | FUNCTION {or} 183 | { { pop$ #1 } 184 | 'skip$ 185 | if$ 186 | } 187 | 188 | FUNCTION {new.block.checka} 189 | { empty$ 190 | 'skip$ 191 | 'new.block 192 | if$ 193 | } 194 | 195 | FUNCTION {new.block.checkb} 196 | { empty$ 197 | swap$ empty$ 198 | and 199 | 'skip$ 200 | 'new.block 201 | if$ 202 | } 203 | 204 | FUNCTION {new.sentence.checka} 205 | { empty$ 206 | 'skip$ 207 | 'new.sentence 208 | if$ 209 | } 210 | 211 | FUNCTION {field.or.null} 212 | { duplicate$ empty$ 213 | { pop$ "" } 214 | 'skip$ 215 | if$ 216 | } 217 | 218 | FUNCTION {emphasize} 219 | { duplicate$ empty$ 220 | { pop$ "" } 221 | { "\emph{" swap$ * "}" * } 222 | if$ 223 | } 224 | 225 | %% this functions should append the correct url prefix to doi 226 | FUNCTION {format.doi} 227 | { doi empty$ 228 | { "" } 229 | {"\href{https://doi.org/" doi * "}" * } 230 | if$ 231 | } 232 | 233 | FUNCTION {formatfull.doi} 234 | { doi empty$ 235 | { "" } 236 | {"\href{https://doi.org/" doi * 237 | "}{DOI}" * } 238 | if$ 239 | } 240 | 241 | FUNCTION {format.url} 242 | { 243 | url empty$ 244 | {""} 245 | {"\href{" url * "}{" * url * "}" *} 246 | if$ 247 | } 248 | 249 | 250 | %% from http://mirrors.ctan.org/biblio/bibtex/contrib/doc/btxFAQ.pdf Q.35 251 | %% from Philip G. Ratcliffe on the newsgroup comp.text.tex on June 28, 2002 252 | %% in the thread “BiBTeX, bst hackers, format.name$, please help”. 253 | FUNCTION {remove.spaces} 254 | { 'z := 255 | "" 256 | { z empty$ not } 257 | { z #1 #1 substring$ 258 | z #2 global.max$ substring$ 'z := 259 | duplicate$ "~" = 260 | 'pop$ 261 | { duplicate$ " " = 262 | 'pop$ 263 | { * } 264 | if$ 265 | } 266 | if$ 267 | } 268 | while$ 269 | } 270 | 271 | INTEGERS { nameptr namesleft numnames } 272 | 273 | FUNCTION {forname.format.string} 274 | { "{f.}" } 275 | 276 | FUNCTION {surname.format.string} 277 | { "{vv~}{ll}" } 278 | 279 | FUNCTION {jnrname.format.string} 280 | { "{, jj}" } 281 | 282 | FUNCTION {format.names} 283 | { 's := 284 | #1 'nameptr := 285 | s num.names$ 'numnames := 286 | numnames 'namesleft := 287 | { namesleft #0 > } 288 | { s nameptr forname.format.string format.name$ remove.spaces 289 | duplicate$ empty$ 'skip$ { "~" * } if$ 290 | s nameptr surname.format.string format.name$ * 291 | s nameptr jnrname.format.string format.name$ * 292 | 't := 293 | nameptr #1 > 294 | { namesleft #1 > 295 | { ", " * t * } 296 | { numnames #2 > 297 | { "" * } 298 | 'skip$ 299 | if$ 300 | t "others" = 301 | { " et~al." * } 302 | { " and " * t * } 303 | if$ 304 | } 305 | if$ 306 | } 307 | nameptr #6 > 308 | { #0 'namesleft := 309 | "others" 't := 310 | 't 311 | } 312 | {'t} 313 | if$ 314 | if$ 315 | nameptr #1 + 'nameptr := 316 | namesleft #1 - 'namesleft := 317 | } 318 | while$ 319 | } 320 | 321 | 322 | FUNCTION {format.authors} 323 | { author empty$ 324 | { "" } 325 | { author format.names } 326 | if$ 327 | } 328 | 329 | FUNCTION {format.eprint} 330 | { eprint empty$ 331 | { ""} 332 | { archive empty$ 333 | {"\href{https://arxiv.org/abs/" eprint * "}" * 334 | "{{\ttfamily " * eprint * "}}" *} 335 | {"\href{https://arxiv.org/abs/" archive * "/" * eprint * "}" * 336 | "{{\ttfamily " * archive * "/" * eprint * "}}" *} 337 | if$ 338 | } 339 | if$ 340 | } 341 | 342 | FUNCTION {format.eprint.paren} 343 | { eprint missing$ { "" } { eprint empty$ { "" } 344 | {"[" format.eprint * "]" *} 345 | if$ 346 | } 347 | if$ 348 | } 349 | 350 | 351 | 352 | FUNCTION {format.report} 353 | { report empty$ 354 | { ""} 355 | { report} 356 | if$ 357 | } 358 | 359 | 360 | 361 | FUNCTION {format.editors} 362 | { 363 | editor empty$ 364 | { "" } 365 | { editor format.names 366 | editor num.names$ #1 > 367 | { ", eds." * } 368 | { ", ed." * } 369 | if$ 370 | } 371 | if$ 372 | } 373 | 374 | %% TODO: change.case$ is probably not a good idea... 375 | %% see typeset/scripts/tests/JHEP.bst/src/bibitem-3127.bib 376 | FUNCTION {format.title} 377 | { title empty$ 378 | { "" } 379 | { "\emph{" title "t" change.case$ * "}, " * } 380 | if$ 381 | } 382 | 383 | FUNCTION {format.title.p} 384 | { title empty$ 385 | { "" } 386 | { "``" title "t" change.case$ * ".''" * } 387 | if$ 388 | } 389 | 390 | FUNCTION {n.dashify} 391 | { 't := 392 | "" 393 | { t empty$ not } 394 | { t #1 #1 substring$ "-" = 395 | { t #1 #2 substring$ "--" = not 396 | { "--" * 397 | t #2 global.max$ substring$ 't := 398 | } 399 | { { t #1 #1 substring$ "-" = } 400 | { "-" * 401 | t #2 global.max$ substring$ 't := 402 | } 403 | while$ 404 | } 405 | if$ 406 | } 407 | { t #1 #1 substring$ * 408 | t #2 global.max$ substring$ 't := 409 | } 410 | if$ 411 | } 412 | while$ 413 | } 414 | 415 | FUNCTION {format.date} 416 | { year empty$ 417 | { month empty$ 418 | { "" } 419 | { "there's a month but no year in " cite$ * warning$ 420 | month 421 | } 422 | if$ 423 | } 424 | { month empty$ 425 | 'year 426 | { month ", " * year * } 427 | if$ 428 | } 429 | if$ 430 | } 431 | 432 | FUNCTION {format.date.paren} 433 | { year empty$ 434 | { month empty$ 435 | { "" } 436 | { "there's a month but no year in " cite$ * warning$ 437 | month 438 | } 439 | if$ 440 | } 441 | { month empty$ 442 | {"(" year * ")" *} 443 | {"(" month * ", " * year * ")" *} 444 | if$ 445 | } 446 | if$ 447 | } 448 | 449 | FUNCTION {format.date.paren.nomonth} 450 | { year empty$ 451 | { "" } 452 | {"(" year * ")" *} 453 | if$ 454 | } 455 | 456 | FUNCTION {format.collaboration} 457 | { collaboration empty$ 458 | { "" } 459 | { "{\scshape " collaboration * "} " * "collaboration" * } 460 | if$ 461 | } 462 | 463 | 464 | FUNCTION {format.btitle} 465 | { title emphasize 466 | } 467 | 468 | FUNCTION {tie.or.space.connect} 469 | { duplicate$ text.length$ #3 < 470 | { "~" } 471 | { " " } 472 | if$ 473 | swap$ * * 474 | } 475 | 476 | FUNCTION {either.or.check} 477 | { empty$ 478 | 'pop$ 479 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } 480 | if$ 481 | } 482 | 483 | FUNCTION {format.bvolume} 484 | { volume empty$ 485 | { "" } 486 | { "vol.~" volume * 487 | series empty$ 488 | 'skip$ 489 | { " of " * series emphasize * } 490 | if$ 491 | "volume and number" number either.or.check 492 | } 493 | if$ 494 | } 495 | 496 | FUNCTION {format.number.series} 497 | { volume empty$ 498 | { number empty$ 499 | { series field.or.null } 500 | { output.state mid.sentence = 501 | { "no.~" } 502 | { "No.~" } 503 | if$ 504 | number * 505 | series empty$ 506 | { "there's a number but no series in " cite$ * warning$ } 507 | { " in " * series * } 508 | if$ 509 | } 510 | if$ 511 | } 512 | { "" } 513 | if$ 514 | } 515 | 516 | FUNCTION {format.edition} 517 | { edition empty$ 518 | { "" } 519 | { edition "l" change.case$ "~ed." * } 520 | if$ 521 | } 522 | 523 | INTEGERS { multiresult } 524 | 525 | FUNCTION {multi.page.check} 526 | { 't := 527 | #0 'multiresult := 528 | { multiresult not 529 | t empty$ not 530 | and 531 | } 532 | { t #1 #1 substring$ 533 | duplicate$ "-" = 534 | swap$ duplicate$ "," = 535 | swap$ "+" = 536 | or or 537 | { #1 'multiresult := } 538 | { t #2 global.max$ substring$ 't := } 539 | if$ 540 | } 541 | while$ 542 | multiresult 543 | } 544 | 545 | FUNCTION {format.pages} 546 | { pages empty$ 547 | { "" } 548 | { pages multi.page.check 549 | { "pp.~" pages n.dashify * } 550 | { "p.~" pages * } 551 | if$ 552 | } 553 | if$ 554 | } 555 | 556 | FUNCTION {first.page} 557 | { 't := 558 | "" 559 | { t empty$ not t #1 #1 substring$ "-" = not and } 560 | { t #1 #1 substring$ * 561 | t #2 global.max$ substring$ 't := 562 | } 563 | while$ 564 | } 565 | 566 | FUNCTION {format.pages.nopp} 567 | { pages empty$ 568 | { "" } 569 | { pages multi.page.check 570 | { pages first.page } 571 | { pages } 572 | if$ 573 | } 574 | if$ 575 | } 576 | 577 | FUNCTION {format.volume} 578 | { volume empty$ 579 | { "" } 580 | { "{\bfseries " volume * "}" * } 581 | if$ 582 | } 583 | 584 | FUNCTION {format.number} 585 | { number empty$ 586 | { "" } 587 | { "no.~" number * } 588 | if$ 589 | } 590 | 591 | FUNCTION {format.chapter.pages} 592 | { chapter empty$ 593 | 'format.pages 594 | { type empty$ 595 | { "ch.~" chapter * } 596 | { type "l" change.case$ chapter tie.or.space.connect } 597 | if$ 598 | pages empty$ 599 | 'skip$ 600 | { ", " * format.pages * } 601 | if$ 602 | } 603 | if$ 604 | } 605 | 606 | FUNCTION {format.in.ed.booktitle} 607 | { booktitle empty$ 608 | { "" } 609 | { "in " booktitle emphasize * 610 | editor empty$ 611 | 'skip$ 612 | { ", " * format.editors * "" * } 613 | if$ 614 | } 615 | if$ 616 | } 617 | 618 | FUNCTION {format.thesis.type} 619 | { type empty$ 620 | 'skip$ 621 | { pop$ 622 | output.state after.block = 623 | { type "t" change.case$ } 624 | { type "l" change.case$ } 625 | if$ 626 | } 627 | if$ 628 | } 629 | 630 | FUNCTION {empty.misc.check} 631 | { author empty$ title empty$ howpublished empty$ 632 | month empty$ year empty$ note empty$ 633 | and and and and and 634 | { "all relevant fields are empty in " cite$ * warning$ } 635 | 'skip$ 636 | if$ 637 | } 638 | 639 | FUNCTION {format.tr.number} 640 | { 641 | type empty$ 642 | { "Tech. Rep." } 643 | 'type 644 | if$ 645 | output blank.sep 646 | url empty$ 647 | { number } 648 | { "\href{" url * "}{" * number * "}" * } 649 | if$ 650 | } 651 | 652 | FUNCTION {format.paddress} 653 | { address empty$ 654 | { "" } 655 | { "(" address * ")" * } 656 | if$ 657 | } 658 | 659 | FUNCTION {format.article.crossref} 660 | { key empty$ 661 | { journal empty$ 662 | { "need key or journal for " cite$ * " to crossref " * crossref * 663 | warning$ 664 | "" 665 | } 666 | { "in \emph{" journal * "\/}" * } 667 | if$ 668 | } 669 | { "in " key * } 670 | if$ 671 | " \cite{" * crossref * "}" * 672 | } 673 | 674 | FUNCTION {format.crossref.editor} 675 | { editor #1 "{vv~}{ll}" format.name$ 676 | editor num.names$ duplicate$ 677 | #2 > 678 | { pop$ " {et~al.}" * } 679 | { #2 < 680 | 'skip$ 681 | { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = 682 | { " {et~al.}" * } 683 | { " and " * editor #2 "{vv~}{ll}" format.name$ * } 684 | if$ 685 | } 686 | if$ 687 | } 688 | if$ 689 | } 690 | 691 | FUNCTION {format.book.crossref} 692 | { volume empty$ 693 | { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ 694 | "In " 695 | } 696 | { "Vol.~" volume * 697 | " of " * 698 | } 699 | if$ 700 | editor empty$ 701 | editor field.or.null author field.or.null = 702 | or 703 | { key empty$ 704 | { series empty$ 705 | { "need editor, key, or series for " cite$ * " to crossref " * 706 | crossref * warning$ 707 | "" * 708 | } 709 | { "{\em " * series * "\/}" * } 710 | if$ 711 | } 712 | { key * } 713 | if$ 714 | } 715 | { format.crossref.editor * } 716 | if$ 717 | " \cite{" * crossref * "}" * 718 | } 719 | 720 | FUNCTION {format.incoll.inproc.crossref} 721 | { editor empty$ 722 | editor field.or.null author field.or.null = 723 | or 724 | { key empty$ 725 | { booktitle empty$ 726 | { "need editor, key, or booktitle for " cite$ * " to crossref " * 727 | crossref * warning$ 728 | "" 729 | } 730 | { "in {\em " booktitle * "\/}" * } 731 | if$ 732 | } 733 | { "in " key * } 734 | if$ 735 | } 736 | { "in " format.crossref.editor * } 737 | if$ 738 | " \cite{" * crossref * "}" * 739 | } 740 | 741 | %% Output either the collaboration name and no authors 742 | %% or the authors (if there is no collaboration) 743 | FUNCTION {format.author.or.collaboration} 744 | { 745 | collaboration empty$ 746 | { format.authors "author" output.check } 747 | { format.collaboration output } 748 | if$ 749 | } 750 | 751 | FUNCTION {article} 752 | { 753 | output.bibitem 754 | format.author.or.collaboration 755 | %% if there is no author, 756 | %% print the editors 757 | %% ok if there is no editor 758 | author empty$ 759 | { 760 | editor empty$ 761 | 'skip$ 762 | { format.editors output } 763 | if$ 764 | } 765 | 'skip$ 766 | if$ 767 | format.title "title" output.check 768 | blank.sep 769 | 770 | crossref missing$ 771 | { 772 | journal missing$ 773 | { format.eprint output } 774 | { journal empty$ 775 | { format.eprint output } 776 | { format.doi * "{" * journal emphasize before.all 'output.state := "journal" output.check 777 | blank.sep 778 | format.volume output 779 | blank.sep 780 | format.date.paren.nomonth "year" output.check 781 | blank.sep 782 | format.pages.nopp "}" * output 783 | blank.sep 784 | } 785 | if$ 786 | } 787 | if$ 788 | 789 | report missing$ 790 | { journal empty$ 791 | {} 792 | { format.eprint.paren output} 793 | if$ 794 | } 795 | { blank.sep format.report output format.eprint.paren output} 796 | if$ 797 | } 798 | 799 | { 800 | format.article.crossref output.nonnull 801 | format.pages.nopp output 802 | format.eprint.paren output 803 | } 804 | if$ 805 | 806 | new.sentence 807 | fin.entry 808 | } 809 | 810 | FUNCTION {book} 811 | { output.bibitem 812 | format.collaboration output 813 | author empty$ 814 | { format.editors "author and editor" output.check } 815 | { format.authors output.nonnull 816 | crossref missing$ 817 | { "author and editor" editor either.or.check } 818 | 'skip$ 819 | if$ 820 | } 821 | if$ 822 | format.btitle "title" output.check 823 | crossref missing$ 824 | { format.bvolume output 825 | format.number.series output 826 | % new.sentence 827 | publisher "publisher" output.check 828 | address output 829 | } 830 | { format.book.crossref output.nonnull } 831 | if$ 832 | format.edition output 833 | blank.sep 834 | format.date.paren "year" output.check 835 | doi empty$ 836 | {} 837 | { format.doi "{" * doi * "}" * "DOI" output.check } 838 | if$ 839 | format.eprint.paren output 840 | fin.entry 841 | } 842 | 843 | FUNCTION {booklet} 844 | { output.bibitem 845 | format.author.or.collaboration 846 | title empty$ 847 | { "empty title in " cite$ * warning$ 848 | howpublished new.sentence.checka 849 | } 850 | { howpublished empty$ not 851 | address empty$ month empty$ year empty$ and and 852 | or 853 | { format.title.p output.nonnull } 854 | { format.title output.nonnull } 855 | if$ 856 | blank.sep 857 | } 858 | if$ 859 | howpublished output 860 | address output 861 | format.date output 862 | new.block 863 | % note output 864 | doi output 865 | fin.entry 866 | } 867 | 868 | FUNCTION {incollection} 869 | { output.bibitem 870 | format.author.or.collaboration 871 | format.title "title" output.check 872 | blank.sep 873 | crossref missing$ 874 | { format.in.ed.booktitle "booktitle" output.check 875 | format.bvolume output 876 | format.number.series output 877 | format.paddress output 878 | format.pages output 879 | organization output 880 | publisher output 881 | blank.sep format.date.paren.nomonth "year" output.check 882 | } 883 | { format.incoll.inproc.crossref output.nonnull 884 | format.pages output 885 | } 886 | if$ 887 | 888 | doi empty$ 889 | { format.url output } 890 | { formatfull.doi output } 891 | if$ 892 | 893 | blank.sep format.eprint.paren output 894 | 895 | fin.entry 896 | } 897 | 898 | FUNCTION {inbook} { incollection } 899 | 900 | FUNCTION {inproceedings} 901 | { output.bibitem 902 | format.author.or.collaboration 903 | format.title "title" output.check 904 | blank.sep 905 | crossref missing$ 906 | { format.in.ed.booktitle "booktitle" output.check 907 | format.bvolume output 908 | format.number.series output 909 | format.paddress output 910 | format.pages output 911 | organization output 912 | publisher output 913 | format.date "year" output.check 914 | } 915 | { format.incoll.inproc.crossref output.nonnull 916 | format.pages output 917 | } 918 | if$ 919 | 920 | doi empty$ 921 | { format.url output } 922 | { formatfull.doi output } 923 | if$ 924 | 925 | blank.sep format.eprint.paren output 926 | 927 | fin.entry 928 | } 929 | 930 | FUNCTION {conference} { inproceedings } 931 | 932 | FUNCTION {manual} 933 | { output.bibitem 934 | format.collaboration output 935 | author empty$ 936 | { organization empty$ 937 | 'skip$ 938 | { organization output.nonnull 939 | address output 940 | } 941 | if$ 942 | } 943 | { format.authors output.nonnull } 944 | if$ 945 | format.btitle "title" output.check 946 | author empty$ 947 | { organization empty$ 948 | { address new.block.checka 949 | address output 950 | } 951 | 'skip$ 952 | if$ 953 | } 954 | { organization address new.block.checkb 955 | organization output 956 | address output 957 | } 958 | if$ 959 | format.edition output 960 | format.date output 961 | new.block 962 | % note output 963 | doi output 964 | fin.entry 965 | } 966 | 967 | FUNCTION {electronic} { manual } 968 | 969 | FUNCTION {mastersthesis} 970 | { output.bibitem 971 | format.authors "author" output.check 972 | format.title "title" output.check 973 | blank.sep 974 | "Master's thesis" format.thesis.type output.nonnull 975 | school "school" output.check 976 | address output 977 | format.date "year" output.check 978 | doi empty$ 979 | {} 980 | { format.doi "{" * doi * "}" * "DOI" output.check } 981 | if$ 982 | format.eprint.paren output 983 | fin.entry 984 | } 985 | 986 | FUNCTION {misc} 987 | { output.bibitem 988 | format.collaboration output 989 | format.authors output 990 | title empty$ 991 | { howpublished new.sentence.checka } 992 | { howpublished empty$ not 993 | month empty$ year empty$ and 994 | or 995 | { format.title.p output.nonnull } 996 | { format.title output.nonnull } 997 | if$ 998 | blank.sep 999 | } 1000 | if$ 1001 | howpublished output 1002 | format.date output 1003 | new.block 1004 | % note output 1005 | doi output 1006 | fin.entry 1007 | empty.misc.check 1008 | } 1009 | 1010 | FUNCTION {phdthesis} 1011 | { output.bibitem 1012 | format.authors "author" output.check 1013 | format.btitle "title" output.check 1014 | "Ph.D. thesis" format.thesis.type output.nonnull 1015 | school "school" output.check 1016 | address output 1017 | format.date "year" output.check 1018 | new.block 1019 | format.eprint output 1020 | new.block 1021 | % note output 1022 | doi output 1023 | fin.entry 1024 | } 1025 | 1026 | FUNCTION {proceedings} 1027 | { output.bibitem 1028 | editor empty$ 1029 | { organization output } 1030 | { format.editors output.nonnull } 1031 | if$ 1032 | format.btitle "title" output.check 1033 | format.bvolume output 1034 | format.number.series output 1035 | format.paddress output 1036 | editor empty$ 1037 | 'skip$ 1038 | { organization output } 1039 | if$ 1040 | publisher output 1041 | format.date "year" output.check 1042 | new.block 1043 | % note output 1044 | doi output 1045 | fin.entry 1046 | } 1047 | 1048 | FUNCTION {techreport} 1049 | { 1050 | output.bibitem 1051 | format.author.or.collaboration 1052 | format.title "title" output.check 1053 | blank.sep 1054 | format.tr.number output 1055 | institution "institution" output.check 1056 | address "address" output.check 1057 | blank.sep 1058 | format.date.paren "year" output.check 1059 | formatfull.doi output 1060 | fin.entry 1061 | } 1062 | 1063 | FUNCTION {unpublished} 1064 | { output.bibitem 1065 | format.author.or.collaboration 1066 | format.title.p "title" output.check 1067 | blank.sep 1068 | % note "note" output.check 1069 | format.date output 1070 | fin.entry 1071 | } 1072 | 1073 | FUNCTION {default.type} { misc } 1074 | 1075 | MACRO {jan} {"Jan."} 1076 | 1077 | MACRO {feb} {"Feb."} 1078 | 1079 | MACRO {mar} {"Mar."} 1080 | 1081 | MACRO {apr} {"Apr."} 1082 | 1083 | MACRO {may} {"May"} 1084 | 1085 | MACRO {jun} {"June"} 1086 | 1087 | MACRO {jul} {"July"} 1088 | 1089 | MACRO {aug} {"Aug."} 1090 | 1091 | MACRO {sep} {"Sept."} 1092 | 1093 | MACRO {oct} {"Oct."} 1094 | 1095 | MACRO {nov} {"Nov."} 1096 | 1097 | MACRO {dec} {"Dec."} 1098 | 1099 | MACRO {nup} {"Nucl. Phys."} 1100 | 1101 | MACRO {cmp} {"Comm. Math. Phys."} 1102 | 1103 | MACRO {prl} {"Phys. Rev. Lett."} 1104 | 1105 | MACRO {pl} {"Phys. Lett."} 1106 | 1107 | MACRO {rmp} {"Rev. Mod. Phys."} 1108 | 1109 | MACRO {ijmp} {"Int. Jour. Mod. Phys."} 1110 | 1111 | MACRO {mpl} {"Mod. Phys. Lett."} 1112 | 1113 | MACRO {pr} {"Phys. Rev."} 1114 | 1115 | READ 1116 | 1117 | STRINGS { longest.label } 1118 | 1119 | INTEGERS { number.label longest.label.width } 1120 | 1121 | FUNCTION {initialize.longest.label} 1122 | { "" 'longest.label := 1123 | #1 'number.label := 1124 | #0 'longest.label.width := 1125 | } 1126 | 1127 | FUNCTION {longest.label.pass} 1128 | { number.label int.to.str$ 'label := 1129 | number.label #1 + 'number.label := 1130 | label width$ longest.label.width > 1131 | { label 'longest.label := 1132 | label width$ 'longest.label.width := 1133 | } 1134 | 'skip$ 1135 | if$ 1136 | } 1137 | 1138 | EXECUTE {initialize.longest.label} 1139 | 1140 | ITERATE {longest.label.pass} 1141 | 1142 | FUNCTION {begin.bib} 1143 | { preamble$ empty$ 1144 | 'skip$ 1145 | { preamble$ write$ newline$ } 1146 | if$ 1147 | newline$ 1148 | "\providecommand{\href}[2]{#2}" 1149 | "\begingroup\raggedright\begin{thebibliography}{" * longest.label * 1150 | "}" * write$ newline$ } 1151 | 1152 | EXECUTE {begin.bib} 1153 | 1154 | EXECUTE {init.state.consts} 1155 | 1156 | ITERATE {call.type$} 1157 | 1158 | FUNCTION {end.bib} 1159 | { newline$ 1160 | "\end{thebibliography}\endgroup" write$ newline$ 1161 | } 1162 | 1163 | EXECUTE {end.bib} 1164 | --------------------------------------------------------------------------------