29,99 €
LaTeX is a high-quality typesetting software and is very popular, especially among scientists. Its programming language gives you full control over every aspect of your documents, no matter how complex they are. LaTeX's huge amount of customizable templates and supporting packages cover most aspects of writing with embedded typographic expertise.
With this book you will learn to leverage the capabilities of the latest document classes and explore the functionalities of the newest packages. The book starts with examples of common document types. It provides you with samples for tuning text design, using fonts, embedding images, and creating legible tables. Common document parts such as the bibliography, glossary, and index are covered, with LaTeX's modern approach.You will learn how to create excellent graphics directly within LaTeX, including diagrams and plots quickly and easily.
Finally, you will discover how to use the new engines XeTeX and LuaTeX for advanced programming and calculating with LaTeX. The example-driven approach of this book is sure to increase your productivity.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 405
Veröffentlichungsjahr: 2015
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2015
Production reference: 1231015
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-514-8
www.packtpub.com
Author
Stefan Kottwitz
Reviewers
Brandon Amos
Jan Baier
Commissioning Editor
Usha Iyer
Acquisition Editor
Sonali Vernekar
Content Development Editor
Athira Laji
Technical Editor
Abhishek R. Kotian
Copy Editor
Brandt D'mello
Project Coordinator
Harshal Ved
Proofreader
Safis Editing
Indexer
Monica Ajmera Mehta
Production Coordinator
Conidon Miranda
Cover Work
Conidon Miranda
Stefan Kottwitz studied mathematics in Jena and Hamburg. He worked as an IT administrator and communication officer onboard cruise ships for AIDA Cruises and for Hapag-Lloyd Cruises. Following 10 years of sailing around the world, he worked for the next few years specializing in network infrastructure and IT security. In 2014, he became a consultant for Lufthansa Systems. Currently, he works for Lufthansa Industry Solutions and designs and implements networks for new cruise ships.
In between contracts, he worked as a freelance programmer and typography designer. For many years, he has been providing LaTeX support on online forums. He maintains the web forums LaTeX-Community.org and goLaTeX.de, the TeX gallery site TeXample.net, the Q&A sites TeXwelt.de and TeXnique.fr, the TeXdoc.net service and the server for the UK TeX FAQ. He is a moderator of the TeX Stack Exchange site and on matheplanet.com.
He publishes ideas and news from the TeX world on his personal blog at TeXblog.net.
Before this book, he authored LaTeX Beginner's Guide, by Packt Publishing in 2011.
Brandon Amos is a PhD student at Carnegie Mellon University with research interests in machine learning and computer vision. He is a Linux and LaTeX enthusiast and actively releases research and hobby projects on the open source community at http://github.com/bamos.
Jan Baier is a young system engineer and administrator from the Czech Republic. He holds a master's degree in computer science from the Czech Technical University, Prague. In his spare time, he teaches Unix/Linux basics. He is a cofounder of amagical.net, a company that focuses on delivering information systems to small and medium companies. He tries to boldly go where no one has gone before, and he believes in the true power of open source.
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at <[email protected]> for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
LaTeX is a high-quality typesetting software and is very popular, especially among scientists. Its programming language gives you full control over every aspect of your documents, no matter how complex they are. LaTeX's large number of customizable templates and supporting packages cover most aspects of writing with embedded typographic expertise.
With this book, you will learn to leverage the capabilities of the latest document classes and explore the functionalities of the newest packages.
This book starts with examples of common document types. It provides samples for tuning text design, using fonts, embedding images, and creating legible tables. Common parts of the document such as the bibliography, glossary, and index are covered with LaTeX's modern approach.
You will learn how to create excellent graphics directly within LaTeX; this includes creating diagrams and plots quickly and easily.
Finally, the book shows the application of LaTeX in various scientific fields.
The example-driven approach of this book is sure to increase your productivity.
Chapter 1, The Variety of Document Types, introduces you to the different types of documents and covers how LaTeX can be used for for any document type such as a thesis, a book, a CV, a presentation, a flyer, and a large poster.
Chapter 2, Tuning the Text, focuses on customizing text details in the documents. We will start with some very useful basics, covering some helpful things. We will end the chapter with recipes that show off what LaTeX can do beyond rectangular paragraphs.
Chapter 3, Adjusting Fonts, helps you to choose fonts globally, and demonstrates how to adjust them within the document.
Chapter 4, Working with Images, contains some recipes for including, positioning, and manipulating images within LaTeX. After discussing the quality aspects, you will get to know about the concept of floating figures for automated positioning to give well-balanced text heights on pages.
Chapter 5, Beautiful Designs, helps you in adding background images, creating beautiful ornaments, adding pretty headings, producing a calendar, and inserting symbols for computer keys and menu items.
Chapter 6, Designing Tables, helps you to create good-looking tables. Specifically, it covers creating a legible table, aligning numeric data, adding colors, shape, shading, and transparency merging and splitting cells, and reading in table data from external files.
Chapter 7, Contents, Indexes, and Bibliographies, provides recipes for quickly starting and customizing the table of contents, lists of of figures and tables, bibliographies, glossaries, and indexes.
Chapter 8, Getting the Most out of the PDF, explores the capabilities of PDF, such as metadata, PDF comments, and fillable forms. You will see how to combine PDF files, how to crop margins, and how to optimize the output for e-books.
Chapter 9, Creating Graphics, contains recipes to create impressive graphics. We will start off using modern packages for various purposes to create complete and useable graphics, such as various kinds of diagrams and charts.
Chapter 10, Advanced Mathematics, explores one of the classic strong points of LaTeX—its excellent quality in typesetting formulas. That's why LaTeX is the most used writing software in mathematics. When it comes to formulas, other sciences benefit from it as well.
Chapter 11, Science and Technology, deals with other sciences such as chemistry, physics, computer science, and technologies such as electronics. This chapter will be an overview, showing how LaTeX can be used in various fields using specific recipes.
Chapter 12, Getting Support on the Internet, starts with a guide to the most useful Internet resources for LaTeX. This chapter will show you how to get help from the TeX online communities.
The software that you need here is TeX Live, version 2015 or later, or MiKTeX, version 2.9 or later. It is recommendable to also install a LaTeX editor. The introduction in Chapter 1 will explain, where to get the TeX software and editors. The Chapter 12 will guide you to further Internet resources.
An important tool is texdoc. It opens manuals and further documentation for you. texdoc is contained in TeX Live. MiKTeX provides a similar tool with the same name. texdoc is called at in Command Prompt by typing texdoc keyword. For packages and bundles, the keyword is usually just the name.
All the code examples in this book can be downloaded as described later in the section Customer support. So, you don't need to type the code, neither to do copy & paste. That's why we could split the codes into snippets to explain them step by step.
If you already know the basics of LaTeX and if you'd like to get quick and efficient solutions to your problems, this is the perfect book for you. If you are an advanced reader, you can use this book's example-driven format to take your skillset to the next level. Some familiarity with the basic syntax of LaTeX and how to use the editor of your choice for compiling is required.
In this book, you will find several headings that appear frequently (Getting ready, How to do it, How it works, There's more, and See also).
To give clear instructions on how to complete a recipe, we use these sections as follows:
This section tells you what to expect in the recipe, and describes how to set up any software or any preliminary settings required for the recipe.
This section contains the steps required to follow the recipe.
This section usually consists of a detailed explanation of what happened in the previous section.
This section consists of additional information about the recipe in order to make the reader more knowledgeable about the recipe.
This section provides helpful links to other useful information for the recipe.
In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.
Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Write a mathematical equation using the equation environment."
A block of code is set as follows:
New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Click on browse files to have filler images and a sample file."
Warnings or important notes appear in a box like this.
Tips and tricks appear like this.
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.
To send us general feedback, simply e-mail <[email protected]>, and mention the book's title in the subject of your message.
If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.
To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.
Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]> with a link to the suspected pirated material.
We appreciate your help in protecting our authors and our ability to bring you valuable content.
If you have a problem with any aspect of this book, you can contact us at <[email protected]>, and we will do our best to address the problem.
Documents can vary in size, format, sectioning, and design in general. You can use LaTeX for any document type. In this chapter, you will find recipes for different kinds of documents.
We will specifically cover the following topics:
LaTeX has been around for many years. Over time, developers and authors have contributed a lot of extensions to the LaTeX code base.
These extensions include the following:
These add-ons are incredibly valuable! They are one of the reasons for the enduring success of LaTeX. We all agree that learning LaTeX can be hard with its steep learning curve. However, if you don't reinvent the wheel, and start with a good template or class and a quality set of packages, you can quickly achieve great results.
The purpose of this book is to assist you in this regard.
To be able to work with LaTeX, you need install the following on your computer:
If you already have these installed, great! In that case, you can skip the next paragraphs and immediately proceed to the first recipe.
A PDF reader is probably already installed on your computer, such as the Foxit Reader, the Adobe Reader or the Preview app on the Mac. Furthermore, most editors come with an integrated PDF previewer. So, let's take a look at the TeX software and editors.
There are collections of TeX and LaTeX software that are ready to use and easy to install. Their websites provide information on installing and updating them. You may choose the download site for your system:
I recommend that you choose MacTeX if you have a Mac; otherwise, I recommend using TeX Live, since the support by the TUG is especially good.
Describing the setup is beyond the scope of this book. For TeX Live, you can find a step-by-step explanation with screenshots in the LaTeX Beginner's Guide by Packt Publishing. Generally, when you visit Internet addresses of the TeX distributions listed above, you can find detailed setup instructions.
Finally, on Linux, such as Ubuntu, Debian, Red Hat, Fedora, and SUSE versions, there's usually a TeX Live-based software package available via the operating system repositories. While it's usually not as up-to-date as an installation done via the TeX Live website or a TeX Live DVD, it's very easy to install using the Linux package manager, which you use to install any software usually.
There are many LaTeX editors, from small and quick to very feature-rich editors. The TeX distributions already provide the fine editor TeXworks, which I use. It can be set up together with TeX or with a package manager on Linux, and it can be downloaded from http://www.tug.org/texworks/.
I have a collection of the links to LaTeX editors and additional software on my blog, http://texblog.net/latex-link-archive/distribution-editor-viewer/, where you may look for alternative editors, which run on your operating system.
Additionally, there are pure online LaTeX editors, which run in a web browser, so you can use them even on tablets and smartphones. The most noticeable LaTeX editors are as follows:
If you need any help in setting up and using LaTeX or any other editor, you can visit a LaTeX web forum. In Chapter 12, Getting Support on the Internet, you can find links to these forums and see and how to use them. You can also find me on those forums.
If you would like to get help in learning LaTeX, you may take a look at LaTeX Beginner's Guide at https://www.packtpub.com/hardware-and-creative/latex-beginners-guide.
Once you have done the installation, you can launch the editor and start with a LaTeX recipe.
While LaTeX is great for big documents, it's just as useful for smaller ones, and you get all the features to work with. Writing down homework or producing a seminar handout, for example, doesn't need book-like chapters, and the layout would not be very spacious. So we will choose a document class that suits the task at hand best.
There are class bundles that cover commonly used document types. Every LaTeX installation contains the base bundle with standard classes. There are class files for articles, books, reports, letters, and more. It is stable stuff; it has not really been changed for many years. If you don't care about the latest style, this can be sufficient. It would even run on a ten-year-old LaTeX installation.
In this recipe, we will use a class of the KOMA-Script bundle. This is a set of classes that were originally designed with the aim of replacing the standard classes and providing more features. In contrast to the rather static base bundle, KOMA-Script has been extensively developed during recent years. It became feature-rich and got an excellent user interface. Parts of its functionality are provided in packages that can be used together with other classes as well. You can identify KOMA-Script classes and packages by the prefix scr. This prefix stands for script, which was the initial name of this bundle.
We will start with a complete small document, already using various features. This can be your template, into which you can add your own text later on.
While we go through the document step by step, you may open the complete code directly with your editor, so you don't need to type it. It is contained in the code bundle available at the book's page https://www.packtpub.com and at the book's page http://latex-cookbook.net. Perform the following steps to create a small document:
In the first line, we loaded the document class scrartcl. In square brackets, we set options for specifying an A4 paper size with one-sided printing and a font size of 12 pt. Finally, we chose to have a full line between paragraphs in the output so that we can easily distinguish paragraphs.
The default setting is no space between paragraphs and a small indentation at the beginning of each paragraph. Uncheck the parskip option to see it. We chose a paragraph skip because many people are used to it when working with e-mails, while indentation costs line space, which is a precious resource on small electronic devices.
Without further ado, we began the text with a table of contents. While numbered sections are started by the \section command, we can start unnumbered sections by using the starred version \section*. However, we used the KOMA-Script command \addsec for the first unnumbered section. That's because, in contrast with \section*, the \addsec command generates an entry in the table of contents.
An empty line tells LaTeX to make a paragraph break.
As bulleted lists are a good way to clearly present points, we used an itemize environment for this. All environments start with the \begin command and are ended with the \end command.
If you would like to have a numbered list, use the enumerate environment.
An equation environment has been used to display a formula that is automatically numbered. We used the \label command to set an invisible anchor mark so we could refer to it using its label name by the \ref command and get the equation number in the output.
Choosing label identifiers:
It is a good practice to use prefixes to identify kinds of labels, such as eq:name for equations, fig:name for figures, tab:name for tables, and so on. Avoid special characters in names, such as accented alphabets.
Small formulas within text lines have been enclosed in \( ... \), which provides inline math mode. Dollar symbols, $ ... $, can be used instead of \( ... \), which makes typing easier. However, the use of parentheses makes it easier to understand where the math mode starts and where it ends, which may be beneficial when many math expressions are scattered throughout the text.
For further information on math typesetting, refer to Chapter 10, Advanced Mathematics, specifically to the recipe Finetuning a formula.
The part of the document before the \begin{document} command is called the preamble. It contains global settings. By adding a few lines to our document preamble, we can improve our document and modify the general appearance. Chapter 2, Tuning the Text, starts with additions that are beneficial for small documents as well. They enable the direct input of accented characters and unicode symbols, and they improve justification and hyphenation.
In Chapter 3, Adjusting Fonts, you can find recipes for changing the fonts of either the whole document or of certain elements.
For further customization tasks, such as modifying page layout, and adding a title page, refer to the recipe Designing a book in the current chapter. We will take a look at such settings on the occasion of a book example.
When you plan to write a large document like a thesis, you have two choices: either choose a ready-made template, or set up your own document environment. If you have got limited time and need to start off with your thesis fast, a template can come to the rescue.
Beware of outdated and questionable templates found somewhere on the Internet. Look first at the date and at user opinions, such as on web forums. The age of a template is not a problem by itself, as LaTeX can run it the same way when it's been written. However, as LaTeX has developed, better solutions have come up over time. Legacy code may not benefit from it.
Some universities provide their own templates. That may be ok, because requirements would be met for sure; just check if it can be improved; for example, by replacing an obsolete package with its recommended successors.
A very good source for checking the quality of a template is the guide to obsolete commands and packages in LaTeX2e, which is also called l2tabu. You can open the English version by typing the texdoc l2tabuen command in Command Prompt, or by visiting http://texdoc.net/pkg/l2tabuen.
To be clear, the LaTeX base is stable and solid, but there are changes in community-contributed packages.
In the previous recipe, Writing a short text, we took the bottom-up approach and built a document from scratch, adding what we desired. Now we will go top-down; let's use and understand a complete template, removing what we don't need.
As we need to choose a template now, let's take a real gem. The ClassicThesis package by Prof. André Miede is a thesis template of very good quality. The design follows the classic guide to writing, The Elements of Typographic Style by Robert Bringhurst, we will see some particular points later in this recipe. Its implementation is thoughtful and modern. Originally written in 2006, it's maintained today as well, and shipped with TeX distributions.
Even if you would not use this specific template later, it shows how we can organize a large document.
Though the ClassicThesis package may already be installed in your TeX system, named classicthesis.sty, the whole template is an archive of files that should go into your working directory.
Download the ClassicThesis archive from CTAN by visiting http://www.ctan.org/tex-archive/macros/latex/contrib/classicthesis/.
Instead of fetching single files, choose to download it as a .zip file. Unzip it to where you keep your personal documents, in its own directory. This directory will be your thesis directory.
This package provides a ready-made structured filesystem of the main document, style file, settings file, and document parts such as the abstract and foreword, and also chapters in dedicated files. You can edit all files and fill in your own text.
The ClassicThesis.tex file is the main document. Its filler text is the template's manual; this allows us to compile the template immediately for looking at the output design. By compiling, you can also verify that your TeX installation can handle additional packages if you need to install any.
After unzipping, your directory will have the following structure:
Now follow these steps:
Don't worry if the font or margins don't please you yet. You can change the layout at any time. Let's take a closer look now, and then you will know how.
We will take a look at the functional lines of the main file, MyThesis.tex.
The document preamble is as follows:
The template is built on the KOMA-Script class, scrreprt. KOMA-Script as a LaTeX bundle is described in this chapter's first recipe, Writing a short text.
You can change the preset options to those you need, such as the font size or binding correction BCOR. There are many class options for adjusting the layout; you can read about them in the KOMA-Script manual. Type texdocscrguien in Command prompt, or visit http://texdoc.net/pkg/scrguien. We will discuss some of them in depth in our next recipe, Designing a book.
Loading of packages and all the remaining settings is done in a single file, classicthesis-config.tex. We will look at it later in this recipe.
The document body starts with the following commands:
The \frenchspacing line means that there's a single space following the punctuation after a sentence. Before the twentieth century, people stuffed extra space between sentences. LaTeX does this by default, or you can enter the \nonfrenchspacing line. The language is set to American English. Actually, you would need the \selectlanguage line only if you need to switch between languages for correct hyphenation.
We start with Roman page numbers. The plain page style means that we have no page headers for now, while page numbers are centered in the page footer.
Then, we look at the front matter, which is the part of the document where the formal parts before the actual content go:
Each commonly-required part of the front matter has its own file. Just edit the file as you need it, comment out by inserting a % symbol at the beginning of a line, or remove what you don't need. The \cleardoublepage line ends a page, but also ensures that the next page starts on the right-hand side. This can mean inserting an empty page if necessary; that is, a double page break. This will not happen if you change the twoside option to oneside, so you can keep the \cleardoublepage line, which will act like a \clearpage command when the oneside option is set.
Finally, we got the main matter:
In the main matter, we use Arabic page numbers. The \pagenumbering line resets the page number to 0.
The thesis is divided into parts. Each one is split into chapters. You can omit the \part lines if you want your highest sectioning level to be the chapter level.
In the Chapters subdirectory, each chapter has its own .tex file; so, you can easily handle a large amount of text. Furthermore, you can use the \includeonly command to compile just the selected chapters for speeding up writing.
Finally, the main document ends with the back matter:
The command \appendix resets the sectioning counters and changes them to alphabetic numbering, that is, the following chapters will be numbered A, B, and so on. Like in the front matter, the parts of the appendix are divided into several files.
Let's take a look at the configuration file. Open the classicthesis-config.tex file. The whole thing would take too much space in the book, so let's just take a look at some sample lines:
Here, you can fill in your own data. Besides being printed on the title page, this data will be used as metadata for the generated PDF document. There are more supported macros here, such as \mySubtitle, \myProf, and many more. The \xspace takes care of proper spacing after such a macro; that is, it inserts a space when there's no punctuation mark following it.
As mentioned, this template contains design decisions inspired by the book The Elements of Typographical Style by Robert Bringhurst. The most notable design decisions are as follows:
Explore the classicthesis-config.tex file further to make modifications. Like in the previous recipe, we apply document-wide changes within the preamble, and here, we do it in this file.
We will now take a look at the selected lines of that configuration file.
You might have noticed that special characters, such as accented characters, don't work directly in the input. Scroll to this line:
This is another way of setting the input encoding. Refer to the recipe Inputting accented characters in Chapter 2, Tuning the Text, to understand the topic of encoding. Here, you should change the latin9 option to utf8 if you wish to use an UTF-8-capable system and editor. The latin9 option is typically used by older editors on Windows. There are other encodings. If you would need another one, use texdoc inputenc, or visit http://texdoc.net/pkg/inputenc to take a look at the available options.
The design is not set in stone, you may adjust it all. If you would like to see the page numbers in the table of contents right aligned, set a single option. Look at the very beginning of the classicthesis-config.tex file:
Here, you can find the options for the actual classicthesis package. Simply add the dottedtoc option to this comma separated list. These options, among others, are documented in the template's manual. You can open it by typing texdocclassicthesis in Command Prompt, or at http://texdoc.net/pkg/classicthesis. (editor: please apply inline code formatting correctly, and URL formatting)
To fulfill requirements of page margins or to implement your own layout ideas, you can specify exact page dimensions by loading the geometry package. Consider the following example:
Here, you can also provide a value for the space that you leave for the binding and all margins you like. It's good practice to have a visible inner margin set to half the value of the outer margin, because margins will be added in the middle. For single-sided printing, with the oneside option, use left=... and right=... for the defining the margins instead of inner and outer.
Place such a line at the end of the classicthesis-config.tex file so that it will override the original settings.
In the classicthesis-config.tex file, you can change the appearance of captions of figures and tables:
The template loads the caption package. It provides a lot of features for fine-tuning captions. For now, the caption texts are indented so they will hang under the first line, and they will have a smaller font size than the normal text. By adding simple options, you can further adjust the appearance; for example, by adding the labelfont=it line, you can get italicized caption labels. Refer to the caption manual to learn more. As usual, you can open it via texdoccaption or at http://texdoc.net/pkg/caption.
While the caption
