- LaTeX Cookbook
- Stefan Kottwitz
- 876字
- 2021-07-09 21:24:57
Introduction
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:
- Document class: This is a style file which is the frame of your document. It usually comes with meaningful default settings that can be changed via options when loading it. Its macros can be customized by the
\renewcommand
command. It often provides commands for authors to modify settings. - Package: This is a style file with a specific purpose that can be loaded in addition to the document class. Packages can be combined. Most of the time, we load many packages using the
\usepackage
command. - Bundle: This is a set of closely related packages or classes. In our first recipe, Writing a short text, you will get to know some bundles.
- Template: This is a document filled with dummy text, which you can use it as a starting point, and just fill in your own headings, texts, formulas, and images. We will take a look at a template in our second recipe, Writing a thesis.
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.
Getting ready
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:
- TeX Live: At http://tug.org/texlive/, you can find download information and installation instructions for the cross-platform TeX distribution that runs on Windows, Linux, Mac OS X, and other Unix systems. It is supported by the TeX Users Group (TUG).
- MacTeX: This is based on TeX Live and has been significantly customized for Mac OS X. The basic information is available at http://www.tug.org/mactex/.
- MiKTeX: The download and documentation of that Windows-specific distribution can be found at http://www.miktex.org/.
- proTeXt: This is for Windows only, and it is derived from MiKTeX, but proTeXt is more user-friendly during installation. Its home page can be found at http://www.tug.org/protext/.
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:
- https://www.overleaf.com, with real-time collaborative editing and a rich text modes which renders headings, equations and further formatting directly in the editor
- https://www.sharelatex.com, also with real-time collaboration and revision history for tracking changes
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.
- Clojure Programming Cookbook
- 零基礎學Visual C++第3版
- Docker and Kubernetes for Java Developers
- Java高并發核心編程(卷2):多線程、鎖、JMM、JUC、高并發設計模式
- 小創客玩轉圖形化編程
- C++面向對象程序設計(微課版)
- SQL Server與JSP動態網站開發
- Mastering Python Design Patterns
- Qt5 C++ GUI Programming Cookbook
- Java程序設計與項目案例教程
- Android Studio Cookbook
- CodeIgniter Web Application Blueprints
- Instant Apache Camel Messaging System
- Ubuntu Server Cookbook
- Go語言編程之旅:一起用Go做項目