Chapter 11 Basic Formatting
The PreTeXt Principles begin with “PreTeXt is a markup language that captures the structure of textbooks and research papers” (Item 1.1.1:1). By a markup language, we mean that the syntax describes the structure of the document and not the presentation of the document. Thus, PreTeXt does not provide, for instance, a way to make text bold or italic or in a larger font. If an author seeks a specific type of local typesetting, then they need to pause and think about the reason for that typesetting. Is the reason to emphasize a word or phrase? Is the reason to alert the reader to a common mistake? Is it to designate that a word is a new term being defined by the author? There are ways to mark up such structural ideas in PreTeXt, and authors should conscientiously ensure that they use this markup.
To illustrate some of the key structural markup that leads to formatting, we include the listing and paragraph below.
<!--********************************************************************
Copyright (C) 2019-2026 Robert A. Beezer
This file is part of PreTeXt.
PreTeXt is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 or version 3 of the
License (at your option).
PreTeXt is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************-->
<p>
This is a new <term>piece of terminology</term>.
Here is a word we have chosen to <em>emphasize</em>.
<alert>This is an alert to the reader!</alert> This is a piece of
<c>code typeset in a different font</c>.
</p>
The code in Listing 11.0.1 produces the following output:
This is a new piece of terminology. Here is a word we have chosen to emphasize. This is an alert to the reader! This is a piece of
code typeset in a different font.
