├── front_img.png ├── images ├── fig1.png ├── slam1.png ├── slam2.png ├── eg1_2up.png ├── mapping1.png ├── mapping2.png ├── pathplan1.png ├── pathplan2.png ├── projectpage.png ├── starhistory.png ├── eg1_largeprint.png ├── localization1.png ├── localization2.png ├── path_tracking1.png └── path_tracking2.png ├── PythonRoboticsPaper.pdf ├── python_robotics.bib ├── README.md ├── egbib.bib ├── bmvc_final.tex ├── bmvc2k.bst ├── bmvc2k.cls └── bmvc2k_natbib.sty /front_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/front_img.png -------------------------------------------------------------------------------- /images/fig1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/fig1.png -------------------------------------------------------------------------------- /images/slam1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/slam1.png -------------------------------------------------------------------------------- /images/slam2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/slam2.png -------------------------------------------------------------------------------- /images/eg1_2up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/eg1_2up.png -------------------------------------------------------------------------------- /images/mapping1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/mapping1.png -------------------------------------------------------------------------------- /images/mapping2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/mapping2.png -------------------------------------------------------------------------------- /images/pathplan1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/pathplan1.png -------------------------------------------------------------------------------- /images/pathplan2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/pathplan2.png -------------------------------------------------------------------------------- /images/projectpage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/projectpage.png -------------------------------------------------------------------------------- /images/starhistory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/starhistory.png -------------------------------------------------------------------------------- /PythonRoboticsPaper.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/PythonRoboticsPaper.pdf -------------------------------------------------------------------------------- /images/eg1_largeprint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/eg1_largeprint.png -------------------------------------------------------------------------------- /images/localization1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/localization1.png -------------------------------------------------------------------------------- /images/localization2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/localization2.png -------------------------------------------------------------------------------- /images/path_tracking1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/path_tracking1.png -------------------------------------------------------------------------------- /images/path_tracking2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AtsushiSakai/PythonRoboticsPaper/HEAD/images/path_tracking2.png -------------------------------------------------------------------------------- /python_robotics.bib: -------------------------------------------------------------------------------- 1 | @misc{1808.10703, 2 | Author = {Atsushi Sakai and Daniel Ingram and Joseph Dinius and Karan Chawla and Antonin Raffin and Alexis Paques}, 3 | Title = {PythonRobotics: a Python code collection of robotics algorithms}, 4 | Year = {2018}, 5 | Eprint = {arXiv:1808.10703}, 6 | } 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PythonRoboticsPaper 2 | 3 | ![1](https://github.com/AtsushiSakai/PythonRoboticsPaper/raw/master/front_img.png) 4 | 5 | 6 | This is an introduction paper of PythonRobotics: https://github.com/AtsushiSakai/PythonRobotics . 7 | 8 | # arXiv link 9 | 10 | - [\[1808\.10703\] PythonRobotics: a Python code collection of robotics algorithms](https://arxiv.org/abs/1808.10703) 11 | 12 | # Metadata for arXiv 13 | 14 | ## Title: 15 | PythonRobotics: a Python code collection of robotics algorithms 16 | 17 | ## authors: 18 | Atsushi Sakai, Daniel Ingram, Joseph Dinius, Karan Chawla, Antonin Raffin and Alexis Paques. 19 | 20 | ## abstruct 21 | This paper describes an Open Source Software (OSS) project: PythonRobotics. This is a collection of robotics algorithms implemented in the Python programming language. The focus of the project is on autonomous navigation, and the goal is for beginners in robotics to understand the basic ideas behind each algorithm. In this project, the algorithms which are practical and widely used in both academia and industry are selected. Each sample code is written in Python3 and only depends on some standard modules for readability and ease of use. Each algorithm is written in Python3 and only depends on some common modules for readability, portability and ease of use. It includes intuitive animations to understand the behavior of the simulation. 22 | 23 | ## comment 24 | 8pages, 6 figures, this is the paper repository:https://github.com/AtsushiSakai/PythonRoboticsPaper 25 | 26 | -------------------------------------------------------------------------------- /egbib.bib: -------------------------------------------------------------------------------- 1 | 2 | @misc{JupyterNotebook, 3 | title = {Project Jupyter}, 4 | note = {\small\url{http://jupyter.org/}} 5 | } 6 | 7 | @book{PRML, 8 | author = {Bishop, Christopher M.}, 9 | title = {Pattern Recognition and Machine Learning (Information Science and Statistics)}, 10 | year = {2006}, 11 | isbn = {0387310738}, 12 | publisher = {Springer-Verlag}, 13 | address = {Berlin, Heidelberg}, 14 | } 15 | 16 | @article{lqrrrt, 17 | author = {Perez, Alejandro and Platt Jr, Robert and Konidaris, George and P. Kaelbling, Leslie and Lozano-Perez, Tomas}, 18 | year = {2012}, 19 | month = {05}, 20 | pages = {2537-2542}, 21 | title = {LQR-RRT*: Optimal Sampling-Based Motion Planning with Automatically Derived Extension Heuristics}, 22 | booktitle = {Proceedings - IEEE International Conference on Robotics and Automation} 23 | } 24 | 25 | @article{pathplanning, 26 | author = {Gonzalez Bautista, David and Pérez, Joshué and Milanes, Vicente and Nashashibi, Fawzi}, 27 | year = {2015}, 28 | month = {11}, 29 | pages = {1-11}, 30 | title = {A Review of Motion Planning Techniques for Automated Vehicles}, 31 | booktitle = {IEEE Transactions on Intelligent Transportation Systems} 32 | } 33 | 34 | @article{pathtracking, 35 | Author = {Brian Paden and Michal Cap and Sze Zheng Yong and Dmitry Yershov and Emilio Frazzoli}, 36 | Title = {A Survey of Motion Planning and Control Techniques for Self-driving Urban Vehicles}, 37 | Year = {2016}, 38 | Eprint = {arXiv:1604.07446}, 39 | } 40 | 41 | @INPROCEEDINGS{Levinson2011, 42 | AUTHOR={Levinson, Jesse and Askeland, Jake and Becker, Jan and Dolson, Jennifer and Held, David and Kammel, Soeren and Kolter, J. Zico and Langer, Dirk and Pink, Oliver and Pratt, Vaughan and Sokolsky, Michael and Stanek, Ganymed and Stavens, David and Teichman, Alex and Werling, Moritz and Thrun, Sebastian}, 43 | BOOKTITLE={Intelligent Vehicles Symposium (IV), 2011 IEEE}, 44 | TITLE={Towards fully autonomous driving: systems and algorithms}, 45 | YEAR={2011} 46 | } 47 | 48 | @book{PR, 49 | author = {Thrun, Sebastian and Burgard, Wolfram and Fox, Dieter}, 50 | title = {Probabilistic Robotics (Intelligent Robotics and Autonomous Agents)}, 51 | year = {2005}, 52 | isbn = {0262201623}, 53 | publisher = {The MIT Press}, 54 | } 55 | 56 | @misc{udacity, 57 | title = {Artificial Intelligence for Robotics | Udacity }, 58 | note = {\small\url{https://www.udacity.com/course/artificial-intelligence-for-robotics--cs373}} 59 | } 60 | 61 | @misc{ros, 62 | title = {ROS (Robot Operating System)}, 63 | note = {\small\url{http://wiki.ros.org}} 64 | } 65 | 66 | @misc{starhistory, 67 | title = {Star history}, 68 | note = {\small\url{http://www.timqian.com/star-history/#AtsushiSakai/PythonRobotics}} 69 | } 70 | 71 | @misc{rosnavigation, 72 | title = {ROS navigation stack}, 73 | note = {\small\url{http://wiki.ros.org/navigation}} 74 | } 75 | 76 | @conference {rospaper, 77 | title = {ROS: an open-source Robot Operating System}, 78 | booktitle = {ICRA Workshop on Open Source Software}, 79 | year = {2009}, 80 | attachments = {http://www.willowgarage.com/sites/default/files/icraoss09-ROS.pdf}, 81 | author = {Morgan Quigley and Ken Conley and Brian P. Gerkey and Josh Faust and Tully Foote and Jeremy Leibs and Rob Wheeler and Andrew Y. Ng} 82 | } 83 | 84 | @misc{course1, 85 | title = {Introduction to Mobile Robotics - SS 2018 - Arbeitsgruppe: Autonome Intelligente Systeme}, 86 | note = {\small\url{http://ais.informatik.uni-freiburg.de/teaching/ss18/robotics/}} 87 | } 88 | 89 | @misc{course2, 90 | title = {Autonomous Mobile Robots - Spring 2018 Autonomous Systems Lab | ETH Zurich}, 91 | note = {\small\url{http://www.asl.ethz.ch/education/lectures/autonomous_mobile_robots/spring-2018.html}} 92 | } 93 | 94 | @misc{course3, 95 | title = {Programming for Robotics - ROS – Robotic Systems Lab ETH Zurich}, 96 | note = {\small\url{http://www.rsl.ethz.ch/education-students/lectures/ros.html}} 97 | } 98 | 99 | @misc{mit, 100 | title = {MIT License}, 101 | note = {\small\url{https://opensource.org/licenses/MIT}} 102 | } 103 | 104 | @misc{numpy, 105 | title = {NumPy}, 106 | note = {\small\url{http://www.numpy.org/}} 107 | } 108 | 109 | @misc{scipy, 110 | title = {SciPy}, 111 | note = {\small\url{https://www.scipy.org/}} 112 | } 113 | 114 | @misc{matplotlib, 115 | title = {Matplotlib}, 116 | note = {\small\url{https://matplotlib.org/}} 117 | } 118 | 119 | @misc{pandas, 120 | title = {pandas}, 121 | note = {\small\url{https://pandas.pydata.org/}} 122 | } 123 | 124 | @misc{patreon, 125 | title = {Atsushi Sakai is creating Open Source Software | Patreon}, 126 | note = {\small\url{https://www.patreon.com/myenigma}} 127 | } 128 | 129 | @misc{cvxpy, 130 | title = {CVXPY}, 131 | note = {\small\url{http://www.cvxpy.org/index.html}} 132 | } 133 | 134 | @misc{opencv, 135 | title = {OpenCV}, 136 | note = {\small\url{https://opencv.org/}} 137 | } 138 | 139 | @misc{python, 140 | title = {Python}, 141 | note = {\small\url{https://www.python.org}} 142 | } 143 | 144 | @misc{github, 145 | author = {Atsushi Sakai et al.}, 146 | title = {AtsushiSakai/PythonRobotics: Python sample codes for robotics algorithms.}, 147 | note = {\small\url{https://github.com/AtsushiSakai/PythonRobotics}} 148 | } 149 | 150 | 151 | @misc{auther1, 152 | author = {Daniel Ingram}, 153 | title = {GitHub account}, 154 | note = {\small\url{https://github.com/daniel-s-ingram}} 155 | } 156 | 157 | @misc{auther2, 158 | author = {Joe Dinius}, 159 | title = {GitHub account}, 160 | note = {\small\url{https://github.com/jwdinius}} 161 | } 162 | 163 | @misc{auther3, 164 | author = {Karan Chawla}, 165 | title = {GitHub account}, 166 | note = {\small\url{https://github.com/karanchawla}} 167 | } 168 | 169 | @misc{auther4, 170 | author = {Antonin RAFFIN}, 171 | title = {GitHub account}, 172 | note = {\small\url{https://github.com/araffin}} 173 | } 174 | 175 | @misc{auther5, 176 | author = {Atsushi Sakai}, 177 | title = {GitHub account}, 178 | note = {\small\url{https://github.com/AtsushiSakai}} 179 | } 180 | 181 | @misc{auther6, 182 | author = {Alexis Paques}, 183 | title = {GitHub account}, 184 | note = {\small\url{https://github.com/AlexisTM}} 185 | } 186 | 187 | -------------------------------------------------------------------------------- /bmvc_final.tex: -------------------------------------------------------------------------------- 1 | \documentclass{bmvc2k} 2 | \usepackage{url} 3 | %\usepackage{hyperref} 4 | \hypersetup{ 5 | colorlinks=true, 6 | linkcolor=blue, 7 | filecolor=magenta, 8 | pdftitle={PythonRobotics: a Python code collection of robotics algorithms}, 9 | bookmarks=true, 10 | pdfpagemode=FullScreen, 11 | } 12 | 13 | %% Enter your paper number here for the review copy 14 | % \bmvcreviewcopy{??} 15 | 16 | \title{PythonRobotics: a Python code collection of robotics algorithms} 17 | 18 | % Enter the paper's authors in order 19 | % \addauthor{Name}{email/homepage}{INSTITUTION_CODE} 20 | \addauthor{Atsushi Sakai}{https://atsushisakai.github.io/}{1} 21 | 22 | \addauthor{Daniel Ingram}{ingramds@appstate.edu}{2} 23 | 24 | \addauthor{Joseph Dinius}{jdinius@inviarobotics.com}{3} 25 | 26 | \addauthor{Karan Chawla}{karan@skyryse.com}{4} 27 | 28 | \addauthor{Antonin Raffin}{antonin.raffin@ensta-paristech.fr}{5} 29 | 30 | \addauthor{Alexis Paques}{Alexis@unmanned.life}{6} 31 | 32 | 33 | % Enter the institutions 34 | % \addinstitution{Name\\Address} 35 | \addinstitution{ 36 | University of California, Berkeley 37 | } 38 | 39 | \addinstitution{ 40 | Appalachian State University 41 | } 42 | 43 | \addinstitution{ 44 | inVia Robotics, Inc. 45 | } 46 | 47 | \addinstitution{ 48 | Skyryse Inc. 49 | } 50 | 51 | \addinstitution{ 52 | ENSTA ParisTech 53 | } 54 | 55 | \addinstitution{ 56 | Unmanned Life 57 | } 58 | 59 | 60 | \runninghead{arXiv}{:1808.10703 [cs.RO] 31 Aug 2018} 61 | 62 | % Any macro definitions you would like to include 63 | % These are not defined in the style file, because they don't begin 64 | % with \bmva, so they might conflict with the user's own macros. 65 | % The \bmvaOneDot macro adds a full stop unless there is one in the 66 | % text already. 67 | \def\eg{\emph{e.g}\bmvaOneDot} 68 | \def\Eg{\emph{E.g}\bmvaOneDot} 69 | \def\etal{\emph{et al}\bmvaOneDot} 70 | 71 | %------------------------------------------------------------------------- 72 | % Document starts here 73 | \begin{document} 74 | 75 | \maketitle 76 | 77 | \begin{abstract} 78 | This paper describes an Open Source Software (OSS) project: PythonRobotics\cite{github}. 79 | This is a collection of robotics algorithms implemented in the Python programming language. 80 | The focus of the project is on autonomous navigation, and the goal is for beginners in robotics to understand the basic ideas behind each algorithm. 81 | In this project, the algorithms which are practical and widely used in both academia and industry are selected. 82 | Each sample code is written in Python3 and only depends on some standard modules for readability and ease of use. 83 | It includes intuitive animations to understand the behavior of the simulation. 84 | 85 | \end{abstract} 86 | 87 | %------------------------------------------------------------------------- 88 | \section{Introduction} 89 | 90 | In recent years, autonomous navigation technologies have received huge attention in many fields. 91 | Such fields include, autonomous driving\cite{pathplanning}, drone flight navigation, and other transportation systems. 92 | 93 | An autonomous navigation system is a system that can move to a goal over long periods of time without any external control by an operator. 94 | The system requires a wide range of technologies: 95 | It needs to know where it is (localization), where it is safe (mapping), where and how to move (path planning), and how to control its motion (path following). 96 | The autonomous system would not work correctly if any of these technologies is missing. 97 | 98 | Educational materials are becoming more and more important for future developers to learn basic autonomous navigation technologies. 99 | Because these autonomous technologies need different technological skill sets such as: linear algebra, statistics, probability theory, optimization theory, and control theory etc. 100 | It needs a lot of time to be familiar with these technological areas. 101 | Therefore, good educational resources for learning basic autonomous navigation technologies are needed. 102 | Our project which is described in this paper aims to be one such resource. 103 | 104 | In this paper, an Open Source Software(OSS) project: PythonRobotics\cite{github} is described. 105 | This project provides a code collection of robotics algorithms, especially focusing on autonomous navigation. 106 | The principle goal is to provide beginners with the tools necessary to understand it. 107 | It is written in Python\cite{python} under MIT license\cite{mit}. 108 | It has a lot of simulation animations that shows behaviors of each algorithm. 109 | It helps for learners to understand its fundamental ideas. 110 | The readers can find the animations in the project page \url{https://atsushisakai.github.io/PythonRobotics/}. 111 | The left figure in Fig.\ref{fig:github} shows the front image of the project page. 112 | All source codes of this project are provided at \url{https://github.com/AtsushiSakai/PythonRobotics}. 113 | 114 | This project was started from Mar. 21 2016 as a self-learning project. 115 | It already has over 3000 stars on GitHub, and the right figure in Fig.\ref{fig:github} shows the history graph of the star counts using \cite{starhistory}. 116 | 117 | \begin{figure} 118 | \begin{tabular}{cc} 119 | \bmvaHangBox{\fbox{\includegraphics[width=5.0cm]{images/projectpage.png}}}& 120 | \bmvaHangBox{\fbox{\includegraphics[width=6.3cm]{images/starhistory.png}}}\\ 121 | 122 | \end{tabular} 123 | \caption{Left: PythonRobotics Project page, Right: GitHub star history graph using \cite{starhistory}} 124 | \label{fig:github} 125 | \end{figure} 126 | 127 | This paper is organized as follows: Section 2 reviews the related works. The philosophy of this project is presented in Section 3. 128 | The repository structure and some technical backgrounds and simulation results are provided in Section 4. 129 | Conclusions are drawn and some future works are presented in Section 5. 130 | Section 6 acknowledges for contributors and supporters. 131 | 132 | 133 | \section{Related works} 134 | 135 | There are already some great educational materials for learning autonomous navigation technologies. 136 | 137 | S. Thrun et al. wrote a great textbook "Probabilistic robotics" which is a bible of localization, mapping, and Simultaneous Localization And Mapping (SLAM) for mobile robotics\cite{PR}. 138 | E. Frazzoli et al. wrote a great survey paper about path planning and control techniques for autonomous driving \cite{pathtracking}. 139 | G. Bautista et al. wrote a survey paper focusing on path planning for automated vehicles\cite{pathplanning}. 140 | J. Levinson wrote an overview paper about systems and algorithms towards fully autonomous driving\cite{Levinson2011}. 141 | 142 | These papers help readers to learn state-of-the-art autonomous navigation technologies. 143 | However, it might be difficult for beginners to understand the basic ideas of the technologies and algorithms because the papers don't include implementation examples. 144 | 145 | Many universities provide great classes to learn robotics and share their lecture notes. 146 | For example, University of Freiburg provides an introduction class to mobile robotics\cite{course1}. 147 | Swiss Federal Institute of Technology in Zurich (ETH in Zurich) also provides a class about autonomous mobile robot\cite{course2} and robotics programming with Robot Operating System(ROS)\cite{course3}. 148 | 149 | Like the academic literature referenced, these lecture notes also help readers to learn autonomous navigation technologies. 150 | However, it might be also difficult for beginners of robotics to understand the basic ideas of the technologies and algorithms if the reader is not a student of the class, because these lecture notes doesn't include actual implementation examples of robotics algorithms. 151 | 152 | Robot Operating System (ROS) is a middle-ware for robotics software development\cite{ros}\cite{rospaper}. 153 | ROS initially released in 2007, and it has become the defacto standard platform in robotics software development. 154 | ROS includes basic navigation software such as the Adaptive Monte Carlo Localization (AMCL) package and the local path planner based on Dynamic Window Approach, etc\cite{rosnavigation}. 155 | Many autonomous navigation packages using ROS are also open-sourced. 156 | 157 | ROS packages can also be useful to learn autonomous navigation algorithms, however the documentation might be inconsistent and it can be difficult to find implementation details about the algorithms used. 158 | ROS packages are usually written in C++ because the focus is computational efficiency and not readability, which makes learning from the code harder. 159 | 160 | Udacity Inc, which is an online learning company founded by S. Thrun, et al, is providing great online courses for autonomous navigation and autonomous driving \cite{udacity}. 161 | These courses provide not only technical lectures, but also programming homework using Python. 162 | This leads to a great learning strategy for beginners to understand the technical background required for autonomous systems. 163 | 164 | The PythonRobotics project seeks to extend Udacity's approach by giving beginners the necessary tools to understand and make further study into the methods of autonomous navigation. 165 | The details of concepts of this OSS project will be described in the next section. 166 | 167 | \begin{figure} 168 | \begin{tabular}{cc} 169 | \bmvaHangBox{\fbox{\includegraphics[width=5.6cm]{images/localization1.png}}}& 170 | \bmvaHangBox{\fbox{\includegraphics[width=6.0cm]{images/localization2.png}}}\\ 171 | Histogram filter localization&Particle filter localization 172 | \end{tabular} 173 | \caption{Localization simulation results} 174 | \label{fig:localization} 175 | \end{figure} 176 | 177 | \begin{figure} 178 | \begin{tabular}{cc} 179 | \bmvaHangBox{\fbox{\includegraphics[width=5.8cm]{images/mapping1.png}}}& 180 | \bmvaHangBox{\fbox{\includegraphics[width=5.5cm]{images/mapping2.png}}}\\ 181 | Grid mapping with 2D ray casting&2D object clustering with k-means algorithm 182 | \end{tabular} 183 | \caption{Mapping simulation results} 184 | \label{fig:mapping} 185 | \end{figure} 186 | 187 | \section{Philosophy} 188 | In this section, the philosophy of this project is described. 189 | The PythonRobotics project is based on three main philosophies. 190 | Each philosophy will be discussed separately in this section. 191 | 192 | \subsection{Readability} 193 | The first philosophy is that the code has to be easy to read. 194 | If the code is not easy to read, it would be difficult to achieve our goal of allowing beginners to understand the algorithms. 195 | Python\cite{python} programming language is adopted in this project. 196 | Python has great libraries for matrix operation, mathematical and scientific operation, and visualization, which makes code more readable because such operations don't need to be re-implemented. 197 | Having the core Python packages allows the user to focus on the algorithms, rather than the implementations. 198 | 199 | \subsection{Practicality} 200 | The second philosophy is that implemented algorithms have to be practical and widely used in both academia and industry. 201 | We believe learning these algorithms will be useful in many applications. 202 | For example, Kalman filters and particle filter for localization, grid mapping for mapping, dynamic programming based approaches and sampling based approaches for path planning, and optimal control based approach for path tracking. 203 | These algorithms are implemented in this project. 204 | 205 | \subsection{Minimal dependencies} 206 | The last philosophy is minimal dependencies. 207 | Having few external dependencies allows us to run code samples easily and to convert the Python codes to other programming languages, such as C++ or Java for more practical application. 208 | Each sample code only depends some modules on Python3 as bellow. 209 | 210 | \begin{itemize} 211 | \item numpy\cite{numpy} for matrix and vector operations 212 | \item scipy\cite{scipy} for mathematical, scientific computing 213 | \item matplotlib\cite{matplotlib} for plotting and visualization 214 | \item pandas\cite{pandas} for data import and manipulation. 215 | \item cvxpy\cite{cvxpy} for convex optimization 216 | \end{itemize} 217 | 218 | These modules are OSS and can also be used for free. 219 | This repository software doesn't depend on any commercial software. 220 | 221 | \begin{figure} 222 | \begin{tabular}{cc} 223 | \bmvaHangBox{\fbox{\includegraphics[width=5.6cm]{images/slam1.png}}}& 224 | \bmvaHangBox{\fbox{\includegraphics[width=5.6cm]{images/slam2.png}}}\\ 225 | Extended Kalman filter based SLAM & FastSLAM 2.0 based SLAM 226 | \end{tabular} 227 | \caption{SLAM simulation results} 228 | \label{fig:slam} 229 | \end{figure} 230 | 231 | \section{Repository structure} 232 | 233 | In this section, the brief repository structure is described. 234 | 235 | There are five directories, each one corresponding to a different technical category in autonomous navigation: localization, mapping, SLAM, path planning, and path tracking. 236 | There is one sub-directory per algorithm, which has a sample code implementing and testing the algorithm. 237 | In the following subsections, some algorithms and some simulation examples in each category are described. 238 | 239 | \subsection{Localization} 240 | 241 | Localization is the ability of a robot to know its position and orientation with sensors such as Global Navigation Satellite System:GNSS etc. 242 | In localization, Bayesian filters such as Kalman filters, histogram filter, and particle filter are widely used\cite{PR}. 243 | Fig.\ref{fig:localization} shows localization simulations using histogram filter and particle filter. 244 | 245 | \subsection{Mapping} 246 | Mapping is the ability of a robot to understand its surroundings with external sensors such as LIDAR and camera. 247 | Robots have to recognize the position and shape of obstacles to avoid them. 248 | In mapping, grid mapping and machine learning algorithms are widely used\cite{PR}\cite{PRML}. 249 | Fig.\ref{fig:mapping} shows mapping simulation results using grid mapping with 2D ray casting and 2D object clustering with k-means algorithm. 250 | 251 | \subsection{SLAM} 252 | Simultaneous Localization and Mapping (SLAM) is an ability to estimate the pose of a robot and the map of the environment at the same time. 253 | The SLAM problem is hard to solve, because a map is needed for localization and localization is needed for mapping. 254 | In this way, SLAM is often said to be similar to a `chicken-and-egg' problem. 255 | Popular SLAM solution methods include the extended Kalman filter, particle filter, and Fast SLAM algorithm\cite{PR}. 256 | Fig.\ref{fig:slam} shows SLAM simulation results using extended Kalman filter and results using FastSLAM2.0\cite{PR}. 257 | 258 | \subsection{Path planning} 259 | 260 | Path planning is the ability of a robot to search feasible and efficient path to the goal. 261 | The path has to satisfy some constraints based on the robot's motion model and obstacle positions, and optimize some objective functions such as time to goal and distance to obstacle. 262 | In path planning, dynamic programming based approaches and sampling based approaches are widely used\cite{pathplanning}. 263 | Fig.\ref{fig:pathplan} shows simulation results of potential field path planning and LQR-RRT* path planning\cite{lqrrrt}. 264 | 265 | \begin{figure} 266 | \begin{tabular}{cc} 267 | \bmvaHangBox{\fbox{\includegraphics[width=6.0cm]{images/pathplan1.png}}}& 268 | \bmvaHangBox{\fbox{\includegraphics[width=6.0cm]{images/pathplan2.png}}}\\ 269 | Potential Field path planning & LQR-RRT* path planning\cite{lqrrrt} 270 | \end{tabular} 271 | \caption{Path planning simulation results} 272 | \label{fig:pathplan} 273 | \end{figure} 274 | 275 | \subsection{Path tracking} 276 | Path tracking is the ability of a robot to follow the reference path generated by a path planner while simultaneously stabilizing the robot. 277 | The path tracking controller may need to account for modeling error and other forms of uncertainty. 278 | In path tracking, feedback control techniques and optimization based control techniques are widely used\cite{pathplanning}. 279 | Fig.\ref{fig:pathtracking} shows simulations using rear wheel feedback steering control and PID speed control, and iterative linear model predictive path tracking control\cite{lqrrrt}. 280 | 281 | \begin{figure} 282 | \begin{tabular}{cc} 283 | \bmvaHangBox{\fbox{\includegraphics[width=5.8cm]{images/path_tracking1.png}}}& 284 | \bmvaHangBox{\fbox{\includegraphics[width=6.0cm]{images/path_tracking2.png}}}\\ 285 | Rear wheel feedback steering control \\ and PID speed control \cite{pathtracking}& Iterative linear model predictive control 286 | \end{tabular} 287 | \caption{Path tracking simulation results} 288 | \label{fig:pathtracking} 289 | \end{figure} 290 | 291 | %------------------------------------------------------------------------- 292 | \section{Conclusion and future work} 293 | 294 | In this paper, we introduced PythonRobotics, a code collection of robotics algorithms, with a focus on autonomous navigation. 295 | Related works of this project, some key ideas about this OSS project, and brief structure of this repository and simulation results were described. 296 | The future works for this project are as follows: 297 | 298 | \begin{itemize} 299 | \item Adding technical and mathematical documentation using Jupyter notebook\cite{JupyterNotebook}. 300 | \item Adding image processing samples for autonomous navigation using OpenCV\cite{opencv}. 301 | \item Adding simple multi-robot simulations for autonomous navigation. 302 | \item Adding a comparison to find which algorithm fits best for a specific application. 303 | \end{itemize} 304 | 305 | If readers are interested in these future projects, contributions are welcome. 306 | Readers can also support this project financially via Patreon\cite{patreon}. 307 | 308 | %------------------------------------------------------------------------ 309 | \section{Acknowledgments} 310 | 311 | We appreciate all contributors: Atsushi Sakai\cite{auther5}, Daniel Ingram\cite{auther1}, Joe Dinius\cite{auther2}, Karan Chala\cite{auther3}, Antonin RAFFIN\cite{auther4}, and Alexis Paques\cite{auther6}. 312 | We also appreciate all robotics lovers who give a star to this repository in GitHub. 313 | 314 | 315 | \bibliography{egbib} 316 | \end{document} 317 | -------------------------------------------------------------------------------- /bmvc2k.bst: -------------------------------------------------------------------------------- 1 | 2 | % --------------------------------------------------------------- 3 | % 4 | % ieee.bst,v 1.0 2002/04/16 5 | % 6 | % by Glenn Paulley (paulley@acm.org) 7 | % 8 | % Modified from latex8.bst 1995/09/15 15:13:49 ienne Exp $ 9 | % 10 | % by Paolo.Ienne@di.epfl.ch 11 | % 12 | % 13 | % --------------------------------------------------------------- 14 | % 15 | % no guarantee is given that the format corresponds perfectly to 16 | % IEEE 8.5" x 11" Proceedings, but most features should be ok. 17 | % 18 | % --------------------------------------------------------------- 19 | % 20 | % `ieee' from BibTeX standard bibliography style `abbrv' 21 | % version 0.99a for BibTeX versions 0.99a or later, LaTeX version 2.09. 22 | % Copyright (C) 1985, all rights reserved. 23 | % Copying of this file is authorized only if either 24 | % (1) you make absolutely no changes to your copy, including name, or 25 | % (2) if you do make changes, you name it something other than 26 | % btxbst.doc, plain.bst, unsrt.bst, alpha.bst, and abbrv.bst. 27 | % This restriction helps ensure that all standard styles are identical. 28 | % The file btxbst.doc has the documentation for this style. 29 | 30 | ENTRY 31 | { address 32 | author 33 | booktitle 34 | chapter 35 | edition 36 | editor 37 | howpublished 38 | institution 39 | journal 40 | key 41 | month 42 | note 43 | number 44 | organization 45 | pages 46 | publisher 47 | school 48 | series 49 | title 50 | type 51 | volume 52 | year 53 | } 54 | {} 55 | { label } 56 | 57 | INTEGERS { output.state before.all mid.sentence after.sentence after.block } 58 | 59 | FUNCTION {init.state.consts} 60 | { #0 'before.all := 61 | #1 'mid.sentence := 62 | #2 'after.sentence := 63 | #3 'after.block := 64 | } 65 | 66 | STRINGS { s t } 67 | 68 | FUNCTION {output.nonnull} 69 | { 's := 70 | output.state mid.sentence = 71 | { ", " * write$ } 72 | { output.state after.block = 73 | { add.period$ write$ 74 | newline$ 75 | "\newblock " write$ 76 | } 77 | { output.state before.all = 78 | 'write$ 79 | { add.period$ " " * write$ } 80 | if$ 81 | } 82 | if$ 83 | mid.sentence 'output.state := 84 | } 85 | if$ 86 | s 87 | } 88 | 89 | FUNCTION {output} 90 | { duplicate$ empty$ 91 | 'pop$ 92 | 'output.nonnull 93 | if$ 94 | } 95 | 96 | FUNCTION {output.check} 97 | { 't := 98 | duplicate$ empty$ 99 | { pop$ "empty " t * " in " * cite$ * warning$ } 100 | 'output.nonnull 101 | if$ 102 | } 103 | 104 | FUNCTION {output.bibitem} 105 | { newline$ 106 | "\bibitem{" write$ 107 | cite$ write$ 108 | "}" write$ 109 | newline$ 110 | "" 111 | before.all 'output.state := 112 | } 113 | 114 | FUNCTION {fin.entry} 115 | { add.period$ 116 | write$ 117 | newline$ 118 | } 119 | 120 | FUNCTION {new.block} 121 | { output.state before.all = 122 | 'skip$ 123 | { after.block 'output.state := } 124 | if$ 125 | } 126 | 127 | FUNCTION {new.sentence} 128 | { output.state after.block = 129 | 'skip$ 130 | { output.state before.all = 131 | 'skip$ 132 | { after.sentence 'output.state := } 133 | if$ 134 | } 135 | if$ 136 | } 137 | 138 | FUNCTION {not} 139 | { { #0 } 140 | { #1 } 141 | if$ 142 | } 143 | 144 | FUNCTION {and} 145 | { 'skip$ 146 | { pop$ #0 } 147 | if$ 148 | } 149 | 150 | FUNCTION {or} 151 | { { pop$ #1 } 152 | 'skip$ 153 | if$ 154 | } 155 | 156 | FUNCTION {new.block.checka} 157 | { empty$ 158 | 'skip$ 159 | 'new.block 160 | if$ 161 | } 162 | 163 | FUNCTION {new.block.checkb} 164 | { empty$ 165 | swap$ empty$ 166 | and 167 | 'skip$ 168 | 'new.block 169 | if$ 170 | } 171 | 172 | FUNCTION {new.sentence.checka} 173 | { empty$ 174 | 'skip$ 175 | 'new.sentence 176 | if$ 177 | } 178 | 179 | FUNCTION {new.sentence.checkb} 180 | { empty$ 181 | swap$ empty$ 182 | and 183 | 'skip$ 184 | 'new.sentence 185 | if$ 186 | } 187 | 188 | FUNCTION {field.or.null} 189 | { duplicate$ empty$ 190 | { pop$ "" } 191 | 'skip$ 192 | if$ 193 | } 194 | 195 | FUNCTION {emphasize} 196 | { duplicate$ empty$ 197 | { pop$ "" } 198 | { "{\em " swap$ * "}" * } 199 | if$ 200 | } 201 | 202 | INTEGERS { nameptr namesleft numnames } 203 | 204 | FUNCTION {format.names} 205 | { 's := 206 | #1 'nameptr := 207 | s num.names$ 'numnames := 208 | numnames 'namesleft := 209 | { namesleft #0 > } 210 | { s nameptr "{f.~}{vv~}{ll}{, jj}" format.name$ 't := 211 | nameptr #1 > 212 | { namesleft #1 > 213 | { ", " * t * } 214 | { numnames #2 > 215 | { "," * } 216 | 'skip$ 217 | if$ 218 | t "others" = 219 | { " et~al." * } 220 | { " and " * t * } 221 | if$ 222 | } 223 | if$ 224 | } 225 | 't 226 | if$ 227 | nameptr #1 + 'nameptr := 228 | 229 | namesleft #1 - 'namesleft := 230 | } 231 | while$ 232 | } 233 | 234 | FUNCTION {format.authors} 235 | { author empty$ 236 | { "" } 237 | { author format.names } 238 | if$ 239 | } 240 | 241 | FUNCTION {format.editors} 242 | { editor empty$ 243 | { "" } 244 | { editor format.names 245 | editor num.names$ #1 > 246 | { ", editors" * } 247 | { ", editor" * } 248 | if$ 249 | } 250 | if$ 251 | } 252 | 253 | FUNCTION {format.title} 254 | { title empty$ 255 | { "" } 256 | { title "t" change.case$ } 257 | if$ 258 | } 259 | 260 | FUNCTION {n.dashify} 261 | { 't := 262 | "" 263 | { t empty$ not } 264 | { t #1 #1 substring$ "-" = 265 | { t #1 #2 substring$ "--" = not 266 | { "--" * 267 | t #2 global.max$ substring$ 't := 268 | } 269 | { { t #1 #1 substring$ "-" = } 270 | { "-" * 271 | t #2 global.max$ substring$ 't := 272 | } 273 | while$ 274 | } 275 | if$ 276 | } 277 | { t #1 #1 substring$ * 278 | t #2 global.max$ substring$ 't := 279 | } 280 | if$ 281 | } 282 | while$ 283 | } 284 | 285 | FUNCTION {format.date} 286 | { year empty$ 287 | { month empty$ 288 | { "" } 289 | { "there's a month but no year in " cite$ * warning$ 290 | month 291 | } 292 | if$ 293 | } 294 | { month empty$ 295 | 'year 296 | { month " " * year * } 297 | if$ 298 | } 299 | if$ 300 | } 301 | 302 | FUNCTION {format.btitle} 303 | { title emphasize 304 | } 305 | 306 | FUNCTION {tie.or.space.connect} 307 | { duplicate$ text.length$ #3 < 308 | { "~" } 309 | { " " } 310 | if$ 311 | swap$ * * 312 | } 313 | 314 | FUNCTION {either.or.check} 315 | { empty$ 316 | 'pop$ 317 | { "can't use both " swap$ * " fields in " * cite$ * warning$ } 318 | if$ 319 | } 320 | 321 | FUNCTION {format.bvolume} 322 | { volume empty$ 323 | { "" } 324 | { "volume" volume tie.or.space.connect 325 | series empty$ 326 | 'skip$ 327 | { " of " * series emphasize * } 328 | if$ 329 | "volume and number" number either.or.check 330 | } 331 | if$ 332 | } 333 | 334 | FUNCTION {format.number.series} 335 | { volume empty$ 336 | { number empty$ 337 | { series field.or.null } 338 | { output.state mid.sentence = 339 | { "number" } 340 | { "Number" } 341 | if$ 342 | number tie.or.space.connect 343 | series empty$ 344 | { "there's a number but no series in " cite$ * warning$ } 345 | { " in " * series * } 346 | if$ 347 | } 348 | if$ 349 | } 350 | { "" } 351 | if$ 352 | } 353 | 354 | FUNCTION {format.edition} 355 | { edition empty$ 356 | { "" } 357 | { output.state mid.sentence = 358 | { edition "l" change.case$ " edition" * } 359 | { edition "t" change.case$ " edition" * } 360 | if$ 361 | } 362 | if$ 363 | } 364 | 365 | INTEGERS { multiresult } 366 | 367 | FUNCTION {multi.page.check} 368 | { 't := 369 | #0 'multiresult := 370 | { multiresult not 371 | t empty$ not 372 | and 373 | } 374 | { t #1 #1 substring$ 375 | duplicate$ "-" = 376 | swap$ duplicate$ "," = 377 | swap$ "+" = 378 | or or 379 | { #1 'multiresult := } 380 | { t #2 global.max$ substring$ 't := } 381 | if$ 382 | } 383 | while$ 384 | multiresult 385 | } 386 | 387 | FUNCTION {format.pages} 388 | { pages empty$ 389 | { "" } 390 | { pages multi.page.check 391 | { "pages" pages n.dashify tie.or.space.connect } 392 | { "page" pages tie.or.space.connect } 393 | if$ 394 | } 395 | if$ 396 | } 397 | 398 | FUNCTION {format.vol.num.pages} 399 | { volume field.or.null 400 | number empty$ 401 | 'skip$ 402 | { "(" number * ")" * * 403 | volume empty$ 404 | { "there's a number but no volume in " cite$ * warning$ } 405 | 'skip$ 406 | if$ 407 | } 408 | if$ 409 | pages empty$ 410 | 'skip$ 411 | { duplicate$ empty$ 412 | { pop$ format.pages } 413 | { ":" * pages n.dashify * } 414 | if$ 415 | } 416 | if$ 417 | } 418 | 419 | FUNCTION {format.chapter.pages} 420 | { chapter empty$ 421 | 'format.pages 422 | { type empty$ 423 | { "chapter" } 424 | { type "l" change.case$ } 425 | if$ 426 | chapter tie.or.space.connect 427 | pages empty$ 428 | 'skip$ 429 | { ", " * format.pages * } 430 | if$ 431 | } 432 | if$ 433 | } 434 | 435 | FUNCTION {format.in.ed.booktitle} 436 | { booktitle empty$ 437 | { "" } 438 | { editor empty$ 439 | { "In " booktitle emphasize * } 440 | { "In " format.editors * ", " * booktitle emphasize * } 441 | if$ 442 | } 443 | if$ 444 | } 445 | 446 | FUNCTION {empty.misc.check} 447 | 448 | { author empty$ title empty$ howpublished empty$ 449 | month empty$ year empty$ note empty$ 450 | and and and and and 451 | key empty$ not and 452 | { "all relevant fields are empty in " cite$ * warning$ } 453 | 'skip$ 454 | if$ 455 | } 456 | 457 | FUNCTION {format.thesis.type} 458 | { type empty$ 459 | 'skip$ 460 | { pop$ 461 | type "t" change.case$ 462 | } 463 | if$ 464 | } 465 | 466 | FUNCTION {format.tr.number} 467 | { type empty$ 468 | { "Technical Report" } 469 | 'type 470 | if$ 471 | number empty$ 472 | { "t" change.case$ } 473 | { number tie.or.space.connect } 474 | if$ 475 | } 476 | 477 | FUNCTION {format.article.crossref} 478 | { key empty$ 479 | { journal empty$ 480 | { "need key or journal for " cite$ * " to crossref " * crossref * 481 | warning$ 482 | "" 483 | } 484 | { "In {\em " journal * "\/}" * } 485 | if$ 486 | } 487 | { "In " key * } 488 | if$ 489 | " \cite{" * crossref * "}" * 490 | } 491 | 492 | FUNCTION {format.crossref.editor} 493 | { editor #1 "{vv~}{ll}" format.name$ 494 | editor num.names$ duplicate$ 495 | #2 > 496 | { pop$ " et~al." * } 497 | { #2 < 498 | 'skip$ 499 | { editor #2 "{ff }{vv }{ll}{ jj}" format.name$ "others" = 500 | { " et~al." * } 501 | { " and " * editor #2 "{vv~}{ll}" format.name$ * } 502 | if$ 503 | } 504 | if$ 505 | } 506 | if$ 507 | } 508 | 509 | FUNCTION {format.book.crossref} 510 | { volume empty$ 511 | { "empty volume in " cite$ * "'s crossref of " * crossref * warning$ 512 | "In " 513 | } 514 | { "Volume" volume tie.or.space.connect 515 | " of " * 516 | } 517 | if$ 518 | editor empty$ 519 | editor field.or.null author field.or.null = 520 | or 521 | { key empty$ 522 | { series empty$ 523 | { "need editor, key, or series for " cite$ * " to crossref " * 524 | crossref * warning$ 525 | "" * 526 | } 527 | { "{\em " * series * "\/}" * } 528 | if$ 529 | } 530 | { key * } 531 | if$ 532 | } 533 | { format.crossref.editor * } 534 | if$ 535 | " \cite{" * crossref * "}" * 536 | } 537 | 538 | FUNCTION {format.incoll.inproc.crossref} 539 | { editor empty$ 540 | editor field.or.null author field.or.null = 541 | or 542 | { key empty$ 543 | { booktitle empty$ 544 | { "need editor, key, or booktitle for " cite$ * " to crossref " * 545 | crossref * warning$ 546 | "" 547 | } 548 | { "In {\em " booktitle * "\/}" * } 549 | if$ 550 | } 551 | { "In " key * } 552 | if$ 553 | } 554 | { "In " format.crossref.editor * } 555 | if$ 556 | " \cite{" * crossref * "}" * 557 | } 558 | 559 | FUNCTION {article} 560 | { output.bibitem 561 | format.authors "author" output.check 562 | new.block 563 | format.title "title" output.check 564 | new.block 565 | crossref missing$ 566 | { journal emphasize "journal" output.check 567 | format.vol.num.pages output 568 | format.date "year" output.check 569 | } 570 | { format.article.crossref output.nonnull 571 | format.pages output 572 | } 573 | if$ 574 | new.block 575 | note output 576 | fin.entry 577 | } 578 | 579 | FUNCTION {book} 580 | { output.bibitem 581 | author empty$ 582 | { format.editors "author and editor" output.check } 583 | { format.authors output.nonnull 584 | crossref missing$ 585 | { "author and editor" editor either.or.check } 586 | 'skip$ 587 | if$ 588 | } 589 | if$ 590 | new.block 591 | format.btitle "title" output.check 592 | crossref missing$ 593 | { format.bvolume output 594 | new.block 595 | format.number.series output 596 | new.sentence 597 | publisher "publisher" output.check 598 | address output 599 | } 600 | { new.block 601 | format.book.crossref output.nonnull 602 | } 603 | if$ 604 | format.edition output 605 | format.date "year" output.check 606 | new.block 607 | note output 608 | fin.entry 609 | } 610 | 611 | FUNCTION {booklet} 612 | { output.bibitem 613 | format.authors output 614 | new.block 615 | format.title "title" output.check 616 | howpublished address new.block.checkb 617 | howpublished output 618 | address output 619 | format.date output 620 | new.block 621 | note output 622 | fin.entry 623 | } 624 | 625 | FUNCTION {inbook} 626 | { output.bibitem 627 | author empty$ 628 | { format.editors "author and editor" output.check } 629 | { format.authors output.nonnull 630 | 631 | crossref missing$ 632 | { "author and editor" editor either.or.check } 633 | 'skip$ 634 | if$ 635 | } 636 | if$ 637 | new.block 638 | format.btitle "title" output.check 639 | crossref missing$ 640 | { format.bvolume output 641 | format.chapter.pages "chapter and pages" output.check 642 | new.block 643 | format.number.series output 644 | new.sentence 645 | publisher "publisher" output.check 646 | address output 647 | } 648 | { format.chapter.pages "chapter and pages" output.check 649 | new.block 650 | format.book.crossref output.nonnull 651 | } 652 | if$ 653 | format.edition output 654 | format.date "year" output.check 655 | new.block 656 | note output 657 | fin.entry 658 | } 659 | 660 | FUNCTION {incollection} 661 | { output.bibitem 662 | format.authors "author" output.check 663 | new.block 664 | format.title "title" output.check 665 | new.block 666 | crossref missing$ 667 | { format.in.ed.booktitle "booktitle" output.check 668 | format.bvolume output 669 | format.number.series output 670 | format.chapter.pages output 671 | new.sentence 672 | publisher "publisher" output.check 673 | address output 674 | format.edition output 675 | format.date "year" output.check 676 | } 677 | { format.incoll.inproc.crossref output.nonnull 678 | format.chapter.pages output 679 | } 680 | if$ 681 | new.block 682 | note output 683 | fin.entry 684 | } 685 | 686 | FUNCTION {inproceedings} 687 | { output.bibitem 688 | format.authors "author" output.check 689 | new.block 690 | format.title "title" output.check 691 | new.block 692 | crossref missing$ 693 | { format.in.ed.booktitle "booktitle" output.check 694 | format.bvolume output 695 | format.number.series output 696 | format.pages output 697 | address empty$ 698 | { organization publisher new.sentence.checkb 699 | organization output 700 | publisher output 701 | format.date "year" output.check 702 | } 703 | { address output.nonnull 704 | format.date "year" output.check 705 | new.sentence 706 | organization output 707 | publisher output 708 | } 709 | if$ 710 | } 711 | { format.incoll.inproc.crossref output.nonnull 712 | format.pages output 713 | } 714 | if$ 715 | new.block 716 | note output 717 | fin.entry 718 | } 719 | 720 | FUNCTION {conference} { inproceedings } 721 | 722 | FUNCTION {manual} 723 | { output.bibitem 724 | author empty$ 725 | { organization empty$ 726 | 'skip$ 727 | { organization output.nonnull 728 | address output 729 | } 730 | if$ 731 | } 732 | { format.authors output.nonnull } 733 | if$ 734 | new.block 735 | format.btitle "title" output.check 736 | author empty$ 737 | { organization empty$ 738 | { address new.block.checka 739 | address output 740 | } 741 | 'skip$ 742 | if$ 743 | } 744 | { organization address new.block.checkb 745 | organization output 746 | address output 747 | } 748 | if$ 749 | format.edition output 750 | format.date output 751 | new.block 752 | note output 753 | fin.entry 754 | } 755 | 756 | FUNCTION {mastersthesis} 757 | { output.bibitem 758 | format.authors "author" output.check 759 | new.block 760 | format.title "title" output.check 761 | new.block 762 | "Master's thesis" format.thesis.type output.nonnull 763 | school "school" output.check 764 | address output 765 | format.date "year" output.check 766 | new.block 767 | note output 768 | fin.entry 769 | } 770 | 771 | FUNCTION {misc} 772 | { output.bibitem 773 | format.authors output 774 | title howpublished new.block.checkb 775 | format.title output 776 | howpublished new.block.checka 777 | howpublished output 778 | format.date output 779 | new.block 780 | note output 781 | fin.entry 782 | empty.misc.check 783 | } 784 | 785 | FUNCTION {phdthesis} 786 | { output.bibitem 787 | format.authors "author" output.check 788 | new.block 789 | format.btitle "title" output.check 790 | new.block 791 | "PhD thesis" format.thesis.type output.nonnull 792 | school "school" output.check 793 | address output 794 | format.date "year" output.check 795 | new.block 796 | note output 797 | fin.entry 798 | } 799 | 800 | FUNCTION {proceedings} 801 | { output.bibitem 802 | editor empty$ 803 | { organization output } 804 | { format.editors output.nonnull } 805 | 806 | if$ 807 | new.block 808 | format.btitle "title" output.check 809 | format.bvolume output 810 | format.number.series output 811 | address empty$ 812 | { editor empty$ 813 | { publisher new.sentence.checka } 814 | { organization publisher new.sentence.checkb 815 | organization output 816 | } 817 | if$ 818 | publisher output 819 | format.date "year" output.check 820 | } 821 | { address output.nonnull 822 | format.date "year" output.check 823 | new.sentence 824 | editor empty$ 825 | 'skip$ 826 | { organization output } 827 | if$ 828 | publisher output 829 | } 830 | if$ 831 | new.block 832 | note output 833 | fin.entry 834 | } 835 | 836 | FUNCTION {techreport} 837 | { output.bibitem 838 | format.authors "author" output.check 839 | new.block 840 | format.title "title" output.check 841 | new.block 842 | format.tr.number output.nonnull 843 | institution "institution" output.check 844 | address output 845 | format.date "year" output.check 846 | new.block 847 | note output 848 | fin.entry 849 | } 850 | 851 | FUNCTION {unpublished} 852 | { output.bibitem 853 | format.authors "author" output.check 854 | new.block 855 | format.title "title" output.check 856 | new.block 857 | note "note" output.check 858 | format.date output 859 | fin.entry 860 | } 861 | 862 | FUNCTION {default.type} { misc } 863 | 864 | MACRO {jan} {"Jan."} 865 | 866 | MACRO {feb} {"Feb."} 867 | 868 | MACRO {mar} {"Mar."} 869 | 870 | MACRO {apr} {"Apr."} 871 | 872 | MACRO {may} {"May"} 873 | 874 | MACRO {jun} {"June"} 875 | 876 | MACRO {jul} {"July"} 877 | 878 | MACRO {aug} {"Aug."} 879 | 880 | MACRO {sep} {"Sept."} 881 | 882 | MACRO {oct} {"Oct."} 883 | 884 | MACRO {nov} {"Nov."} 885 | 886 | MACRO {dec} {"Dec."} 887 | 888 | MACRO {acmcs} {"ACM Comput. Surv."} 889 | 890 | MACRO {acta} {"Acta Inf."} 891 | 892 | MACRO {cacm} {"Commun. ACM"} 893 | 894 | MACRO {ibmjrd} {"IBM J. Res. Dev."} 895 | 896 | MACRO {ibmsj} {"IBM Syst.~J."} 897 | 898 | MACRO {ieeese} {"IEEE Trans. Softw. Eng."} 899 | 900 | MACRO {ieeetc} {"IEEE Trans. Comput."} 901 | 902 | MACRO {ieeetcad} 903 | {"IEEE Trans. Comput.-Aided Design Integrated Circuits"} 904 | 905 | MACRO {ipl} {"Inf. Process. Lett."} 906 | 907 | MACRO {jacm} {"J.~ACM"} 908 | 909 | MACRO {jcss} {"J.~Comput. Syst. Sci."} 910 | 911 | MACRO {scp} {"Sci. Comput. Programming"} 912 | 913 | MACRO {sicomp} {"SIAM J. Comput."} 914 | 915 | MACRO {tocs} {"ACM Trans. Comput. Syst."} 916 | 917 | MACRO {tods} {"ACM Trans. Database Syst."} 918 | 919 | MACRO {tog} {"ACM Trans. Gr."} 920 | 921 | MACRO {toms} {"ACM Trans. Math. Softw."} 922 | 923 | MACRO {toois} {"ACM Trans. Office Inf. Syst."} 924 | 925 | MACRO {toplas} {"ACM Trans. Prog. Lang. Syst."} 926 | 927 | MACRO {tcs} {"Theoretical Comput. Sci."} 928 | 929 | READ 930 | 931 | FUNCTION {sortify} 932 | { purify$ 933 | "l" change.case$ 934 | } 935 | 936 | INTEGERS { len } 937 | 938 | FUNCTION {chop.word} 939 | { 's := 940 | 'len := 941 | s #1 len substring$ = 942 | { s len #1 + global.max$ substring$ } 943 | 's 944 | if$ 945 | } 946 | 947 | FUNCTION {sort.format.names} 948 | { 's := 949 | #1 'nameptr := 950 | "" 951 | s num.names$ 'numnames := 952 | numnames 'namesleft := 953 | { namesleft #0 > } 954 | { nameptr #1 > 955 | { " " * } 956 | 'skip$ 957 | if$ 958 | s nameptr "{vv{ } }{ll{ }}{ f{ }}{ jj{ }}" format.name$ 't := 959 | nameptr numnames = t "others" = and 960 | { "et al" * } 961 | { t sortify * } 962 | if$ 963 | nameptr #1 + 'nameptr := 964 | namesleft #1 - 'namesleft := 965 | } 966 | while$ 967 | } 968 | 969 | FUNCTION {sort.format.title} 970 | { 't := 971 | "A " #2 972 | "An " #3 973 | "The " #4 t chop.word 974 | chop.word 975 | chop.word 976 | sortify 977 | #1 global.max$ substring$ 978 | } 979 | 980 | FUNCTION {author.sort} 981 | { author empty$ 982 | { key empty$ 983 | { "to sort, need author or key in " cite$ * warning$ 984 | "" 985 | } 986 | { key sortify } 987 | if$ 988 | } 989 | { author sort.format.names } 990 | if$ 991 | } 992 | 993 | FUNCTION {author.editor.sort} 994 | { author empty$ 995 | { editor empty$ 996 | { key empty$ 997 | { "to sort, need author, editor, or key in " cite$ * warning$ 998 | "" 999 | } 1000 | { key sortify } 1001 | if$ 1002 | } 1003 | { editor sort.format.names } 1004 | if$ 1005 | } 1006 | { author sort.format.names } 1007 | if$ 1008 | } 1009 | 1010 | FUNCTION {author.organization.sort} 1011 | { author empty$ 1012 | 1013 | { organization empty$ 1014 | { key empty$ 1015 | { "to sort, need author, organization, or key in " cite$ * warning$ 1016 | "" 1017 | } 1018 | { key sortify } 1019 | if$ 1020 | } 1021 | { "The " #4 organization chop.word sortify } 1022 | if$ 1023 | } 1024 | { author sort.format.names } 1025 | if$ 1026 | } 1027 | 1028 | FUNCTION {editor.organization.sort} 1029 | { editor empty$ 1030 | { organization empty$ 1031 | { key empty$ 1032 | { "to sort, need editor, organization, or key in " cite$ * warning$ 1033 | "" 1034 | } 1035 | { key sortify } 1036 | if$ 1037 | } 1038 | { "The " #4 organization chop.word sortify } 1039 | if$ 1040 | } 1041 | { editor sort.format.names } 1042 | if$ 1043 | } 1044 | 1045 | FUNCTION {presort} 1046 | { type$ "book" = 1047 | type$ "inbook" = 1048 | or 1049 | 'author.editor.sort 1050 | { type$ "proceedings" = 1051 | 'editor.organization.sort 1052 | { type$ "manual" = 1053 | 'author.organization.sort 1054 | 'author.sort 1055 | if$ 1056 | } 1057 | if$ 1058 | } 1059 | if$ 1060 | " " 1061 | * 1062 | year field.or.null sortify 1063 | * 1064 | " " 1065 | * 1066 | title field.or.null 1067 | sort.format.title 1068 | * 1069 | #1 entry.max$ substring$ 1070 | 'sort.key$ := 1071 | } 1072 | 1073 | ITERATE {presort} 1074 | 1075 | SORT 1076 | 1077 | STRINGS { longest.label } 1078 | 1079 | INTEGERS { number.label longest.label.width } 1080 | 1081 | FUNCTION {initialize.longest.label} 1082 | { "" 'longest.label := 1083 | #1 'number.label := 1084 | #0 'longest.label.width := 1085 | } 1086 | 1087 | FUNCTION {longest.label.pass} 1088 | { number.label int.to.str$ 'label := 1089 | number.label #1 + 'number.label := 1090 | label width$ longest.label.width > 1091 | { label 'longest.label := 1092 | label width$ 'longest.label.width := 1093 | } 1094 | 'skip$ 1095 | if$ 1096 | } 1097 | 1098 | EXECUTE {initialize.longest.label} 1099 | 1100 | ITERATE {longest.label.pass} 1101 | 1102 | FUNCTION {begin.bib} 1103 | { preamble$ empty$ 1104 | 'skip$ 1105 | { preamble$ write$ newline$ } 1106 | if$ 1107 | "\begin{thebibliography}{" longest.label * "}" * 1108 | "\itemsep=-1pt" * % Compact the entries a little. 1109 | write$ newline$ 1110 | } 1111 | 1112 | EXECUTE {begin.bib} 1113 | 1114 | EXECUTE {init.state.consts} 1115 | 1116 | ITERATE {call.type$} 1117 | 1118 | FUNCTION {end.bib} 1119 | { newline$ 1120 | "\end{thebibliography}" write$ newline$ 1121 | } 1122 | 1123 | EXECUTE {end.bib} 1124 | 1125 | % end of file ieee.bst 1126 | % --------------------------------------------------------------- 1127 | 1128 | 1129 | 1130 | -------------------------------------------------------------------------------- /bmvc2k.cls: -------------------------------------------------------------------------------- 1 | % -*- compile-command: "texify --pdf --quiet bmvc_abstract.tex" -*- 2 | % The above must be the first line 3 | %------------------------------------------------------------------------------ 4 | % B M V A 2 K 9. c l s -- LaTeX2e class for BMVC, 2009 onwards 5 | %------------------------------------------------------------------------------ 6 | % REVISION HISTORY 7 | % 0.00 2007-03-29 Adrian F. Clark 8 | % Original version. 9 | % 0.01 2007-05-01 Adrian F. Clark 10 | % Increase \headsep and tweak headline following comments from Roy Davies. 11 | % 0.02 2008-10-01 Andrew Fitzgibbon 12 | % Changes for BMVC 13 | % 0.03 2009-06-19 Andrew Fitzgibbon 14 | % Added extended abstract for BMVC 15 | % 0.04 2009-06-22 Andrew Fitzgibbon 16 | % Remove ``References'' from before bibliography 17 | % 0.05 2009-06-22 Andrew Fitzgibbon 18 | % Add pdfcatalog entry to display 2-up 19 | % 0.06 2010-01-29 Alan Woodland 20 | % Bump year to 2010 21 | % 0.07 2010-07-06 Andrew Fitzgibbon 22 | % Add DOI 23 | % 0.08 2011-03-01 Stephen McKenna 24 | % Change year to 2011 25 | % 0.09 2011-04-07 Oliver Woodford 26 | % Changed to use default mathcal font 27 | % Change year to 2011 28 | % 0.10 2012-04-17 John Collomosse 29 | % Change year to 2012 30 | %------------------------------------------------------------------------------ 31 | % Copyright 2007 Adrian F. Clark . All rights reserved. 32 | %------------------------------------------------------------------------------ 33 | 34 | % Notes on reading this file: 35 | % 36 | % 1. 37 | % Private identifiers begin with bmv@, identifiers intended for use by 38 | % the authors are of two kinds: identifiers typically exported by 39 | % ``article'' classes such as \addauthor, \maketitle, or \addinstitution; 40 | % additional useful tools such as \bmvaOneDot, \bmvaHangBox, etc. 41 | % 42 | % 2. 43 | % Lines ending with apparently innocuous comments are common in TeX 44 | % source, because without them, spaces are inserted into the output. 45 | % In this file I've tried to make these ``important'' comments begin 46 | % with %^, to indicate that they have a structural purpose. We use 47 | % ^ because it's easy to type shift-56, and the ^ looks like an 48 | % ``insert'' marker. 49 | % 50 | % 3. 51 | % Debugging tips: 52 | % \tracingmacros=1 % xx check this is unset before release... 53 | %\def\bmv@pdfcompresslevel{\global\pdfcompresslevel=0} % xx this should also be unset for release 54 | \let\bmv@pdfcompresslevel=\relax % xx this should also be unset for release 55 | 56 | \newif\ifbmv@pdf 57 | \bmv@pdffalse 58 | \ifx\pdfoutput\undefined 59 | \else 60 | \ifx\pdfoutput\relax 61 | \else 62 | \ifcase\pdfoutput 63 | \else 64 | \bmv@pdftrue 65 | \fi 66 | \fi 67 | \fi 68 | 69 | 70 | %% Change the year... 71 | \def\BMVA@year{2018} 72 | 73 | %% -- CLASS FILE BOILERPLATE -- 74 | 75 | \def\fileversion{0.10} 76 | \def\filedate{2018/04/17} 77 | 78 | \newif\ifbmv@extabs 79 | \bmv@extabsfalse 80 | 81 | \NeedsTeXFormat{LaTeX2e} 82 | \ProvidesClass{bmvc2k}[\filedate\space BMVC Proceedings. v\fileversion] 83 | \DeclareOption{extendedabs}{\bmv@extabstrue} 84 | 85 | \newif\ifbmv@review 86 | \bmv@reviewfalse 87 | 88 | \def\bmv@papernumber{??} 89 | \def\bmvcreviewcopy#1{\bmv@reviewtrue\global\def\bmv@papernumber{#1}} 90 | 91 | % We're based on the article class. 92 | \ProcessOptions 93 | \ifbmv@extabs 94 | % Extended abstract: one page, 95 | \LoadClass[a4paper,twoside]{article} 96 | \renewcommand{\normalsize}{\fontsize{9}{11pt}\selectfont} 97 | \renewcommand{\small}{\fontsize{8}{9pt}\selectfont} 98 | \renewcommand{\footnotesize}{\fontsize{7}{8pt}\selectfont} 99 | \renewcommand{\scriptsize}{\fontsize{6}{8.5pt}\selectfont} 100 | \renewcommand{\tiny}{\fontsize{5.5}{6.5pt}\selectfont} 101 | \renewcommand{\large}{\fontsize{10}{12pt}\selectfont} 102 | \renewcommand{\Large}{\fontsize{11}{12.5pt}\selectfont} 103 | \renewcommand{\LARGE}{\fontsize{12}{14pt}\selectfont} 104 | \renewcommand{\huge}{\fontsize{14}{16pt}\selectfont} 105 | \renewcommand{\Huge}{\fontsize{16}{18pt}\selectfont} 106 | 107 | \newcommand{\bmv@titlesize}{\fontsize{11.5}{12.5pt}\selectfont} 108 | \twocolumn 109 | 110 | \else 111 | \LoadClass[10pt,twoside]{article} 112 | \newcommand{\bmv@titlesize}{\LARGE} 113 | \fi 114 | 115 | %% -- USEFUL PACKAGES -- 116 | \RequirePackage{color} 117 | \RequirePackage{graphicx,subfigure} 118 | \RequirePackage{xspace} 119 | \RequirePackage{eso-pic} 120 | \ifbmv@extabs 121 | % no need for hyperref in a 1-pager, but we do want urlstyle 122 | \RequirePackage{url} 123 | \else 124 | \RequirePackage[colorlinks,urlcolor=blue,citecolor=red,bookmarks=false]{hyperref} 125 | \bmv@pdfcompresslevel % reset as hyperref mucks it (of course..) 126 | \fi 127 | 128 | \DeclareUrlCommand\bmvaUrl{\urlstyle{sf}} 129 | 130 | \usepackage{amsmath} 131 | 132 | %% -- USER-VISIBLE MACROS -- 133 | 134 | %% \bmvaOneDot{e.g} 135 | % Add a period to the end of an abbreviation unless there's one 136 | % already, then \xspace. 137 | \DeclareRobustCommand\bmvaOneDot{\futurelet\@let@token\bmv@onedotaux} 138 | \def\bmv@onedotaux{\ifx\@let@token.\else.\null\fi\xspace} 139 | 140 | %% \bmvaCenterBox{Line 1\\Line 2} 141 | % Center lines in a box. This expands its argument twice, so any side 142 | % effects (e.g. incrementing a counter) will be observed twice 143 | \newbox\bmv@CenterBoxtmp 144 | \def\bmvaCenterBox#1{%^ 145 | % First measure the width 146 | \setbox\bmv@CenterBoxtmp\hbox{%^ 147 | \begin{minipage}{2\textwidth}%^ 148 | \begin{tabbing}#1\end{tabbing}%^ 149 | \end{minipage}}%^ 150 | % And then make the minipage 151 | \begin{minipage}[t]{\wd\bmv@CenterBoxtmp}%^ 152 | \begin{center}#1\end{center}%^ 153 | \end{minipage}} 154 | 155 | %% \bmvaHangBox{Text} 156 | % Proper hanging from top o f first line, not bottom. i.e. 157 | % \bmv@hang{\epsfbox{pic1.ps}}\bmv@hang{\epsfbox{pic2.ps}} 158 | % will produce 159 | % ----- ----- 160 | % | 1 | | 2 | 161 | % ----- | | 162 | % ----- 163 | % 164 | % 165 | 166 | \def\bmvaHangBox#1{%^ 167 | \begin{minipage}[t]{\textwidth}% Top-hanging minipage, will align on 168 | % bottom of first line 169 | \begin{tabbing} % tabbing so that minipage shrinks to fit 170 | ~\\[-\baselineskip] % Make first line zero-height 171 | #1 % Include user's text 172 | \end{tabbing}%^ 173 | \end{minipage}} % can't allow } onto next line, as {WIDEBOX}~x will not tie. 174 | 175 | 176 | \def\bmvaBaselineHangBox#1{%^ 177 | \begin{minipage}[t]{\textwidth}% Top-hanging minipage, will align on 178 | % bottom of first line 179 | \begin{tabbing} % tabbing so that minipage shrinks to fit 180 | #1 % Include user's text 181 | \end{tabbing} 182 | \end{minipage}} % can't allow } onto next line, as {WIDEBOX}~x will not tie. 183 | 184 | %% -- PAGE LAYOUT -- 185 | \ifbmv@extabs 186 | % Extended abstract: 187 | % A single A4 page, for printed abstract booklet. Pages are centered 188 | % horizontally, as they will be shifted left and right at print time. 189 | \RequirePackage[twoside,headsep=3mm,a4paper,inner=11mm,outer=11mm,top=3mm,includehead,bottom=8mm,heightrounded]{geometry} 190 | \columnsep=3mm 191 | \else 192 | % Proceedings: 193 | % This format is designed with on-screen reading in mind. This means that 194 | % a single-column format is required, to avoid panning between text and 195 | % figures. However, a single-column format with very long lines wastes 196 | % space and is hard to read, so this format uses a narrow page which is 197 | % readable either 1-up on a low res monitor, or 2-up on a high-resolution 198 | % display. 199 | % 200 | % For printing, setting the PDF reader to an appropriate combination of 201 | % centering, scaling, and number of pages yields a variety of useful 202 | % formats, for example: 203 | % 1-up, centred: A format very like the old BMVC or Springer LNCS (ECCV). 204 | % 1-up, scaled: A large-print format, for the visually impaired. 205 | % 2-up, scaled: A compact paper-saving format without loss of font size. 206 | % If we had kept the old margins, only the first of these is possible. 207 | 208 | % Page width is 70 characters, i.e. about 70 * 6pt, 209 | % Page height is 3/2 times the width, so two can fit side-by-side on a 4x3 monitor 210 | % 16/9 monitors can use the space to the sides for notes. 211 | % xx talk about notes 212 | \RequirePackage[twoside,headsep=3mm,papersize={410pt,620pt},inner=9mm,outer=6mm,top=3mm,includehead,bottom=5mm,heightrounded]{geometry} 213 | \ifbmv@pdf 214 | % Default view is 2-up to emphasize that this is the intended view 215 | % for on-screen reading 216 | \pdfcatalog{/PageLayout /TwoColumnLeft} 217 | \fi 218 | \fi 219 | 220 | % Set up the fonts. 221 | 222 | \RequirePackage[T1]{fontenc} 223 | \RequirePackage{mathptmx} 224 | \RequirePackage{helvet,courier} 225 | \DeclareMathAlphabet{\mathcal}{OMS}{cmsy}{m}{n} 226 | 227 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 228 | % INTERNALS 229 | 230 | % xx 231 | % pdfTeX warning (ext4): destination with the same identifier 232 | % (name{}) has been already used, duplicate ignored 233 | % 234 | 235 | % Debug flag: set to 1 to see boxes around authors/insts 236 | \let\bmvadebug=0 237 | \newif\ifbmvadebug 238 | \ifx\bmvadebug 1 239 | \bmvadebugtrue 240 | \else 241 | \bmvadebugfalse 242 | \fi 243 | 244 | % Colours for debugging 245 | \ifbmvadebug 246 | \definecolor{bmv@PaleBlue}{rgb}{.7,.7,1} 247 | \definecolor{bmv@PalePink}{rgb}{1,.7,.7} 248 | \else 249 | \definecolor{bmv@PaleBlue}{rgb}{1,1,1} 250 | \definecolor{bmv@PalePink}{rgb}{1,1,1} 251 | \fi 252 | 253 | \definecolor{bmv@sectioncolor}{rgb}{0,.1,.4} 254 | \definecolor{bmv@captioncolor}{rgb}{0,0,.4} 255 | 256 | \ifbmvadebug 257 | \message{BMVA style file debugging on} 258 | \fi 259 | 260 | %% bmv@edefappend -- expand token list and append to macro #1 261 | \newtoks\bmv@toks 262 | \def\bmv@edefappend#1#2{%^ 263 | \bmv@toks = \expandafter{#1}%^ 264 | \xdef#1{\the\bmv@toks #2}%^ 265 | } 266 | 267 | %% Useful macros for named boxes and counters 268 | 269 | % named boxes 270 | \def\bmv@newbox#1{\expandafter \newbox \csname bmv@box #1 \endcsname} 271 | \def\bmv@sbox#1#2{\expandafter \sbox \csname bmv@box #1 \endcsname {#2}} 272 | \def\bmv@savenewbox#1#2{\bmv@newbox{#1}\bmv@sbox{#1}{#2}} 273 | \def\bmv@unhbox#1{\expandafter\unhbox \csname bmv@box #1 \endcsname} 274 | \def\bmv@usebox#1{\expandafter\usebox \csname bmv@box #1 \endcsname} 275 | 276 | % named counters 277 | \def\bmv@newcount#1{\expandafter \newcount \csname bmv@cnt #1 \endcsname} 278 | \def\bmv@setcountaux#1#2{#1=#2} 279 | \def\bmv@setcount#1#2{\expandafter \bmv@setcountaux \csname bmv@cnt #1 \endcsname {#2}} 280 | \def\bmv@thecount#1{\expandafter \the \csname bmv@cnt #1 \endcsname} 281 | 282 | % struts 283 | % These are visible in debug mode 284 | \ifbmvadebug 285 | \def\bmv@strut{\rule{0.1pt}{1ex}\hspace{-0.1pt}} 286 | \else 287 | \def\bmv@strut{\rule{0pt}{1ex}} 288 | \fi 289 | 290 | %% Generic List Map 291 | \let\bmv@endstop=\relax 292 | 293 | % bmv@maplistaux -- macro \bmv@action is called with each token in list up to 294 | % next \bmv@endstop, calling macro \bmv@between between items. 295 | \def\bmv@maplistaux#1{%^ 296 | \bmv@action{#1}%^ 297 | \@ifnextchar\bmv@endstop{\@gobble}{\bmv@between\bmv@maplistaux}%^ 298 | } 299 | 300 | % executing \between between each 301 | 302 | % e.g. \bmv@maplist\fbox{-o-}{{fred}{una}{conor}} 303 | 304 | % reminder of ~ catcodes 305 | % \catcode`\~=12 \def~{\char`~} % code is ``7E 306 | 307 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 308 | % AUTHOR AND INSTITUTION HANDLING 309 | 310 | %% bmvaResetAuthors -- Empty author/institution lists for testing 311 | \def\bmvaResetAuthors{ 312 | \bmv@nauthors=0 313 | \bmv@ninsts=0 314 | \edef\bmv@auths{} 315 | \edef\bmv@insts{} 316 | \gdef\maketitle{\bmv@maketitle} 317 | } 318 | 319 | % We will explictly count the authors in bmv@nauthors 320 | % just to keep the code a bit clearer 321 | \newcount\bmv@nauthors 322 | \bmv@nauthors=0 323 | 324 | % bmv@ninsts -- Number of institutions 325 | \newcount\bmv@ninsts 326 | \bmv@ninsts=0 327 | 328 | % bmv@auths -- stores the author ids as a list of length n 329 | \edef\bmv@auths{} 330 | 331 | % bmv@insts -- stores the institutions as a list of length n 332 | \edef\bmv@insts{} 333 | 334 | % \bmv@RenderAuthorName -- Place the author's name in a box 335 | \def\bmv@RenderAuthorName#1{%^ 336 | \sffamily\normalsize #1} 337 | 338 | % \bmv@RenderAuthorNameFN -- Place the author's name in a box with a footnotemark 339 | \def\bmv@RenderAuthorNameFN#1#2{%^ 340 | \sffamily\normalsize #1$^{\mbox{\sffamily\scriptsize #2}}$} 341 | 342 | % \bmv@RenderAuthorMail -- Place the author's mail/www in a box 343 | \def\bmv@RenderAuthorMail#1{%^ 344 | \small\textcolor{bmv@sectioncolor}{\bmvaUrl{#1}}} 345 | 346 | % \addauthor{Name}{email/homepage}{INSTITUTION_CODE} 347 | \def\addauthor#1#2#3{%^ 348 | \advance\bmv@nauthors1 349 | \bmv@savenewbox{authname\the\bmv@nauthors}{\bmv@RenderAuthorName{#1}} 350 | \bmv@savenewbox{authnameFN\the\bmv@nauthors}{\bmv@RenderAuthorNameFN{#1}{#3}} 351 | \bmv@savenewbox{authmail\the\bmv@nauthors}{\bmv@RenderAuthorMail{#2}} 352 | \bmv@newcount{authinst\the\bmv@nauthors} 353 | \bmv@setcount{authinst\the\bmv@nauthors}{#3} 354 | \bmv@edefappend{\bmv@auths}{\the\bmv@nauthors} 355 | } 356 | 357 | % \bmv@RenderInst{Name\\Address} 358 | % Display an institution address 359 | \def\bmv@RenderInst#1{%^ 360 | \begin{minipage}[t]{0.48\textwidth} 361 | \sffamily 362 | \begin{raggedright} 363 | #1 364 | \end{raggedright} 365 | \end{minipage}} 366 | 367 | % \addinstitution{Name\\Address} 368 | % This creates two display boxes: one with footnotemark, 369 | % and one without. We make the boxes now so that we can 370 | % deal with them without worrying about subsequent macro 371 | % expansion. 372 | \long\def\addinstitution#1{ 373 | \advance\bmv@ninsts1 374 | \bmv@savenewbox{inst\the\bmv@ninsts}{\bmv@RenderInst{#1}} 375 | \bmv@savenewbox{instFN\the\bmv@ninsts}{%^ 376 | \sffamily$\rule{0pt}{1ex}^{\mbox{\scriptsize \the\bmv@ninsts}}\,$%^ 377 | \hbox{\bmv@RenderInst{#1}}} 378 | \bmv@edefappend{\bmv@insts}{\the\bmv@ninsts} 379 | } 380 | 381 | \ifbmv@extabs 382 | \def\bmv@RAIspace{\hspace*{4pt}} 383 | \else 384 | \def\bmv@RAIspace{} 385 | \fi 386 | 387 | % \bmv@RenderAuthInstTwoColumn 388 | % Display authors on left and institutions on right 389 | % Add footnotes if 390 | \def\bmv@RenderAuthInstTwoColumn{ 391 | % Use footnotes if more than one institution 392 | % In future, one might be cleverer if the author order and 393 | % institution order are both ascending 394 | \ifnum\bmv@ninsts>1 395 | \def\bmv@FN{FN} 396 | \else 397 | \def\bmv@FN{} 398 | \fi 399 | % A minipage for the authors, on the left 400 | \begin{minipage}[t]{0.49\textwidth} 401 | \def\bmv@action##1{%^ 402 | \bmv@unhbox{authname\bmv@FN##1}\\ 403 | \bmv@unhbox{authmail##1}} 404 | \def\bmv@between{\\[3pt]} 405 | \expandafter\bmv@maplistaux\bmv@auths\bmv@endstop 406 | \end{minipage} 407 | \bmv@RAIspace\hfill%^ 408 | % A minipage for the institutions, on the right 409 | \begin{minipage}[t]{0.48\textwidth} 410 | \def\bmv@action##1{%^ 411 | \bmv@unhbox{inst\bmv@FN##1}} 412 | \def\bmv@between{\\[4pt]} 413 | \expandafter\bmv@maplistaux\bmv@insts\bmv@endstop 414 | \end{minipage} 415 | } 416 | 417 | % \bmv@RenderAuthInstTable 418 | % Display authors on left and institutions on right, 419 | % but look up the institution for each author 420 | \def\bmv@RenderAuthInstTable{ 421 | \def\bmv@FN{} 422 | \let\bmv@action=\bmv@RAITableAction 423 | \def\bmv@between{\\[4pt]} 424 | \expandafter\bmv@maplistaux\bmv@auths\bmv@endstop 425 | } 426 | 427 | \def\bmv@RAITableAction#1{ 428 | \begin{minipage}[t]{0.49\textwidth} 429 | \bmv@unhbox{authname#1}\\ 430 | \bmv@unhbox{authmail#1} 431 | \end{minipage} 432 | \bmv@RAIspace~ 433 | \begin{minipage}[t]{0.48\textwidth} 434 | \bmv@usebox{inst\bmv@thecount{authinst#1}} 435 | \end{minipage} 436 | } 437 | 438 | %% bmv@RenderAuthorsAndInstitutions 439 | % Make author list, but not in ``review'' mode... 440 | \def\bmv@RenderAuthorsAndInstitutions{ 441 | \ifbmv@review 442 | \begin{center} 443 | \sffamily\normalsize BMVC \BMVA@year\ Submission \# \bmv@papernumber 444 | \end{center} 445 | \else 446 | % Send them to the page 447 | \ifnum\bmv@ninsts=1 448 | \bmv@RenderAuthInstTwoColumn 449 | \else 450 | % more than one institution. 451 | % if equal to number of authors, then there's one each, so 452 | % render one each.. 453 | \ifnum\bmv@ninsts=\bmv@nauthors 454 | \bmv@RenderAuthInstTable 455 | \else 456 | \bmv@RenderAuthInstTwoColumn 457 | \fi 458 | \fi 459 | \fi 460 | } 461 | 462 | 463 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 464 | 465 | % Email addresses are enclosed in angle brackets. (The \<...> macro 466 | % can also be used independently, though it works only outside maths mode.) 467 | 468 | %\def\<#1>{$\langle$#1$\rangle$} 469 | %\def\email#1{\<\texttt{#1}>} 470 | 471 | % A macro for producing the title, which also puts the copyright notice 472 | % in an unnumbered footnote on the first page. The \maketitle macro 473 | % was derived from a (probably very old) version of the article class 474 | % and is probably not as elegant as it could be. 475 | 476 | \newcounter{BMVA@shortyear} 477 | \setcounter{BMVA@shortyear}\BMVA@year 478 | \addtocounter{BMVA@shortyear}{-1986} 479 | 480 | \def\bmv@maketitle{\newpage\global\@topnum\z@%^ 481 | \bmv@strut\\[-4pt]% vglue produces inconsistent results 482 | \begin{raggedright}%^ 483 | {\bmv@titlesize\bfseries\sffamily\textcolor{bmv@sectioncolor} \@title\par}%^ 484 | \vskip 1.5em%^ 485 | {\bmv@RenderAuthorsAndInstitutions}%^ 486 | \end{raggedright}%^ 487 | \vskip\baselineskip 488 | \hrule 489 | \vskip\baselineskip 490 | \def\BMVA@blfootnote{\xdef\@thefnmark{}\@footnotetext}%^ 491 | \BMVA@blfootnote{\null\hspace{-1.9em}\copyright{} \BMVA@year. 492 | The copyright of this document resides with its authors. 493 | %\hfill doi:10.5244/C.\arabic{BMVA@shortyear}.NNN % DOI will be inserted directly on the PDF 494 | \\ 495 | It may be distributed unchanged freely in print or electronic forms.}%^ 496 | \setcounter{footnote}{0}%^ 497 | \thispagestyle{bmv@c}\pagestyle{bmv@c}%^ 498 | \gdef\maketitle{\message{Cannot use maketitle twice}}%^ 499 | } 500 | \ifbmv@extabs 501 | \def\maketitle{\twocolumn[\bmv@maketitle]} 502 | \else 503 | \let\maketitle=\bmv@maketitle 504 | \fi 505 | 506 | % The running head contains the author(s) and paper title, perhaps 507 | % abbreviated so that the overall length of the headline is not too long. 508 | 509 | \def\runninghead#1#2{\gdef\BMVA@author{\MakeUppercase{#1}}%^ 510 | \gdef\BMVA@title{\MakeUppercase{#2}}} 511 | 512 | % The et al macro allows for a lowercase ``et al.'' in the running head. 513 | % It is called using \protect\etal 514 | \def\bmv@EtAl{\em et al.} 515 | \def\bmvaEtAl{\protect\bmv@EtAl} 516 | 517 | 518 | % A macro that saves out the number of the last page of the document 519 | % in the macro \BMVA@LastPage, for use in the headline. 520 | 521 | \AtEndDocument{\immediate\write\@auxout{\gdef\string\BMVA@LastPage{\thepage}}} 522 | \def\BMVA@LastPage{??} 523 | 524 | % The headline itself, which comprises two lines of text: 525 | % -- The first contains the paper's authors and title and is a 526 | % hypertext reference to the master version on the Annals website. 527 | % -- The second gives citation information, with the journal name 528 | % being a hypertext reference to the Annals website. 529 | % This has to be set explicitly by the author (or editor) via the \papernumber 530 | % macro (see above). 531 | 532 | \def\BMVA@authorOrAnon{\ifbmv@review{AUTHOR(S)}\else\BMVA@author\fi} 533 | 534 | \ifbmv@extabs 535 | \newcommand*{\ps@bmv@c}{%^ 536 | \renewcommand*{\@oddhead}{}%^ 537 | \renewcommand*{\@evenhead}{}%^ 538 | \renewcommand*{\@oddfoot}{}%^ 539 | \renewcommand*{\@evenfoot}{}%^ 540 | } 541 | \else 542 | \newcommand*{\ps@bmv@c}{%^ 543 | \renewcommand*{\@oddhead}{\begin{minipage}{\textwidth}\small 544 | \begin{tabular*}{\textwidth}{@{}l@{\extracolsep{\fill}}r@{}} 545 | \textsl{\BMVA@authorOrAnon: \BMVA@title} 546 | & \bfseries\thepage 547 | \end{tabular*}\par\smallskip\hrule 548 | \end{minipage}} 549 | \renewcommand*{\@evenhead}{%^ 550 | \begin{minipage}{\textwidth}\small 551 | \begin{tabular*}{\textwidth}{@{}l@{\extracolsep{\fill}}r@{}} 552 | \bfseries\thepage &\textsl{\BMVA@authorOrAnon: \BMVA@title} 553 | \end{tabular*}\par\smallskip\hrule 554 | \end{minipage}} 555 | \renewcommand*{\@oddfoot}{}%^ 556 | \renewcommand*{\@evenfoot}{}%^ 557 | } 558 | \fi 559 | 560 | % Ensure section titles are set ragged-right. These definitions are 561 | % adapted from those in article.cls v1.4f of 2004/02/16. 562 | 563 | \renewcommand\section{\@startsection {section}{1}{\z@}%^ 564 | {-3.5ex \@plus -1ex \@minus -.2ex}%^ 565 | {2.3ex \@plus.2ex}%^ 566 | {\normalfont\Large\bfseries\flushleft\textcolor{bmv@sectioncolor}}} 567 | \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%^ 568 | {-3.25ex\@plus -1ex \@minus -.2ex}%^ 569 | {1.5ex \@plus .2ex}%^ 570 | {\normalfont\large\bfseries\flushleft\textcolor{bmv@sectioncolor}}} 571 | \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%^ 572 | {-3.25ex\@plus -1ex \@minus -.2ex}%^ 573 | {1.5ex \@plus .2ex}%^ 574 | {\normalfont\normalsize\bfseries\flushleft\textcolor{bmv@sectioncolor}}} 575 | 576 | % Footnote rules go right across the page (definition adapted from 577 | % article.cls v1.4f of 2004/02/16). 578 | 579 | \renewcommand\footnoterule{\kern-3\p@ 580 | \hrule\@width\columnwidth 581 | \kern2.6\p@} 582 | 583 | % Make the space above figure captions more compact 584 | \setlength\abovecaptionskip{-5pt} 585 | 586 | % Set captions in blue 587 | \let\bmv@makecaption=\@makecaption 588 | \def\@makecaption#1#2{\textcolor{bmv@captioncolor}{\bmv@makecaption{#1}{#2}}} 589 | 590 | 591 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 592 | % RULER 593 | %% --------- Page background marks: Ruler and confidentiality 594 | 595 | % ----- define vruler 596 | \newbox\bmv@rulerbox 597 | \newcount\bmv@rulercount 598 | \newdimen\bmv@ruleroffset 599 | \newdimen\bmv@rulerlineheight 600 | \newdimen\bmv@rulerboxheight 601 | \newbox\bmv@rulertmpbox 602 | \newcount\bmv@rulerrefno 603 | \newcount\bmv@rulertot 604 | 605 | \font\bmv@ruler@tenhv = phvb at 8pt % *** If this fails, see the lines after this one in bmvc2k.sty *** 606 | % If the above lines give an error message, try to comment them and 607 | % uncomment these: 608 | %\font\bmv@ruler@tenhv = phvb7t at 8pt 609 | 610 | %% \fillzeros[] 611 | % NUMBER with left flushed zeros 612 | \newcount\bmv@rulertmpc@ 613 | \newcount\bmv@rulertmpc 614 | \def\bmv@fillzeros[#1]#2{ 615 | \bmv@rulertmpc@=#2\relax\ifnum\bmv@rulertmpc@<0\bmv@rulertmpc@=-\bmv@rulertmpc@\fi 616 | \bmv@rulertmpc=1 %^ 617 | \loop\ifnum\bmv@rulertmpc@<10 \else \divide\bmv@rulertmpc@ by 10 \advance\bmv@rulertmpc by 1 \fi 618 | \ifnum\bmv@rulertmpc@=10\relax\bmv@rulertmpc@=11\relax\fi \ifnum\bmv@rulertmpc@>10 \repeat 619 | \ifnum#2<0\advance\bmv@rulertmpc1\relax-\fi 620 | \loop\ifnum\bmv@rulertmpc<#1\relax0\advance\bmv@rulertmpc1\relax\fi \ifnum\bmv@rulertmpc<#1 \repeat 621 | \bmv@rulertmpc@=#2\relax\ifnum\bmv@rulertmpc@<0\bmv@rulertmpc@=-\bmv@rulertmpc@\fi 622 | \relax\the\bmv@rulertmpc@} 623 | 624 | % \makevruler[][][][][] 625 | \def\makevruler[#1][#2][#3][#4][#5]{\begingroup\offinterlineskip 626 | \textheight=#5\vbadness=10000\vfuzz=120ex\overfullrule=0pt%^ 627 | \global\setbox\bmv@rulerbox=\vbox to \textheight{%^ 628 | {\parskip=0pt\hfuzz=150em\bmv@rulerboxheight=\textheight 629 | \bmv@rulerlineheight=#1\global\bmv@rulercount=#2%^ 630 | \bmv@rulertot\bmv@rulerboxheight\divide\bmv@rulertot\bmv@rulerlineheight\advance\bmv@rulertot2%^ 631 | \bmv@rulerrefno1\vskip-\bmv@rulerlineheight\vskip1ex%^ 632 | \loop\setbox\bmv@rulertmpbox=\hbox to0cm{{\bmv@ruler@tenhv\hfil\bmv@fillzeros[#4]\bmv@rulercount}}%^ 633 | \ht\bmv@rulertmpbox\bmv@rulerlineheight\dp\bmv@rulertmpbox0pt\box\bmv@rulertmpbox\break 634 | \advance\bmv@rulerrefno1\global\advance\bmv@rulercount#3\relax 635 | \ifnum\bmv@rulerrefno<\bmv@rulertot\repeat}}\endgroup}%^ 636 | % ----- end of vruler 637 | 638 | % \makevruler[][][][][] 639 | \def\bmv@ruler#1{\makevruler[12.5pt][#1][1][3][0.993\textheight]\usebox{\bmv@rulerbox}} 640 | \AddToShipoutPicture{%^ 641 | %\AtTextLowerLeft{%^ 642 | % \color[gray]{.15}\framebox(\LenToUnit{\textwidth},\LenToUnit{\textheight}){} 643 | %} 644 | \ifbmv@review 645 | \bmv@ruleroffset=\textheight 646 | \advance\bmv@ruleroffset by 1pt 647 | \color[rgb]{.7,.7,1} 648 | \AtTextUpperLeft{%^ 649 | \ifodd\c@page 650 | \put(\LenToUnit{-21pt},\LenToUnit{-\bmv@ruleroffset}){%left ruler 651 | \bmv@ruler{\bmv@rulercount}} 652 | \else 653 | \put(\LenToUnit{\textwidth\kern3pt},\LenToUnit{-\bmv@ruleroffset}){%right ruler 654 | \bmv@ruler{\bmv@rulercount}} 655 | \fi 656 | } 657 | \fi 658 | } 659 | 660 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 661 | % Bibliography stuff. 662 | 663 | % Natbib gives sorting of numeric references. 664 | % We don't use the compress option, because we 665 | % want each reference to have its own popup 666 | \usepackage[sort,numbers]{bmvc2k_natbib} 667 | 668 | % Compressed bibliography for the 1-pager 669 | \ifbmv@extabs 670 | \def\bibsection{} % No ``References'' header 671 | \bibsep=2pt 672 | \fi 673 | 674 | \newif\ifbmv@annot 675 | \bmv@annotfalse 676 | \def\bmv@annotation{} 677 | \definecolor{bmv@CiteBoxColor}{rgb}{1,1,1} 678 | 679 | \def\Hy@StartlinkName#1#2{%^ #1 is object props -- ignored for us 680 | \ifbmv@annot%^ 681 | \setbox\@tempboxa=\hbox{\textcolor{bmv@CiteBoxColor}{{BMVCtest~}}}%^ 682 | \immediate\pdfxform\@tempboxa%^ 683 | \edef\bmv@theblank{\the\pdflastxform}%^ 684 | \pdfannot { % This annot will be given a bounding box corresponding to 685 | % its surrounding hbox 686 | % We use a ``square'' Annot because we want it to scale with the text 687 | /A << /D << /S /GoTo /D (#2) >> >> ^^J 688 | /Subtype /Square ^^J 689 | /Subj (Citation) ^^J 690 | /CA 1.0 691 | /T (Citation) ^^J 692 | /Contents (\bmv@annotation) ^^J 693 | /XAP << % Appearance 694 | /N \bmv@theblank\space 0 R 695 | /D \bmv@theblank\space 0 R 696 | /R \bmv@theblank\space 0 R 697 | >> ^^J 698 | /Open false 699 | }%^ 700 | \else 701 | \pdfstartlink attr{#1 /PTEX.FullName (BMVCtest) }goto name{#2}\relax 702 | \fi} 703 | 704 | % hook into the natbib/hyperref citation hooks. 705 | %\ifbmv@extabs\else 706 | %\ifbmv@pdf 707 | %\newbox\bmv@citebox 708 | %\let\hyper@natlinkend=\relax 709 | %\def\hyper@natlinkstart#1{%^ 710 | % \Hy@backout{#1}%^ 711 | % \xdef\bmv@annotation{\NAT@all@names\space\NAT@date}%^ 712 | % \message{BMVC cite \bmv@annotation}%^ 713 | %\fbox{\bmv@annotation}%^ 714 | % \bmv@annottrue%^ 715 | % \hyper@linkstart{cite}{cite.#1}%^ 716 | % \bmv@annotfalse%^ 717 | % \def\hyper@nat@current{#1}%^ 718 | %} 719 | 720 | %\def\hyper@natlinkend{%^ 721 | % \Hy@endcolorlink %^ 722 | %\pdfendlink 723 | } 724 | \fi 725 | \fi 726 | 727 | \bibliographystyle{plainnat} 728 | 729 | %------------------------------------------------------------------------------ 730 | % End of bmvc2k.cls 731 | %------------------------------------------------------------------------------ 732 | \message{Finished loading BMVC2K} 733 | -------------------------------------------------------------------------------- /bmvc2k_natbib.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `natbib.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% natbib.dtx (with options: `package,all') 8 | %% ============================================= 9 | %% IMPORTANT NOTICE: 10 | %% 11 | %% This program can be redistributed and/or modified under the terms 12 | %% of the LaTeX Project Public License Distributed from CTAN 13 | %% archives in directory macros/latex/base/lppl.txt; either 14 | %% version 1 of the License, or any later version. 15 | %% 16 | %% This is a generated file. 17 | %% It may not be distributed without the original source file natbib.dtx. 18 | %% 19 | %% Full documentation can be obtained by LaTeXing that original file. 20 | %% Only a few abbreviated comments remain here to describe the usage. 21 | %% ============================================= 22 | %% Copyright 1993-2007 Patrick W Daly 23 | %% Max-Planck-Institut f\"ur Sonnensystemforschung 24 | %% Max-Planck-Str. 2 25 | %% D-37191 Katlenburg-Lindau 26 | %% Germany 27 | %% E-mail: daly@mps.mpg.de 28 | \NeedsTeXFormat{LaTeX2e}[1995/06/01] 29 | \ProvidesPackage{bmvc2k_natbib} 30 | [2007/10/30 8.1 (PWD)] 31 | % This package reimplements the LaTeX \cite command to be used for various 32 | % citation styles, both author-year and numerical. It accepts BibTeX 33 | % output intended for many other packages, and therefore acts as a 34 | % general, all-purpose citation-style interface. 35 | % 36 | % With standard numerical .bst files, only numerical citations are 37 | % possible. With an author-year .bst file, both numerical and 38 | % author-year citations are possible. 39 | % 40 | % If author-year citations are selected, \bibitem must have one of the 41 | % following forms: 42 | % \bibitem[Jones et al.(1990)]{key}... 43 | % \bibitem[Jones et al.(1990)Jones, Baker, and Williams]{key}... 44 | % \bibitem[Jones et al., 1990]{key}... 45 | % \bibitem[\protect\citeauthoryear{Jones, Baker, and Williams}{Jones 46 | % et al.}{1990}]{key}... 47 | % \bibitem[\protect\citeauthoryear{Jones et al.}{1990}]{key}... 48 | % \bibitem[\protect\astroncite{Jones et al.}{1990}]{key}... 49 | % \bibitem[\protect\citename{Jones et al., }1990]{key}... 50 | % \harvarditem[Jones et al.]{Jones, Baker, and Williams}{1990}{key}... 51 | % 52 | % This is either to be made up manually, or to be generated by an 53 | % appropriate .bst file with BibTeX. 54 | % Author-year mode || Numerical mode 55 | % Then, \citet{key} ==>> Jones et al. (1990) || Jones et al. [21] 56 | % \citep{key} ==>> (Jones et al., 1990) || [21] 57 | % Multiple citations as normal: 58 | % \citep{key1,key2} ==>> (Jones et al., 1990; Smith, 1989) || [21,24] 59 | % or (Jones et al., 1990, 1991) || [21,24] 60 | % or (Jones et al., 1990a,b) || [21,24] 61 | % \cite{key} is the equivalent of \citet{key} in author-year mode 62 | % and of \citep{key} in numerical mode 63 | % Full author lists may be forced with \citet* or \citep*, e.g. 64 | % \citep*{key} ==>> (Jones, Baker, and Williams, 1990) 65 | % Optional notes as: 66 | % \citep[chap. 2]{key} ==>> (Jones et al., 1990, chap. 2) 67 | % \citep[e.g.,][]{key} ==>> (e.g., Jones et al., 1990) 68 | % \citep[see][pg. 34]{key}==>> (see Jones et al., 1990, pg. 34) 69 | % (Note: in standard LaTeX, only one note is allowed, after the ref. 70 | % Here, one note is like the standard, two make pre- and post-notes.) 71 | % \citealt{key} ==>> Jones et al. 1990 72 | % \citealt*{key} ==>> Jones, Baker, and Williams 1990 73 | % \citealp{key} ==>> Jones et al., 1990 74 | % \citealp*{key} ==>> Jones, Baker, and Williams, 1990 75 | % Additional citation possibilities (both author-year and numerical modes) 76 | % \citeauthor{key} ==>> Jones et al. 77 | % \citeauthor*{key} ==>> Jones, Baker, and Williams 78 | % \citeyear{key} ==>> 1990 79 | % \citeyearpar{key} ==>> (1990) 80 | % \citetext{priv. comm.} ==>> (priv. comm.) 81 | % \citenum{key} ==>> 11 [non-superscripted] 82 | % Note: full author lists depends on whether the bib style supports them; 83 | % if not, the abbreviated list is printed even when full requested. 84 | % 85 | % For names like della Robbia at the start of a sentence, use 86 | % \Citet{dRob98} ==>> Della Robbia (1998) 87 | % \Citep{dRob98} ==>> (Della Robbia, 1998) 88 | % \Citeauthor{dRob98} ==>> Della Robbia 89 | % 90 | % 91 | % Citation aliasing is achieved with 92 | % \defcitealias{key}{text} 93 | % \citetalias{key} ==>> text 94 | % \citepalias{key} ==>> (text) 95 | % 96 | % Defining the citation mode and punctual (citation style) 97 | % \setcitestyle{} 99 | % Example: \setcitestyle{square,semicolon} 100 | % Alternatively: 101 | % Use \bibpunct with 6 mandatory arguments: 102 | % 1. opening bracket for citation 103 | % 2. closing bracket 104 | % 3. citation separator (for multiple citations in one \cite) 105 | % 4. the letter n for numerical styles, s for superscripts 106 | % else anything for author-year 107 | % 5. punctuation between authors and date 108 | % 6. punctuation between years (or numbers) when common authors missing 109 | % One optional argument is the character coming before post-notes. It 110 | % appears in square braces before all other arguments. May be left off. 111 | % Example (and default) \bibpunct[, ]{(}{)}{;}{a}{,}{,} 112 | % 113 | % To make this automatic for a given bib style, named newbib, say, make 114 | % a local configuration file, natbib.cfg, with the definition 115 | % \newcommand{\bibstyle@newbib}{\bibpunct...} 116 | % Then the \bibliographystyle{newbib} will cause \bibstyle@newbib to 117 | % be called on THE NEXT LATEX RUN (via the aux file). 118 | % 119 | % Such preprogrammed definitions may be invoked anywhere in the text 120 | % by calling \citestyle{newbib}. This is only useful if the style specified 121 | % differs from that in \bibliographystyle. 122 | % 123 | % With \citeindextrue and \citeindexfalse, one can control whether the 124 | % \cite commands make an automatic entry of the citation in the .idx 125 | % indexing file. For this, \makeindex must also be given in the preamble. 126 | % 127 | % Package Options: (for selecting punctuation) 128 | % round - round parentheses are used (default) 129 | % square - square brackets are used [option] 130 | % curly - curly braces are used {option} 131 | % angle - angle brackets are used