Now it's time for an overview of what the typical LaTeX document looks like before and after it's compiled into an output format, such as PDF.
I designed these before-and-after graphics to be seen side-by-side. If they do not appear so, you can widen your browser window until they are.
Somewhere in the preamble you can conveniently place your various definitions/macros, which are user-defined bits of TeX code or font definitions. I should warn the reader that because I started in TeX with Plain TeX, some of my macros/definitions are not always preferred LaTeX standard, as I have sometimes kept the old way of doing things. I don't even know if the font definition is standard LaTeX, but it still works. What follows are just a few of my standard set of macros (about a twentieth of them) that I keep in the preamble of each of my articles, whether I use them in that article or not. In Plain TeX, one needed to make a user definition with the '\def' command. Out of laziness, I have kept most of these rather than to take the time to convert them. I managed to convert the four that are displayed below so as not to appear as a troglodyte to my audience. (I have also retained such commands as '\vskip' and '\hskip', which work just fine in LaTeX.)
\font\ninerm=cmr9By default, the article style will indent the first word of the abstract. I don't this feature, so I tell it not to indent with a '\noindent' command, or, by using my own macro, the '\no' command, which I made using the command '\newcommand{\no}{\noindent}'.
\newcommand{\no}{\noindent}
\newcommand{\object}{o\kern-.15pt{}b\kern-.3pt{}ject}
\newcommand{\objective}{o\kern-.15pt{}b\kern-.3pt{}jective}
\newcommand{\sectionskip}{\vskip.2in}
One thing about TeX I don't like is how it kerns, or spaces, the letters in some words. (Admittedly, this is not a large percentage of English words.) The command
\newcommand{\objective}{o\kern-.15pt{}b\kern-.3pt{}jective}is designed to 'fix' the spacing of letters in the word objective. One of the really nice feature of TeX is that is allows us nearly total control of the vertical and horizontal spacing with simple commands. I have not found this to be so with WYSIWYG programs, such as Word.
Mathematics is an immensely rich subject in terms of its use of fonts, mathematical symbols, special structures, such as lists, arrays, matrices, cases, etc. Putting all this stuff on a page so that it looks good is not easy feat, not even with the aid of special packages that assist in the effort. Basic LaTeX is a vast improvement of the convenience feature provided by Plain TeX, but even it needs help, which is provided by the ease of incorporating additional features built into packages. The few I've list below is just a small number of possible package available.
One could ask, "Why don't they just make a LaTeX version that already includes all those packages?" I can think of three reasons not to: First, most people will not use more than a few of those packages at a time, so why load all of them into memory. Second, they may have some conflicting definitions. Third, since packages are made by different people, you would have to obtain 'permission' from all those people to use their packages, and then coordinate the maintenance of these packages.
Fonts are a special case. These are never easy to construct, so using packages such as amssymb (provides greek font and many math markups) or amsfonts (among other things, this allows us to use blackboard bold with \mathbb) can be both a timesaver and an improvement in the looks of your fonts.
One can tell the TeX compiler to incorporate a slew of packages that provide access to a plethora of handy macros to use to produce even more sophisticated TeX output. Below, I've listed a few of the packages that I use. I commented out all the packages I knew for sure I didn't need for this tiny TeX file to work. (And, yes, there is a learning curve to all of this, of course.) I'll go into more detail about the features of these packages elsewhere.
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsfonts}
%\usepackage{mhchem}
%\usepackage{graphicx}
%\usepackage{cancel}
%\usepackage{float}
%\usepackage{gensymb}
\begin{document}we can start to print stuff. Now, clearly my one-page document doesn't need sections, but I put one section command in it for demonstration purposes. LaTeX automatically numbers sections and will automatically renumber sections if you add or subtract them anywhere in the document. The command used to establish the first section was
\section{Introduction}
\begin{verbatim}I like this environment for a few reasons. First, it uses a different font than the default. Second, it indents the text. And, third, it treats all characters as merely text, so you never have to worry about 'escaping' markup characters, such as '\' and '_'.
Preamble
Document EnvironmentThe Preamble is everything up to the command \begin{document}
The Document Environment is everything from the \begin{document}
to the \end{document}
\end{verbatim}
\begin{thebibliography}{9}
\bibitem{Atkins} P.\ Atkins and L.\ Jones.\ {\it Chemical Principles: The Quest for Insight}, 3rd Ed.\ Freeman (2005).
\bibitem{Silberberg} M.\ S.\ Silberberg.\ {\it Chemistry: The Molecular Nature of Matter and Change} 4th Ed.\ McGraw-Hill (2006).
\end{thebibliography}
And, finally, there's the command
\end{document}which terminates the official document. Any text after that is simply ignored. And this brings us to the end of this webpage.